@noy-db/hub 0.7.0-pre.13 → 0.7.0-pre.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +108 -0
- package/README.md +4 -3
- package/dist/{api-UE2XQKDN.js → api-JPZT6BDD.js} +1 -2
- package/dist/as/index.js +3 -4
- package/dist/as/index.js.map +1 -1
- package/dist/at/index.js +0 -1
- package/dist/attestation/index.js +6 -7
- package/dist/attestation/index.js.map +1 -1
- package/dist/{backup-R6A4VZRX.js → backup-AKWIMYWU.js} +1 -2
- package/dist/{backup-R6A4VZRX.js.map → backup-AKWIMYWU.js.map} +1 -1
- package/dist/blobs/index.js +0 -1
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +3 -4
- package/dist/broker/index.js.map +1 -1
- package/dist/by/index.js +0 -1
- package/dist/cargo/index.js +10 -11
- package/dist/{chunk-5FUULQ6F.js → chunk-2HVILGVR.js} +6 -6
- package/dist/{chunk-DJ3LNNZQ.js → chunk-3LK2XZCW.js} +2 -2
- package/dist/{chunk-BWXGSSFX.js → chunk-4SZMZAYN.js} +79 -16
- package/dist/chunk-4SZMZAYN.js.map +1 -0
- package/dist/{chunk-PQKG5AHH.js → chunk-6X6SEMEE.js} +4 -2
- package/dist/{chunk-PQKG5AHH.js.map → chunk-6X6SEMEE.js.map} +1 -1
- package/dist/{chunk-E2MYJGSG.js → chunk-AMODH7AU.js} +2 -2
- package/dist/{chunk-B2ZSGYSF.js → chunk-B2KCRDJM.js} +3 -3
- package/dist/{chunk-TO3EQ7HF.js → chunk-BLN54W3L.js} +2 -2
- package/dist/{chunk-IHFXR2VQ.js → chunk-BOBFL5TW.js} +2 -2
- package/dist/{chunk-ZVCC36XQ.js → chunk-DRB6IHPS.js} +55 -55
- package/dist/{chunk-AJQY44CE.js → chunk-EKVNVJVV.js} +3 -20
- package/dist/chunk-EKVNVJVV.js.map +1 -0
- package/dist/{chunk-ZR2YMODS.js → chunk-EKZ6VZYF.js} +2 -2
- package/dist/{chunk-RTYJRFQO.js → chunk-EWPRPP3M.js} +1 -1
- package/dist/{chunk-VGICZPVE.js → chunk-FUJSIP4K.js} +2 -2
- package/dist/{chunk-PKJ43CMD.js → chunk-NLOLF6LD.js} +2 -2
- package/dist/{chunk-SXCYYMVS.js → chunk-NOSRK3ZZ.js} +5 -5
- package/dist/{chunk-COTPDJR5.js → chunk-OMB2ZKIT.js} +8 -8
- package/dist/{chunk-Y4MJQ2UG.js → chunk-QQ2YMQZU.js} +2 -2
- package/dist/{chunk-URHRIAV6.js → chunk-REDOOY2Q.js} +2 -2
- package/dist/chunk-REDOOY2Q.js.map +1 -0
- package/dist/{chunk-YCXICMOY.js → chunk-RJ7NN2UR.js} +2 -2
- package/dist/{chunk-PDD75NUZ.js → chunk-SMH6SRX7.js} +2 -2
- package/dist/{chunk-QHW35ZON.js → chunk-TGPST6FK.js} +2 -2
- package/dist/{chunk-BMELYFHU.js → chunk-V2PNPF6J.js} +3 -3
- package/dist/{chunk-BERJ4AWW.js → chunk-VGXZT72I.js} +2 -2
- package/dist/{chunk-2Z47NMFK.js → chunk-WZW37ZHL.js} +2 -2
- package/dist/classified/index.js +1 -2
- package/dist/{classified-marker-67HBIJMZ.js → classified-marker-OO65UYXN.js} +3 -5
- package/dist/{classified-marker-67HBIJMZ.js.map → classified-marker-OO65UYXN.js.map} +1 -1
- package/dist/{collection-facade-4ACKIDDY.js → collection-facade-VOWW732S.js} +3 -4
- package/dist/{computed-LSEZYRJS.js → computed-VPOKQK4N.js} +1 -2
- package/dist/consent/index.js +0 -1
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +0 -1
- package/dist/crdt/index.js +0 -1
- package/dist/crdt/index.js.map +1 -1
- package/dist/custody/index.js +1 -2
- package/dist/{dead-filter-M3NZUWBZ.js → dead-filter-OMMVBAKZ.js} +2 -3
- package/dist/{dead-filter-M3NZUWBZ.js.map → dead-filter-OMMVBAKZ.js.map} +1 -1
- package/dist/debug/index.js +0 -1
- package/dist/debug/index.js.map +1 -1
- package/dist/{delegation-OLJUWTVA.js → delegation-VRYMQRCF.js} +1 -2
- package/dist/{delegation-OLJUWTVA.js.map → delegation-VRYMQRCF.js.map} +1 -1
- package/dist/derivations/index.js +3 -4
- package/dist/{derive-LY47HG7Q.js → derive-HHBRFS2U.js} +2 -3
- package/dist/directory/index.js +0 -1
- package/dist/{dispatch-MSTR5VBI.js → dispatch-DC3LQJ3S.js} +6 -7
- package/dist/{dispatch-MSTR5VBI.js.map → dispatch-DC3LQJ3S.js.map} +1 -1
- package/dist/{dispatch-PDP5TA73.js → dispatch-GGFBWQU7.js} +5 -7
- package/dist/{dispatch-PDP5TA73.js.map → dispatch-GGFBWQU7.js.map} +1 -1
- package/dist/{enclave-4YBQK77G.js → enclave-VM2YQONI.js} +1 -2
- package/dist/{executor-TOLPBHOC.js → executor-5NIMLSKZ.js} +1 -2
- package/dist/{executor-YDDC5XGY.js → executor-5XJNV5H5.js} +1 -2
- package/dist/{executor-MZJXBWNM.js → executor-AQVXV5GZ.js} +1 -2
- package/dist/{export-accessible-LGV6IAFX.js → export-accessible-2LOBM67T.js} +3 -4
- package/dist/{extract-partition-RYJZIKQZ.js → extract-partition-AZGSEMIF.js} +3 -4
- package/dist/{fanout-sidecar-TSFPXY5C.js → fanout-sidecar-HJIVUPTD.js} +1 -2
- package/dist/{fanout-sidecar-TSFPXY5C.js.map → fanout-sidecar-HJIVUPTD.js.map} +1 -1
- package/dist/{fence-watcher-ZVSMLKQD.js → fence-watcher-U2PW6JU5.js} +1 -3
- package/dist/{fence-watcher-ZVSMLKQD.js.map → fence-watcher-U2PW6JU5.js.map} +1 -1
- package/dist/{find-LC7P63MX.js → find-2ABFCZX4.js} +1 -2
- package/dist/forget/index.js +0 -1
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +0 -1
- package/dist/history/index.js +0 -1
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +0 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.js +26 -27
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +0 -1
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +2 -3
- package/dist/{issue-IOXM3RSJ.js → issue-RH4H733Z.js} +1 -2
- package/dist/{json-schema-I22JCYCG.js → json-schema-V3M5MUCM.js} +1 -3
- package/dist/{json-schema-I22JCYCG.js.map → json-schema-V3M5MUCM.js.map} +1 -1
- package/dist/kernel/collection-config.d.ts +34 -0
- package/dist/lazy/index.js +0 -1
- package/dist/{ledger-HXHIOD36.js → ledger-454SU3VE.js} +1 -2
- package/dist/{liberate-4APIV7FR.js → liberate-AAZSP2BT.js} +5 -6
- package/dist/{link-set-6RAHEKZN.js → link-set-67CAMUAL.js} +1 -2
- package/dist/{managed-secret-P3JQ7ZG4.js → managed-secret-NHRYG7CD.js} +1 -2
- package/dist/materialized-views/index.js +2 -3
- package/dist/{migrate-cek-25KNTS5U.js → migrate-cek-5ENH64AA.js} +1 -2
- package/dist/{migrate-cek-25KNTS5U.js.map → migrate-cek-5ENH64AA.js.map} +1 -1
- package/dist/money/index.js +0 -1
- package/dist/{noydb-2C6QQJ5S.js → noydb-Y53CQHZK.js} +11 -12
- package/dist/overlay-views/index.js +0 -1
- package/dist/periods/index.js +1 -2
- package/dist/pod/index.js +12 -13
- package/dist/{pod-handle-6II7KFBR.js → pod-handle-S7AMCJIF.js} +2 -3
- package/dist/{pod-handle-6II7KFBR.js.map → pod-handle-S7AMCJIF.js.map} +1 -1
- package/dist/policy/index.js +0 -1
- package/dist/portability/index.js +6 -7
- package/dist/portability/index.js.map +1 -1
- package/dist/{post-register-BPJ36A6D.js → post-register-HIYY4Y5S.js} +4 -5
- package/dist/{post-register-BPJ36A6D.js.map → post-register-HIYY4Y5S.js.map} +1 -1
- package/dist/{purge-scope-FGNNLWHD.js → purge-scope-4HEFPDOW.js} +1 -3
- package/dist/{purge-scope-FGNNLWHD.js.map → purge-scope-4HEFPDOW.js.map} +1 -1
- package/dist/query/index.js +0 -1
- package/dist/{read-only-facade-CHCKSEPD.js → read-only-facade-BIGO37U3.js} +1 -2
- package/dist/reduce/index.js +0 -1
- package/dist/reduce/index.js.map +1 -1
- package/dist/{register-AEOOGKNO.js → register-7OJWAWT5.js} +3 -4
- package/dist/{registry-SKSOUXNF.js → registry-23WF3TGH.js} +1 -2
- package/dist/{registry-SHMGHEK4.js → registry-4AYVUNXK.js} +1 -2
- package/dist/{registry-I6FP4677.js → registry-5MVJGPXW.js} +1 -2
- package/dist/{registry-D2YXKRYC.js → registry-HDINK5QW.js} +4 -5
- package/dist/{request-withdrawal-6HJT4ODF.js → request-withdrawal-P5EQATZ7.js} +5 -6
- package/dist/{reveal-DDQBDWPM.js → reveal-IMGQ2EE5.js} +1 -2
- package/dist/{reveal-DDQBDWPM.js.map → reveal-IMGQ2EE5.js.map} +1 -1
- package/dist/{revoke-U7U3FMXU.js → revoke-POHP4GPB.js} +1 -2
- package/dist/satellites/index.js +0 -1
- package/dist/schema-update/index.js +0 -1
- package/dist/sealed-record/index.js +3 -4
- package/dist/sealed-record/index.js.map +1 -1
- package/dist/search/index.js +1 -2
- package/dist/{seed-3RXT4VGN.js → seed-UYR6YG3V.js} +1 -2
- package/dist/{seed-3RXT4VGN.js.map → seed-UYR6YG3V.js.map} +1 -1
- package/dist/sequence/index.js +0 -1
- package/dist/session/index.js +0 -1
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +0 -1
- package/dist/shadow/index.js.map +1 -1
- package/dist/share-link/index.js +0 -1
- package/dist/share-link/index.js.map +1 -1
- package/dist/{signer-7NK7TMWU.js → signer-5K3WDHOC.js} +1 -2
- package/dist/snapshots/index.js +1 -2
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-2CHKZTMK.js → stale-AU74OPUW.js} +2 -3
- package/dist/{storage-WP4M7IFO.js → storage-AVJA5BTW.js} +1 -2
- package/dist/store/index.js +0 -1
- package/dist/{store-coordination-provider-O2VUEMJH.js → store-coordination-provider-RX2CGWXV.js} +1 -2
- package/dist/{store-coordination-provider-O2VUEMJH.js.map → store-coordination-provider-RX2CGWXV.js.map} +1 -1
- package/dist/sync/index.js +0 -1
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +0 -1
- package/dist/tiers/index.js +1 -2
- package/dist/to/index.js +0 -1
- package/dist/to/index.js.map +1 -1
- package/dist/transactions/index.js +2 -3
- package/dist/transactions/index.js.map +1 -1
- package/dist/{ulid-VQW6ERQN.js → ulid-4MKXG325.js} +1 -2
- package/dist/util/index.js +0 -1
- package/dist/util/index.js.map +1 -1
- package/dist/{vault-diff-FE5J35NJ.js → vault-diff-C6WUJFNP.js} +1 -2
- package/dist/vault-head/index.js +0 -1
- package/dist/vault-head/index.js.map +1 -1
- package/dist/{verify-JBXCAGDL.js → verify-KOV2G5D6.js} +1 -2
- package/dist/{verify-JBXCAGDL.js.map → verify-KOV2G5D6.js.map} +1 -1
- package/dist/{walk-P3E6QSNC.js → walk-ERAJ5RHO.js} +3 -4
- package/dist/with-formula/derivations/registry.d.ts +6 -0
- package/dist/with-shape/introspection/describe.d.ts +2 -53
- package/dist/with-shape/introspection/field-meta.d.ts +86 -0
- package/dist/{withdraw-accessible-6Q7NE4EY.js → withdraw-accessible-42D32Z7G.js} +4 -5
- package/package.json +7 -3
- package/dist/chunk-AJQY44CE.js.map +0 -1
- package/dist/chunk-BWXGSSFX.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-URHRIAV6.js.map +0 -1
- package/dist/withdraw-accessible-6Q7NE4EY.js.map +0 -1
- package/dist/zod-HAJM7LMS.js +0 -14763
- package/dist/zod-HAJM7LMS.js.map +0 -1
- /package/dist/{api-UE2XQKDN.js.map → api-JPZT6BDD.js.map} +0 -0
- /package/dist/{chunk-5FUULQ6F.js.map → chunk-2HVILGVR.js.map} +0 -0
- /package/dist/{chunk-DJ3LNNZQ.js.map → chunk-3LK2XZCW.js.map} +0 -0
- /package/dist/{chunk-E2MYJGSG.js.map → chunk-AMODH7AU.js.map} +0 -0
- /package/dist/{chunk-B2ZSGYSF.js.map → chunk-B2KCRDJM.js.map} +0 -0
- /package/dist/{chunk-TO3EQ7HF.js.map → chunk-BLN54W3L.js.map} +0 -0
- /package/dist/{chunk-IHFXR2VQ.js.map → chunk-BOBFL5TW.js.map} +0 -0
- /package/dist/{chunk-ZVCC36XQ.js.map → chunk-DRB6IHPS.js.map} +0 -0
- /package/dist/{chunk-ZR2YMODS.js.map → chunk-EKZ6VZYF.js.map} +0 -0
- /package/dist/{chunk-RTYJRFQO.js.map → chunk-EWPRPP3M.js.map} +0 -0
- /package/dist/{chunk-VGICZPVE.js.map → chunk-FUJSIP4K.js.map} +0 -0
- /package/dist/{chunk-PKJ43CMD.js.map → chunk-NLOLF6LD.js.map} +0 -0
- /package/dist/{chunk-SXCYYMVS.js.map → chunk-NOSRK3ZZ.js.map} +0 -0
- /package/dist/{chunk-COTPDJR5.js.map → chunk-OMB2ZKIT.js.map} +0 -0
- /package/dist/{chunk-Y4MJQ2UG.js.map → chunk-QQ2YMQZU.js.map} +0 -0
- /package/dist/{chunk-YCXICMOY.js.map → chunk-RJ7NN2UR.js.map} +0 -0
- /package/dist/{chunk-PDD75NUZ.js.map → chunk-SMH6SRX7.js.map} +0 -0
- /package/dist/{chunk-QHW35ZON.js.map → chunk-TGPST6FK.js.map} +0 -0
- /package/dist/{chunk-BMELYFHU.js.map → chunk-V2PNPF6J.js.map} +0 -0
- /package/dist/{chunk-BERJ4AWW.js.map → chunk-VGXZT72I.js.map} +0 -0
- /package/dist/{chunk-2Z47NMFK.js.map → chunk-WZW37ZHL.js.map} +0 -0
- /package/dist/{chunk-PZ5AY32C.js.map → collection-facade-VOWW732S.js.map} +0 -0
- /package/dist/{collection-facade-4ACKIDDY.js.map → computed-VPOKQK4N.js.map} +0 -0
- /package/dist/{computed-LSEZYRJS.js.map → derive-HHBRFS2U.js.map} +0 -0
- /package/dist/{derive-LY47HG7Q.js.map → enclave-VM2YQONI.js.map} +0 -0
- /package/dist/{enclave-4YBQK77G.js.map → executor-5NIMLSKZ.js.map} +0 -0
- /package/dist/{executor-MZJXBWNM.js.map → executor-5XJNV5H5.js.map} +0 -0
- /package/dist/{executor-TOLPBHOC.js.map → executor-AQVXV5GZ.js.map} +0 -0
- /package/dist/{executor-YDDC5XGY.js.map → export-accessible-2LOBM67T.js.map} +0 -0
- /package/dist/{export-accessible-LGV6IAFX.js.map → extract-partition-AZGSEMIF.js.map} +0 -0
- /package/dist/{extract-partition-RYJZIKQZ.js.map → find-2ABFCZX4.js.map} +0 -0
- /package/dist/{find-LC7P63MX.js.map → issue-RH4H733Z.js.map} +0 -0
- /package/dist/{issue-IOXM3RSJ.js.map → ledger-454SU3VE.js.map} +0 -0
- /package/dist/{ledger-HXHIOD36.js.map → liberate-AAZSP2BT.js.map} +0 -0
- /package/dist/{liberate-4APIV7FR.js.map → link-set-67CAMUAL.js.map} +0 -0
- /package/dist/{link-set-6RAHEKZN.js.map → managed-secret-NHRYG7CD.js.map} +0 -0
- /package/dist/{managed-secret-P3JQ7ZG4.js.map → noydb-Y53CQHZK.js.map} +0 -0
- /package/dist/{noydb-2C6QQJ5S.js.map → read-only-facade-BIGO37U3.js.map} +0 -0
- /package/dist/{read-only-facade-CHCKSEPD.js.map → register-7OJWAWT5.js.map} +0 -0
- /package/dist/{register-AEOOGKNO.js.map → registry-23WF3TGH.js.map} +0 -0
- /package/dist/{registry-D2YXKRYC.js.map → registry-4AYVUNXK.js.map} +0 -0
- /package/dist/{registry-I6FP4677.js.map → registry-5MVJGPXW.js.map} +0 -0
- /package/dist/{registry-SHMGHEK4.js.map → registry-HDINK5QW.js.map} +0 -0
- /package/dist/{registry-SKSOUXNF.js.map → request-withdrawal-P5EQATZ7.js.map} +0 -0
- /package/dist/{request-withdrawal-6HJT4ODF.js.map → revoke-POHP4GPB.js.map} +0 -0
- /package/dist/{revoke-U7U3FMXU.js.map → signer-5K3WDHOC.js.map} +0 -0
- /package/dist/{signer-7NK7TMWU.js.map → stale-AU74OPUW.js.map} +0 -0
- /package/dist/{stale-2CHKZTMK.js.map → storage-AVJA5BTW.js.map} +0 -0
- /package/dist/{storage-WP4M7IFO.js.map → ulid-4MKXG325.js.map} +0 -0
- /package/dist/{ulid-VQW6ERQN.js.map → vault-diff-C6WUJFNP.js.map} +0 -0
- /package/dist/{vault-diff-FE5J35NJ.js.map → walk-ERAJ5RHO.js.map} +0 -0
- /package/dist/{walk-P3E6QSNC.js.map → withdraw-accessible-42D32Z7G.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-UBSFPGVJ.js";
|
|
2
2
|
import {
|
|
3
3
|
dumpVaultSchema
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-FUJSIP4K.js";
|
|
5
5
|
import {
|
|
6
6
|
applyListProjection
|
|
7
7
|
} from "../chunk-VG2ZSFYD.js";
|
|
@@ -9,7 +9,7 @@ import "../chunk-RXLYKVTF.js";
|
|
|
9
9
|
import {
|
|
10
10
|
jsonSchemaToFields
|
|
11
11
|
} from "../chunk-VYYM3MEN.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-REDOOY2Q.js";
|
|
13
13
|
import "../chunk-Y2NBBT6K.js";
|
|
14
14
|
import "../chunk-WWNYSV7S.js";
|
|
15
15
|
import "../chunk-CIGAQBJR.js";
|
|
@@ -21,7 +21,6 @@ import "../chunk-LP7BEXCT.js";
|
|
|
21
21
|
import "../chunk-SL3JAAKN.js";
|
|
22
22
|
import "../chunk-N4CHCXDL.js";
|
|
23
23
|
import "../chunk-7O3Y4PPD.js";
|
|
24
|
-
import "../chunk-PZ5AY32C.js";
|
|
25
24
|
export {
|
|
26
25
|
applyListProjection,
|
|
27
26
|
dumpVaultSchema,
|
|
@@ -12,8 +12,7 @@ import "./chunk-LP7BEXCT.js";
|
|
|
12
12
|
import "./chunk-SL3JAAKN.js";
|
|
13
13
|
import "./chunk-N4CHCXDL.js";
|
|
14
14
|
import "./chunk-7O3Y4PPD.js";
|
|
15
|
-
import "./chunk-PZ5AY32C.js";
|
|
16
15
|
export {
|
|
17
16
|
issueAttestationCore
|
|
18
17
|
};
|
|
19
|
-
//# sourceMappingURL=issue-
|
|
18
|
+
//# sourceMappingURL=issue-RH4H733Z.js.map
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "./chunk-PZ5AY32C.js";
|
|
2
|
-
|
|
3
1
|
// src/with-shape/introspection/json-schema.ts
|
|
4
2
|
function jsonType(t) {
|
|
5
3
|
switch (t) {
|
|
@@ -41,4 +39,4 @@ function buildJsonSchema(desc, base) {
|
|
|
41
39
|
export {
|
|
42
40
|
buildJsonSchema
|
|
43
41
|
};
|
|
44
|
-
//# sourceMappingURL=json-schema-
|
|
42
|
+
//# sourceMappingURL=json-schema-V3M5MUCM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-shape/introspection/json-schema.ts"],"sourcesContent":["/**\n * `buildJsonSchema` — pure overlay that merges describe() metadata onto a\n * base JSON Schema (from derivePersistedSchema) as `x-` extension keys.\n *\n * When no base JSON Schema is available (non-zod / unknown validator),\n * builds a minimal `{ type:'object', properties }` from describe()'s field\n * type tags. No static `import 'zod'` — validator derivation stays lazy.\n *\n * @module\n */\n\nimport type { CollectionDescription } from './describe.js'\n\n/** Map a DescribedField's type tag to a JSON-Schema `type`. */\nfunction jsonType(t: string): string {\n switch (t) {\n case 'number': return 'number'\n case 'boolean': return 'boolean'\n case 'array': return 'array'\n case 'object': return 'object'\n default: return 'string'\n }\n}\n\n/** Overlay describe() metadata onto a base JSON Schema (or build a minimal one). */\nexport function buildJsonSchema(desc: CollectionDescription, base?: Record<string, unknown> | null): object {\n const baseProps = (base?.['properties'] as Record<string, Record<string, unknown>> | undefined) ?? {}\n const properties: Record<string, Record<string, unknown>> = {}\n for (const f of desc.fields) {\n const prop: Record<string, unknown> = { ...(baseProps[f.key] ?? { type: jsonType(f.type) }) }\n prop['x-label'] = f.label\n if (f.unit !== undefined) prop['x-unit'] = f.unit\n if (f.semanticType !== undefined) prop['x-semanticType'] = f.semanticType\n if (f.sensitivity !== undefined) prop['x-sensitivity'] = f.sensitivity\n if (f.widget !== undefined) prop['x-widget'] = f.widget\n if (f.editable === false) prop['x-readonly'] = true\n if (f.money !== undefined) prop['x-money'] = f.money\n if (f.ref !== undefined) prop['x-ref'] = f.ref.target\n if (f.dict?.values) {\n const labels: Record<string, string> = {}\n for (const v of f.dict.values) if (v.label !== undefined) labels[v.value] = v.label\n if (Object.keys(labels).length) prop['x-enumLabels'] = labels\n }\n // `x-classified` carries the whole classified block, incl. `equatable` when\n // set — emitted ungated (boundary note on DescribedField.classified): a\n // deployment wanting it gated can gate this behind its value-bearing door.\n if (f.classified !== undefined) prop['x-classified'] = f.classified\n properties[f.key] = prop\n }\n return base != null && typeof base === 'object'\n ? { ...base, properties }\n : { type: 'object', properties }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/with-shape/introspection/json-schema.ts"],"sourcesContent":["/**\n * `buildJsonSchema` — pure overlay that merges describe() metadata onto a\n * base JSON Schema (from derivePersistedSchema) as `x-` extension keys.\n *\n * When no base JSON Schema is available (non-zod / unknown validator),\n * builds a minimal `{ type:'object', properties }` from describe()'s field\n * type tags. No static `import 'zod'` — validator derivation stays lazy.\n *\n * @module\n */\n\nimport type { CollectionDescription } from './describe.js'\n\n/** Map a DescribedField's type tag to a JSON-Schema `type`. */\nfunction jsonType(t: string): string {\n switch (t) {\n case 'number': return 'number'\n case 'boolean': return 'boolean'\n case 'array': return 'array'\n case 'object': return 'object'\n default: return 'string'\n }\n}\n\n/** Overlay describe() metadata onto a base JSON Schema (or build a minimal one). */\nexport function buildJsonSchema(desc: CollectionDescription, base?: Record<string, unknown> | null): object {\n const baseProps = (base?.['properties'] as Record<string, Record<string, unknown>> | undefined) ?? {}\n const properties: Record<string, Record<string, unknown>> = {}\n for (const f of desc.fields) {\n const prop: Record<string, unknown> = { ...(baseProps[f.key] ?? { type: jsonType(f.type) }) }\n prop['x-label'] = f.label\n if (f.unit !== undefined) prop['x-unit'] = f.unit\n if (f.semanticType !== undefined) prop['x-semanticType'] = f.semanticType\n if (f.sensitivity !== undefined) prop['x-sensitivity'] = f.sensitivity\n if (f.widget !== undefined) prop['x-widget'] = f.widget\n if (f.editable === false) prop['x-readonly'] = true\n if (f.money !== undefined) prop['x-money'] = f.money\n if (f.ref !== undefined) prop['x-ref'] = f.ref.target\n if (f.dict?.values) {\n const labels: Record<string, string> = {}\n for (const v of f.dict.values) if (v.label !== undefined) labels[v.value] = v.label\n if (Object.keys(labels).length) prop['x-enumLabels'] = labels\n }\n // `x-classified` carries the whole classified block, incl. `equatable` when\n // set — emitted ungated (boundary note on DescribedField.classified): a\n // deployment wanting it gated can gate this behind its value-bearing door.\n if (f.classified !== undefined) prop['x-classified'] = f.classified\n properties[f.key] = prop\n }\n return base != null && typeof base === 'object'\n ? { ...base, properties }\n : { type: 'object', properties }\n}\n"],"mappings":";AAcA,SAAS,SAAS,GAAmB;AACnC,UAAQ,GAAG;AAAA,IACT,KAAK;AAAU,aAAO;AAAA,IACtB,KAAK;AAAW,aAAO;AAAA,IACvB,KAAK;AAAS,aAAO;AAAA,IACrB,KAAK;AAAU,aAAO;AAAA,IACtB;AAAS,aAAO;AAAA,EAClB;AACF;AAGO,SAAS,gBAAgB,MAA6B,MAA+C;AAC1G,QAAM,YAAa,OAAO,YAAY,KAA6D,CAAC;AACpG,QAAM,aAAsD,CAAC;AAC7D,aAAW,KAAK,KAAK,QAAQ;AAC3B,UAAM,OAAgC,EAAE,GAAI,UAAU,EAAE,GAAG,KAAK,EAAE,MAAM,SAAS,EAAE,IAAI,EAAE,EAAG;AAC5F,SAAK,SAAS,IAAI,EAAE;AACpB,QAAI,EAAE,SAAS,OAAW,MAAK,QAAQ,IAAI,EAAE;AAC7C,QAAI,EAAE,iBAAiB,OAAW,MAAK,gBAAgB,IAAI,EAAE;AAC7D,QAAI,EAAE,gBAAgB,OAAW,MAAK,eAAe,IAAI,EAAE;AAC3D,QAAI,EAAE,WAAW,OAAW,MAAK,UAAU,IAAI,EAAE;AACjD,QAAI,EAAE,aAAa,MAAO,MAAK,YAAY,IAAI;AAC/C,QAAI,EAAE,UAAU,OAAW,MAAK,SAAS,IAAI,EAAE;AAC/C,QAAI,EAAE,QAAQ,OAAW,MAAK,OAAO,IAAI,EAAE,IAAI;AAC/C,QAAI,EAAE,MAAM,QAAQ;AAClB,YAAM,SAAiC,CAAC;AACxC,iBAAW,KAAK,EAAE,KAAK,OAAQ,KAAI,EAAE,UAAU,OAAW,QAAO,EAAE,KAAK,IAAI,EAAE;AAC9E,UAAI,OAAO,KAAK,MAAM,EAAE,OAAQ,MAAK,cAAc,IAAI;AAAA,IACzD;AAIA,QAAI,EAAE,eAAe,OAAW,MAAK,cAAc,IAAI,EAAE;AACzD,eAAW,EAAE,GAAG,IAAI;AAAA,EACtB;AACA,SAAO,QAAQ,QAAQ,OAAO,SAAS,WACnC,EAAE,GAAG,MAAM,WAAW,IACtB,EAAE,MAAM,UAAU,WAAW;AACnC;","names":[]}
|
|
@@ -479,6 +479,40 @@ export interface ComputedEntryParts {
|
|
|
479
479
|
readonly mode: 'materialized' | 'virtual';
|
|
480
480
|
}
|
|
481
481
|
export declare function computedEntryParts(entry: ComputedFn | ComputedFieldEntry): ComputedEntryParts;
|
|
482
|
+
/**
|
|
483
|
+
* Field names a `triggerBy` match may NOT target, and the ones it may (#1266).
|
|
484
|
+
*
|
|
485
|
+
* Lives beside `computedEntryParts`, the other computed-mode reader. It was
|
|
486
|
+
* briefly moved into the derivation registry on the theory that twenty lines
|
|
487
|
+
* here cost the floor bundle 5.2% — measuring it showed the helper accounted
|
|
488
|
+
* for ONE byte and the growth was elsewhere (#1268). Moved back now that a
|
|
489
|
+
* second caller (the MV group-key guard) needs it and the layering forbids
|
|
490
|
+
* the kernel importing the registry.
|
|
491
|
+
*
|
|
492
|
+
* A derivation matcher reads the STORED record, so a match target must be a
|
|
493
|
+
* field that is stored. `mode: 'virtual'` computed fields are evaluated on the
|
|
494
|
+
* READ path and never persisted — but they appear in `computed:` (and in
|
|
495
|
+
* `via(computed(...))`) exactly like materialized ones, so the registration
|
|
496
|
+
* guard accepted them and the fan-out then matched nothing, forever: the guard's
|
|
497
|
+
* own stated failure mode, reached through the guard rather than around it.
|
|
498
|
+
*
|
|
499
|
+
* Rejected rather than supported. Matching a virtual field means running user
|
|
500
|
+
* code for every candidate row, which turns an indexed narrow into a full scan
|
|
501
|
+
* of the collection; `mode: 'materialized'` is stored, already works, and is
|
|
502
|
+
* what the error points the caller at.
|
|
503
|
+
*
|
|
504
|
+
* `declared` also folds in `viaFields`, which the guard's key set previously
|
|
505
|
+
* omitted entirely — a `via()`-declared MATERIALIZED field is a perfectly good
|
|
506
|
+
* match target and was being rejected as a typo. An over-firing guard teaches
|
|
507
|
+
* people to stop trusting it, so both directions are fixed together.
|
|
508
|
+
*/
|
|
509
|
+
export declare function matchTargetFieldNames(opts: {
|
|
510
|
+
readonly computed?: Readonly<Record<string, unknown>> | undefined;
|
|
511
|
+
readonly viaFields?: Readonly<Record<string, unknown>> | undefined;
|
|
512
|
+
}): {
|
|
513
|
+
readonly declared: readonly string[];
|
|
514
|
+
readonly virtual: readonly string[];
|
|
515
|
+
};
|
|
482
516
|
/**
|
|
483
517
|
* Compile a collection's declared config into the ordered list of `NoydbVia`s
|
|
484
518
|
* for its `ViaPipeline`.
|
package/dist/lazy/index.js
CHANGED
|
@@ -25,7 +25,6 @@ import "./chunk-LP7BEXCT.js";
|
|
|
25
25
|
import "./chunk-SL3JAAKN.js";
|
|
26
26
|
import "./chunk-N4CHCXDL.js";
|
|
27
27
|
import "./chunk-7O3Y4PPD.js";
|
|
28
|
-
import "./chunk-PZ5AY32C.js";
|
|
29
28
|
export {
|
|
30
29
|
LEDGER_COLLECTION,
|
|
31
30
|
LEDGER_DELTAS_COLLECTION,
|
|
@@ -39,4 +38,4 @@ export {
|
|
|
39
38
|
parseIndex,
|
|
40
39
|
sha256Hex
|
|
41
40
|
};
|
|
42
|
-
//# sourceMappingURL=ledger-
|
|
41
|
+
//# sourceMappingURL=ledger-454SU3VE.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
liberateVault
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RJ7NN2UR.js";
|
|
4
|
+
import "./chunk-TGPST6FK.js";
|
|
5
|
+
import "./chunk-EKZ6VZYF.js";
|
|
6
6
|
import "./chunk-JUBWUJY5.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-NLOLF6LD.js";
|
|
8
8
|
import "./chunk-MLO75SFJ.js";
|
|
9
9
|
import "./chunk-VNR2SNVJ.js";
|
|
10
10
|
import "./chunk-YQWBEJCS.js";
|
|
@@ -18,8 +18,7 @@ import "./chunk-LP7BEXCT.js";
|
|
|
18
18
|
import "./chunk-SL3JAAKN.js";
|
|
19
19
|
import "./chunk-N4CHCXDL.js";
|
|
20
20
|
import "./chunk-7O3Y4PPD.js";
|
|
21
|
-
import "./chunk-PZ5AY32C.js";
|
|
22
21
|
export {
|
|
23
22
|
liberateVault
|
|
24
23
|
};
|
|
25
|
-
//# sourceMappingURL=liberate-
|
|
24
|
+
//# sourceMappingURL=liberate-AAZSP2BT.js.map
|
|
@@ -18,7 +18,6 @@ import "./chunk-LP7BEXCT.js";
|
|
|
18
18
|
import "./chunk-SL3JAAKN.js";
|
|
19
19
|
import "./chunk-N4CHCXDL.js";
|
|
20
20
|
import "./chunk-7O3Y4PPD.js";
|
|
21
|
-
import "./chunk-PZ5AY32C.js";
|
|
22
21
|
export {
|
|
23
22
|
LINK_COLLECTION_PREFIX,
|
|
24
23
|
LinkEndpointError,
|
|
@@ -28,4 +27,4 @@ export {
|
|
|
28
27
|
linkCollectionName,
|
|
29
28
|
linkRowKey
|
|
30
29
|
};
|
|
31
|
-
//# sourceMappingURL=link-set-
|
|
30
|
+
//# sourceMappingURL=link-set-67CAMUAL.js.map
|
|
@@ -19,7 +19,6 @@ import "./chunk-LP7BEXCT.js";
|
|
|
19
19
|
import "./chunk-SL3JAAKN.js";
|
|
20
20
|
import "./chunk-N4CHCXDL.js";
|
|
21
21
|
import "./chunk-7O3Y4PPD.js";
|
|
22
|
-
import "./chunk-PZ5AY32C.js";
|
|
23
22
|
export {
|
|
24
23
|
MemoryRecipientSealer,
|
|
25
24
|
MemorySealer,
|
|
@@ -32,4 +31,4 @@ export {
|
|
|
32
31
|
saveSealedSecret,
|
|
33
32
|
sealRsaOaepTlv
|
|
34
33
|
};
|
|
35
|
-
//# sourceMappingURL=managed-secret-
|
|
34
|
+
//# sourceMappingURL=managed-secret-NHRYG7CD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withMaterializedView
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-6X6SEMEE.js";
|
|
4
4
|
import {
|
|
5
5
|
MaterializedViewExecutor
|
|
6
6
|
} from "../chunk-FFBYRWDJ.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isMVStale,
|
|
17
17
|
markMVStale,
|
|
18
18
|
resolveStaleMVOnRead
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-AMODH7AU.js";
|
|
20
20
|
import "../chunk-VXANTWBJ.js";
|
|
21
21
|
import "../chunk-MGOXJIBV.js";
|
|
22
22
|
import "../chunk-YPXNAP72.js";
|
|
@@ -44,7 +44,6 @@ import {
|
|
|
44
44
|
MaterializedViewSourceUnknownError,
|
|
45
45
|
MaterializedViewTooLargeError
|
|
46
46
|
} from "../chunk-7O3Y4PPD.js";
|
|
47
|
-
import "../chunk-PZ5AY32C.js";
|
|
48
47
|
export {
|
|
49
48
|
MaterializedViewConfigError,
|
|
50
49
|
MaterializedViewCycleError,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SatelliteConfigError
|
|
3
3
|
} from "./chunk-7O3Y4PPD.js";
|
|
4
|
-
import "./chunk-PZ5AY32C.js";
|
|
5
4
|
|
|
6
5
|
// src/with-shape/satellites/migrate-cek.ts
|
|
7
6
|
async function migrateSatelliteCek(name, coll) {
|
|
@@ -16,4 +15,4 @@ async function migrateSatelliteCek(name, coll) {
|
|
|
16
15
|
export {
|
|
17
16
|
migrateSatelliteCek
|
|
18
17
|
};
|
|
19
|
-
//# sourceMappingURL=migrate-cek-
|
|
18
|
+
//# sourceMappingURL=migrate-cek-5ENH64AA.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-shape/satellites/migrate-cek.ts"],"sourcesContent":["/**\n * Satellite per-record-CEK migration (#599) — the R-S7 retro-coverage\n * unblock.\n *\n * R-S7 (`declare.ts:89-91`) correctly refuses declaring/redeclaring a\n * satellite of a forget-covered base without `perRecordKeys: true` — but\n * `perRecordKeys` is construction-only (`kernel/collection.ts:402`), so an\n * app that shipped a satellite BEFORE its base gained forget coverage has\n * no way past the refusal: the existing records must be re-encrypted under\n * fresh per-record CEKs before the satellite can reopen in\n * `perRecordKeys: true` mode, and the only re-encrypt primitive\n * (`Collection._applyCutoverTransform`) needs the collection already\n * constructed in that mode — chicken-and-egg.\n *\n * The break: `Vault.migrateSatellitePerRecordKeys` (`kernel/vault.ts`)\n * opens the satellite collection via `vault.collection(name, {\n * perRecordKeys: true })` WITHOUT `satelliteOf` — that never enters\n * `declareSatellite`, so R-S7's gate (which only fires on the `satelliteOf`\n * declaration path) never runs for the migration pass. R-S7 stays fully\n * enforced for every NORMAL `satelliteOf` declaration; this module and its\n * call-site never touch `declare.ts`.\n *\n * `migrateSatelliteCek` then reuses `_applyCutoverTransform` verbatim (an\n * identity transform — no field/shape change, only the encryption wrapper\n * changes) rather than duplicating its mint-or-reuse-CEK logic\n * (`resolveRecordCek`/`resolveStableCek`, `collection.ts:2537-2545`): a\n * record with no `_cek` yet gets a freshly minted per-record CEK; a record\n * that already carries `_cek` (already migrated, e.g. a prior interrupted\n * run) reuses its existing CEK unchanged. That mint-or-reuse discrimination\n * is what makes re-running this after a mid-migration failure safe for\n * free — no separate resumability marker needed, no double-mint, no\n * plaintext write, no shared-DEK write.\n *\n * **Mode-assertion guard (review Important 1):** `perRecordKeys` is\n * construction-only and the vault's collection cache is first-wins with no\n * mismatch guard. If `coll`'s name was already opened THIS SESSION without\n * `perRecordKeys` (e.g. an incidental bare `vault.collection(name)` call\n * before the migration ran), `vault.collection(name, { perRecordKeys: true\n * })` cache-HITS that instance instead of constructing a fresh one — the\n * returned handle is silently NOT in per-record-CEK mode. Without a check,\n * `_applyCutoverTransform` would then pass `cek: undefined` for every\n * record (`this.perRecordCek` false) and RE-ENCRYPT EVERY RECORD UNDER THE\n * SHARED COLLECTION DEK while still reporting `{ migrated: N }` as success\n * — a security migration that silently mints nothing. `migrateSatelliteCek`\n * reads the opened handle's own `getConfig()` (the same accessor\n * `dumpSchema()` uses) to confirm `perRecordKeys` is genuinely `true`\n * before walking, and throws `SatelliteConfigError` instead of proceeding\n * if not.\n *\n * **No-quiesce precondition (review Important 2):** `_applyCutoverTransform`\n * is documented as fence-phase-only (`collection.ts:2517-2522`) — the\n * generic schema-cutover caller (`Vault.runSchemaCutover` →\n * `SchemaFenceController`) always runs it under the vault-wide schema fence,\n * which blocks concurrent writes. This migration does NOT fence: it calls\n * `_applyCutoverTransform` directly, with no fence and CAS-less\n * (`adapter.put` with no `expectedVersion`) writes. A concurrent write to\n * the same satellite collection racing the walk's `await`s can be\n * clobbered by (or clobber) a migration write. Callers MUST run this before\n * the collection serves traffic — e.g. at v2 boot, before declaring the\n * pair, before any client can write — or otherwise ensure the vault is\n * quiescent for this collection for the duration of the call.\n */\nimport { SatelliteConfigError } from '../../kernel/errors.js'\n\n/** The narrow slice of `Collection` the migration pass needs (mirrors `fanout.ts`'s `CollectionHandle` narrowing). */\nexport interface SatelliteCekMigrationTarget {\n /** Public config snapshot (`Collection.getConfig()`) — used to confirm the handle is genuinely in per-record-CEK mode before walking. */\n getConfig(): { readonly perRecordKeys?: boolean } | undefined\n _applyCutoverTransform(transform: (doc: Record<string, unknown>) => Record<string, unknown>): Promise<number>\n}\n\nexport interface SatelliteCekMigrationResult {\n /** Records touched by this call (both freshly minted and already-migrated re-touches on a resumed run). */\n readonly migrated: number\n}\n\n/**\n * Re-encrypt every record in `coll` under a per-record CEK. `coll` must be\n * a collection handle already opened with `perRecordKeys: true` — see the\n * file header for how the caller gets one past R-S7. Throws\n * `SatelliteConfigError` (does NOT proceed) if `coll` is not genuinely in\n * per-record-CEK mode — see the file header's mode-assertion note.\n * Idempotent/resumable: safe to call again after a partial failure. NOT\n * fenced against concurrent writers — see the file header's no-quiesce\n * precondition; run this before the collection serves traffic.\n *\n * @param name The satellite collection's name — used only for the error\n * message below; identical to what the caller passed to `vault.collection()`.\n */\nexport async function migrateSatelliteCek(name: string, coll: SatelliteCekMigrationTarget): Promise<SatelliteCekMigrationResult> {\n if (coll.getConfig()?.perRecordKeys !== true) {\n throw new SatelliteConfigError(\n `migrateSatellitePerRecordKeys: collection \"${name}\" was already opened this session without ` +\n `perRecordKeys (construction-only); migrate before its first open, or restart the session.`,\n )\n }\n // Ledger reason (review Minor): the walk below reuses _applyCutoverTransform's\n // hardcoded 'schema:coordinated-cutover' ledger reason — it has no reason/label\n // param, and this migration is not itself a schema cutover. Not threaded through\n // (would touch collection.ts's own ceilinged surface for a cosmetic label);\n // flagged here so the audit trail's shared reason string is documented, not silent.\n const migrated = await coll._applyCutoverTransform((doc) => doc)\n return { migrated }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/with-shape/satellites/migrate-cek.ts"],"sourcesContent":["/**\n * Satellite per-record-CEK migration (#599) — the R-S7 retro-coverage\n * unblock.\n *\n * R-S7 (`declare.ts:89-91`) correctly refuses declaring/redeclaring a\n * satellite of a forget-covered base without `perRecordKeys: true` — but\n * `perRecordKeys` is construction-only (`kernel/collection.ts:402`), so an\n * app that shipped a satellite BEFORE its base gained forget coverage has\n * no way past the refusal: the existing records must be re-encrypted under\n * fresh per-record CEKs before the satellite can reopen in\n * `perRecordKeys: true` mode, and the only re-encrypt primitive\n * (`Collection._applyCutoverTransform`) needs the collection already\n * constructed in that mode — chicken-and-egg.\n *\n * The break: `Vault.migrateSatellitePerRecordKeys` (`kernel/vault.ts`)\n * opens the satellite collection via `vault.collection(name, {\n * perRecordKeys: true })` WITHOUT `satelliteOf` — that never enters\n * `declareSatellite`, so R-S7's gate (which only fires on the `satelliteOf`\n * declaration path) never runs for the migration pass. R-S7 stays fully\n * enforced for every NORMAL `satelliteOf` declaration; this module and its\n * call-site never touch `declare.ts`.\n *\n * `migrateSatelliteCek` then reuses `_applyCutoverTransform` verbatim (an\n * identity transform — no field/shape change, only the encryption wrapper\n * changes) rather than duplicating its mint-or-reuse-CEK logic\n * (`resolveRecordCek`/`resolveStableCek`, `collection.ts:2537-2545`): a\n * record with no `_cek` yet gets a freshly minted per-record CEK; a record\n * that already carries `_cek` (already migrated, e.g. a prior interrupted\n * run) reuses its existing CEK unchanged. That mint-or-reuse discrimination\n * is what makes re-running this after a mid-migration failure safe for\n * free — no separate resumability marker needed, no double-mint, no\n * plaintext write, no shared-DEK write.\n *\n * **Mode-assertion guard (review Important 1):** `perRecordKeys` is\n * construction-only and the vault's collection cache is first-wins with no\n * mismatch guard. If `coll`'s name was already opened THIS SESSION without\n * `perRecordKeys` (e.g. an incidental bare `vault.collection(name)` call\n * before the migration ran), `vault.collection(name, { perRecordKeys: true\n * })` cache-HITS that instance instead of constructing a fresh one — the\n * returned handle is silently NOT in per-record-CEK mode. Without a check,\n * `_applyCutoverTransform` would then pass `cek: undefined` for every\n * record (`this.perRecordCek` false) and RE-ENCRYPT EVERY RECORD UNDER THE\n * SHARED COLLECTION DEK while still reporting `{ migrated: N }` as success\n * — a security migration that silently mints nothing. `migrateSatelliteCek`\n * reads the opened handle's own `getConfig()` (the same accessor\n * `dumpSchema()` uses) to confirm `perRecordKeys` is genuinely `true`\n * before walking, and throws `SatelliteConfigError` instead of proceeding\n * if not.\n *\n * **No-quiesce precondition (review Important 2):** `_applyCutoverTransform`\n * is documented as fence-phase-only (`collection.ts:2517-2522`) — the\n * generic schema-cutover caller (`Vault.runSchemaCutover` →\n * `SchemaFenceController`) always runs it under the vault-wide schema fence,\n * which blocks concurrent writes. This migration does NOT fence: it calls\n * `_applyCutoverTransform` directly, with no fence and CAS-less\n * (`adapter.put` with no `expectedVersion`) writes. A concurrent write to\n * the same satellite collection racing the walk's `await`s can be\n * clobbered by (or clobber) a migration write. Callers MUST run this before\n * the collection serves traffic — e.g. at v2 boot, before declaring the\n * pair, before any client can write — or otherwise ensure the vault is\n * quiescent for this collection for the duration of the call.\n */\nimport { SatelliteConfigError } from '../../kernel/errors.js'\n\n/** The narrow slice of `Collection` the migration pass needs (mirrors `fanout.ts`'s `CollectionHandle` narrowing). */\nexport interface SatelliteCekMigrationTarget {\n /** Public config snapshot (`Collection.getConfig()`) — used to confirm the handle is genuinely in per-record-CEK mode before walking. */\n getConfig(): { readonly perRecordKeys?: boolean } | undefined\n _applyCutoverTransform(transform: (doc: Record<string, unknown>) => Record<string, unknown>): Promise<number>\n}\n\nexport interface SatelliteCekMigrationResult {\n /** Records touched by this call (both freshly minted and already-migrated re-touches on a resumed run). */\n readonly migrated: number\n}\n\n/**\n * Re-encrypt every record in `coll` under a per-record CEK. `coll` must be\n * a collection handle already opened with `perRecordKeys: true` — see the\n * file header for how the caller gets one past R-S7. Throws\n * `SatelliteConfigError` (does NOT proceed) if `coll` is not genuinely in\n * per-record-CEK mode — see the file header's mode-assertion note.\n * Idempotent/resumable: safe to call again after a partial failure. NOT\n * fenced against concurrent writers — see the file header's no-quiesce\n * precondition; run this before the collection serves traffic.\n *\n * @param name The satellite collection's name — used only for the error\n * message below; identical to what the caller passed to `vault.collection()`.\n */\nexport async function migrateSatelliteCek(name: string, coll: SatelliteCekMigrationTarget): Promise<SatelliteCekMigrationResult> {\n if (coll.getConfig()?.perRecordKeys !== true) {\n throw new SatelliteConfigError(\n `migrateSatellitePerRecordKeys: collection \"${name}\" was already opened this session without ` +\n `perRecordKeys (construction-only); migrate before its first open, or restart the session.`,\n )\n }\n // Ledger reason (review Minor): the walk below reuses _applyCutoverTransform's\n // hardcoded 'schema:coordinated-cutover' ledger reason — it has no reason/label\n // param, and this migration is not itself a schema cutover. Not threaded through\n // (would touch collection.ts's own ceilinged surface for a cosmetic label);\n // flagged here so the audit trail's shared reason string is documented, not silent.\n const migrated = await coll._applyCutoverTransform((doc) => doc)\n return { migrated }\n}\n"],"mappings":";;;;;AAyFA,eAAsB,oBAAoB,MAAc,MAAyE;AAC/H,MAAI,KAAK,UAAU,GAAG,kBAAkB,MAAM;AAC5C,UAAM,IAAI;AAAA,MACR,8CAA8C,IAAI;AAAA,IAEpD;AAAA,EACF;AAMA,QAAM,WAAW,MAAM,KAAK,uBAAuB,CAAC,QAAQ,GAAG;AAC/D,SAAO,EAAE,SAAS;AACpB;","names":[]}
|
package/dist/money/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Noydb,
|
|
3
3
|
createNoydb
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-PDD75NUZ.js";
|
|
4
|
+
} from "./chunk-DRB6IHPS.js";
|
|
6
5
|
import "./chunk-EPFF7LOX.js";
|
|
7
6
|
import "./chunk-QIZPZMUI.js";
|
|
8
7
|
import "./chunk-TUFM4UZP.js";
|
|
8
|
+
import "./chunk-SMH6SRX7.js";
|
|
9
9
|
import "./chunk-GM4IM7TC.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-BOBFL5TW.js";
|
|
11
11
|
import "./chunk-GYGLAVCX.js";
|
|
12
12
|
import "./chunk-6LJY7X5A.js";
|
|
13
13
|
import "./chunk-Q7HZX3IF.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-EWPRPP3M.js";
|
|
15
15
|
import "./chunk-BZ3534YM.js";
|
|
16
16
|
import "./chunk-NQKIUNW5.js";
|
|
17
17
|
import "./chunk-JUBWUJY5.js";
|
|
18
18
|
import "./chunk-VTFVLCUH.js";
|
|
19
19
|
import "./chunk-RXLYKVTF.js";
|
|
20
20
|
import "./chunk-MMOZQTXV.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-QQ2YMQZU.js";
|
|
22
|
+
import "./chunk-4SZMZAYN.js";
|
|
23
23
|
import "./chunk-TFMM5DBB.js";
|
|
24
24
|
import "./chunk-RTBJ5IOO.js";
|
|
25
25
|
import "./chunk-KCUIMITG.js";
|
|
26
26
|
import "./chunk-VYYM3MEN.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-REDOOY2Q.js";
|
|
28
28
|
import "./chunk-Y2NBBT6K.js";
|
|
29
29
|
import "./chunk-WWNYSV7S.js";
|
|
30
30
|
import "./chunk-MGOXJIBV.js";
|
|
@@ -32,14 +32,14 @@ import "./chunk-YPXNAP72.js";
|
|
|
32
32
|
import "./chunk-SKGMN35F.js";
|
|
33
33
|
import "./chunk-T7IR4N2S.js";
|
|
34
34
|
import "./chunk-PEOZ34EM.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-VGXZT72I.js";
|
|
36
36
|
import "./chunk-GHVIKOHT.js";
|
|
37
37
|
import "./chunk-FAHMLERK.js";
|
|
38
38
|
import "./chunk-SMY5X46Z.js";
|
|
39
39
|
import "./chunk-DZFQVICS.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-BLN54W3L.js";
|
|
41
41
|
import "./chunk-5D2ALSM5.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-OMB2ZKIT.js";
|
|
43
43
|
import "./chunk-AURFOK3D.js";
|
|
44
44
|
import "./chunk-6YXCPL4T.js";
|
|
45
45
|
import "./chunk-7MG2LHO5.js";
|
|
@@ -83,9 +83,8 @@ import "./chunk-LP7BEXCT.js";
|
|
|
83
83
|
import "./chunk-SL3JAAKN.js";
|
|
84
84
|
import "./chunk-N4CHCXDL.js";
|
|
85
85
|
import "./chunk-7O3Y4PPD.js";
|
|
86
|
-
import "./chunk-PZ5AY32C.js";
|
|
87
86
|
export {
|
|
88
87
|
Noydb,
|
|
89
88
|
createNoydb
|
|
90
89
|
};
|
|
91
|
-
//# sourceMappingURL=noydb-
|
|
90
|
+
//# sourceMappingURL=noydb-Y53CQHZK.js.map
|
package/dist/periods/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
samePartition,
|
|
12
12
|
validatePeriodName,
|
|
13
13
|
withPeriods
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-VGXZT72I.js";
|
|
15
15
|
import "../chunk-GHVIKOHT.js";
|
|
16
16
|
import {
|
|
17
17
|
PERIODS_COLLECTION,
|
|
@@ -33,7 +33,6 @@ import "../chunk-LP7BEXCT.js";
|
|
|
33
33
|
import "../chunk-SL3JAAKN.js";
|
|
34
34
|
import "../chunk-N4CHCXDL.js";
|
|
35
35
|
import "../chunk-7O3Y4PPD.js";
|
|
36
|
-
import "../chunk-PZ5AY32C.js";
|
|
37
36
|
export {
|
|
38
37
|
NO_PERIODS,
|
|
39
38
|
PERIODS_COLLECTION,
|
package/dist/pod/index.js
CHANGED
|
@@ -5,9 +5,8 @@ import {
|
|
|
5
5
|
signRedirect,
|
|
6
6
|
verifyRedirect,
|
|
7
7
|
wrapPodStore
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-PDD75NUZ.js";
|
|
8
|
+
} from "../chunk-V2PNPF6J.js";
|
|
9
|
+
import "../chunk-DRB6IHPS.js";
|
|
11
10
|
import {
|
|
12
11
|
deriveSchemaManifest,
|
|
13
12
|
loadSchemaManifestEntry
|
|
@@ -18,25 +17,26 @@ import {
|
|
|
18
17
|
} from "../chunk-EPFF7LOX.js";
|
|
19
18
|
import "../chunk-QIZPZMUI.js";
|
|
20
19
|
import "../chunk-TUFM4UZP.js";
|
|
20
|
+
import "../chunk-SMH6SRX7.js";
|
|
21
21
|
import "../chunk-GM4IM7TC.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-BOBFL5TW.js";
|
|
23
23
|
import "../chunk-GYGLAVCX.js";
|
|
24
24
|
import "../chunk-6LJY7X5A.js";
|
|
25
25
|
import "../chunk-Q7HZX3IF.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-EWPRPP3M.js";
|
|
27
27
|
import "../chunk-BZ3534YM.js";
|
|
28
28
|
import "../chunk-NQKIUNW5.js";
|
|
29
29
|
import "../chunk-JUBWUJY5.js";
|
|
30
30
|
import "../chunk-VTFVLCUH.js";
|
|
31
31
|
import "../chunk-RXLYKVTF.js";
|
|
32
32
|
import "../chunk-MMOZQTXV.js";
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-QQ2YMQZU.js";
|
|
34
|
+
import "../chunk-4SZMZAYN.js";
|
|
35
35
|
import "../chunk-TFMM5DBB.js";
|
|
36
36
|
import "../chunk-RTBJ5IOO.js";
|
|
37
37
|
import "../chunk-KCUIMITG.js";
|
|
38
38
|
import "../chunk-VYYM3MEN.js";
|
|
39
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-REDOOY2Q.js";
|
|
40
40
|
import "../chunk-Y2NBBT6K.js";
|
|
41
41
|
import "../chunk-WWNYSV7S.js";
|
|
42
42
|
import "../chunk-MGOXJIBV.js";
|
|
@@ -44,7 +44,7 @@ import "../chunk-YPXNAP72.js";
|
|
|
44
44
|
import "../chunk-SKGMN35F.js";
|
|
45
45
|
import "../chunk-T7IR4N2S.js";
|
|
46
46
|
import "../chunk-PEOZ34EM.js";
|
|
47
|
-
import "../chunk-
|
|
47
|
+
import "../chunk-VGXZT72I.js";
|
|
48
48
|
import "../chunk-GHVIKOHT.js";
|
|
49
49
|
import "../chunk-FAHMLERK.js";
|
|
50
50
|
import "../chunk-SMY5X46Z.js";
|
|
@@ -72,11 +72,11 @@ import {
|
|
|
72
72
|
verifyPodHeader,
|
|
73
73
|
verifyRecord,
|
|
74
74
|
writePod
|
|
75
|
-
} from "../chunk-
|
|
75
|
+
} from "../chunk-NLOLF6LD.js";
|
|
76
76
|
import "../chunk-MLO75SFJ.js";
|
|
77
|
-
import "../chunk-
|
|
77
|
+
import "../chunk-BLN54W3L.js";
|
|
78
78
|
import "../chunk-5D2ALSM5.js";
|
|
79
|
-
import "../chunk-
|
|
79
|
+
import "../chunk-OMB2ZKIT.js";
|
|
80
80
|
import "../chunk-AURFOK3D.js";
|
|
81
81
|
import "../chunk-6YXCPL4T.js";
|
|
82
82
|
import "../chunk-7MG2LHO5.js";
|
|
@@ -136,7 +136,6 @@ import {
|
|
|
136
136
|
RedirectLoopError,
|
|
137
137
|
RedirectUnreachableError
|
|
138
138
|
} from "../chunk-7O3Y4PPD.js";
|
|
139
|
-
import "../chunk-PZ5AY32C.js";
|
|
140
139
|
export {
|
|
141
140
|
BackupCorruptedError,
|
|
142
141
|
BackupLedgerError,
|
|
@@ -9,7 +9,6 @@ import "./chunk-LP7BEXCT.js";
|
|
|
9
9
|
import "./chunk-SL3JAAKN.js";
|
|
10
10
|
import "./chunk-N4CHCXDL.js";
|
|
11
11
|
import "./chunk-7O3Y4PPD.js";
|
|
12
|
-
import "./chunk-PZ5AY32C.js";
|
|
13
12
|
|
|
14
13
|
// src/with-pod/pod-handle.ts
|
|
15
14
|
async function buildPodHandle(adapter, name) {
|
|
@@ -26,7 +25,7 @@ async function buildPodHandle(adapter, name) {
|
|
|
26
25
|
} catch {
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
|
-
const { generateULID } = await import("./ulid-
|
|
28
|
+
const { generateULID } = await import("./ulid-4MKXG325.js");
|
|
30
29
|
const handle = generateULID();
|
|
31
30
|
const envelope = buildRecordEnvelope(
|
|
32
31
|
{ collection: "_meta", id: "handle", version: 1 },
|
|
@@ -38,4 +37,4 @@ async function buildPodHandle(adapter, name) {
|
|
|
38
37
|
export {
|
|
39
38
|
buildPodHandle
|
|
40
39
|
};
|
|
41
|
-
//# sourceMappingURL=pod-handle-
|
|
40
|
+
//# sourceMappingURL=pod-handle-S7AMCJIF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-pod/pod-handle.ts"],"sourcesContent":["/**\n * Vault bundle handle — the stable opaque ULID identifying a vault\n * across `.noydb` exports.\n *\n * Behaviour is byte-identical to the inline `Vault.getPodHandle`\n * method this function replaced. `Vault` keeps the public method as\n * a thin delegator.\n *\n * Internal — reached through `vault.getPodHandle()`.\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../kernel/types.js'\nimport { buildRecordEnvelope } from '../kernel/enclave/index.js'\n\n/**\n * Return the stable opaque bundle handle for the given vault adapter,\n * generating and persisting a fresh ULID on first call.\n *\n * See {@link import('../kernel/vault.js').Vault.getPodHandle} for\n * the full rationale and storage-path documentation.\n */\nexport async function buildPodHandle(adapter: NoydbStore, name: string): Promise<string> {\n const existing = await adapter.get(name, '_meta', 'handle')\n if (existing) {\n try {\n const parsed = JSON.parse(existing._data) as unknown\n if (parsed !== null && typeof parsed === 'object' && 'handle' in parsed) {\n const handle = (parsed as { handle: unknown }).handle\n if (typeof handle === 'string' && /^[0-9A-HJKMNP-TV-Z]{26}$/.test(handle)) {\n return handle\n }\n }\n } catch {\n // Fall through to regenerate — corrupted handle envelope\n // is treated as missing, not as an error. The new handle\n // overwrites the bad one.\n }\n }\n const { generateULID } = await import('./ulid.js')\n const handle = generateULID()\n const envelope: EncryptedEnvelope = buildRecordEnvelope(\n { collection: '_meta', id: 'handle', version: 1 },\n { iv: '', data: JSON.stringify({ handle }) },\n )\n await adapter.put(name, '_meta', 'handle', envelope)\n return handle\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/with-pod/pod-handle.ts"],"sourcesContent":["/**\n * Vault bundle handle — the stable opaque ULID identifying a vault\n * across `.noydb` exports.\n *\n * Behaviour is byte-identical to the inline `Vault.getPodHandle`\n * method this function replaced. `Vault` keeps the public method as\n * a thin delegator.\n *\n * Internal — reached through `vault.getPodHandle()`.\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../kernel/types.js'\nimport { buildRecordEnvelope } from '../kernel/enclave/index.js'\n\n/**\n * Return the stable opaque bundle handle for the given vault adapter,\n * generating and persisting a fresh ULID on first call.\n *\n * See {@link import('../kernel/vault.js').Vault.getPodHandle} for\n * the full rationale and storage-path documentation.\n */\nexport async function buildPodHandle(adapter: NoydbStore, name: string): Promise<string> {\n const existing = await adapter.get(name, '_meta', 'handle')\n if (existing) {\n try {\n const parsed = JSON.parse(existing._data) as unknown\n if (parsed !== null && typeof parsed === 'object' && 'handle' in parsed) {\n const handle = (parsed as { handle: unknown }).handle\n if (typeof handle === 'string' && /^[0-9A-HJKMNP-TV-Z]{26}$/.test(handle)) {\n return handle\n }\n }\n } catch {\n // Fall through to regenerate — corrupted handle envelope\n // is treated as missing, not as an error. The new handle\n // overwrites the bad one.\n }\n }\n const { generateULID } = await import('./ulid.js')\n const handle = generateULID()\n const envelope: EncryptedEnvelope = buildRecordEnvelope(\n { collection: '_meta', id: 'handle', version: 1 },\n { iv: '', data: JSON.stringify({ handle }) },\n )\n await adapter.put(name, '_meta', 'handle', envelope)\n return handle\n}\n"],"mappings":";;;;;;;;;;;;;AAoBA,eAAsB,eAAe,SAAqB,MAA+B;AACvF,QAAM,WAAW,MAAM,QAAQ,IAAI,MAAM,SAAS,QAAQ;AAC1D,MAAI,UAAU;AACZ,QAAI;AACF,YAAM,SAAS,KAAK,MAAM,SAAS,KAAK;AACxC,UAAI,WAAW,QAAQ,OAAO,WAAW,YAAY,YAAY,QAAQ;AACvE,cAAMA,UAAU,OAA+B;AAC/C,YAAI,OAAOA,YAAW,YAAY,2BAA2B,KAAKA,OAAM,GAAG;AACzE,iBAAOA;AAAA,QACT;AAAA,MACF;AAAA,IACF,QAAQ;AAAA,IAIR;AAAA,EACF;AACA,QAAM,EAAE,aAAa,IAAI,MAAM,OAAO,oBAAW;AACjD,QAAM,SAAS,aAAa;AAC5B,QAAM,WAA8B;AAAA,IAClC,EAAE,YAAY,SAAS,IAAI,UAAU,SAAS,EAAE;AAAA,IAChD,EAAE,IAAI,IAAI,MAAM,KAAK,UAAU,EAAE,OAAO,CAAC,EAAE;AAAA,EAC7C;AACA,QAAM,QAAQ,IAAI,MAAM,SAAS,UAAU,QAAQ;AACnD,SAAO;AACT;","names":["handle"]}
|
package/dist/policy/index.js
CHANGED
|
@@ -4,33 +4,32 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
PortabilityNotEnabledError
|
|
6
6
|
} from "../chunk-7O3Y4PPD.js";
|
|
7
|
-
import "../chunk-PZ5AY32C.js";
|
|
8
7
|
|
|
9
8
|
// src/with-audit/portability/active.ts
|
|
10
9
|
function withPortability() {
|
|
11
10
|
return {
|
|
12
11
|
async exportAccessibleData(vault, opts) {
|
|
13
|
-
const { exportAccessibleData } = await import("../export-accessible-
|
|
12
|
+
const { exportAccessibleData } = await import("../export-accessible-2LOBM67T.js");
|
|
14
13
|
return exportAccessibleData(vault, opts);
|
|
15
14
|
},
|
|
16
15
|
async withdrawAccessibleData(vault, opts) {
|
|
17
|
-
const { withdrawAccessibleData } = await import("../withdraw-accessible-
|
|
16
|
+
const { withdrawAccessibleData } = await import("../withdraw-accessible-42D32Z7G.js");
|
|
18
17
|
return withdrawAccessibleData(vault, opts);
|
|
19
18
|
},
|
|
20
19
|
async requestWithdrawal(vault, opts) {
|
|
21
|
-
const { requestWithdrawal } = await import("../request-withdrawal-
|
|
20
|
+
const { requestWithdrawal } = await import("../request-withdrawal-P5EQATZ7.js");
|
|
22
21
|
return requestWithdrawal(vault, opts);
|
|
23
22
|
},
|
|
24
23
|
async listWithdrawalRequests(vault, opts) {
|
|
25
|
-
const { listWithdrawalRequests } = await import("../request-withdrawal-
|
|
24
|
+
const { listWithdrawalRequests } = await import("../request-withdrawal-P5EQATZ7.js");
|
|
26
25
|
return listWithdrawalRequests(vault, opts);
|
|
27
26
|
},
|
|
28
27
|
async approveWithdrawal(vault, requestId, opts) {
|
|
29
|
-
const { approveWithdrawal } = await import("../request-withdrawal-
|
|
28
|
+
const { approveWithdrawal } = await import("../request-withdrawal-P5EQATZ7.js");
|
|
30
29
|
return approveWithdrawal(vault, requestId, opts);
|
|
31
30
|
},
|
|
32
31
|
async rejectWithdrawal(vault, requestId, opts) {
|
|
33
|
-
const { rejectWithdrawal } = await import("../request-withdrawal-
|
|
32
|
+
const { rejectWithdrawal } = await import("../request-withdrawal-P5EQATZ7.js");
|
|
34
33
|
return rejectWithdrawal(vault, requestId, opts);
|
|
35
34
|
}
|
|
36
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/with-audit/portability/active.ts"],"sourcesContent":["/**\n * Enable the portability capability.\n * Pass to `createNoydb({ portabilityStrategy: withPortability() })` to make a\n * vault's `user.exportMyAccessibleData` / `user.unilateralWithdrawal` /\n * `user.requestWithdrawal` / `user.listWithdrawalRequests` /\n * `user.approveWithdrawal` / `user.rejectWithdrawal` methods live. The\n * export/withdraw/request engines are dynamically imported here, so they stay\n * reachable only via opt-in.\n */\nimport type { PortabilityStrategy } from './strategy.js'\n\nexport function withPortability(): PortabilityStrategy {\n return {\n async exportAccessibleData(vault, opts) {\n const { exportAccessibleData } = await import('./export-accessible.js')\n return exportAccessibleData(vault, opts)\n },\n async withdrawAccessibleData(vault, opts) {\n const { withdrawAccessibleData } = await import('./withdraw-accessible.js')\n return withdrawAccessibleData(vault, opts)\n },\n async requestWithdrawal(vault, opts) {\n const { requestWithdrawal } = await import('./request-withdrawal.js')\n return requestWithdrawal(vault, opts)\n },\n async listWithdrawalRequests(vault, opts) {\n const { listWithdrawalRequests } = await import('./request-withdrawal.js')\n return listWithdrawalRequests(vault, opts)\n },\n async approveWithdrawal(vault, requestId, opts) {\n const { approveWithdrawal } = await import('./request-withdrawal.js')\n return approveWithdrawal(vault, requestId, opts)\n },\n async rejectWithdrawal(vault, requestId, opts) {\n const { rejectWithdrawal } = await import('./request-withdrawal.js')\n return rejectWithdrawal(vault, requestId, opts)\n },\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/with-audit/portability/active.ts"],"sourcesContent":["/**\n * Enable the portability capability.\n * Pass to `createNoydb({ portabilityStrategy: withPortability() })` to make a\n * vault's `user.exportMyAccessibleData` / `user.unilateralWithdrawal` /\n * `user.requestWithdrawal` / `user.listWithdrawalRequests` /\n * `user.approveWithdrawal` / `user.rejectWithdrawal` methods live. The\n * export/withdraw/request engines are dynamically imported here, so they stay\n * reachable only via opt-in.\n */\nimport type { PortabilityStrategy } from './strategy.js'\n\nexport function withPortability(): PortabilityStrategy {\n return {\n async exportAccessibleData(vault, opts) {\n const { exportAccessibleData } = await import('./export-accessible.js')\n return exportAccessibleData(vault, opts)\n },\n async withdrawAccessibleData(vault, opts) {\n const { withdrawAccessibleData } = await import('./withdraw-accessible.js')\n return withdrawAccessibleData(vault, opts)\n },\n async requestWithdrawal(vault, opts) {\n const { requestWithdrawal } = await import('./request-withdrawal.js')\n return requestWithdrawal(vault, opts)\n },\n async listWithdrawalRequests(vault, opts) {\n const { listWithdrawalRequests } = await import('./request-withdrawal.js')\n return listWithdrawalRequests(vault, opts)\n },\n async approveWithdrawal(vault, requestId, opts) {\n const { approveWithdrawal } = await import('./request-withdrawal.js')\n return approveWithdrawal(vault, requestId, opts)\n },\n async rejectWithdrawal(vault, requestId, opts) {\n const { rejectWithdrawal } = await import('./request-withdrawal.js')\n return rejectWithdrawal(vault, requestId, opts)\n },\n }\n}\n"],"mappings":";;;;;;;;AAWO,SAAS,kBAAuC;AACrD,SAAO;AAAA,IACL,MAAM,qBAAqB,OAAO,MAAM;AACtC,YAAM,EAAE,qBAAqB,IAAI,MAAM,OAAO,kCAAwB;AACtE,aAAO,qBAAqB,OAAO,IAAI;AAAA,IACzC;AAAA,IACA,MAAM,uBAAuB,OAAO,MAAM;AACxC,YAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,oCAA0B;AAC1E,aAAO,uBAAuB,OAAO,IAAI;AAAA,IAC3C;AAAA,IACA,MAAM,kBAAkB,OAAO,MAAM;AACnC,YAAM,EAAE,kBAAkB,IAAI,MAAM,OAAO,mCAAyB;AACpE,aAAO,kBAAkB,OAAO,IAAI;AAAA,IACtC;AAAA,IACA,MAAM,uBAAuB,OAAO,MAAM;AACxC,YAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,mCAAyB;AACzE,aAAO,uBAAuB,OAAO,IAAI;AAAA,IAC3C;AAAA,IACA,MAAM,kBAAkB,OAAO,WAAW,MAAM;AAC9C,YAAM,EAAE,kBAAkB,IAAI,MAAM,OAAO,mCAAyB;AACpE,aAAO,kBAAkB,OAAO,WAAW,IAAI;AAAA,IACjD;AAAA,IACA,MAAM,iBAAiB,OAAO,WAAW,MAAM;AAC7C,YAAM,EAAE,iBAAiB,IAAI,MAAM,OAAO,mCAAyB;AACnE,aAAO,iBAAiB,OAAO,WAAW,IAAI;AAAA,IAChD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SatelliteConfigError
|
|
6
6
|
} from "./chunk-7O3Y4PPD.js";
|
|
7
|
-
import "./chunk-PZ5AY32C.js";
|
|
8
7
|
|
|
9
8
|
// src/with-shape/satellites/marker.ts
|
|
10
9
|
async function ensureSatelliteMarker(store, vaultName, spec, dek) {
|
|
@@ -14,7 +13,7 @@ async function ensureSatelliteMarker(store, vaultName, spec, dek) {
|
|
|
14
13
|
joined: spec.joined,
|
|
15
14
|
epoch: (/* @__PURE__ */ new Date()).toISOString()
|
|
16
15
|
};
|
|
17
|
-
const { loadPersistedSchema } = await import("./storage-
|
|
16
|
+
const { loadPersistedSchema } = await import("./storage-AVJA5BTW.js");
|
|
18
17
|
const persisted = await loadPersistedSchema(store, vaultName, spec.satellite, dek);
|
|
19
18
|
const prior = persisted?.satellite;
|
|
20
19
|
if (prior) {
|
|
@@ -25,7 +24,7 @@ async function ensureSatelliteMarker(store, vaultName, spec, dek) {
|
|
|
25
24
|
}
|
|
26
25
|
return;
|
|
27
26
|
}
|
|
28
|
-
const { persistSatelliteMarker } = await import("./register-
|
|
27
|
+
const { persistSatelliteMarker } = await import("./register-7OJWAWT5.js");
|
|
29
28
|
await persistSatelliteMarker({ store, vault: vaultName, collectionName: spec.satellite, dek, marker: next });
|
|
30
29
|
}
|
|
31
30
|
|
|
@@ -39,7 +38,7 @@ async function postRegister(store, vaultName, spec, getDEK, baseSchema, registry
|
|
|
39
38
|
}
|
|
40
39
|
if (baseSchema !== void 0) {
|
|
41
40
|
try {
|
|
42
|
-
const { derivePersistedSchema } = await import("./derive-
|
|
41
|
+
const { derivePersistedSchema } = await import("./derive-HHBRFS2U.js");
|
|
43
42
|
const envelope = await derivePersistedSchema(baseSchema);
|
|
44
43
|
const properties = envelope.jsonSchema?.["properties"];
|
|
45
44
|
const baseFields = Object.keys(properties ?? {});
|
|
@@ -57,4 +56,4 @@ async function postRegister(store, vaultName, spec, getDEK, baseSchema, registry
|
|
|
57
56
|
export {
|
|
58
57
|
postRegister
|
|
59
58
|
};
|
|
60
|
-
//# sourceMappingURL=post-register-
|
|
59
|
+
//# sourceMappingURL=post-register-HIYY4Y5S.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-shape/satellites/marker.ts","../src/with-shape/satellites/post-register.ts"],"sourcesContent":["import type { NoydbStore } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport { SatelliteConfigError } from '../../kernel/errors.js'\nimport { hashFields } from './validate.js'\nimport type { PairingMarker, SatelliteSpec } from './types.js'\n\n/**\n * Persist-or-reconcile the pairing marker in `_schemas/<satellite>`.\n * First declaration writes { base, fieldsHash, joined }; later declarations\n * must match exactly or are refused (R-S9). Lazy imports keep the satellite\n * spine tree-shakeable (config-drift.ts pattern).\n */\nexport async function ensureSatelliteMarker(\n store: NoydbStore, vaultName: string, spec: SatelliteSpec, dek: EnclaveKey,\n): Promise<void> {\n // #597: `epoch` only matters the first time this marker is ever persisted —\n // when a `prior` marker already exists below we return without ever using\n // it, so re-declaring a LIVE collection never mints (or compares) a new\n // epoch; the persisted one is carried forward untouched. Stamped here as a\n // timestamp (mirrors `derivedAt` in persisted-schemas/register.ts) rather\n // than a counter, since there's nothing to count from yet.\n const next: PairingMarker = {\n base: spec.base, fieldsHash: hashFields(spec.fields), joined: spec.joined,\n epoch: new Date().toISOString(),\n }\n const { loadPersistedSchema } = await import('../persisted-schemas/storage.js')\n const persisted = await loadPersistedSchema(store, vaultName, spec.satellite, dek)\n const prior = persisted?.satellite\n if (prior) {\n if (prior.base !== next.base || prior.fieldsHash !== next.fieldsHash || (prior.joined ?? null) !== (next.joined ?? null)) {\n throw new SatelliteConfigError(\n `R-S9: satellite \"${spec.satellite}\" re-declared divergently from its persisted pairing marker ` +\n `(persisted base=\"${prior.base}\" fieldsHash=${prior.fieldsHash}; declared base=\"${next.base}\" fieldsHash=${next.fieldsHash}). ` +\n `Evolve the marker deliberately, don't redeclare.`,\n )\n }\n return\n }\n const { persistSatelliteMarker } = await import('../persisted-schemas/register.js')\n await persistSatelliteMarker({ store, vault: vaultName, collectionName: spec.satellite, dek, marker: next })\n}\n","import type { NoydbStore } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport type { SatelliteSpec } from './types.js'\nimport type { SatelliteRegistry } from './registry.js'\nimport { ensureSatelliteMarker } from './marker.js'\n\n/** Async post-registration: R-S9 marker reconcile + R-S1/R-S5 derivable-schema cross-check. Failures poison, never throw. */\nexport async function postRegister(\n store: NoydbStore, vaultName: string, spec: SatelliteSpec,\n getDEK: (collectionName: string) => Promise<EnclaveKey>,\n baseSchema: unknown, registry: SatelliteRegistry,\n): Promise<void> {\n try {\n await ensureSatelliteMarker(store, vaultName, spec, await getDEK(spec.satellite))\n } catch (err) {\n registry.poison(spec.satellite, (err as Error).message); return\n }\n if (baseSchema !== undefined) {\n try {\n const { derivePersistedSchema } = await import('../persisted-schemas/derive.js')\n const envelope = await derivePersistedSchema(baseSchema)\n const properties = (envelope.jsonSchema as Record<string, unknown> | null)?.['properties'] as Record<string, unknown> | undefined\n const baseFields: string[] = Object.keys(properties ?? {})\n const overlap = spec.fields.filter(f => baseFields.includes(f))\n if (overlap.length > 0) {\n registry.poison(spec.satellite,\n `R-S1: satellite \"${spec.satellite}\" fields overlap the base schema: ${overlap.join(', ')} — routing must be unambiguous.`)\n }\n } catch { /* non-derivable validator → cross-check unavailable, by design (spec R-S5) */ }\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/with-shape/satellites/marker.ts","../src/with-shape/satellites/post-register.ts"],"sourcesContent":["import type { NoydbStore } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport { SatelliteConfigError } from '../../kernel/errors.js'\nimport { hashFields } from './validate.js'\nimport type { PairingMarker, SatelliteSpec } from './types.js'\n\n/**\n * Persist-or-reconcile the pairing marker in `_schemas/<satellite>`.\n * First declaration writes { base, fieldsHash, joined }; later declarations\n * must match exactly or are refused (R-S9). Lazy imports keep the satellite\n * spine tree-shakeable (config-drift.ts pattern).\n */\nexport async function ensureSatelliteMarker(\n store: NoydbStore, vaultName: string, spec: SatelliteSpec, dek: EnclaveKey,\n): Promise<void> {\n // #597: `epoch` only matters the first time this marker is ever persisted —\n // when a `prior` marker already exists below we return without ever using\n // it, so re-declaring a LIVE collection never mints (or compares) a new\n // epoch; the persisted one is carried forward untouched. Stamped here as a\n // timestamp (mirrors `derivedAt` in persisted-schemas/register.ts) rather\n // than a counter, since there's nothing to count from yet.\n const next: PairingMarker = {\n base: spec.base, fieldsHash: hashFields(spec.fields), joined: spec.joined,\n epoch: new Date().toISOString(),\n }\n const { loadPersistedSchema } = await import('../persisted-schemas/storage.js')\n const persisted = await loadPersistedSchema(store, vaultName, spec.satellite, dek)\n const prior = persisted?.satellite\n if (prior) {\n if (prior.base !== next.base || prior.fieldsHash !== next.fieldsHash || (prior.joined ?? null) !== (next.joined ?? null)) {\n throw new SatelliteConfigError(\n `R-S9: satellite \"${spec.satellite}\" re-declared divergently from its persisted pairing marker ` +\n `(persisted base=\"${prior.base}\" fieldsHash=${prior.fieldsHash}; declared base=\"${next.base}\" fieldsHash=${next.fieldsHash}). ` +\n `Evolve the marker deliberately, don't redeclare.`,\n )\n }\n return\n }\n const { persistSatelliteMarker } = await import('../persisted-schemas/register.js')\n await persistSatelliteMarker({ store, vault: vaultName, collectionName: spec.satellite, dek, marker: next })\n}\n","import type { NoydbStore } from '../../kernel/types.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport type { SatelliteSpec } from './types.js'\nimport type { SatelliteRegistry } from './registry.js'\nimport { ensureSatelliteMarker } from './marker.js'\n\n/** Async post-registration: R-S9 marker reconcile + R-S1/R-S5 derivable-schema cross-check. Failures poison, never throw. */\nexport async function postRegister(\n store: NoydbStore, vaultName: string, spec: SatelliteSpec,\n getDEK: (collectionName: string) => Promise<EnclaveKey>,\n baseSchema: unknown, registry: SatelliteRegistry,\n): Promise<void> {\n try {\n await ensureSatelliteMarker(store, vaultName, spec, await getDEK(spec.satellite))\n } catch (err) {\n registry.poison(spec.satellite, (err as Error).message); return\n }\n if (baseSchema !== undefined) {\n try {\n const { derivePersistedSchema } = await import('../persisted-schemas/derive.js')\n const envelope = await derivePersistedSchema(baseSchema)\n const properties = (envelope.jsonSchema as Record<string, unknown> | null)?.['properties'] as Record<string, unknown> | undefined\n const baseFields: string[] = Object.keys(properties ?? {})\n const overlap = spec.fields.filter(f => baseFields.includes(f))\n if (overlap.length > 0) {\n registry.poison(spec.satellite,\n `R-S1: satellite \"${spec.satellite}\" fields overlap the base schema: ${overlap.join(', ')} — routing must be unambiguous.`)\n }\n } catch { /* non-derivable validator → cross-check unavailable, by design (spec R-S5) */ }\n }\n}\n"],"mappings":";;;;;;;;AAYA,eAAsB,sBACpB,OAAmB,WAAmB,MAAqB,KAC5C;AAOf,QAAM,OAAsB;AAAA,IAC1B,MAAM,KAAK;AAAA,IAAM,YAAY,WAAW,KAAK,MAAM;AAAA,IAAG,QAAQ,KAAK;AAAA,IACnE,QAAO,oBAAI,KAAK,GAAE,YAAY;AAAA,EAChC;AACA,QAAM,EAAE,oBAAoB,IAAI,MAAM,OAAO,uBAAiC;AAC9E,QAAM,YAAY,MAAM,oBAAoB,OAAO,WAAW,KAAK,WAAW,GAAG;AACjF,QAAM,QAAQ,WAAW;AACzB,MAAI,OAAO;AACT,QAAI,MAAM,SAAS,KAAK,QAAQ,MAAM,eAAe,KAAK,eAAe,MAAM,UAAU,WAAW,KAAK,UAAU,OAAO;AACxH,YAAM,IAAI;AAAA,QACR,oBAAoB,KAAK,SAAS,gFACd,MAAM,IAAI,gBAAgB,MAAM,UAAU,oBAAoB,KAAK,IAAI,gBAAgB,KAAK,UAAU;AAAA,MAE5H;AAAA,IACF;AACA;AAAA,EACF;AACA,QAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,wBAAkC;AAClF,QAAM,uBAAuB,EAAE,OAAO,OAAO,WAAW,gBAAgB,KAAK,WAAW,KAAK,QAAQ,KAAK,CAAC;AAC7G;;;ACjCA,eAAsB,aACpB,OAAmB,WAAmB,MACtC,QACA,YAAqB,UACN;AACf,MAAI;AACF,UAAM,sBAAsB,OAAO,WAAW,MAAM,MAAM,OAAO,KAAK,SAAS,CAAC;AAAA,EAClF,SAAS,KAAK;AACZ,aAAS,OAAO,KAAK,WAAY,IAAc,OAAO;AAAG;AAAA,EAC3D;AACA,MAAI,eAAe,QAAW;AAC5B,QAAI;AACF,YAAM,EAAE,sBAAsB,IAAI,MAAM,OAAO,sBAAgC;AAC/E,YAAM,WAAW,MAAM,sBAAsB,UAAU;AACvD,YAAM,aAAc,SAAS,aAAgD,YAAY;AACzF,YAAM,aAAuB,OAAO,KAAK,cAAc,CAAC,CAAC;AACzD,YAAM,UAAU,KAAK,OAAO,OAAO,OAAK,WAAW,SAAS,CAAC,CAAC;AAC9D,UAAI,QAAQ,SAAS,GAAG;AACtB,iBAAS;AAAA,UAAO,KAAK;AAAA,UACnB,oBAAoB,KAAK,SAAS,qCAAqC,QAAQ,KAAK,IAAI,CAAC;AAAA,QAAiC;AAAA,MAC9H;AAAA,IACF,QAAQ;AAAA,IAAiF;AAAA,EAC3F;AACF;","names":[]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "./chunk-PZ5AY32C.js";
|
|
2
|
-
|
|
3
1
|
// src/with-audit/forget/purge-scope.ts
|
|
4
2
|
function partitionSealedCekKeys(keys, prefix, scopedPurge, declared) {
|
|
5
3
|
const matches = keys.filter((key) => key.startsWith(prefix));
|
|
@@ -21,4 +19,4 @@ export {
|
|
|
21
19
|
residueNoticesFromMap,
|
|
22
20
|
shouldSkipBlobScan
|
|
23
21
|
};
|
|
24
|
-
//# sourceMappingURL=purge-scope-
|
|
22
|
+
//# sourceMappingURL=purge-scope-4HEFPDOW.js.map
|