feat(storage): domain data form — typed schemas over opaque KV units
ctx.storage.domain opens declared domains: zod value schemas parsed at the durable boundary, one write chain per domain (update(fn) is the only read-modify-write), domain/changed emitted per record after durability (new snapshot + operation, no old value, per repo event convention). Domain-to-backend routing is configuration (default backend + per-domain overrides); unknown names and missing facets fail loud. Ships the MemoryStorageBackend test helper and a runtime invariant asserting every change event matches the in-memory state.
This commit is contained in:
27
packages/storage/domain/tsconfig.json
Normal file
27
packages/storage/domain/tsconfig.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "lib/types"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../vendor/cosmokit"
|
||||
},
|
||||
{
|
||||
"path": "../../../vendor/cordis"
|
||||
},
|
||||
{
|
||||
"path": "../../../vendor/schemastery"
|
||||
},
|
||||
{
|
||||
"path": "../storage"
|
||||
},
|
||||
{
|
||||
"path": "../../support/invariants"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user