mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
style: enable import-x/no-duplicates (#6279)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import type { AwarenessProvider } from '@toeverything/infra';
|
||||
import type { Awareness } from 'y-protocols/awareness';
|
||||
import {
|
||||
applyAwarenessUpdate,
|
||||
type Awareness,
|
||||
encodeAwarenessUpdate,
|
||||
removeAwarenessStates,
|
||||
} from 'y-protocols/awareness';
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import {
|
||||
deleteBlobMutation,
|
||||
fetcher,
|
||||
fetchWithTraceReport,
|
||||
findGraphQLError,
|
||||
getBaseUrl,
|
||||
listBlobsQuery,
|
||||
setBlobMutation,
|
||||
} from '@affine/graphql';
|
||||
import { fetcher } from '@affine/graphql';
|
||||
import { type BlobStorage, BlobStorageOverCapacity } from '@toeverything/infra';
|
||||
import type { BlobStorage } from '@toeverything/infra';
|
||||
import { BlobStorageOverCapacity } from '@toeverything/infra';
|
||||
|
||||
import { bufferToBlob } from '../utils/buffer-to-blob';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import { type DocServer, throwIfAborted } from '@toeverything/infra';
|
||||
import type { DocServer } from '@toeverything/infra';
|
||||
import { throwIfAborted } from '@toeverything/infra';
|
||||
import type { Socket } from 'socket.io-client';
|
||||
|
||||
import { getIoManager } from '../utils/affine-io';
|
||||
|
||||
@@ -2,16 +2,16 @@ import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import {
|
||||
createWorkspaceMutation,
|
||||
deleteWorkspaceMutation,
|
||||
fetcher,
|
||||
findGraphQLError,
|
||||
getWorkspacesQuery,
|
||||
} from '@affine/graphql';
|
||||
import { fetcher } from '@affine/graphql';
|
||||
import { DocCollection } from '@blocksuite/store';
|
||||
import type { WorkspaceListProvider } from '@toeverything/infra';
|
||||
import {
|
||||
type BlobStorage,
|
||||
type WorkspaceInfo,
|
||||
type WorkspaceMetadata,
|
||||
import type {
|
||||
BlobStorage,
|
||||
WorkspaceInfo,
|
||||
WorkspaceListProvider,
|
||||
WorkspaceMetadata,
|
||||
} from '@toeverything/infra';
|
||||
import { globalBlockSuiteSchema } from '@toeverything/infra';
|
||||
import { difference } from 'lodash-es';
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import type { WorkspaceFactory } from '@toeverything/infra';
|
||||
import type { ServiceCollection } from '@toeverything/infra';
|
||||
import type { ServiceCollection, WorkspaceFactory } from '@toeverything/infra';
|
||||
import {
|
||||
AwarenessContext,
|
||||
AwarenessProvider,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
type GlobalState,
|
||||
type Memento,
|
||||
type Workspace,
|
||||
type WorkspaceLocalState,
|
||||
wrapMemento,
|
||||
import type {
|
||||
GlobalState,
|
||||
Memento,
|
||||
Workspace,
|
||||
WorkspaceLocalState,
|
||||
} from '@toeverything/infra';
|
||||
import { wrapMemento } from '@toeverything/infra';
|
||||
|
||||
export class WorkspaceLocalStateImpl implements WorkspaceLocalState {
|
||||
wrapped: Memento;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type BlobStorage } from '@toeverything/infra';
|
||||
import type { BlobStorage } from '@toeverything/infra';
|
||||
import { createStore, del, get, keys, set } from 'idb-keyval';
|
||||
|
||||
import { bufferToBlob } from '../utils/buffer-to-blob';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { apis } from '@affine/electron-api';
|
||||
import { assertExists } from '@blocksuite/global/utils';
|
||||
import { type BlobStorage } from '@toeverything/infra';
|
||||
import type { BlobStorage } from '@toeverything/infra';
|
||||
|
||||
import { bufferToBlob } from '../utils/buffer-to-blob';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type BlobStorage } from '@toeverything/infra';
|
||||
import type { BlobStorage } from '@toeverything/infra';
|
||||
|
||||
export const predefinedStaticFiles = [
|
||||
'029uztLz2CzJezK7UUhrbGiWUdZ0J7NVs_qR6RDsvb8=',
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import type { ByteKV, ByteKVBehavior, DocStorage } from '@toeverything/infra';
|
||||
import {
|
||||
type DBSchema,
|
||||
type IDBPDatabase,
|
||||
type IDBPObjectStore,
|
||||
openDB,
|
||||
} from 'idb';
|
||||
import type { DBSchema, IDBPDatabase, IDBPObjectStore } from 'idb';
|
||||
import { openDB } from 'idb';
|
||||
import { mergeUpdates } from 'yjs';
|
||||
|
||||
import { BroadcastChannelDocEventBus } from './doc-broadcast-channel';
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
import { apis } from '@affine/electron-api';
|
||||
import {
|
||||
AsyncLock,
|
||||
type ByteKV,
|
||||
type ByteKVBehavior,
|
||||
type DocStorage,
|
||||
MemoryDocEventBus,
|
||||
} from '@toeverything/infra';
|
||||
import {
|
||||
type DBSchema,
|
||||
type IDBPDatabase,
|
||||
type IDBPObjectStore,
|
||||
openDB,
|
||||
} from 'idb';
|
||||
import type { ByteKV, ByteKVBehavior, DocStorage } from '@toeverything/infra';
|
||||
import { AsyncLock, MemoryDocEventBus } from '@toeverything/infra';
|
||||
import type { DBSchema, IDBPDatabase, IDBPObjectStore } from 'idb';
|
||||
import { openDB } from 'idb';
|
||||
|
||||
export class SqliteDocStorage implements DocStorage {
|
||||
constructor(private readonly workspaceId: string) {}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { apis } from '@affine/electron-api';
|
||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import { DocCollection } from '@blocksuite/store';
|
||||
import type { WorkspaceListProvider } from '@toeverything/infra';
|
||||
import {
|
||||
type BlobStorage,
|
||||
type WorkspaceInfo,
|
||||
type WorkspaceMetadata,
|
||||
import type {
|
||||
BlobStorage,
|
||||
WorkspaceInfo,
|
||||
WorkspaceListProvider,
|
||||
WorkspaceMetadata,
|
||||
} from '@toeverything/infra';
|
||||
import { globalBlockSuiteSchema } from '@toeverything/infra';
|
||||
import { difference } from 'lodash-es';
|
||||
|
||||
Reference in New Issue
Block a user