mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-01 09:30:01 +08:00
feat(nbstore): rename SyncStorage to DocSyncStorage (#10751)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import type { Observable } from 'rxjs';
|
||||
import { combineLatest, map, of, ReplaySubject, share } from 'rxjs';
|
||||
|
||||
import type { DocStorage, SyncStorage } from '../../storage';
|
||||
import type { DocStorage, DocSyncStorage } from '../../storage';
|
||||
import { DummyDocStorage } from '../../storage/dummy/doc';
|
||||
import { DummySyncStorage } from '../../storage/dummy/sync';
|
||||
import { DummyDocSyncStorage } from '../../storage/dummy/doc-sync';
|
||||
import { MANUALLY_STOP } from '../../utils/throw-if-aborted';
|
||||
import type { PeerStorageOptions } from '../types';
|
||||
import { DocSyncPeer } from './peer';
|
||||
@@ -68,7 +68,7 @@ export class DocSyncImpl implements DocSync {
|
||||
|
||||
constructor(
|
||||
readonly storages: PeerStorageOptions<DocStorage>,
|
||||
readonly sync: SyncStorage
|
||||
readonly sync: DocSyncStorage
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -80,7 +80,7 @@ export class DocSyncImpl implements DocSync {
|
||||
local: new DummyDocStorage(),
|
||||
remotes: {},
|
||||
},
|
||||
new DummySyncStorage()
|
||||
new DummyDocSyncStorage()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { nanoid } from 'nanoid';
|
||||
import { Observable, ReplaySubject, share, Subject } from 'rxjs';
|
||||
import { diffUpdate, encodeStateVectorFromUpdate, mergeUpdates } from 'yjs';
|
||||
|
||||
import type { DocStorage, SyncStorage } from '../../storage';
|
||||
import type { DocStorage, DocSyncStorage } from '../../storage';
|
||||
import { AsyncPriorityQueue } from '../../utils/async-priority-queue';
|
||||
import { ClockMap } from '../../utils/clock';
|
||||
import { isEmptyUpdate } from '../../utils/is-empty-update';
|
||||
@@ -147,7 +147,7 @@ export class DocSyncPeer {
|
||||
constructor(
|
||||
readonly peerId: string,
|
||||
readonly local: DocStorage,
|
||||
readonly syncMetadata: SyncStorage,
|
||||
readonly syncMetadata: DocSyncStorage,
|
||||
readonly remote: DocStorage,
|
||||
readonly options: DocSyncPeerOptions = {}
|
||||
) {}
|
||||
|
||||
Reference in New Issue
Block a user