refactor(core): move infra modules to core (#9207)
This commit is contained in:
@@ -1,20 +1,16 @@
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import type {
|
||||
Job,
|
||||
JobQueue,
|
||||
WorkspaceLocalState,
|
||||
WorkspaceService,
|
||||
} from '@toeverything/infra';
|
||||
import type { Job, JobQueue } from '@toeverything/infra';
|
||||
import {
|
||||
Entity,
|
||||
IndexedDBIndexStorage,
|
||||
IndexedDBJobQueue,
|
||||
JobRunner,
|
||||
LiveData,
|
||||
WorkspaceDBService,
|
||||
} from '@toeverything/infra';
|
||||
import { map } from 'rxjs';
|
||||
|
||||
import { WorkspaceDBService } from '../../db';
|
||||
import type { WorkspaceLocalState, WorkspaceService } from '../../workspace';
|
||||
import { blockIndexSchema, docIndexSchema } from '../schema';
|
||||
import { createWorker, type IndexerWorker } from '../worker/out-worker';
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export { DocsSearchService } from './services/docs-search';
|
||||
|
||||
import { type Framework } from '@toeverything/infra';
|
||||
|
||||
import {
|
||||
type Framework,
|
||||
WorkspaceLocalState,
|
||||
WorkspaceScope,
|
||||
WorkspaceService,
|
||||
} from '@toeverything/infra';
|
||||
|
||||
} from '../workspace';
|
||||
import { DocsIndexer } from './entities/docs-indexer';
|
||||
import { DocsSearchService } from './services/docs-search';
|
||||
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import { toURLSearchParams } from '@affine/core/modules/navigation';
|
||||
import type { ReferenceParams } from '@blocksuite/blocks';
|
||||
import type { WorkspaceService } from '@toeverything/infra';
|
||||
import {
|
||||
fromPromise,
|
||||
OnEvent,
|
||||
Service,
|
||||
WorkspaceEngineBeforeStart,
|
||||
} from '@toeverything/infra';
|
||||
import { fromPromise, OnEvent, Service } from '@toeverything/infra';
|
||||
import { isEmpty, omit } from 'lodash-es';
|
||||
import { map, type Observable, switchMap } from 'rxjs';
|
||||
import { z } from 'zod';
|
||||
|
||||
import type { WorkspaceService } from '../../workspace';
|
||||
import { WorkspaceEngineBeforeStart } from '../../workspace';
|
||||
import { DocsIndexer } from '../entities/docs-indexer';
|
||||
|
||||
@OnEvent(WorkspaceEngineBeforeStart, s => s.handleWorkspaceEngineBeforeStart)
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
} from '@blocksuite/affine/store';
|
||||
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
|
||||
import type { DeltaInsert } from '@blocksuite/inline';
|
||||
import { Document, getAFFiNEWorkspaceSchema } from '@toeverything/infra';
|
||||
import { Document } from '@toeverything/infra';
|
||||
import { toHexString } from 'lib0/buffer.js';
|
||||
import { digest as lib0Digest } from 'lib0/hash/sha256';
|
||||
import { difference, uniq } from 'lodash-es';
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
Text as YText,
|
||||
} from 'yjs';
|
||||
|
||||
import { getAFFiNEWorkspaceSchema } from '../../workspace/global-schema';
|
||||
import type { BlockIndexSchema, DocIndexSchema } from '../schema';
|
||||
import type {
|
||||
WorkerIngoingMessage,
|
||||
|
||||
Reference in New Issue
Block a user