@noy-db/hub 0.6.0-pre.15 → 0.6.0-pre.17
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/dist/{api-VRTBOCY7.js → api-AEIN3KAQ.js} +6 -6
- package/dist/attestation/index.js +12 -12
- package/dist/{backup-BXS6GNCA.js → backup-7X3PFTSI.js} +13 -15
- package/dist/backup-7X3PFTSI.js.map +1 -0
- package/dist/blobs/index.js +5 -5
- package/dist/broker/index.js +6 -6
- package/dist/cargo/index.js +20 -20
- package/dist/{chunk-4FNR5YZI.js → chunk-2RGQNFJB.js} +10 -10
- package/dist/chunk-2RGQNFJB.js.map +1 -0
- package/dist/{chunk-ESABIXMQ.js → chunk-3JQVA527.js} +2 -2
- package/dist/{chunk-SX7MAZ5U.js → chunk-4GR422R5.js} +3 -3
- package/dist/{chunk-SFY6NT7D.js → chunk-5UGEGEIJ.js} +1 -1
- package/dist/chunk-5UGEGEIJ.js.map +1 -0
- package/dist/{chunk-6UAVKAG6.js → chunk-5VVBZ6E4.js} +2 -2
- package/dist/{chunk-GWJNBTZA.js → chunk-67XA44HH.js} +2 -2
- package/dist/{chunk-FINIMZ55.js → chunk-6JRIYG2C.js} +3 -3
- package/dist/{chunk-A5BGC3GR.js → chunk-6VAM5THN.js} +21 -19
- package/dist/chunk-6VAM5THN.js.map +1 -0
- package/dist/{chunk-SZZEDEIU.js → chunk-7LLKPODL.js} +1 -1
- package/dist/chunk-7LLKPODL.js.map +1 -0
- package/dist/{chunk-AIR3LSJH.js → chunk-7TZTQS4H.js} +13 -19
- package/dist/chunk-7TZTQS4H.js.map +1 -0
- package/dist/{chunk-FBG62BUQ.js → chunk-AKFNLRA2.js} +8 -14
- package/dist/chunk-AKFNLRA2.js.map +1 -0
- package/dist/{chunk-6O3PVUYJ.js → chunk-APUP2J5M.js} +6 -6
- package/dist/{chunk-PWJSO7HH.js → chunk-BKYQNNO3.js} +67 -37
- package/dist/chunk-BKYQNNO3.js.map +1 -0
- package/dist/{chunk-JZVXGOJE.js → chunk-BMDF4TLU.js} +2 -2
- package/dist/{chunk-DU27P4LO.js → chunk-C3YP5KKS.js} +3 -3
- package/dist/{chunk-4VRZDYRE.js → chunk-C52CJDFO.js} +2 -2
- package/dist/{chunk-6R4QXE43.js → chunk-D6E5N2O3.js} +3 -3
- package/dist/{chunk-5CK7VSSK.js → chunk-DEP24EE3.js} +3 -3
- package/dist/chunk-DEP24EE3.js.map +1 -0
- package/dist/{chunk-QVDK5AR7.js → chunk-EEBMKMA7.js} +5 -5
- package/dist/{chunk-X24QHSG5.js → chunk-EMFFWSAD.js} +3 -3
- package/dist/{chunk-BPT4W6CI.js → chunk-ES36R3U2.js} +3 -3
- package/dist/{chunk-TEJILTMY.js → chunk-FHFMWYGM.js} +4 -4
- package/dist/{chunk-PJ5TGJ7U.js → chunk-FZ2SSI5R.js} +2 -2
- package/dist/{chunk-CJ4KXDD4.js → chunk-GWI65NDQ.js} +2 -2
- package/dist/{chunk-TWSFSH32.js → chunk-I7JF5TNL.js} +2 -2
- package/dist/{chunk-RQ5G2YER.js → chunk-IEA3TZJE.js} +4 -4
- package/dist/{chunk-RLK57SMS.js → chunk-IRHOQFA7.js} +2 -2
- package/dist/{chunk-55B3KHZW.js → chunk-JAHIL6WO.js} +2 -2
- package/dist/{chunk-KNAZGJFG.js → chunk-JHYISAID.js} +9 -9
- package/dist/{chunk-YZGKXIYY.js → chunk-JV2CNEX2.js} +73 -74
- package/dist/chunk-JV2CNEX2.js.map +1 -0
- package/dist/{chunk-ELA2THEC.js → chunk-LUFZPROB.js} +4 -4
- package/dist/{chunk-62KVBIBU.js → chunk-N4GAJSRQ.js} +2 -2
- package/dist/{chunk-I5OLA3H6.js → chunk-N7HOHWKF.js} +2 -2
- package/dist/{chunk-HAN2PHLM.js → chunk-NWPR2V5W.js} +2 -2
- package/dist/{chunk-U26JILS3.js → chunk-OAWVM5L6.js} +6 -6
- package/dist/{chunk-PE6R44GS.js → chunk-OXRPH6AR.js} +5 -5
- package/dist/chunk-OXRPH6AR.js.map +1 -0
- package/dist/{chunk-WVCOS4XA.js → chunk-P5ARVLNW.js} +3 -3
- package/dist/{chunk-LAVPHX2V.js → chunk-QC2HGYFX.js} +3 -3
- package/dist/{chunk-PNEV2TBR.js → chunk-QJBXB4WU.js} +3 -3
- package/dist/{chunk-6N5PZ6G5.js → chunk-QKRJUPAC.js} +5 -5
- package/dist/chunk-RGPB25DB.js +60 -0
- package/dist/chunk-RGPB25DB.js.map +1 -0
- package/dist/{chunk-T7XUDZ7N.js → chunk-SDEHNGWW.js} +3 -3
- package/dist/{chunk-UZ2J7OKF.js → chunk-SJOK23XT.js} +3 -3
- package/dist/{chunk-WMUN7ZUD.js → chunk-UKKBKEUI.js} +2 -2
- package/dist/{chunk-ELHNLDXB.js → chunk-UNR6G3EJ.js} +15 -17
- package/dist/chunk-UNR6G3EJ.js.map +1 -0
- package/dist/{chunk-KIZOCPHS.js → chunk-URVL4EKU.js} +3 -3
- package/dist/{chunk-5AV6FENP.js → chunk-V3OLO4TK.js} +3 -3
- package/dist/{chunk-WVS62P45.js → chunk-VEA35MQP.js} +4 -4
- package/dist/{chunk-MMXMJXAE.js → chunk-VQQUOEON.js} +4 -4
- package/dist/{chunk-5LKPMDBC.js → chunk-VUQZYVYX.js} +4 -4
- package/dist/{chunk-RERAMZK5.js → chunk-WBHQX6ME.js} +34 -16
- package/dist/chunk-WBHQX6ME.js.map +1 -0
- package/dist/{chunk-PF3E6ABL.js → chunk-X2FXEEQT.js} +5 -5
- package/dist/{chunk-7F4TMKXC.js → chunk-XTC5EKST.js} +2 -2
- package/dist/{chunk-LGGLPURL.js → chunk-Z2OFE6IX.js} +2 -2
- package/dist/classified/index.js +3 -3
- package/dist/{classified-marker-BCYBGITH.js → classified-marker-W2PUYC3K.js} +3 -3
- package/dist/{collection-facade-YCJHWX64.js → collection-facade-CRXN72DU.js} +10 -10
- package/dist/consent/index.js +4 -4
- package/dist/cover/index.js +2 -2
- package/dist/custody/index.js +6 -6
- package/dist/{dead-filter-5ROD2DCQ.js → dead-filter-MVFQCLXY.js} +2 -2
- package/dist/{delegation-IULC56LW.js → delegation-I7XXO5LL.js} +4 -4
- package/dist/derivations/index.js +3 -3
- package/dist/{derive-AP2NXZDC.js → derive-NL7X2EFT.js} +4 -4
- package/dist/directory/index.js +5 -5
- package/dist/{dispatch-Z6C35BGM.js → dispatch-K3MDLCXG.js} +5 -5
- package/dist/{dispatch-4KKOMKWJ.js → dispatch-PY5RUHJF.js} +10 -10
- package/dist/{enclave-KJID436X.js → enclave-77K7UDLS.js} +10 -4
- package/dist/{executor-GD32BQQK.js → executor-FNGVGDW3.js} +10 -10
- package/dist/{export-accessible-H4Y2RTTD.js → export-accessible-QWUYY2OY.js} +7 -7
- package/dist/{extract-partition-PIJZX4G4.js → extract-partition-CGCURVS4.js} +10 -10
- package/dist/{fanout-sidecar-6QGMG5MA.js → fanout-sidecar-JI3MUPQV.js} +4 -4
- package/dist/forget/index.js +4 -4
- package/dist/history/index.js +6 -6
- package/dist/i18n/index.js +8 -8
- package/dist/index.js +56 -58
- package/dist/index.js.map +1 -1
- package/dist/introspection/index.js +5 -5
- package/dist/{issue-Q6STVPV5.js → issue-7IPUNAFA.js} +6 -6
- package/dist/kernel/enclave/index.d.ts +3 -0
- package/dist/kernel/enclave/record-envelope.d.ts +29 -0
- package/dist/kernel/enclave/record-keys/rekey.d.ts +62 -0
- package/dist/kernel/enclave/record-keys/tombstone.d.ts +3 -2
- package/dist/kernel/types.d.ts +15 -0
- package/dist/{ledger-HLINHILR.js → ledger-3RDSSMGD.js} +6 -6
- package/dist/liberate-2DNJ7AJ7.js +24 -0
- package/dist/{link-set-S47JZWHV.js → link-set-VJIWWUZO.js} +5 -5
- package/dist/{managed-secret-IDAOXSSX.js → managed-secret-XGGJ3BC3.js} +3 -3
- package/dist/materialized-views/index.js +10 -10
- package/dist/{noydb-HT56GCTQ.js → noydb-CLQP36JR.js} +27 -27
- package/dist/periods/index.js +6 -6
- package/dist/pod/index.js +30 -30
- package/dist/{pod-handle-N6HQMAAV.js → pod-handle-7BVSWP5B.js} +15 -10
- package/dist/pod-handle-7BVSWP5B.js.map +1 -0
- package/dist/policy/index.js +3 -3
- package/dist/port/with/i18n-strategy.d.ts +4 -1
- package/dist/port/with/lookup-strategy.d.ts +4 -1
- package/dist/portability/index.js +6 -6
- package/dist/{post-register-KW557BUZ.js → post-register-W3T4U57K.js} +4 -4
- package/dist/reduce/index.js +2 -2
- package/dist/{register-OMH3WVVL.js → register-YUVC4G27.js} +10 -10
- package/dist/{registry-SAEOPHFF.js → registry-BPKJX562.js} +4 -4
- package/dist/{registry-ZE2OG4TN.js → registry-HRFRBFDV.js} +4 -4
- package/dist/{request-withdrawal-HTSROWCL.js → request-withdrawal-CXTQLMJK.js} +9 -9
- package/dist/{reveal-T4N65GUG.js → reveal-G7W7N3AZ.js} +3 -3
- package/dist/{revoke-NE4CU2T3.js → revoke-ZX3TZUI6.js} +6 -6
- package/dist/sealed-record/index.js +6 -6
- package/dist/search/index.js +2 -2
- package/dist/{seed-TC42KFUK.js → seed-2FUULTQV.js} +6 -6
- package/dist/sequence/index.js +4 -4
- package/dist/session/index.js +3 -3
- package/dist/{signer-W2LX2FPA.js → signer-FPUIX63Z.js} +5 -5
- package/dist/snapshots/index.js +5 -5
- package/dist/{stale-WSC6Z7SB.js → stale-42FPALK2.js} +5 -5
- package/dist/{storage-EWT5HIX5.js → storage-6QODT6K5.js} +5 -5
- package/dist/{store-coordination-provider-RGHCIRWV.js → store-coordination-provider-Y3VXBHPL.js} +3 -3
- package/dist/sync/index.js +4 -4
- package/dist/team/index.js +8 -8
- package/dist/tiers/index.js +4 -4
- package/dist/via/lookup/handle.d.ts +4 -1
- package/dist/{walk-OLQC4JFV.js → walk-5PGJI3ND.js} +6 -6
- package/dist/with-commit/numbering/index.d.ts +0 -5
- package/dist/with-party/team/keyring.d.ts +5 -0
- package/dist/with-pod/pod-handle.d.ts +10 -0
- package/dist/{withdraw-accessible-Y7OEPWXM.js → withdraw-accessible-PFCQQGNP.js} +8 -8
- package/package.json +3 -3
- package/dist/backup-BXS6GNCA.js.map +0 -1
- package/dist/chunk-4FNR5YZI.js.map +0 -1
- package/dist/chunk-5CK7VSSK.js.map +0 -1
- package/dist/chunk-A5BGC3GR.js.map +0 -1
- package/dist/chunk-AIR3LSJH.js.map +0 -1
- package/dist/chunk-ELHNLDXB.js.map +0 -1
- package/dist/chunk-FBG62BUQ.js.map +0 -1
- package/dist/chunk-P3AFV6EA.js +0 -45
- package/dist/chunk-P3AFV6EA.js.map +0 -1
- package/dist/chunk-PE6R44GS.js.map +0 -1
- package/dist/chunk-PWJSO7HH.js.map +0 -1
- package/dist/chunk-RERAMZK5.js.map +0 -1
- package/dist/chunk-SFY6NT7D.js.map +0 -1
- package/dist/chunk-SZZEDEIU.js.map +0 -1
- package/dist/chunk-YZGKXIYY.js.map +0 -1
- package/dist/liberate-C3XBBLYM.js +0 -24
- package/dist/pod-handle-N6HQMAAV.js.map +0 -1
- /package/dist/{api-VRTBOCY7.js.map → api-AEIN3KAQ.js.map} +0 -0
- /package/dist/{chunk-ESABIXMQ.js.map → chunk-3JQVA527.js.map} +0 -0
- /package/dist/{chunk-SX7MAZ5U.js.map → chunk-4GR422R5.js.map} +0 -0
- /package/dist/{chunk-6UAVKAG6.js.map → chunk-5VVBZ6E4.js.map} +0 -0
- /package/dist/{chunk-GWJNBTZA.js.map → chunk-67XA44HH.js.map} +0 -0
- /package/dist/{chunk-FINIMZ55.js.map → chunk-6JRIYG2C.js.map} +0 -0
- /package/dist/{chunk-6O3PVUYJ.js.map → chunk-APUP2J5M.js.map} +0 -0
- /package/dist/{chunk-JZVXGOJE.js.map → chunk-BMDF4TLU.js.map} +0 -0
- /package/dist/{chunk-DU27P4LO.js.map → chunk-C3YP5KKS.js.map} +0 -0
- /package/dist/{chunk-4VRZDYRE.js.map → chunk-C52CJDFO.js.map} +0 -0
- /package/dist/{chunk-6R4QXE43.js.map → chunk-D6E5N2O3.js.map} +0 -0
- /package/dist/{chunk-QVDK5AR7.js.map → chunk-EEBMKMA7.js.map} +0 -0
- /package/dist/{chunk-X24QHSG5.js.map → chunk-EMFFWSAD.js.map} +0 -0
- /package/dist/{chunk-BPT4W6CI.js.map → chunk-ES36R3U2.js.map} +0 -0
- /package/dist/{chunk-TEJILTMY.js.map → chunk-FHFMWYGM.js.map} +0 -0
- /package/dist/{chunk-PJ5TGJ7U.js.map → chunk-FZ2SSI5R.js.map} +0 -0
- /package/dist/{chunk-CJ4KXDD4.js.map → chunk-GWI65NDQ.js.map} +0 -0
- /package/dist/{chunk-TWSFSH32.js.map → chunk-I7JF5TNL.js.map} +0 -0
- /package/dist/{chunk-RQ5G2YER.js.map → chunk-IEA3TZJE.js.map} +0 -0
- /package/dist/{chunk-RLK57SMS.js.map → chunk-IRHOQFA7.js.map} +0 -0
- /package/dist/{chunk-55B3KHZW.js.map → chunk-JAHIL6WO.js.map} +0 -0
- /package/dist/{chunk-KNAZGJFG.js.map → chunk-JHYISAID.js.map} +0 -0
- /package/dist/{chunk-ELA2THEC.js.map → chunk-LUFZPROB.js.map} +0 -0
- /package/dist/{chunk-62KVBIBU.js.map → chunk-N4GAJSRQ.js.map} +0 -0
- /package/dist/{chunk-I5OLA3H6.js.map → chunk-N7HOHWKF.js.map} +0 -0
- /package/dist/{chunk-HAN2PHLM.js.map → chunk-NWPR2V5W.js.map} +0 -0
- /package/dist/{chunk-U26JILS3.js.map → chunk-OAWVM5L6.js.map} +0 -0
- /package/dist/{chunk-WVCOS4XA.js.map → chunk-P5ARVLNW.js.map} +0 -0
- /package/dist/{chunk-LAVPHX2V.js.map → chunk-QC2HGYFX.js.map} +0 -0
- /package/dist/{chunk-PNEV2TBR.js.map → chunk-QJBXB4WU.js.map} +0 -0
- /package/dist/{chunk-6N5PZ6G5.js.map → chunk-QKRJUPAC.js.map} +0 -0
- /package/dist/{chunk-T7XUDZ7N.js.map → chunk-SDEHNGWW.js.map} +0 -0
- /package/dist/{chunk-UZ2J7OKF.js.map → chunk-SJOK23XT.js.map} +0 -0
- /package/dist/{chunk-WMUN7ZUD.js.map → chunk-UKKBKEUI.js.map} +0 -0
- /package/dist/{chunk-KIZOCPHS.js.map → chunk-URVL4EKU.js.map} +0 -0
- /package/dist/{chunk-5AV6FENP.js.map → chunk-V3OLO4TK.js.map} +0 -0
- /package/dist/{chunk-WVS62P45.js.map → chunk-VEA35MQP.js.map} +0 -0
- /package/dist/{chunk-MMXMJXAE.js.map → chunk-VQQUOEON.js.map} +0 -0
- /package/dist/{chunk-5LKPMDBC.js.map → chunk-VUQZYVYX.js.map} +0 -0
- /package/dist/{chunk-PF3E6ABL.js.map → chunk-X2FXEEQT.js.map} +0 -0
- /package/dist/{chunk-7F4TMKXC.js.map → chunk-XTC5EKST.js.map} +0 -0
- /package/dist/{chunk-LGGLPURL.js.map → chunk-Z2OFE6IX.js.map} +0 -0
- /package/dist/{classified-marker-BCYBGITH.js.map → classified-marker-W2PUYC3K.js.map} +0 -0
- /package/dist/{collection-facade-YCJHWX64.js.map → collection-facade-CRXN72DU.js.map} +0 -0
- /package/dist/{dead-filter-5ROD2DCQ.js.map → dead-filter-MVFQCLXY.js.map} +0 -0
- /package/dist/{delegation-IULC56LW.js.map → delegation-I7XXO5LL.js.map} +0 -0
- /package/dist/{derive-AP2NXZDC.js.map → derive-NL7X2EFT.js.map} +0 -0
- /package/dist/{dispatch-Z6C35BGM.js.map → dispatch-K3MDLCXG.js.map} +0 -0
- /package/dist/{dispatch-4KKOMKWJ.js.map → dispatch-PY5RUHJF.js.map} +0 -0
- /package/dist/{enclave-KJID436X.js.map → enclave-77K7UDLS.js.map} +0 -0
- /package/dist/{executor-GD32BQQK.js.map → executor-FNGVGDW3.js.map} +0 -0
- /package/dist/{export-accessible-H4Y2RTTD.js.map → export-accessible-QWUYY2OY.js.map} +0 -0
- /package/dist/{extract-partition-PIJZX4G4.js.map → extract-partition-CGCURVS4.js.map} +0 -0
- /package/dist/{fanout-sidecar-6QGMG5MA.js.map → fanout-sidecar-JI3MUPQV.js.map} +0 -0
- /package/dist/{issue-Q6STVPV5.js.map → issue-7IPUNAFA.js.map} +0 -0
- /package/dist/{ledger-HLINHILR.js.map → ledger-3RDSSMGD.js.map} +0 -0
- /package/dist/{liberate-C3XBBLYM.js.map → liberate-2DNJ7AJ7.js.map} +0 -0
- /package/dist/{link-set-S47JZWHV.js.map → link-set-VJIWWUZO.js.map} +0 -0
- /package/dist/{managed-secret-IDAOXSSX.js.map → managed-secret-XGGJ3BC3.js.map} +0 -0
- /package/dist/{noydb-HT56GCTQ.js.map → noydb-CLQP36JR.js.map} +0 -0
- /package/dist/{post-register-KW557BUZ.js.map → post-register-W3T4U57K.js.map} +0 -0
- /package/dist/{register-OMH3WVVL.js.map → register-YUVC4G27.js.map} +0 -0
- /package/dist/{registry-SAEOPHFF.js.map → registry-BPKJX562.js.map} +0 -0
- /package/dist/{registry-ZE2OG4TN.js.map → registry-HRFRBFDV.js.map} +0 -0
- /package/dist/{request-withdrawal-HTSROWCL.js.map → request-withdrawal-CXTQLMJK.js.map} +0 -0
- /package/dist/{reveal-T4N65GUG.js.map → reveal-G7W7N3AZ.js.map} +0 -0
- /package/dist/{revoke-NE4CU2T3.js.map → revoke-ZX3TZUI6.js.map} +0 -0
- /package/dist/{seed-TC42KFUK.js.map → seed-2FUULTQV.js.map} +0 -0
- /package/dist/{signer-W2LX2FPA.js.map → signer-FPUIX63Z.js.map} +0 -0
- /package/dist/{stale-WSC6Z7SB.js.map → stale-42FPALK2.js.map} +0 -0
- /package/dist/{storage-EWT5HIX5.js.map → storage-6QODT6K5.js.map} +0 -0
- /package/dist/{store-coordination-provider-RGHCIRWV.js.map → store-coordination-provider-Y3VXBHPL.js.map} +0 -0
- /package/dist/{walk-OLQC4JFV.js.map → walk-5PGJI3ND.js.map} +0 -0
- /package/dist/{withdraw-accessible-Y7OEPWXM.js.map → withdraw-accessible-PFCQQGNP.js.map} +0 -0
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
ATTESTATIONS_COLLECTION,
|
|
3
3
|
REVOKED_RECORD_ID,
|
|
4
4
|
loadOrCreateSigner
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-C3YP5KKS.js";
|
|
6
6
|
import {
|
|
7
7
|
openEnvelopeJson
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BKYQNNO3.js";
|
|
9
9
|
import {
|
|
10
10
|
encrypt
|
|
11
11
|
} from "./chunk-QTDAPDDV.js";
|
|
12
12
|
import {
|
|
13
13
|
NOYDB_FORMAT_VERSION
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5UGEGEIJ.js";
|
|
15
15
|
import {
|
|
16
16
|
AttestationError,
|
|
17
17
|
ConflictError
|
|
@@ -82,4 +82,4 @@ export {
|
|
|
82
82
|
getRevokedDocIdsCore,
|
|
83
83
|
publishRevocationListCore
|
|
84
84
|
};
|
|
85
|
-
//# sourceMappingURL=chunk-
|
|
85
|
+
//# sourceMappingURL=chunk-LUFZPROB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
envelopeBodyForHash
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BKYQNNO3.js";
|
|
4
4
|
import {
|
|
5
5
|
sha256Hex
|
|
6
6
|
} from "./chunk-QTDAPDDV.js";
|
|
@@ -67,4 +67,4 @@ export {
|
|
|
67
67
|
parseIndex,
|
|
68
68
|
envelopePayloadHash
|
|
69
69
|
};
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
70
|
+
//# sourceMappingURL=chunk-N4GAJSRQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NOYDB_FORMAT_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5UGEGEIJ.js";
|
|
4
4
|
import {
|
|
5
5
|
ValidationError
|
|
6
6
|
} from "./chunk-I64WQSN3.js";
|
|
@@ -233,4 +233,4 @@ export {
|
|
|
233
233
|
resolveLocale,
|
|
234
234
|
pickLocale
|
|
235
235
|
};
|
|
236
|
-
//# sourceMappingURL=chunk-
|
|
236
|
+
//# sourceMappingURL=chunk-N7HOHWKF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writePod
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SDEHNGWW.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/portability/export-accessible.ts
|
|
6
6
|
function resolveAccessibleCollections(keyring, scope, writableOnly = false) {
|
|
@@ -42,4 +42,4 @@ export {
|
|
|
42
42
|
buildAccessibleBundle,
|
|
43
43
|
exportAccessibleData
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-NWPR2V5W.js.map
|
|
@@ -3,22 +3,22 @@ import {
|
|
|
3
3
|
} from "./chunk-EPFF7LOX.js";
|
|
4
4
|
import {
|
|
5
5
|
loadFence
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C52CJDFO.js";
|
|
7
7
|
import {
|
|
8
8
|
SCHEMAS_COLLECTION,
|
|
9
9
|
loadPersistedSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6JRIYG2C.js";
|
|
11
11
|
import {
|
|
12
12
|
canonicalJson,
|
|
13
13
|
sha256Hex
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-N4GAJSRQ.js";
|
|
15
15
|
import {
|
|
16
16
|
openEnvelopeJson,
|
|
17
17
|
writeEnvelopeBody
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BKYQNNO3.js";
|
|
19
19
|
import {
|
|
20
20
|
NOYDB_FORMAT_VERSION
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5UGEGEIJ.js";
|
|
22
22
|
|
|
23
23
|
// src/with-shape/manifest/types.ts
|
|
24
24
|
var MANIFEST_SCHEMA_RECORD_ID = "schema";
|
|
@@ -88,4 +88,4 @@ export {
|
|
|
88
88
|
saveSchemaManifest,
|
|
89
89
|
deriveSchemaManifest
|
|
90
90
|
};
|
|
91
|
-
//# sourceMappingURL=chunk-
|
|
91
|
+
//# sourceMappingURL=chunk-OAWVM5L6.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
envelopePayloadHash
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N4GAJSRQ.js";
|
|
4
4
|
import {
|
|
5
5
|
NOYDB_FORMAT_VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5UGEGEIJ.js";
|
|
7
7
|
import {
|
|
8
8
|
DictKeyMissingError,
|
|
9
9
|
PermissionDeniedError
|
|
@@ -224,7 +224,7 @@ var LookupHandle = class {
|
|
|
224
224
|
}
|
|
225
225
|
const nextVersion = existing._v + 1;
|
|
226
226
|
if (this.onDirty) {
|
|
227
|
-
await this.adapter.put(this.compartmentName, this.collName, key, this.buildDeleteMarker(nextVersion, this.keyring.userId));
|
|
227
|
+
await this.adapter.put(this.compartmentName, this.collName, key, this.buildDeleteMarker({ collection: this.collName, id: key }, nextVersion, this.keyring.userId));
|
|
228
228
|
} else {
|
|
229
229
|
await this.adapter.delete(this.compartmentName, this.collName, key);
|
|
230
230
|
}
|
|
@@ -295,7 +295,7 @@ var LookupHandle = class {
|
|
|
295
295
|
}
|
|
296
296
|
const oldKeyNextVersion = existing._v + 1;
|
|
297
297
|
if (this.onDirty) {
|
|
298
|
-
await this.adapter.put(this.compartmentName, this.collName, oldKey, this.buildDeleteMarker(oldKeyNextVersion, this.keyring.userId));
|
|
298
|
+
await this.adapter.put(this.compartmentName, this.collName, oldKey, this.buildDeleteMarker({ collection: this.collName, id: oldKey }, oldKeyNextVersion, this.keyring.userId));
|
|
299
299
|
} else {
|
|
300
300
|
await this.adapter.delete(this.compartmentName, this.collName, oldKey);
|
|
301
301
|
}
|
|
@@ -389,4 +389,4 @@ export {
|
|
|
389
389
|
dictCollectionName,
|
|
390
390
|
LookupHandle
|
|
391
391
|
};
|
|
392
|
-
//# sourceMappingURL=chunk-
|
|
392
|
+
//# sourceMappingURL=chunk-OXRPH6AR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/via/lookup/handle.ts"],"sourcesContent":["/**\n * `_dict_*` reserved-collection storage engine — `LookupHandle`.\n *\n * Verbatim move of `DictionaryHandle` out of `via/i18n/dictionary.ts`\n * (#650 Task 1 — via-lookup extraction, phase D). The class is renamed to\n * `LookupHandle` (the dict tier is one backing kind the eventual lookup\n * layer supports); `via/i18n/dictionary.ts` re-exports it as\n * `DictionaryHandle` for one release so existing importers compile\n * unchanged. `DictEntry` / `DictionaryOptions` / `DICT_COLLECTION_PREFIX` /\n * `dictCollectionName` move with it — they were exclusively consumed by\n * this class's constructor/methods.\n *\n * No behavior change from the pre-move class: same encryption door\n * (`reservedEnvelopes('_dict_')`, #629 Task 4), same ACL, same ledger\n * shape, same sync-cache/snapshot contract for dict joins.\n */\n\nimport type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\nimport type { NoydbEventEmitter } from '../../kernel/events.js'\nimport { NOYDB_FORMAT_VERSION } from '../../kernel/types.js'\nimport type { UnlockedKeyring } from '../../with-party/team/keyring.js'\nimport type { ViaCryptoCtx } from '../../kernel/via/index.js'\nimport type { LedgerStore } from '../../with-commit/history/ledger/store.js'\nimport { envelopePayloadHash } from '../../with-commit/history/ledger/hash.js'\nimport {\n PermissionDeniedError,\n DictKeyMissingError,\n} from '../../kernel/errors.js'\n\n/**\n * Delete-marker predicate, duplicated (not imported) from\n * `kernel/enclave/record-keys/tombstone.ts`'s `isDeleteMarker` (#647 fix wave 1).\n * `via/lookup/**` may not statically import `kernel/enclave/` — not even the barrel\n * (Check 15, `via-enclave-isolation`) — and this predicate carries zero crypto/protected-body\n * surface (just the `_del` protocol-header field, not `_iv`/`_data`), so duplicating it here\n * mirrors the same call `port/with/i18n-strategy.ts` already makes for `isDictCollectionName`\n * (see its doc comment). Keep the two in sync if the marker shape ever changes.\n *\n * `buildDeleteMarker` (which DOES construct the protected `_iv`/`_data` body fields — Check 11,\n * `enclave-body-only`) can't be duplicated the same way; it's injected via the constructor\n * instead, built from the real `kernel/enclave` function at the Vault call site.\n */\nfunction isDeleteMarker(envelope: EncryptedEnvelope): boolean {\n return envelope._del === true\n}\n\n/** Reserved collection name prefix. Never collides with user collections. */\nexport const DICT_COLLECTION_PREFIX = '_dict_'\n\n/** Return the adapter collection name for a named dictionary. */\nexport function dictCollectionName(dictionaryName: string): string {\n return `${DICT_COLLECTION_PREFIX}${dictionaryName}`\n}\n\n// ─── Dictionary entry shape ────────────────────────────────────────────\n\n/**\n * One entry in a `_dict_*` collection. The record `id` (adapter-side\n * key) IS the stable dictionary key (e.g. `'paid'`). The `labels`\n * record maps locale codes to display strings.\n */\nexport interface DictEntry {\n /** Stable key — same as the record id in the adapter. */\n readonly key: string\n /** Locale → label map, e.g. `{ en: 'Paid', th: 'ชำระแล้ว' }`. */\n readonly labels: Record<string, string>\n}\n\n// ─── Per-dictionary options ────────────────────────────────────────────\n\n/**\n * Options for `vault.dictionary(name, options?)`.\n *\n * `writableBy` controls the minimum role for write operations (put,\n * putAll, delete, rename). Defaults to `'admin'` to match the standard\n * \"dictionary contents are owned by admins\" convention; set to\n * `'operator'` for user-editable dictionaries like custom tags.\n */\nexport interface DictionaryOptions {\n /** Minimum role allowed to write dictionary entries. Default: `'admin'`. */\n readonly writableBy?: 'owner' | 'admin' | 'operator'\n}\n\n// ─── LookupHandle ───────────────────────────────────────────────────────\n\n/**\n * Handle to a named dictionary within a vault.\n *\n * Obtained via `vault.dictionary(name)`. Provides strongly-typed\n * CRUD for dictionary entries, plus the `rename()` operation that is the\n * only sanctioned mass-mutation path for dictKey fields.\n *\n * All writes are encrypted under the compartment's DEK for the\n * `_dict_<name>` collection. Adapters never see plaintext.\n */\nexport class LookupHandle<Keys extends string = string> {\n private readonly collName: string\n\n /**\n * Synchronous write-through cache for dict-join support.\n * Populated on every `put()`, `delete()`, and `rename()`. The snapshot\n * is built from this cache by `snapshotEntries()` — the query executor\n * calls this synchronously inside `.toArray()`.\n *\n * `null` means \"not yet initialized\" — callers should use `list()`\n * to warm the cache before using dict joins on pre-existing data.\n */\n private readonly _syncCache = new Map<string, DictEntry>()\n\n /**\n * Return all cached entries as `{ key, labels, ...labels }` records —\n * usable synchronously by the join executor's `snapshot()` call.\n * Returns an empty array when the cache has never been populated.\n */\n snapshotEntries(): readonly Record<string, unknown>[] {\n return Array.from(this._syncCache.values()).map((e) => ({\n key: e.key,\n labels: e.labels,\n ...e.labels,\n }))\n }\n\n constructor(\n private readonly adapter: NoydbStore,\n private readonly compartmentName: string,\n private readonly dictionaryName: string,\n private readonly keyring: UnlockedKeyring,\n /**\n * The `reservedEnvelopes('_dict_')` capability — this handle's sanctioned\n * crypto door onto its `_dict_<name>` collection (#629 Task 4). Bound by\n * the Vault; never a keyring, raw DEK, or enclave import.\n */\n private readonly reservedEnvelopes: ReturnType<ViaCryptoCtx['reservedEnvelopes']>,\n private readonly encrypted: boolean,\n private readonly ledger: LedgerStore | undefined,\n private readonly options: DictionaryOptions,\n /**\n * Callback provided by the Vault to find and rewrite records\n * in any registered collection that has a dictKeyField pointing at\n * this dictionary, used by `rename()`.\n */\n private readonly findAndUpdateReferences:\n | ((\n dictionaryName: string,\n oldKey: string,\n newKey: string,\n ) => Promise<void>)\n | undefined,\n private readonly emitter: NoydbEventEmitter,\n /**\n * #647 fix wave 1 — mints a version-ordered delete-marker envelope (the reserved-tier\n * mirror of #589's ordinary-collection delete marker). Injected rather than imported:\n * `buildDeleteMarker` constructs the envelope's protected-body fields (`_iv`/`_data`), and\n * `via/lookup/**` may not reach `kernel/enclave/` directly (Check 11\n * `enclave-body-only` / Check 15 `via-enclave-isolation`) — the Vault binds the real\n * `kernel/enclave` function at construction time, same pattern as `reservedEnvelopes` above.\n */\n private readonly buildDeleteMarker: (identity: { collection: string; id: string }, version: number, actor: string) => EncryptedEnvelope,\n /** #650 Task 4 (#647) — dirty-log participation hook (origin `local-write`), threaded from `BuildLookupHandleOptions`. */\n private readonly onDirty?: (collection: string, id: string, action: 'put' | 'delete', version: number) => Promise<void>,\n /** #650 Task 4 — thin `graphDispatch.collect`-equivalent; opens/collects/flushes a one-shot wave for this touch. */\n private readonly onRecordMutated?: (collection: string, id: string, action: 'put' | 'delete', version: number) => Promise<void>,\n /** #650 Task 5 (#648) — the real reference check `delete()`'s strict branch calls: restrict\n * throws `DictKeyInUseError`, cascade/nullify apply their propagation. Vault-bound; a no-op\n * when the dimension has no declared lookup-referencing edges. */\n private readonly checkReferencesOnDelete?: (key: string) => Promise<unknown>,\n ) {\n this.collName = dictCollectionName(dictionaryName)\n }\n\n // ─── Access checks ────────────────────────────────────────────────\n\n private requireWriteAccess(): void {\n const minRole = this.options.writableBy ?? 'admin'\n const roleRank: Record<string, number> = {\n client: 1,\n viewer: 2,\n operator: 3,\n admin: 4,\n owner: 5,\n }\n const callerRank = roleRank[this.keyring.role] ?? 0\n const requiredRank = roleRank[minRole] ?? 4\n if (callerRank < requiredRank) {\n throw new PermissionDeniedError(\n `Dictionary \"${this.dictionaryName}\" writes require \"${minRole}\" role or above. ` +\n `Current role: \"${this.keyring.role}\".`,\n )\n }\n }\n\n // ─── Internal helpers ─────────────────────────────────────────────\n\n private async encryptEntry(entry: DictEntry, version: number): Promise<EncryptedEnvelope> {\n if (!this.encrypted) {\n return {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: version,\n _ts: new Date().toISOString(),\n _iv: '',\n _data: JSON.stringify(entry),\n _by: this.keyring.userId,\n }\n }\n const envelope = await this.reservedEnvelopes.encrypt(this.collName, JSON.stringify(entry), version)\n return { ...envelope, _by: this.keyring.userId }\n }\n\n private async decryptEntry(envelope: EncryptedEnvelope): Promise<DictEntry> {\n if (!this.encrypted) {\n return JSON.parse(envelope._data) as DictEntry\n }\n const json = await this.reservedEnvelopes.decrypt(this.collName, envelope)\n return JSON.parse(json) as DictEntry\n }\n\n /** @internal #650 Task 4 — re-read `key`'s CURRENT adapter truth into `_syncCache` (delete the\n * cache entry when the key is now gone). Called by `Vault._invalidateSyncApplied` after a\n * reserved-lookup row applies via sync, so an already-warmed snapshot/membership/altIndex read\n * never sees a stale verdict for a pulled vocabulary edit — the same invalidation a local\n * put()/delete()/rename() already triggers via `_syncCache.set`/`delete` above. */\n async _refreshSyncCache(key: string): Promise<void> {\n const envelope = await this.adapter.get(this.compartmentName, this.collName, key)\n if (!envelope || isDeleteMarker(envelope)) { this._syncCache.delete(key); return }\n this._syncCache.set(key, await this.decryptEntry(envelope))\n }\n\n // ─── Public API ───────────────────────────────────────────────────\n\n /**\n * Add or overwrite a single dictionary entry.\n *\n * @param key The stable key to store (e.g. `'paid'`).\n * @param labels Locale → label map (e.g. `{ en: 'Paid', th: 'ชำระแล้ว' }`).\n */\n async put(key: Keys, labels: Record<string, string>): Promise<void> {\n this.requireWriteAccess()\n\n const entry: DictEntry = { key, labels }\n const existing = await this.adapter.get(\n this.compartmentName,\n this.collName,\n key,\n )\n const version = existing ? existing._v + 1 : 1\n const envelope = await this.encryptEntry(entry, version)\n\n await this.adapter.put(\n this.compartmentName,\n this.collName,\n key,\n envelope,\n existing ? existing._v : undefined,\n )\n\n // Maintain synchronous cache for dict-join snapshot\n this._syncCache.set(key, entry)\n\n // #650 Task 4 (#647) — choke-point participation: dirty-log tracking BEFORE the emit (mirrors\n // Collection._onRecordMutated's local-write order), then the wave-open hook AFTER.\n await this.onDirty?.(this.collName, key, 'put', version)\n\n this.emitter.emit('change', {\n vault: this.compartmentName,\n collection: this.collName,\n id: key,\n action: 'put',\n })\n\n await this.onRecordMutated?.(this.collName, key, 'put', version)\n\n if (this.ledger) {\n await this.ledger.append({\n op: 'put',\n collection: this.collName,\n id: key,\n version,\n actor: this.keyring.userId,\n // — must be the real envelope hash so\n // vault.verifyBackupIntegrity()'s data-cross-check matches.\n payloadHash: await envelopePayloadHash(envelope),\n })\n }\n }\n\n /**\n * Batch-add or overwrite multiple dictionary entries in one call.\n *\n * @param entries `{ key: { locale: label } }` map.\n */\n async putAll(entries: Record<Keys, Record<string, string>>): Promise<void> {\n this.requireWriteAccess()\n for (const [key, labels] of Object.entries(entries) as [Keys, Record<string, string>][]) {\n await this.put(key, labels)\n }\n }\n\n /**\n * Load the label map for a single key.\n *\n * @returns The label map, or `null` if the key doesn't exist.\n */\n async get(key: Keys): Promise<Record<string, string> | null> {\n const envelope = await this.adapter.get(\n this.compartmentName,\n this.collName,\n key,\n )\n if (!envelope || isDeleteMarker(envelope)) return null\n const entry = await this.decryptEntry(envelope)\n return entry.labels\n }\n\n /**\n * Delete a dictionary key.\n *\n * Default mode is `'strict'` — throws `DictKeyInUseError` if any\n * registered collection has a record referencing this key. Pass\n * `{ mode: 'warn' }` to skip the check (dev-mode cleanup only).\n *\n * Under sync, deletion writes a version-ordered delete-marker row rather than removing the\n * adapter key outright (#647 fix wave 1) — markers accumulate over time; GC is future work,\n * acceptable for vocabulary-scale data.\n */\n async delete(key: Keys, opts: { mode?: 'strict' | 'warn' } = {}): Promise<void> {\n this.requireWriteAccess()\n\n const existing = await this.adapter.get(\n this.compartmentName,\n this.collName,\n key,\n )\n if (!existing || isDeleteMarker(existing)) {\n throw new DictKeyMissingError(this.dictionaryName, key)\n }\n\n // #650 Task 5 (#648) — the real reference check: restrict throws `DictKeyInUseError` naming\n // the referencing collection, cascade/nullify apply their propagation. `mode: 'warn'` skips\n // this entirely (today's dev-mode-cleanup escape hatch, unconditional delete). A dimension\n // with no declared lookup-referencing edges is a no-op (undeclared refs keep dangling).\n const mode = opts.mode ?? 'strict'\n if (mode === 'strict') {\n await this.checkReferencesOnDelete?.(key)\n }\n\n // #647 fix wave 1 — mirrors Collection._doDelete's identical `this.onDirty`-gated branch\n // (#589): under sync, a raw adapter.delete() is invisible to a peer's next pull (the key\n // simply stops appearing in remote.list()) — a deleted key never propagates and can be\n // silently resurrected by a later edit. Write a version-ordered DELETE-MARKER instead, so\n // the removal round-trips like any other row. No-op (plain adapter.delete) when sync isn't wired.\n const nextVersion = existing._v + 1\n if (this.onDirty) {\n await this.adapter.put(this.compartmentName, this.collName, key, this.buildDeleteMarker({ collection: this.collName, id: key }, nextVersion, this.keyring.userId))\n } else {\n await this.adapter.delete(this.compartmentName, this.collName, key)\n }\n\n // Maintain synchronous cache for dict-join snapshot\n this._syncCache.delete(key)\n\n // #650 Task 4 (#647) — same choke-point ordering as put() above.\n // #647 fix wave 1: the dirty entry's ACTION is 'put' (not 'delete') — mirrors\n // Collection._onRecordMutated's 'local-delete' case exactly: the marker rides push's\n // CAS-put path, not push's raw remote.delete() path (which would strip the marker off the\n // remote too and reopen this same hole). The version is the MARKER's version, so push's CAS\n // (expectedVersion = entry.version - 1) matches the pre-delete remote copy.\n await this.onDirty?.(this.collName, key, 'put', nextVersion)\n\n this.emitter.emit('change', {\n vault: this.compartmentName,\n collection: this.collName,\n id: key,\n action: 'delete',\n })\n\n await this.onRecordMutated?.(this.collName, key, 'delete', nextVersion)\n\n if (this.ledger) {\n await this.ledger.append({\n op: 'delete',\n collection: this.collName,\n id: key,\n version: existing._v,\n actor: this.keyring.userId,\n // — for delete the prior envelope is what was just\n // removed; we hash it so the chain captures intent. The\n // verifyBackupIntegrity data-cross-check skips delete\n // entries entirely (the live record is gone), but the\n // chain still benefits from a stable non-empty hash.\n payloadHash: await envelopePayloadHash(existing),\n })\n }\n }\n\n /**\n * Rename a dictionary key — the only sanctioned mass-mutation path.\n *\n * Atomically:\n * 1. Adds the new key with the same labels as the old key.\n * 2. Updates every registered record that stores the old key to\n * store the new key instead.\n * 3. Deletes the old key.\n * 4. Appends a single ledger entry recording the rename.\n *\n * Respects ACL: throws `PermissionDeniedError` before any mutation\n * if the caller can't write. The cascade is best-effort atomic\n * within this call — no two-phase commit across adapter calls.\n *\n * Cascade-on-delete is NOT supported. Use `rename()` when you need\n * to change a key that records reference.\n */\n async rename(oldKey: Keys, newKey: string): Promise<void> {\n this.requireWriteAccess()\n\n // 1. Load old entry\n const existing = await this.adapter.get(\n this.compartmentName,\n this.collName,\n oldKey,\n )\n if (!existing || isDeleteMarker(existing)) {\n throw new DictKeyMissingError(this.dictionaryName, oldKey)\n }\n const oldEntry = await this.decryptEntry(existing)\n\n // 2. Write new key\n const newEntry: DictEntry = { key: newKey, labels: oldEntry.labels }\n const newEnvelope = await this.encryptEntry(newEntry, 1)\n await this.adapter.put(\n this.compartmentName,\n this.collName,\n newKey,\n newEnvelope,\n )\n\n // #670 — publish newKey to the sync cache BEFORE step 3 rewrites referencing records: a\n // vocabulary:'closed' referencing field's enforceWrite reads checkLookupMembership ->\n // snapshotEntries() -> this._syncCache, so if newKey isn't a member yet, step 3's own write of\n // newKey into those records self-refuses with UnknownLookupKeyError. Transition semantics:\n // mid-rename BOTH oldKey and newKey are legitimately members (records are transitioning\n // old->new during the rewrite) — oldKey stays a member until its removal completes below.\n this._syncCache.set(newKey, newEntry)\n\n // 3. Update all referencing records in registered collections\n if (this.findAndUpdateReferences) {\n await this.findAndUpdateReferences(this.dictionaryName, oldKey, newKey)\n }\n\n // 4. Remove old key — #647 fix wave 1: same delete-marker convention as delete() above, so\n // the old key's removal propagates on sync instead of leaving a phantom stale row on a peer\n // that only observes the new key arriving.\n const oldKeyNextVersion = existing._v + 1\n if (this.onDirty) {\n await this.adapter.put(this.compartmentName, this.collName, oldKey, this.buildDeleteMarker({ collection: this.collName, id: oldKey }, oldKeyNextVersion, this.keyring.userId))\n } else {\n await this.adapter.delete(this.compartmentName, this.collName, oldKey)\n }\n\n // Maintain synchronous cache for dict-join snapshot — oldKey's removal from the cache lands\n // here (after step 3), completing the old->new membership transition begun above.\n this._syncCache.delete(oldKey)\n\n // #650 Task 4 (#647) — same choke-point ordering as put()/delete() above, for BOTH touches.\n // #647 fix wave 1: oldKey's dirty action is 'put' (not 'delete') — see delete()'s comment\n // above for why the marker must ride push's CAS-put path, at the marker's version.\n await this.onDirty?.(this.collName, oldKey, 'put', oldKeyNextVersion)\n this.emitter.emit('change', {\n vault: this.compartmentName,\n collection: this.collName,\n id: oldKey,\n action: 'delete',\n })\n await this.onRecordMutated?.(this.collName, oldKey, 'delete', oldKeyNextVersion)\n\n await this.onDirty?.(this.collName, newKey, 'put', 1)\n this.emitter.emit('change', {\n vault: this.compartmentName,\n collection: this.collName,\n id: newKey,\n action: 'put',\n })\n await this.onRecordMutated?.(this.collName, newKey, 'put', 1)\n\n // 5. Ledger — record the rename as delete(oldKey) + put(newKey)\n // so verifyBackupIntegrity()'s data-cross-check matches reality\n // (the oldKey envelope is gone; the newKey envelope is what was\n // just written). Two entries instead of one — the chain still\n // captures the rename intent via the matching ts + actor.\n if (this.ledger) {\n await this.ledger.append({\n op: 'delete',\n collection: this.collName,\n id: oldKey,\n version: existing._v,\n actor: this.keyring.userId,\n payloadHash: await envelopePayloadHash(existing),\n })\n await this.ledger.append({\n op: 'put',\n collection: this.collName,\n id: newKey,\n version: 1,\n actor: this.keyring.userId,\n payloadHash: await envelopePayloadHash(newEnvelope),\n })\n }\n }\n\n /**\n * List all entries in this dictionary.\n *\n * @returns Array of `{ key, labels }` objects.\n */\n async list(): Promise<DictEntry[]> {\n const keys = await this.adapter.list(this.compartmentName, this.collName)\n const entries: DictEntry[] = []\n for (const key of keys) {\n const envelope = await this.adapter.get(\n this.compartmentName,\n this.collName,\n key,\n )\n // #647 fix wave 1 — a delete-marker row is a removed key, not a live entry: exclude it\n // from the listing and drop any stale cache entry a prior warm may have left under it.\n if (!envelope || isDeleteMarker(envelope)) { this._syncCache.delete(key); continue }\n const entry = await this.decryptEntry(envelope)\n entries.push(entry)\n // Warm the synchronous cache\n this._syncCache.set(key, entry)\n }\n return entries\n }\n\n /**\n * Resolve a key to its label for the given locale.\n *\n * Used by the collection's locale-aware read path to populate\n * `<field>Label` virtual fields. Returns `undefined` when the\n * key doesn't exist or has no label for the requested locale\n * (after exhausting the fallback chain).\n */\n async resolveLabel(\n key: string,\n locale: string,\n fallback?: string | readonly string[],\n ): Promise<string | undefined> {\n const labels = await this.get(key as Keys)\n if (!labels) return undefined\n\n // Try primary locale\n if (labels[locale] !== undefined) return labels[locale]\n\n // Try fallback chain\n const chain = Array.isArray(fallback) ? (fallback as readonly string[]) : fallback ? [fallback as string] : []\n for (const fb of chain) {\n if (fb === 'any') {\n // Return any available label\n const any = Object.values(labels)[0]\n if (any !== undefined) return any\n } else if (labels[fb] !== undefined) {\n return labels[fb]\n }\n }\n\n return undefined\n }\n}\n\n// Compat alias — existing importers of `DictionaryHandle` (the pre-#650\n// name) keep compiling unchanged. `via/i18n/dictionary.ts` re-exports\n// this same binding for one release.\nexport { LookupHandle as DictionaryHandle }\n"],"mappings":";;;;;;;;;;;;AA0CA,SAAS,eAAe,UAAsC;AAC5D,SAAO,SAAS,SAAS;AAC3B;AAGO,IAAM,yBAAyB;AAG/B,SAAS,mBAAmB,gBAAgC;AACjE,SAAO,GAAG,sBAAsB,GAAG,cAAc;AACnD;AA2CO,IAAM,eAAN,MAAiD;AAAA,EA2BtD,YACmB,SACA,iBACA,gBACA,SAMA,mBACA,WACA,QACA,SAMA,yBAOA,SASA,mBAEA,SAEA,iBAIA,yBACjB;AA3CiB;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAMA;AAOA;AASA;AAEA;AAEA;AAIA;AAEjB,SAAK,WAAW,mBAAmB,cAAc;AAAA,EACnD;AAAA,EA7CmB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAMA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAMA;AAAA,EAOA;AAAA,EASA;AAAA,EAEA;AAAA,EAEA;AAAA,EAIA;AAAA,EArEF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,aAAa,oBAAI,IAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOzD,kBA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+1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildAccessibleBundle,
|
|
3
3
|
resolveAccessibleCollections
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NWPR2V5W.js";
|
|
5
5
|
import {
|
|
6
6
|
sha256Hex
|
|
7
7
|
} from "./chunk-QTDAPDDV.js";
|
|
8
8
|
import {
|
|
9
9
|
NOYDB_FORMAT_VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5UGEGEIJ.js";
|
|
11
11
|
import {
|
|
12
12
|
ReadOnlyError
|
|
13
13
|
} from "./chunk-I64WQSN3.js";
|
|
@@ -114,4 +114,4 @@ export {
|
|
|
114
114
|
freezeAndDeleteClosure,
|
|
115
115
|
withdrawAccessibleData
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=chunk-
|
|
117
|
+
//# sourceMappingURL=chunk-P5ARVLNW.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
grant,
|
|
3
3
|
revoke
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WBHQX6ME.js";
|
|
5
5
|
import {
|
|
6
6
|
CustodyNotEnabledError
|
|
7
7
|
} from "./chunk-I64WQSN3.js";
|
|
@@ -16,7 +16,7 @@ function withCustody() {
|
|
|
16
16
|
return host._revokeCustodianImpl(revoke, vault, options, factors);
|
|
17
17
|
},
|
|
18
18
|
async liberate(vault, opts) {
|
|
19
|
-
const { liberateVault } = await import("./liberate-
|
|
19
|
+
const { liberateVault } = await import("./liberate-2DNJ7AJ7.js");
|
|
20
20
|
return liberateVault(vault, opts);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
@@ -74,4 +74,4 @@ export {
|
|
|
74
74
|
withCustody,
|
|
75
75
|
CustodyApi
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
77
|
+
//# sourceMappingURL=chunk-QC2HGYFX.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openEnvelopeJson
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BKYQNNO3.js";
|
|
4
4
|
import {
|
|
5
5
|
encrypt
|
|
6
6
|
} from "./chunk-QTDAPDDV.js";
|
|
7
7
|
import {
|
|
8
8
|
NOYDB_FORMAT_VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5UGEGEIJ.js";
|
|
10
10
|
import {
|
|
11
11
|
ConflictError,
|
|
12
12
|
USER_ENVELOPE_COLLECTION,
|
|
@@ -148,4 +148,4 @@ export {
|
|
|
148
148
|
deleteUserEnvelope,
|
|
149
149
|
listUserEnvelopeIds
|
|
150
150
|
};
|
|
151
|
-
//# sourceMappingURL=chunk-
|
|
151
|
+
//# sourceMappingURL=chunk-QJBXB4WU.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
freezeSnapshotOnly
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P5ARVLNW.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveManagedSecret
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JAHIL6WO.js";
|
|
7
7
|
import {
|
|
8
8
|
createOwnerKeyring
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WBHQX6ME.js";
|
|
10
10
|
import {
|
|
11
11
|
wrapKey
|
|
12
12
|
} from "./chunk-QTDAPDDV.js";
|
|
13
13
|
import {
|
|
14
14
|
NOYDB_FORMAT_VERSION
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5UGEGEIJ.js";
|
|
16
16
|
import {
|
|
17
17
|
PermissionDeniedError
|
|
18
18
|
} from "./chunk-I64WQSN3.js";
|
|
@@ -131,4 +131,4 @@ export {
|
|
|
131
131
|
isDeedVault,
|
|
132
132
|
liberateVault
|
|
133
133
|
};
|
|
134
|
-
//# sourceMappingURL=chunk-
|
|
134
|
+
//# sourceMappingURL=chunk-QKRJUPAC.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NOYDB_FORMAT_VERSION
|
|
3
|
+
} from "./chunk-5UGEGEIJ.js";
|
|
4
|
+
|
|
5
|
+
// src/kernel/enclave/record-envelope.ts
|
|
6
|
+
function buildRecordEnvelope(identity, body) {
|
|
7
|
+
void identity;
|
|
8
|
+
return {
|
|
9
|
+
_noydb: NOYDB_FORMAT_VERSION,
|
|
10
|
+
_v: body.version,
|
|
11
|
+
_ts: body.ts ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
12
|
+
_iv: body.iv,
|
|
13
|
+
_data: body.data,
|
|
14
|
+
...body.by !== void 0 ? { _by: body.by } : {},
|
|
15
|
+
...body.cek !== void 0 ? { _cek: body.cek } : {},
|
|
16
|
+
...body.provenance !== void 0 ? { _source: body.provenance.source, _sourceTs: body.provenance.sourceTs } : {},
|
|
17
|
+
...body.extra ?? {}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// src/kernel/enclave/record-keys/tombstone.ts
|
|
22
|
+
function isTombstoneShape(envelope) {
|
|
23
|
+
return envelope._data === "" && envelope._cek === void 0 && envelope._del !== true;
|
|
24
|
+
}
|
|
25
|
+
function isTombstone(envelope, encrypted) {
|
|
26
|
+
if (!encrypted) return false;
|
|
27
|
+
return isTombstoneShape(envelope);
|
|
28
|
+
}
|
|
29
|
+
function buildTombstone(identity, version, actor) {
|
|
30
|
+
return buildRecordEnvelope(identity, {
|
|
31
|
+
version,
|
|
32
|
+
iv: "",
|
|
33
|
+
data: "",
|
|
34
|
+
...actor ? { by: actor } : {}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function isDeleteMarker(envelope) {
|
|
38
|
+
return envelope._del === true;
|
|
39
|
+
}
|
|
40
|
+
function buildDeleteMarker(identity, version, actor) {
|
|
41
|
+
return {
|
|
42
|
+
...buildRecordEnvelope(identity, {
|
|
43
|
+
version,
|
|
44
|
+
iv: "",
|
|
45
|
+
data: "",
|
|
46
|
+
...actor ? { by: actor } : {}
|
|
47
|
+
}),
|
|
48
|
+
_del: true
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
buildRecordEnvelope,
|
|
54
|
+
isTombstoneShape,
|
|
55
|
+
isTombstone,
|
|
56
|
+
buildTombstone,
|
|
57
|
+
isDeleteMarker,
|
|
58
|
+
buildDeleteMarker
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=chunk-RGPB25DB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/kernel/enclave/record-envelope.ts","../src/kernel/enclave/record-keys/tombstone.ts"],"sourcesContent":["/**\n * The one place an `EncryptedEnvelope` is constructed (#1051).\n *\n * ## Why this exists\n *\n * 49 files built envelopes with an object literal, bypassing\n * `RecordCodec.buildEnvelope` (which had 4 callers). That is **writer\n * fan-out**: N independent places each had to know the envelope contract, and\n * nothing checked that they agreed.\n *\n * It only became load-bearing with #1041. Binding a record's identity into the\n * AEAD requires every writer to supply that identity — and a writer that\n * doesn't produces data the reader rejects. Reader fan-out you fix by threading\n * an argument through call sites; **writer fan-out cannot be migrated\n * incrementally**, because the first migrated writer emits envelopes the\n * unmigrated readers refuse.\n *\n * ## Why adopting it is safe\n *\n * `identity` is **required but not yet used**. Output is byte-identical to the\n * literals it replaces, so every producer can migrate independently and the\n * existing suite verifies each step. The behaviour change happens **once**,\n * when AAD is switched on here — by which point every writer already supplies\n * identity, and the compiler proved it.\n *\n * That ordering is deliberate: a required-but-unused parameter converts \"did\n * we find every writer?\" from a question into a compile error, the same trick\n * that made the `NOYDB_FORMAT_VERSION` single-sourcing safe in #1048.\n *\n * @packageDocumentation\n */\nimport { NOYDB_FORMAT_VERSION } from '../types.js'\nimport type { EncryptedEnvelope } from '../types.js'\nimport type { RecordIdentity } from './record-aad.js'\n\n/** The body an envelope carries, independent of who is writing it. */\nexport interface RecordEnvelopeBody {\n readonly version: number\n /** AES-GCM IV, base64. Empty string for a plaintext or tombstone envelope. */\n readonly iv: string\n /** Ciphertext (or plaintext JSON when the collection stores plaintext). */\n readonly data: string\n /** ISO timestamp. Defaults to now — pass it when the caller has a real one. */\n readonly ts?: string | undefined\n readonly by?: string | undefined\n /** Wrapped per-record CEK, when the record has one. */\n readonly cek?: string | undefined\n readonly provenance?: { readonly source: string; readonly sourceTs: string } | undefined\n /** Slots the envelope may additionally carry. */\n readonly extra?: Partial<Pick<EncryptedEnvelope, '_tier' | '_det' | '_sealed' | '_vdig' | '_bidx'>> | undefined\n}\n\n/**\n * Build an envelope for `identity`.\n *\n * `identity` is required and currently unused — see the module docs. Do not\n * \"simplify\" it away: its presence is what makes the eventual AAD binding a\n * one-line change here instead of a 49-site hunt.\n */\nexport function buildRecordEnvelope(\n identity: RecordIdentity,\n body: RecordEnvelopeBody,\n): EncryptedEnvelope {\n void identity\n return {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: body.version,\n _ts: body.ts ?? new Date().toISOString(),\n _iv: body.iv,\n _data: body.data,\n ...(body.by !== undefined ? { _by: body.by } : {}),\n ...(body.cek !== undefined ? { _cek: body.cek } : {}),\n ...(body.provenance !== undefined\n ? { _source: body.provenance.source, _sourceTs: body.provenance.sourceTs }\n : {}),\n ...(body.extra ?? {}),\n }\n}\n","/**\n * Tombstone shape + predicate for the per-record-key (CEK) layer.\n *\n * A *tombstone* is the residue a GDPR crypto-shred (`vault.forget()`)\n * leaves on disk: the live envelope rewritten to `{ _noydb, _v, _ts, _by,\n * _iv:'', _data:'' }`, dropping `_iv`/`_data`/`_cek`/`_det`. With the wrapped\n * per-record CEK gone, the body — and every history version under the same\n * CEK — is permanently undecryptable, while the record KEY survives so the\n * version counter and \"record existed and was erased\" persist for the audit\n * ledger.\n *\n * These two helpers are the pure, collection-independent core of that\n * contract: {@link buildTombstone} mints the shape, {@link isTombstone}\n * recognises it on the read path. The orchestration that *writes* a tombstone\n * (`_writeTombstone`) and drives `vault.forget()` lives with the collection /\n * vault; it calls into these.\n */\nimport { type EncryptedEnvelope } from '../../types.js'\nimport { buildRecordEnvelope } from '../record-envelope.js'\nimport type { RecordIdentity } from '../record-aad.js'\n\n/**\n * Shape-only tombstone recognition for layers that have no per-collection\n * context (the sync engine, #590): a tombstone carries an empty `_data` and\n * no wrapped CEK. No live envelope can match — record bodies never serialize\n * to the empty string (the `_sync` meta envelope carries non-empty `_data`,\n * and legacy migration envelopes carry non-empty `_iv`/`_data`).\n */\nexport function isTombstoneShape(envelope: EncryptedEnvelope): boolean {\n return envelope._data === '' && envelope._cek === undefined && envelope._del !== true\n}\n\n/**\n * Is this envelope a crypto-shred tombstone?\n *\n * A tombstone carries no body (`_data` empty) and no wrapped CEK (`_cek`\n * absent) — decrypting it would call `decrypt('', '', dek)` → an AES-GCM\n * throw, so every read choke point must short-circuit to `null` instead.\n *\n * `encrypted` is the collection's encryption flag: on an unencrypted\n * collection there are no envelopes to shred, so nothing is ever a tombstone.\n * (Legacy migration envelopes carry non-empty `_iv`/`_data`, so they are not\n * tombstones and stay readable.)\n */\nexport function isTombstone(envelope: EncryptedEnvelope, encrypted: boolean): boolean {\n if (!encrypted) return false\n return isTombstoneShape(envelope)\n}\n\n/**\n * Mint a tombstone envelope from a record's live version + actor.\n *\n * Keeps `_v` (the displaced version) so the counter is monotonic across the\n * shred, stamps a fresh `_ts`, and records `_by` when an actor is supplied.\n * Deliberately omits `_iv`/`_data`/`_cek`/`_det` — that omission *is* the\n * erasure.\n */\nexport function buildTombstone(\n identity: RecordIdentity,\n version: number,\n actor: string,\n): EncryptedEnvelope {\n return buildRecordEnvelope(identity, {\n version,\n iv: '',\n data: '',\n ...(actor ? { by: actor } : {}),\n })\n}\n\n/** #589: is this envelope an ordinary-delete marker (version-ordered, reads as absent)? */\nexport function isDeleteMarker(envelope: EncryptedEnvelope): boolean {\n return envelope._del === true\n}\n\n/**\n * Mint a delete marker from the deleted record's next version + actor (#589).\n * Minted at the NEXT version (`existing._v + 1`) — unlike `buildTombstone`, which\n * keeps the displaced `_v` — so it wins convergence over the pre-delete copy and a\n * re-create can still win over it at a higher version.\n */\nexport function buildDeleteMarker(\n identity: RecordIdentity,\n version: number,\n actor: string,\n): EncryptedEnvelope {\n // `_del` is not one of buildRecordEnvelope's declared slots — a delete marker\n // is a distinct envelope class, not a record body — so it is stamped here.\n return {\n ...buildRecordEnvelope(identity, {\n version,\n iv: '',\n data: '',\n ...(actor ? { by: actor } : {}),\n }),\n _del: true,\n }\n}\n"],"mappings":";;;;;AA2DO,SAAS,oBACd,UACA,MACmB;AACnB,OAAK;AACL,SAAO;AAAA,IACL,QAAQ;AAAA,IACR,IAAI,KAAK;AAAA,IACT,KAAK,KAAK,OAAM,oBAAI,KAAK,GAAE,YAAY;AAAA,IACvC,KAAK,KAAK;AAAA,IACV,OAAO,KAAK;AAAA,IACZ,GAAI,KAAK,OAAO,SAAY,EAAE,KAAK,KAAK,GAAG,IAAI,CAAC;AAAA,IAChD,GAAI,KAAK,QAAQ,SAAY,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC;AAAA,IACnD,GAAI,KAAK,eAAe,SACpB,EAAE,SAAS,KAAK,WAAW,QAAQ,WAAW,KAAK,WAAW,SAAS,IACvE,CAAC;AAAA,IACL,GAAI,KAAK,SAAS,CAAC;AAAA,EACrB;AACF;;;ACjDO,SAAS,iBAAiB,UAAsC;AACrE,SAAO,SAAS,UAAU,MAAM,SAAS,SAAS,UAAa,SAAS,SAAS;AACnF;AAcO,SAAS,YAAY,UAA6B,WAA6B;AACpF,MAAI,CAAC,UAAW,QAAO;AACvB,SAAO,iBAAiB,QAAQ;AAClC;AAUO,SAAS,eACd,UACA,SACA,OACmB;AACnB,SAAO,oBAAoB,UAAU;AAAA,IACnC;AAAA,IACA,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,GAAI,QAAQ,EAAE,IAAI,MAAM,IAAI,CAAC;AAAA,EAC/B,CAAC;AACH;AAGO,SAAS,eAAe,UAAsC;AACnE,SAAO,SAAS,SAAS;AAC3B;AAQO,SAAS,kBACd,UACA,SACA,OACmB;AAGnB,SAAO;AAAA,IACL,GAAG,oBAAoB,UAAU;AAAA,MAC/B;AAAA,MACA,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,GAAI,QAAQ,EAAE,IAAI,MAAM,IAAI,CAAC;AAAA,IAC/B,CAAC;AAAA,IACD,MAAM;AAAA,EACR;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pickLocale
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N7HOHWKF.js";
|
|
4
4
|
import {
|
|
5
5
|
sha256Hex
|
|
6
6
|
} from "./chunk-QTDAPDDV.js";
|
|
@@ -812,7 +812,7 @@ async function applySatelliteLivenessFilter(vault, dumpJson) {
|
|
|
812
812
|
if (!backup.collections || typeof backup.collections !== "object") return dumpJson;
|
|
813
813
|
if (typeof vault._introspectState !== "function") return dumpJson;
|
|
814
814
|
const { adapter, name, getDEK } = vault._introspectState();
|
|
815
|
-
const { liveBaseIdSetsForBundle } = await import("./dead-filter-
|
|
815
|
+
const { liveBaseIdSetsForBundle } = await import("./dead-filter-MVFQCLXY.js");
|
|
816
816
|
const satLive = await liveBaseIdSetsForBundle(adapter, name, Object.keys(backup.collections), getDEK);
|
|
817
817
|
if (satLive.size === 0) return dumpJson;
|
|
818
818
|
const next = {};
|
|
@@ -1058,4 +1058,4 @@ export {
|
|
|
1058
1058
|
readPodRedirect,
|
|
1059
1059
|
readPod
|
|
1060
1060
|
};
|
|
1061
|
-
//# sourceMappingURL=chunk-
|
|
1061
|
+
//# sourceMappingURL=chunk-SDEHNGWW.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-5D2ALSM5.js";
|
|
4
4
|
import {
|
|
5
5
|
RecordCodec
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BKYQNNO3.js";
|
|
7
7
|
|
|
8
8
|
// src/with-formula/materialized-views/stale.ts
|
|
9
|
-
var loadMVExecutor = lazy(() => import("./executor-
|
|
9
|
+
var loadMVExecutor = lazy(() => import("./executor-FNGVGDW3.js"));
|
|
10
10
|
var _staleByRegistry = /* @__PURE__ */ new WeakMap();
|
|
11
11
|
function markMVStale(registry, mvName) {
|
|
12
12
|
let set = _staleByRegistry.get(registry);
|
|
@@ -134,4 +134,4 @@ export {
|
|
|
134
134
|
clearMVStale,
|
|
135
135
|
clearMVStaleFully
|
|
136
136
|
};
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-SJOK23XT.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadVaultPolicy,
|
|
3
3
|
saveVaultPolicy
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BMDF4TLU.js";
|
|
5
5
|
import {
|
|
6
6
|
PolicyDeniedError,
|
|
7
7
|
ValidationError
|
|
@@ -364,4 +364,4 @@ export {
|
|
|
364
364
|
describeGate,
|
|
365
365
|
createNoydbPolicy
|
|
366
366
|
};
|
|
367
|
-
//# sourceMappingURL=chunk-
|
|
367
|
+
//# sourceMappingURL=chunk-UKKBKEUI.js.map
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
BLOB_INTENT_COLLECTION,
|
|
6
6
|
BLOB_SLOTS_PREFIX,
|
|
7
7
|
BLOB_VERSIONS_PREFIX
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ES36R3U2.js";
|
|
9
9
|
import {
|
|
10
10
|
SCHEMAS_COLLECTION
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6JRIYG2C.js";
|
|
12
12
|
import {
|
|
13
13
|
assemblePodContainer,
|
|
14
14
|
buildExtractedPartitionWrapper
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SDEHNGWW.js";
|
|
16
16
|
import {
|
|
17
17
|
generateULID
|
|
18
18
|
} from "./chunk-4AOERLTV.js";
|
|
@@ -23,11 +23,14 @@ import {
|
|
|
23
23
|
canonicalJson,
|
|
24
24
|
envelopePayloadHash,
|
|
25
25
|
hashEntry
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-N4GAJSRQ.js";
|
|
27
27
|
import {
|
|
28
28
|
openEnvelopeJson,
|
|
29
29
|
writeEnvelopeBody
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-BKYQNNO3.js";
|
|
31
|
+
import {
|
|
32
|
+
buildRecordEnvelope
|
|
33
|
+
} from "./chunk-RGPB25DB.js";
|
|
31
34
|
import {
|
|
32
35
|
bufferToBase64,
|
|
33
36
|
decrypt,
|
|
@@ -39,9 +42,8 @@ import {
|
|
|
39
42
|
wrapCek
|
|
40
43
|
} from "./chunk-QTDAPDDV.js";
|
|
41
44
|
import {
|
|
42
|
-
NOYDB_BACKUP_VERSION
|
|
43
|
-
|
|
44
|
-
} from "./chunk-SFY6NT7D.js";
|
|
45
|
+
NOYDB_BACKUP_VERSION
|
|
46
|
+
} from "./chunk-5UGEGEIJ.js";
|
|
45
47
|
import {
|
|
46
48
|
PartitionExtractionError
|
|
47
49
|
} from "./chunk-I64WQSN3.js";
|
|
@@ -259,14 +261,10 @@ async function reKeyLedger(vault, closure, reKeyedCollections, ledgerDek) {
|
|
|
259
261
|
...src.reason !== void 0 ? { reason: src.reason } : {}
|
|
260
262
|
};
|
|
261
263
|
const { iv, data } = await encrypt(canonicalJson(entry), ledgerDek);
|
|
262
|
-
entries[paddedIndex(i)] =
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
_iv: iv,
|
|
267
|
-
_data: data,
|
|
268
|
-
_by: entry.actor
|
|
269
|
-
};
|
|
264
|
+
entries[paddedIndex(i)] = buildRecordEnvelope(
|
|
265
|
+
{ collection: LEDGER_COLLECTION, id: paddedIndex(i) },
|
|
266
|
+
{ version: i + 1, ts: entry.ts, iv, data, by: entry.actor }
|
|
267
|
+
);
|
|
270
268
|
prevHash = await hashEntry(entry);
|
|
271
269
|
last = entry;
|
|
272
270
|
}
|
|
@@ -492,4 +490,4 @@ export {
|
|
|
492
490
|
extractPartition,
|
|
493
491
|
extractPartitionCore
|
|
494
492
|
};
|
|
495
|
-
//# sourceMappingURL=chunk-
|
|
493
|
+
//# sourceMappingURL=chunk-UNR6G3EJ.js.map
|