- Every KV storage emits change events (base class owns writeMany/removeMany/ writeIfAbsent; implementations provide protected apply* methods) - KVStorageHttpServer streams changes over SSE (GET /events) with a resumable history; KVStorageHttp.watch() subscribes and resumes via Last-Event-ID - KVStorageIndexedDB for local persistence - KVStorageComposite keeps replicas of a source in sync: local reads, resume instead of full sync, offline outbox replayed in order, echo tracking - Values may contain bigint/Uint8Array (Extended JSON over the network) - Vendor sse-session, event-emitter and extended-json (no runtime deps) - Freeze child nodes so shadowed state on children fails loudly - CI on Node 22, 24 and 26 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qxbkp4tA7G5SCWjzWuxmE
39 lines
893 B
JSON
39 lines
893 B
JSON
{
|
|
"name": "potential-storage",
|
|
"version": "0.1.0",
|
|
"description": "Layered TypeScript storage: KV -> Events -> Documents",
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=22"
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.build.json",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "tsc --noEmit && vitest run",
|
|
"test:watch": "vitest",
|
|
"bench": "vitest bench --run",
|
|
"test:only": "vitest run",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check ."
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.20.5",
|
|
"fake-indexeddb": "^6.2.6",
|
|
"fast-check": "^4.10.2",
|
|
"prettier": "^3.9.10",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^3.2.7"
|
|
}
|
|
}
|