fix: resolve cycle imports and prevent it by oxlint (#5103)

This commit is contained in:
LongYinan
2023-11-29 04:43:27 +00:00
parent b73e87e4ad
commit a843dcd851
25 changed files with 309 additions and 1034 deletions
@@ -0,0 +1,7 @@
export const MANUALLY_STOP = 'manually-stop';
export enum SyncEngineStep {
Stopped = 0,
Syncing = 1,
Synced = 2,
}
@@ -3,16 +3,9 @@ import { Slot } from '@blocksuite/global/utils';
import type { Doc } from 'yjs';
import type { Storage } from '../storage';
import { MANUALLY_STOP, SyncEngineStep } from './consts';
import { SyncPeer, type SyncPeerStatus, SyncPeerStep } from './peer';
export const MANUALLY_STOP = 'manually-stop';
export enum SyncEngineStep {
Stopped = 0,
Syncing = 1,
Synced = 2,
}
export interface SyncEngineStatus {
step: SyncEngineStep;
local: SyncPeerStatus | null;
@@ -14,5 +14,6 @@
*
*/
export * from './consts';
export * from './engine';
export * from './peer';
@@ -7,7 +7,7 @@ import { applyUpdate, encodeStateAsUpdate, encodeStateVector } from 'yjs';
import { mergeUpdates, type Storage } from '../storage';
import { AsyncQueue } from '../utils/async-queue';
import { throwIfAborted } from '../utils/throw-if-aborted';
import { MANUALLY_STOP } from './engine';
import { MANUALLY_STOP } from './consts';
export enum SyncPeerStep {
Stopped = 0,