feat(durable): replicate storages as a commit log

Every built-in storage implements ReplayableStorage: head(), replay() at an explicit sequence, and export() of the current state as a log that replays to the same reads. SQLite schema version 3 adds sequence indexes so export streams. @earendil-works/pi-durable/sync adds ReplicatingStorage, which appends each committed batch to an outbox with fork copies resolved, compactRecords(), and versioned JSON log lines.
This commit is contained in:
Armin Ronacher 2026-10-21 14:26:19 +02:00
parent 89e309581b
commit 4c25119f54
24 changed files with 1586 additions and 33 deletions

View file

@ -60,6 +60,12 @@
"import": "./dist/images/cloudflare.js",
"default": "./dist/images/cloudflare.js"
},
"./sync": {
"source": "./src/sync/index.ts",
"types": "./dist/sync/index.d.ts",
"import": "./dist/sync/index.js",
"default": "./dist/sync/index.js"
},
"./storage/memory": {
"source": "./src/storage/memory.ts",
"types": "./dist/storage/memory.d.ts",