Break KVStorageComposite into focused classes
- KVReplicaSet: seed, apply, local scan, diff against the source, sync meta - KVOutbox: persisted offline queue with in-order replay (load() resumes it) - utils: KeyRange (also used for server authorization), KeyCounter, SerialQueue (also used by KVStorageHttp and the event-sourced store), RetryTimer (separate timers for sync and replay; previously one shared timer could cancel the other's retry) The composite now only orchestrates. Behaviour unchanged; new unit tests for the building blocks and the outbox. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qxbkp4tA7G5SCWjzWuxmE
This commit is contained in:
@@ -4,6 +4,8 @@ export * from './kv-storage/kv-storage-http.js'
|
||||
export * from './kv-storage/kv-storage-http-server.js'
|
||||
export * from './kv-storage/kv-storage-indexeddb.js'
|
||||
export * from './kv-storage/kv-storage-composite.js'
|
||||
export * from './kv-storage/kv-replica-set.js'
|
||||
export * from './kv-storage/kv-outbox.js'
|
||||
export * from './event-storage/base-event-storage.js'
|
||||
export * from './event-storage/event-storage-kv.js'
|
||||
export * from './document-storage/base-document-storage.js'
|
||||
@@ -17,6 +19,10 @@ export * from './utils/errors.js'
|
||||
export * from './utils/event-emitter.js'
|
||||
export * from './utils/extended-json.js'
|
||||
export * from './utils/hex.js'
|
||||
export * from './utils/key-counter.js'
|
||||
export * from './utils/key-range.js'
|
||||
export * from './utils/retry-timer.js'
|
||||
export * from './utils/serial-queue.js'
|
||||
export * from './utils/request-auth.js'
|
||||
export * from './utils/json.js'
|
||||
export * from './utils/keys.js'
|
||||
|
||||
Reference in New Issue
Block a user