@noy-db/hub 0.3.0-pre.7 → 0.3.0-pre.8
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/adapter/index.d.ts +1 -1
- package/dist/aggregate/index.d.ts +2 -2
- package/dist/{api-Z66JMGOU.js → api-JDWL67WL.js} +6 -6
- package/dist/as/index.d.ts +3 -3
- package/dist/as/index.js +5 -5
- package/dist/at/index.d.ts +1 -1
- package/dist/attestation/index.d.ts +2 -2
- package/dist/attestation/index.js +12 -12
- package/dist/{backup-7PX6NDKT.js → backup-WRGNTGJF.js} +6 -6
- package/dist/blobs/index.d.ts +3 -3
- package/dist/blobs/index.js +5 -5
- package/dist/bundle/index.d.ts +4 -4
- package/dist/bundle/index.js +14 -14
- package/dist/{bundle-BN_VSq5L.d.ts → bundle-DzWtVw7w.d.ts} +1 -1
- package/dist/cargo/index.d.ts +3 -3
- package/dist/cargo/index.js +13 -13
- package/dist/{chunk-2L7PPF2C.js → chunk-25G7PUTA.js} +7 -7
- package/dist/{chunk-7AERMJP6.js → chunk-2PJB6H3H.js} +2 -2
- package/dist/{chunk-YSU2E4GZ.js → chunk-37JZR7CY.js} +18 -5
- package/dist/chunk-37JZR7CY.js.map +1 -0
- package/dist/{chunk-DJ4TNF4N.js → chunk-3KBK5LU4.js} +3 -3
- package/dist/{chunk-62TTFKU4.js → chunk-3YKBGS3I.js} +4 -4
- package/dist/{chunk-YSJG4L4A.js → chunk-44DV37ZV.js} +2 -2
- package/dist/{chunk-E3LURVGQ.js → chunk-4VDFUBTS.js} +3 -3
- package/dist/{chunk-5K7KZMXG.js → chunk-56JB2BGI.js} +355 -74
- package/dist/chunk-56JB2BGI.js.map +1 -0
- package/dist/{chunk-IEKK2XI4.js → chunk-5HRJQSKN.js} +3 -3
- package/dist/{chunk-PE25C4QL.js → chunk-5YBUFCFF.js} +5 -5
- package/dist/{chunk-J54DC5IC.js → chunk-62APEMF3.js} +3 -3
- package/dist/{chunk-RUWEHFRB.js → chunk-723XB5NX.js} +3 -3
- package/dist/{chunk-JIW3Q5JN.js → chunk-7TAV3BFQ.js} +3 -3
- package/dist/{chunk-CND5WQLO.js → chunk-BJ2XF2RC.js} +3 -3
- package/dist/{chunk-H3MPSYCH.js → chunk-BM6E4MUT.js} +3 -3
- package/dist/{chunk-NO53W6O5.js → chunk-BTFTHF6Q.js} +2 -2
- package/dist/{chunk-DKGZIX6S.js → chunk-DCVVCJVB.js} +2 -2
- package/dist/{chunk-AG2PLGQ2.js → chunk-F3EKFGUS.js} +4 -4
- package/dist/{chunk-VUHXLL32.js → chunk-FWART3VA.js} +2 -2
- package/dist/{chunk-3CHNKEFI.js → chunk-FZK3JJJK.js} +3 -3
- package/dist/{chunk-VFG5YXWM.js → chunk-GDOOG5YQ.js} +2 -2
- package/dist/{chunk-T4NQMPBN.js → chunk-GLVXQU3E.js} +2 -2
- package/dist/{chunk-RHB7BOEO.js → chunk-I6URUNTD.js} +3 -3
- package/dist/{chunk-K6WHZBCO.js → chunk-IARAK3PK.js} +2 -2
- package/dist/{chunk-OFYY5Q4R.js → chunk-J5YUA6JB.js} +2 -2
- package/dist/{chunk-7F2P2NHX.js → chunk-J7OH6R4K.js} +3 -3
- package/dist/{chunk-WRLPV6SI.js → chunk-L6Q5NA22.js} +2 -2
- package/dist/{chunk-7L6EH6S7.js → chunk-M3OYTM5Z.js} +4 -4
- package/dist/{chunk-WGH3YV6Y.js → chunk-NTPWQH4S.js} +5 -5
- package/dist/{chunk-H7WQMGXH.js → chunk-P2PEPSPK.js} +2 -2
- package/dist/{chunk-J5YDMJHG.js → chunk-P6TZ3IVN.js} +7 -7
- package/dist/{chunk-WFBZRXS5.js → chunk-PMMV5SQC.js} +5 -5
- package/dist/{chunk-I6Q7YECW.js → chunk-PPPZIBKY.js} +2 -2
- package/dist/{chunk-HGQ6UNHE.js → chunk-PVC2FBCQ.js} +2 -2
- package/dist/{chunk-HBVEGUON.js → chunk-QABECTNN.js} +2 -2
- package/dist/{chunk-HV3VNAYI.js → chunk-QYMMMKOO.js} +4 -4
- package/dist/{chunk-AZPGB4OD.js → chunk-R4IVPJHN.js} +3 -3
- package/dist/{chunk-HCK2DFEK.js → chunk-REWTMYSF.js} +1 -1
- package/dist/{chunk-HCK2DFEK.js.map → chunk-REWTMYSF.js.map} +1 -1
- package/dist/{chunk-UJJJPKJO.js → chunk-TCGVRKOS.js} +2 -2
- package/dist/{chunk-U5IJHUHZ.js → chunk-TIAYXOEI.js} +2 -2
- package/dist/{chunk-GMZFHDSG.js → chunk-TUL5YQWF.js} +3 -3
- package/dist/{chunk-G5CFMITA.js → chunk-UMH35AQV.js} +2 -2
- package/dist/{chunk-VMRXI3IF.js → chunk-VVLOWY74.js} +3 -3
- package/dist/{chunk-WJEMUO32.js → chunk-W3JABOVB.js} +2 -2
- package/dist/{chunk-QAVFI23O.js → chunk-WPNP3NF5.js} +4 -4
- package/dist/{chunk-JT4A6OAJ.js → chunk-X5QZAJDB.js} +3 -3
- package/dist/{chunk-QYNBPDGO.js → chunk-X6VNIRHS.js} +2 -2
- package/dist/{chunk-CP3GUIAN.js → chunk-XBPUVQDO.js} +8 -8
- package/dist/classified/index.d.ts +3 -3
- package/dist/classified/index.js +1 -1
- package/dist/{collection-facade-JP6N7USE.js → collection-facade-EJVIN2BY.js} +9 -9
- package/dist/{config-drift-LRKCC3VZ.js → config-drift-RFEVGBKR.js} +3 -3
- package/dist/consent/index.d.ts +2 -2
- package/dist/consent/index.js +4 -4
- package/dist/crdt/index.d.ts +2 -2
- package/dist/{dead-filter-NZORV45S.js → dead-filter-RHMNYOXP.js} +2 -2
- package/dist/{delegation-FDOXXHNG.js → delegation-IHXOASHV.js} +5 -5
- package/dist/derivations/index.d.ts +3 -3
- package/dist/derivations/index.js +3 -3
- package/dist/{derive-JR2C5JFG.js → derive-CD3ZVIXK.js} +4 -4
- package/dist/{dev-unlock-CsOqX7O2.d.ts → dev-unlock-wgQ7Ci5I.d.ts} +1 -1
- package/dist/{enclave-7X5BUAMS.js → enclave-KGEUW2GL.js} +4 -4
- package/dist/{executor-6LHOV7MN.js → executor-MHUM2VZK.js} +4 -4
- package/dist/{export-accessible-7XLSZBGJ.js → export-accessible-Z3NSZZHN.js} +7 -7
- package/dist/{extract-partition-RM6EROS5.js → extract-partition-VSKT35JG.js} +10 -10
- package/dist/{fanout-sidecar-BDKLP5GG.js → fanout-sidecar-NBDKKCHT.js} +4 -4
- package/dist/forget/index.js +4 -4
- package/dist/guards/index.d.ts +3 -3
- package/dist/{hash-BPzm02Za.d.ts → hash-CwHnoKyW.d.ts} +1 -1
- package/dist/history/index.d.ts +3 -3
- package/dist/history/index.js +6 -6
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +7 -7
- package/dist/in/index.d.ts +1 -1
- package/dist/{index-CLucFLeN.d.ts → index-CTvUp94-.d.ts} +2 -2
- package/dist/{index-BJ3L-XcV.d.ts → index-Dn5GzPg_.d.ts} +243 -9
- package/dist/index.d.ts +26 -19
- package/dist/index.js +52 -51
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.d.ts +2 -2
- package/dist/{issue-FJE2IHUI.js → issue-AEOL6RXA.js} +6 -6
- package/dist/kernel/index.d.ts +2 -2
- package/dist/kernel/index.js +3 -3
- package/dist/lazy/index.d.ts +2 -2
- package/dist/{ledger-EMDHRJJN.js → ledger-3LR3YO2W.js} +6 -6
- package/dist/liberate-XSEPRWEA.js +24 -0
- package/dist/{link-set-62Y36TOG.js → link-set-NSUIX6BR.js} +5 -5
- package/dist/materialized-views/index.d.ts +3 -3
- package/dist/materialized-views/index.js +4 -4
- package/dist/{mime-magic-BlE9fzn2.d.ts → mime-magic-CYbFNQ4h.d.ts} +1 -1
- package/dist/{noydb-4ZASGII5.js → noydb-POVTIVQ6.js} +23 -23
- package/dist/on/index.d.ts +1 -1
- package/dist/on/index.js +4 -4
- package/dist/overlay-views/index.d.ts +3 -3
- package/dist/periods/index.d.ts +2 -2
- package/dist/periods/index.js +15 -7
- package/dist/pod/index.d.ts +2 -2
- package/dist/pod/index.js +5 -5
- package/dist/{policy-SXPLTQS4.js → policy-Y7HL2KGA.js} +4 -4
- package/dist/portability/index.d.ts +2 -2
- package/dist/portability/index.js +6 -6
- package/dist/{post-register-DCJ2SRVG.js → post-register-KOFRTCDD.js} +4 -4
- package/dist/{public-envelope-CBRIJORQ.js → public-envelope-NC7SPNMV.js} +3 -3
- package/dist/query/index.d.ts +1 -1
- package/dist/{register-5NRE7HBZ.js → register-3D6R2MKN.js} +6 -6
- package/dist/{registry-DYTNLOJC.js → registry-AI4E46PD.js} +4 -4
- package/dist/{registry-5QLETK3Q.js → registry-WIX6QCV5.js} +4 -4
- package/dist/{request-withdrawal-5APB7RKN.js → request-withdrawal-GU4XS2R5.js} +9 -9
- package/dist/{reveal-R5N7JKA5.js → reveal-5Y777N5Q.js} +3 -3
- package/dist/{revoke-VELFCK7S.js → revoke-ZFETCLYV.js} +6 -6
- package/dist/satellites/index.d.ts +1 -1
- package/dist/sealed-record/index.d.ts +2 -2
- package/dist/sealed-record/index.js +6 -6
- package/dist/session/index.d.ts +3 -3
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.d.ts +2 -2
- package/dist/{signer-IVU3B6DP.js → signer-GAIMQQ2J.js} +5 -5
- package/dist/snapshots/index.d.ts +2 -2
- package/dist/snapshots/index.js +5 -5
- package/dist/{stale-DP66HFT3.js → stale-77LP2EEF.js} +2 -2
- package/dist/{storage-RH5VBLLL.js → storage-KEXIXLGM.js} +5 -5
- package/dist/{store-coordination-provider-F5N5ASDF.js → store-coordination-provider-NJDDZ264.js} +3 -3
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.js +4 -4
- package/dist/team/index.d.ts +2 -2
- package/dist/team/index.js +9 -9
- package/dist/tiers/index.d.ts +1 -1
- package/dist/tiers/index.js +4 -4
- package/dist/to/index.d.ts +1 -1
- package/dist/{transition-guard-BzsAQEd-.d.ts → transition-guard-D5RLJv8S.d.ts} +1 -1
- package/dist/tx/index.d.ts +2 -2
- package/dist/{validators-DGmYFP51.d.ts → validators-C3lrVF-c.d.ts} +1 -1
- package/dist/{vault-diff-DmBBatkx.d.ts → vault-diff-_LSIcOMv.d.ts} +1 -1
- package/dist/{walk-3SB25HF2.js → walk-SMAE4IEI.js} +5 -5
- package/dist/with/index.d.ts +2 -2
- package/dist/with/index.js +6 -6
- package/dist/{with-materialized-view-DPEVoGoB.d.ts → with-materialized-view-Xv1-9Bh0.d.ts} +1 -1
- package/dist/{with-overlayed-view-DGpKFSv1.d.ts → with-overlayed-view-CuWhq_-C.d.ts} +1 -1
- package/dist/{with-rollup-B2RwnTq0.d.ts → with-rollup-K_iwal4b.d.ts} +1 -1
- package/dist/{withdraw-accessible-LN4AOJDD.js → withdraw-accessible-Q7BULAN5.js} +8 -8
- package/package.json +3 -3
- package/dist/chunk-5K7KZMXG.js.map +0 -1
- package/dist/chunk-YSU2E4GZ.js.map +0 -1
- package/dist/liberate-HFIPHJGR.js +0 -24
- /package/dist/{api-Z66JMGOU.js.map → api-JDWL67WL.js.map} +0 -0
- /package/dist/{backup-7PX6NDKT.js.map → backup-WRGNTGJF.js.map} +0 -0
- /package/dist/{chunk-2L7PPF2C.js.map → chunk-25G7PUTA.js.map} +0 -0
- /package/dist/{chunk-7AERMJP6.js.map → chunk-2PJB6H3H.js.map} +0 -0
- /package/dist/{chunk-DJ4TNF4N.js.map → chunk-3KBK5LU4.js.map} +0 -0
- /package/dist/{chunk-62TTFKU4.js.map → chunk-3YKBGS3I.js.map} +0 -0
- /package/dist/{chunk-YSJG4L4A.js.map → chunk-44DV37ZV.js.map} +0 -0
- /package/dist/{chunk-E3LURVGQ.js.map → chunk-4VDFUBTS.js.map} +0 -0
- /package/dist/{chunk-IEKK2XI4.js.map → chunk-5HRJQSKN.js.map} +0 -0
- /package/dist/{chunk-PE25C4QL.js.map → chunk-5YBUFCFF.js.map} +0 -0
- /package/dist/{chunk-J54DC5IC.js.map → chunk-62APEMF3.js.map} +0 -0
- /package/dist/{chunk-RUWEHFRB.js.map → chunk-723XB5NX.js.map} +0 -0
- /package/dist/{chunk-JIW3Q5JN.js.map → chunk-7TAV3BFQ.js.map} +0 -0
- /package/dist/{chunk-CND5WQLO.js.map → chunk-BJ2XF2RC.js.map} +0 -0
- /package/dist/{chunk-H3MPSYCH.js.map → chunk-BM6E4MUT.js.map} +0 -0
- /package/dist/{chunk-NO53W6O5.js.map → chunk-BTFTHF6Q.js.map} +0 -0
- /package/dist/{chunk-DKGZIX6S.js.map → chunk-DCVVCJVB.js.map} +0 -0
- /package/dist/{chunk-AG2PLGQ2.js.map → chunk-F3EKFGUS.js.map} +0 -0
- /package/dist/{chunk-VUHXLL32.js.map → chunk-FWART3VA.js.map} +0 -0
- /package/dist/{chunk-3CHNKEFI.js.map → chunk-FZK3JJJK.js.map} +0 -0
- /package/dist/{chunk-VFG5YXWM.js.map → chunk-GDOOG5YQ.js.map} +0 -0
- /package/dist/{chunk-T4NQMPBN.js.map → chunk-GLVXQU3E.js.map} +0 -0
- /package/dist/{chunk-RHB7BOEO.js.map → chunk-I6URUNTD.js.map} +0 -0
- /package/dist/{chunk-K6WHZBCO.js.map → chunk-IARAK3PK.js.map} +0 -0
- /package/dist/{chunk-OFYY5Q4R.js.map → chunk-J5YUA6JB.js.map} +0 -0
- /package/dist/{chunk-7F2P2NHX.js.map → chunk-J7OH6R4K.js.map} +0 -0
- /package/dist/{chunk-WRLPV6SI.js.map → chunk-L6Q5NA22.js.map} +0 -0
- /package/dist/{chunk-7L6EH6S7.js.map → chunk-M3OYTM5Z.js.map} +0 -0
- /package/dist/{chunk-WGH3YV6Y.js.map → chunk-NTPWQH4S.js.map} +0 -0
- /package/dist/{chunk-H7WQMGXH.js.map → chunk-P2PEPSPK.js.map} +0 -0
- /package/dist/{chunk-J5YDMJHG.js.map → chunk-P6TZ3IVN.js.map} +0 -0
- /package/dist/{chunk-WFBZRXS5.js.map → chunk-PMMV5SQC.js.map} +0 -0
- /package/dist/{chunk-I6Q7YECW.js.map → chunk-PPPZIBKY.js.map} +0 -0
- /package/dist/{chunk-HGQ6UNHE.js.map → chunk-PVC2FBCQ.js.map} +0 -0
- /package/dist/{chunk-HBVEGUON.js.map → chunk-QABECTNN.js.map} +0 -0
- /package/dist/{chunk-HV3VNAYI.js.map → chunk-QYMMMKOO.js.map} +0 -0
- /package/dist/{chunk-AZPGB4OD.js.map → chunk-R4IVPJHN.js.map} +0 -0
- /package/dist/{chunk-UJJJPKJO.js.map → chunk-TCGVRKOS.js.map} +0 -0
- /package/dist/{chunk-U5IJHUHZ.js.map → chunk-TIAYXOEI.js.map} +0 -0
- /package/dist/{chunk-GMZFHDSG.js.map → chunk-TUL5YQWF.js.map} +0 -0
- /package/dist/{chunk-G5CFMITA.js.map → chunk-UMH35AQV.js.map} +0 -0
- /package/dist/{chunk-VMRXI3IF.js.map → chunk-VVLOWY74.js.map} +0 -0
- /package/dist/{chunk-WJEMUO32.js.map → chunk-W3JABOVB.js.map} +0 -0
- /package/dist/{chunk-QAVFI23O.js.map → chunk-WPNP3NF5.js.map} +0 -0
- /package/dist/{chunk-JT4A6OAJ.js.map → chunk-X5QZAJDB.js.map} +0 -0
- /package/dist/{chunk-QYNBPDGO.js.map → chunk-X6VNIRHS.js.map} +0 -0
- /package/dist/{chunk-CP3GUIAN.js.map → chunk-XBPUVQDO.js.map} +0 -0
- /package/dist/{collection-facade-JP6N7USE.js.map → collection-facade-EJVIN2BY.js.map} +0 -0
- /package/dist/{config-drift-LRKCC3VZ.js.map → config-drift-RFEVGBKR.js.map} +0 -0
- /package/dist/{dead-filter-NZORV45S.js.map → dead-filter-RHMNYOXP.js.map} +0 -0
- /package/dist/{delegation-FDOXXHNG.js.map → delegation-IHXOASHV.js.map} +0 -0
- /package/dist/{derive-JR2C5JFG.js.map → derive-CD3ZVIXK.js.map} +0 -0
- /package/dist/{enclave-7X5BUAMS.js.map → enclave-KGEUW2GL.js.map} +0 -0
- /package/dist/{executor-6LHOV7MN.js.map → executor-MHUM2VZK.js.map} +0 -0
- /package/dist/{export-accessible-7XLSZBGJ.js.map → export-accessible-Z3NSZZHN.js.map} +0 -0
- /package/dist/{extract-partition-RM6EROS5.js.map → extract-partition-VSKT35JG.js.map} +0 -0
- /package/dist/{fanout-sidecar-BDKLP5GG.js.map → fanout-sidecar-NBDKKCHT.js.map} +0 -0
- /package/dist/{issue-FJE2IHUI.js.map → issue-AEOL6RXA.js.map} +0 -0
- /package/dist/{ledger-EMDHRJJN.js.map → ledger-3LR3YO2W.js.map} +0 -0
- /package/dist/{liberate-HFIPHJGR.js.map → liberate-XSEPRWEA.js.map} +0 -0
- /package/dist/{link-set-62Y36TOG.js.map → link-set-NSUIX6BR.js.map} +0 -0
- /package/dist/{noydb-4ZASGII5.js.map → noydb-POVTIVQ6.js.map} +0 -0
- /package/dist/{policy-SXPLTQS4.js.map → policy-Y7HL2KGA.js.map} +0 -0
- /package/dist/{post-register-DCJ2SRVG.js.map → post-register-KOFRTCDD.js.map} +0 -0
- /package/dist/{public-envelope-CBRIJORQ.js.map → public-envelope-NC7SPNMV.js.map} +0 -0
- /package/dist/{register-5NRE7HBZ.js.map → register-3D6R2MKN.js.map} +0 -0
- /package/dist/{registry-5QLETK3Q.js.map → registry-AI4E46PD.js.map} +0 -0
- /package/dist/{registry-DYTNLOJC.js.map → registry-WIX6QCV5.js.map} +0 -0
- /package/dist/{request-withdrawal-5APB7RKN.js.map → request-withdrawal-GU4XS2R5.js.map} +0 -0
- /package/dist/{reveal-R5N7JKA5.js.map → reveal-5Y777N5Q.js.map} +0 -0
- /package/dist/{revoke-VELFCK7S.js.map → revoke-ZFETCLYV.js.map} +0 -0
- /package/dist/{signer-IVU3B6DP.js.map → signer-GAIMQQ2J.js.map} +0 -0
- /package/dist/{stale-DP66HFT3.js.map → stale-77LP2EEF.js.map} +0 -0
- /package/dist/{storage-RH5VBLLL.js.map → storage-KEXIXLGM.js.map} +0 -0
- /package/dist/{store-coordination-provider-F5N5ASDF.js.map → store-coordination-provider-NJDDZ264.js.map} +0 -0
- /package/dist/{walk-3SB25HF2.js.map → walk-SMAE4IEI.js.map} +0 -0
- /package/dist/{withdraw-accessible-LN4AOJDD.js.map → withdraw-accessible-Q7BULAN5.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadVaultPolicy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BTFTHF6Q.js";
|
|
4
4
|
import {
|
|
5
5
|
jsonSchemaToFields
|
|
6
6
|
} from "./chunk-TQ3REHVF.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
SEQUENCE_COLLECTION,
|
|
10
10
|
compileSequenceFormat,
|
|
11
11
|
resolveSequenceKey
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5HRJQSKN.js";
|
|
13
13
|
import {
|
|
14
14
|
LinkIntegrityError,
|
|
15
15
|
isLinkCollectionName,
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
} from "./chunk-5JQMX2EH.js";
|
|
23
23
|
import {
|
|
24
24
|
loadFence
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-L6Q5NA22.js";
|
|
26
26
|
import {
|
|
27
27
|
InvertedIndex,
|
|
28
28
|
MemoryIndexStore,
|
|
29
29
|
NO_SEARCH,
|
|
30
30
|
VectorSet,
|
|
31
31
|
buildPersistedIndexCallbacks
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XBPUVQDO.js";
|
|
33
33
|
import {
|
|
34
34
|
derivePersistedSchema,
|
|
35
35
|
isZod4Schema
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
CustodyApi,
|
|
43
43
|
NO_CARGO,
|
|
44
44
|
NO_CUSTODY
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-723XB5NX.js";
|
|
46
46
|
import {
|
|
47
47
|
ServiceBus,
|
|
48
48
|
WriteHookRegistry,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
assertCanImport,
|
|
51
51
|
canExport,
|
|
52
52
|
canImport
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-QABECTNN.js";
|
|
54
54
|
import {
|
|
55
55
|
NO_ATTESTATION
|
|
56
56
|
} from "./chunk-LFGJG4XZ.js";
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
import {
|
|
63
63
|
NO_TIERS,
|
|
64
64
|
classifySealedShred
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-4VDFUBTS.js";
|
|
66
66
|
import {
|
|
67
67
|
NO_PORTABILITY
|
|
68
68
|
} from "./chunk-II6DLDZM.js";
|
|
@@ -70,8 +70,12 @@ import {
|
|
|
70
70
|
runDrainBarrier
|
|
71
71
|
} from "./chunk-EU7HDMT3.js";
|
|
72
72
|
import {
|
|
73
|
-
PERIODS_COLLECTION
|
|
74
|
-
|
|
73
|
+
PERIODS_COLLECTION,
|
|
74
|
+
PERIOD_ARCHIVES_COLLECTION,
|
|
75
|
+
PERIOD_FREEZES_COLLECTION,
|
|
76
|
+
PERIOD_TARGET_PURGES_COLLECTION,
|
|
77
|
+
periodExclusiveUpperBound
|
|
78
|
+
} from "./chunk-37JZR7CY.js";
|
|
75
79
|
import {
|
|
76
80
|
TxContext,
|
|
77
81
|
revertExecuted
|
|
@@ -83,7 +87,7 @@ import {
|
|
|
83
87
|
EXPORT_AUDIT_COLLECTION,
|
|
84
88
|
createExportBlobsHandle,
|
|
85
89
|
runCompaction
|
|
86
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-PPPZIBKY.js";
|
|
87
91
|
import {
|
|
88
92
|
LazyQuery,
|
|
89
93
|
decodeIdxId,
|
|
@@ -97,11 +101,11 @@ import {
|
|
|
97
101
|
import {
|
|
98
102
|
resolveManagedSecret,
|
|
99
103
|
saveSealedPassphrase
|
|
100
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-P2PEPSPK.js";
|
|
101
105
|
import {
|
|
102
106
|
isDictCollectionName,
|
|
103
107
|
isStaticDictDescriptor
|
|
104
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-PMMV5SQC.js";
|
|
105
109
|
import {
|
|
106
110
|
NO_TEAM,
|
|
107
111
|
enrollAuthenticator,
|
|
@@ -112,7 +116,7 @@ import {
|
|
|
112
116
|
rotatePassphrase,
|
|
113
117
|
updateAuthenticator,
|
|
114
118
|
writeMagicLinkGrant
|
|
115
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-NTPWQH4S.js";
|
|
116
120
|
import {
|
|
117
121
|
hasRecoveryEnrolled,
|
|
118
122
|
hasStrongRecoveryEnrolled,
|
|
@@ -122,7 +126,7 @@ import {
|
|
|
122
126
|
mintShamirRecoveryEntry,
|
|
123
127
|
savePaperRecoveryEntries,
|
|
124
128
|
saveShamirRecoveryEntries
|
|
125
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-FWART3VA.js";
|
|
126
130
|
import {
|
|
127
131
|
INDEXED_STORE_POLICY
|
|
128
132
|
} from "./chunk-VQNJ7UZL.js";
|
|
@@ -138,17 +142,17 @@ import {
|
|
|
138
142
|
listUsers,
|
|
139
143
|
loadKeyring,
|
|
140
144
|
updateKeyringIdentity
|
|
141
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-TUL5YQWF.js";
|
|
142
146
|
import {
|
|
143
147
|
persistDirectoryConfig,
|
|
144
148
|
readDirectoryConfig
|
|
145
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-FZK3JJJK.js";
|
|
146
150
|
import {
|
|
147
151
|
generateULID
|
|
148
152
|
} from "./chunk-ZJADGNYF.js";
|
|
149
153
|
import {
|
|
150
154
|
sha256Hex
|
|
151
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-UMH35AQV.js";
|
|
152
156
|
import {
|
|
153
157
|
NO_FORGET,
|
|
154
158
|
addSubjectRef,
|
|
@@ -157,7 +161,7 @@ import {
|
|
|
157
161
|
readDottedPath,
|
|
158
162
|
rebuildSubjectIndex,
|
|
159
163
|
removeSubjectRef
|
|
160
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-VVLOWY74.js";
|
|
161
165
|
import {
|
|
162
166
|
NO_SEALED_RECORD
|
|
163
167
|
} from "./chunk-XW5LZYV4.js";
|
|
@@ -170,16 +174,16 @@ import {
|
|
|
170
174
|
queryByDet,
|
|
171
175
|
resolveStableCek,
|
|
172
176
|
validateSchemaInput
|
|
173
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-7TAV3BFQ.js";
|
|
174
178
|
import {
|
|
175
179
|
buildDeleteMarker,
|
|
176
180
|
buildTombstone,
|
|
177
181
|
isDeleteMarker,
|
|
178
182
|
isTombstone
|
|
179
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-PVC2FBCQ.js";
|
|
180
184
|
import {
|
|
181
185
|
NOYDB_FORMAT_VERSION
|
|
182
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-REWTMYSF.js";
|
|
183
187
|
import {
|
|
184
188
|
encrypt
|
|
185
189
|
} from "./chunk-5HZULLHE.js";
|
|
@@ -242,7 +246,7 @@ import {
|
|
|
242
246
|
|
|
243
247
|
// src/port/by/default-provider.ts
|
|
244
248
|
async function createDefaultCoordinationProvider(store) {
|
|
245
|
-
const { StoreCoordinationProvider } = await import("./store-coordination-provider-
|
|
249
|
+
const { StoreCoordinationProvider } = await import("./store-coordination-provider-NJDDZ264.js");
|
|
246
250
|
return new StoreCoordinationProvider(store);
|
|
247
251
|
}
|
|
248
252
|
|
|
@@ -2375,7 +2379,7 @@ var Collection = class {
|
|
|
2375
2379
|
}
|
|
2376
2380
|
}
|
|
2377
2381
|
if (this.materializedViewSource !== void 0) {
|
|
2378
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
2382
|
+
const { resolveStaleMVOnRead } = await import("./stale-77LP2EEF.js");
|
|
2379
2383
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name);
|
|
2380
2384
|
}
|
|
2381
2385
|
let record;
|
|
@@ -2943,7 +2947,7 @@ var Collection = class {
|
|
|
2943
2947
|
if (mode === "eager") {
|
|
2944
2948
|
if (executor === null) {
|
|
2945
2949
|
;
|
|
2946
|
-
({ MaterializedViewExecutor: executor } = await import("./executor-
|
|
2950
|
+
({ MaterializedViewExecutor: executor } = await import("./executor-MHUM2VZK.js"));
|
|
2947
2951
|
}
|
|
2948
2952
|
await executor.refresh(reg, {
|
|
2949
2953
|
getCollection: (name) => this.materializedViewSource.getCollection(name),
|
|
@@ -2952,7 +2956,7 @@ var Collection = class {
|
|
|
2952
2956
|
});
|
|
2953
2957
|
} else if (mode === "lazy") {
|
|
2954
2958
|
if (staleHelpers === null) {
|
|
2955
|
-
staleHelpers = await import("./stale-
|
|
2959
|
+
staleHelpers = await import("./stale-77LP2EEF.js");
|
|
2956
2960
|
}
|
|
2957
2961
|
staleHelpers.markMVStale(registry, reg.spec.name);
|
|
2958
2962
|
}
|
|
@@ -3156,7 +3160,7 @@ var Collection = class {
|
|
|
3156
3160
|
const outputCollection = this.derivationSource.getCollection(outSpec.collection);
|
|
3157
3161
|
const txCtx = this.derivationSource.getActiveTxContext();
|
|
3158
3162
|
if (out.kind === "array") {
|
|
3159
|
-
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-
|
|
3163
|
+
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-NBDKKCHT.js");
|
|
3160
3164
|
const prior = await loadFanoutSidecar(this.adapter, this.vault, spec.source, run.runId, key, this.getDEK, this.storeCiphertext);
|
|
3161
3165
|
const prevKeys = new Set(prior?.keys ?? []);
|
|
3162
3166
|
const newKeysList = out.entries.map((e) => e.key);
|
|
@@ -3518,7 +3522,7 @@ var Collection = class {
|
|
|
3518
3522
|
for (const [outputKey, outSpec] of Object.entries(spec.outputs)) {
|
|
3519
3523
|
if (outSpec.shape !== "array") continue;
|
|
3520
3524
|
if (helpers === null) {
|
|
3521
|
-
helpers = await import("./fanout-sidecar-
|
|
3525
|
+
helpers = await import("./fanout-sidecar-NBDKKCHT.js");
|
|
3522
3526
|
}
|
|
3523
3527
|
const sidecar = await helpers.loadFanoutSidecar(this.adapter, this.vault, spec.source, id, outputKey, this.getDEK, this.storeCiphertext);
|
|
3524
3528
|
if (!sidecar) continue;
|
|
@@ -3552,7 +3556,7 @@ var Collection = class {
|
|
|
3552
3556
|
if (mode === "eager") {
|
|
3553
3557
|
if (executor === null) {
|
|
3554
3558
|
;
|
|
3555
|
-
({ MaterializedViewExecutor: executor } = await import("./executor-
|
|
3559
|
+
({ MaterializedViewExecutor: executor } = await import("./executor-MHUM2VZK.js"));
|
|
3556
3560
|
}
|
|
3557
3561
|
await executor.refresh(reg, {
|
|
3558
3562
|
getCollection: (name) => this.materializedViewSource.getCollection(name),
|
|
@@ -3561,7 +3565,7 @@ var Collection = class {
|
|
|
3561
3565
|
});
|
|
3562
3566
|
} else if (mode === "lazy") {
|
|
3563
3567
|
if (staleHelpers === null) {
|
|
3564
|
-
staleHelpers = await import("./stale-
|
|
3568
|
+
staleHelpers = await import("./stale-77LP2EEF.js");
|
|
3565
3569
|
}
|
|
3566
3570
|
staleHelpers.markMVStale(registry, reg.spec.name);
|
|
3567
3571
|
}
|
|
@@ -3584,7 +3588,7 @@ var Collection = class {
|
|
|
3584
3588
|
);
|
|
3585
3589
|
}
|
|
3586
3590
|
if (this.materializedViewSource !== void 0) {
|
|
3587
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
3591
|
+
const { resolveStaleMVOnRead } = await import("./stale-77LP2EEF.js");
|
|
3588
3592
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name);
|
|
3589
3593
|
}
|
|
3590
3594
|
await this.ensureHydrated();
|
|
@@ -4738,14 +4742,14 @@ var Collection = class {
|
|
|
4738
4742
|
/** C-A/R10: persist the classified marker once per classified handle (store I/O in config-drift.ts). */
|
|
4739
4743
|
async _ensureClassifiedMarker() {
|
|
4740
4744
|
if (this._markerPersisted || this.vdigFields === null) return;
|
|
4741
|
-
const { persistClassifiedMarkerForFields } = await import("./config-drift-
|
|
4745
|
+
const { persistClassifiedMarkerForFields } = await import("./config-drift-RFEVGBKR.js");
|
|
4742
4746
|
await persistClassifiedMarkerForFields(this.adapter, this.vault, this.name, this.vdigFields, await this.getDEK(this.name));
|
|
4743
4747
|
this._markerPersisted = true;
|
|
4744
4748
|
}
|
|
4745
4749
|
/** C-A/R10 drift signal — the marker's declared digest-only set, memoized to one store read per handle (see config-drift.ts). */
|
|
4746
4750
|
async _classifiedMarkerDigestOnly() {
|
|
4747
4751
|
if (this._markerDigestOnlyCache !== void 0) return this._markerDigestOnlyCache;
|
|
4748
|
-
const { readClassifiedMarkerDigestOnly } = await import("./config-drift-
|
|
4752
|
+
const { readClassifiedMarkerDigestOnly } = await import("./config-drift-RFEVGBKR.js");
|
|
4749
4753
|
this._markerDigestOnlyCache = await readClassifiedMarkerDigestOnly(this.adapter, this.vault, this.name, await this.getDEK(this.name));
|
|
4750
4754
|
return this._markerDigestOnlyCache;
|
|
4751
4755
|
}
|
|
@@ -5224,7 +5228,7 @@ var VaultPeriods = class {
|
|
|
5224
5228
|
...anchor.priorPeriodName !== void 0 && { priorPeriodName: anchor.priorPeriodName },
|
|
5225
5229
|
...options.dateField !== void 0 && { dateField: options.dateField }
|
|
5226
5230
|
};
|
|
5227
|
-
const envelope = await this.
|
|
5231
|
+
const envelope = await this.writeReserved(PERIODS_COLLECTION, record.name, record);
|
|
5228
5232
|
await this.deps.strategy.appendPeriodLedgerEntry(this.deps.getLedgerOrNull(), this.deps.userId(), envelope, record.name);
|
|
5229
5233
|
existing.push(record);
|
|
5230
5234
|
this.periodCache = existing;
|
|
@@ -5279,20 +5283,208 @@ var VaultPeriods = class {
|
|
|
5279
5283
|
priorPeriodName: anchor.priorPeriodName ?? prior.name,
|
|
5280
5284
|
...openingCollections.length > 0 && { openingCollections }
|
|
5281
5285
|
};
|
|
5282
|
-
const envelope = await this.
|
|
5286
|
+
const envelope = await this.writeReserved(PERIODS_COLLECTION, record.name, record);
|
|
5283
5287
|
await this.deps.strategy.appendPeriodLedgerEntry(this.deps.getLedgerOrNull(), this.deps.userId(), envelope, record.name);
|
|
5284
5288
|
existing.push(record);
|
|
5285
5289
|
this.periodCache = existing;
|
|
5286
5290
|
return record;
|
|
5287
5291
|
}
|
|
5288
|
-
/**
|
|
5292
|
+
/**
|
|
5293
|
+
* Freeze a closed period: physically purges delete markers whose `_ts`
|
|
5294
|
+
* falls inside the period's window (#604) and records the fact in a
|
|
5295
|
+
* companion `_period_freezes/<name>` record. NEVER mutates the
|
|
5296
|
+
* hash-chained `_periods/<name>` record's stored bytes — `frozenAt` /
|
|
5297
|
+
* `frozenBy` / `purgedMarkerCount` are merged into `PeriodRecord`s on
|
|
5298
|
+
* read only. Idempotent: a second call is a no-op that returns the
|
|
5299
|
+
* same merged record without re-purging or re-appending a ledger entry.
|
|
5300
|
+
*/
|
|
5301
|
+
async freezePeriod(name) {
|
|
5302
|
+
const existing = await this.loadPeriodsCache();
|
|
5303
|
+
const period = existing.find((p) => p.name === name);
|
|
5304
|
+
if (!period) throw new ValidationError(`freezePeriod: no period named "${name}".`);
|
|
5305
|
+
if (period.kind !== "closed") {
|
|
5306
|
+
throw new ValidationError(
|
|
5307
|
+
`freezePeriod: period "${name}" is "${period.kind}"; only a closed period can be frozen.`
|
|
5308
|
+
);
|
|
5309
|
+
}
|
|
5310
|
+
const before = periodExclusiveUpperBound(period.endDate);
|
|
5311
|
+
if (Date.parse(before) > Date.now()) {
|
|
5312
|
+
throw new ValidationError(
|
|
5313
|
+
`freezePeriod: period "${name}" purge window ends at ${before}, in the future; only a period whose window is fully in the past can be frozen (recent delete markers may not have converged).`
|
|
5314
|
+
);
|
|
5315
|
+
}
|
|
5316
|
+
const prior = await this.readReserved(PERIOD_FREEZES_COLLECTION, name);
|
|
5317
|
+
if (prior) return this.mergeFreeze(period, prior);
|
|
5318
|
+
const purgedMarkerCount = await this.deps.purgeDeleteMarkers(before);
|
|
5319
|
+
const freeze = {
|
|
5320
|
+
period: name,
|
|
5321
|
+
frozenAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5322
|
+
frozenBy: this.deps.userId(),
|
|
5323
|
+
purgedMarkerCount
|
|
5324
|
+
};
|
|
5325
|
+
const envelope = await this.writeReserved(PERIOD_FREEZES_COLLECTION, name, freeze);
|
|
5326
|
+
await this.deps.strategy.appendPeriodLedgerEntry(
|
|
5327
|
+
this.deps.getLedgerOrNull(),
|
|
5328
|
+
this.deps.userId(),
|
|
5329
|
+
envelope,
|
|
5330
|
+
name,
|
|
5331
|
+
PERIOD_FREEZES_COLLECTION
|
|
5332
|
+
);
|
|
5333
|
+
return this.mergeFreeze(period, freeze);
|
|
5334
|
+
}
|
|
5335
|
+
/**
|
|
5336
|
+
* Archive a closed period (#613): physically relocates its in-window
|
|
5337
|
+
* records (those with `_ts < periodExclusiveUpperBound(endDate)`) from the
|
|
5338
|
+
* hot store to the configured cold tier via `archiveRecords`, and records
|
|
5339
|
+
* the fact in a companion `_period_archives/<name>` record. NEVER mutates
|
|
5340
|
+
* the hash-chained `_periods/<name>` record. Non-destructive (reads fall
|
|
5341
|
+
* through to cold) and idempotent: a second call is a no-op returning the
|
|
5342
|
+
* same merged record.
|
|
5343
|
+
*/
|
|
5344
|
+
async archivePeriod(name) {
|
|
5345
|
+
const existing = await this.loadPeriodsCache();
|
|
5346
|
+
const period = existing.find((p) => p.name === name);
|
|
5347
|
+
if (!period) throw new ValidationError(`archivePeriod: no period named "${name}".`);
|
|
5348
|
+
if (period.kind !== "closed") {
|
|
5349
|
+
throw new ValidationError(
|
|
5350
|
+
`archivePeriod: period "${name}" is "${period.kind}"; only a closed period can be archived.`
|
|
5351
|
+
);
|
|
5352
|
+
}
|
|
5353
|
+
const prior = await this.readReserved(PERIOD_ARCHIVES_COLLECTION, name);
|
|
5354
|
+
if (prior) return this.mergeArchive(period, prior);
|
|
5355
|
+
const before = periodExclusiveUpperBound(period.endDate);
|
|
5356
|
+
const archivedRecordCount = await this.deps.archiveRecords(before);
|
|
5357
|
+
const archive = {
|
|
5358
|
+
period: name,
|
|
5359
|
+
archivedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5360
|
+
archivedBy: this.deps.userId(),
|
|
5361
|
+
archivedRecordCount
|
|
5362
|
+
};
|
|
5363
|
+
const envelope = await this.writeReserved(PERIOD_ARCHIVES_COLLECTION, name, archive);
|
|
5364
|
+
await this.deps.strategy.appendPeriodLedgerEntry(
|
|
5365
|
+
this.deps.getLedgerOrNull(),
|
|
5366
|
+
this.deps.userId(),
|
|
5367
|
+
envelope,
|
|
5368
|
+
name,
|
|
5369
|
+
PERIOD_ARCHIVES_COLLECTION
|
|
5370
|
+
);
|
|
5371
|
+
return this.mergeArchive(period, archive);
|
|
5372
|
+
}
|
|
5373
|
+
/**
|
|
5374
|
+
* Target-purge a closed period (#615): sweeps delete markers off the vault's
|
|
5375
|
+
* PUSH-ONLY sync targets (`backup`/`archive`) via `purgeTargets`, recording a
|
|
5376
|
+
* companion `_period_target_purges/<name>` record. `sync-peer` targets are
|
|
5377
|
+
* skipped (resurrection risk). NEVER mutates the chained `_periods/<name>`
|
|
5378
|
+
* record. Requires the period be frozen first (closed → frozen → target-purged).
|
|
5379
|
+
* Idempotent once run; with no push-only targets it writes no companion and
|
|
5380
|
+
* is re-runnable.
|
|
5381
|
+
*/
|
|
5382
|
+
async purgePeriodTargets(name) {
|
|
5383
|
+
const existing = await this.loadPeriodsCache();
|
|
5384
|
+
const period = existing.find((p) => p.name === name);
|
|
5385
|
+
if (!period) throw new ValidationError(`purgePeriodTargets: no period named "${name}".`);
|
|
5386
|
+
if (period.kind !== "closed") {
|
|
5387
|
+
throw new ValidationError(
|
|
5388
|
+
`purgePeriodTargets: period "${name}" is "${period.kind}"; only a closed period can be target-purged.`
|
|
5389
|
+
);
|
|
5390
|
+
}
|
|
5391
|
+
const frozen = await this.readReserved(PERIOD_FREEZES_COLLECTION, name);
|
|
5392
|
+
if (!frozen) {
|
|
5393
|
+
throw new ValidationError(
|
|
5394
|
+
`purgePeriodTargets: period "${name}" must be frozen first (closed \u2192 frozen \u2192 target-purged).`
|
|
5395
|
+
);
|
|
5396
|
+
}
|
|
5397
|
+
const prior = await this.readReserved(PERIOD_TARGET_PURGES_COLLECTION, name);
|
|
5398
|
+
if (prior) return this.mergeTargetPurge(period, prior);
|
|
5399
|
+
const before = periodExclusiveUpperBound(period.endDate);
|
|
5400
|
+
const targets = await this.deps.purgeTargets(before);
|
|
5401
|
+
if (targets.length === 0) return period;
|
|
5402
|
+
const record = {
|
|
5403
|
+
period: name,
|
|
5404
|
+
purgedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5405
|
+
purgedBy: this.deps.userId(),
|
|
5406
|
+
targets
|
|
5407
|
+
};
|
|
5408
|
+
const envelope = await this.writeReserved(PERIOD_TARGET_PURGES_COLLECTION, name, record);
|
|
5409
|
+
await this.deps.strategy.appendPeriodLedgerEntry(
|
|
5410
|
+
this.deps.getLedgerOrNull(),
|
|
5411
|
+
this.deps.userId(),
|
|
5412
|
+
envelope,
|
|
5413
|
+
name,
|
|
5414
|
+
PERIOD_TARGET_PURGES_COLLECTION
|
|
5415
|
+
);
|
|
5416
|
+
return this.mergeTargetPurge(period, record);
|
|
5417
|
+
}
|
|
5418
|
+
/** Merge target-purge companion fields into a fresh `PeriodRecord` copy — never mutates `periodCache`. */
|
|
5419
|
+
mergeTargetPurge(period, record) {
|
|
5420
|
+
return {
|
|
5421
|
+
...period,
|
|
5422
|
+
targetsPurgedAt: record.purgedAt,
|
|
5423
|
+
targetsPurgedBy: record.purgedBy,
|
|
5424
|
+
targetsPurged: record.targets
|
|
5425
|
+
};
|
|
5426
|
+
}
|
|
5427
|
+
/** Merge archive companion fields into a fresh `PeriodRecord` copy — never mutates `periodCache`. */
|
|
5428
|
+
mergeArchive(period, archive) {
|
|
5429
|
+
return {
|
|
5430
|
+
...period,
|
|
5431
|
+
archivedAt: archive.archivedAt,
|
|
5432
|
+
archivedBy: archive.archivedBy,
|
|
5433
|
+
archivedRecordCount: archive.archivedRecordCount
|
|
5434
|
+
};
|
|
5435
|
+
}
|
|
5436
|
+
/** Merge freeze companion fields into a fresh `PeriodRecord` copy — never mutates `periodCache`. */
|
|
5437
|
+
mergeFreeze(period, freeze) {
|
|
5438
|
+
return {
|
|
5439
|
+
...period,
|
|
5440
|
+
frozenAt: freeze.frozenAt,
|
|
5441
|
+
frozenBy: freeze.frozenBy,
|
|
5442
|
+
purgedMarkerCount: freeze.purgedMarkerCount
|
|
5443
|
+
};
|
|
5444
|
+
}
|
|
5445
|
+
/** Return every closed / opened period in `closedAt` order, merged with any freeze + archive companions. */
|
|
5289
5446
|
async listPeriods() {
|
|
5290
|
-
|
|
5447
|
+
const all = await this.loadPeriodsCache();
|
|
5448
|
+
const freezeIds = await this.deps.adapter.list(this.deps.vault, PERIOD_FREEZES_COLLECTION);
|
|
5449
|
+
const freezes = /* @__PURE__ */ new Map();
|
|
5450
|
+
for (const id of freezeIds) {
|
|
5451
|
+
const f = await this.readReserved(PERIOD_FREEZES_COLLECTION, id);
|
|
5452
|
+
if (f) freezes.set(f.period, f);
|
|
5453
|
+
}
|
|
5454
|
+
const archiveIds = await this.deps.adapter.list(this.deps.vault, PERIOD_ARCHIVES_COLLECTION);
|
|
5455
|
+
const archives = /* @__PURE__ */ new Map();
|
|
5456
|
+
for (const id of archiveIds) {
|
|
5457
|
+
const a = await this.readReserved(PERIOD_ARCHIVES_COLLECTION, id);
|
|
5458
|
+
if (a) archives.set(a.period, a);
|
|
5459
|
+
}
|
|
5460
|
+
const targetPurgeIds = await this.deps.adapter.list(this.deps.vault, PERIOD_TARGET_PURGES_COLLECTION);
|
|
5461
|
+
const targetPurges = /* @__PURE__ */ new Map();
|
|
5462
|
+
for (const id of targetPurgeIds) {
|
|
5463
|
+
const tp = await this.readReserved(PERIOD_TARGET_PURGES_COLLECTION, id);
|
|
5464
|
+
if (tp) targetPurges.set(tp.period, tp);
|
|
5465
|
+
}
|
|
5466
|
+
return all.map((p) => {
|
|
5467
|
+
const f = freezes.get(p.name);
|
|
5468
|
+
let merged = f ? this.mergeFreeze(p, f) : p;
|
|
5469
|
+
const a = archives.get(p.name);
|
|
5470
|
+
if (a) merged = this.mergeArchive(merged, a);
|
|
5471
|
+
const tp = targetPurges.get(p.name);
|
|
5472
|
+
if (tp) merged = this.mergeTargetPurge(merged, tp);
|
|
5473
|
+
return merged;
|
|
5474
|
+
});
|
|
5291
5475
|
}
|
|
5292
|
-
/** Look up a single period by name. Returns `null` if not found. */
|
|
5476
|
+
/** Look up a single period by name, merged with its freeze + archive + target-purge companions if any. Returns `null` if not found. */
|
|
5293
5477
|
async getPeriod(name) {
|
|
5294
5478
|
const all = await this.loadPeriodsCache();
|
|
5295
|
-
|
|
5479
|
+
const period = all.find((p) => p.name === name);
|
|
5480
|
+
if (!period) return null;
|
|
5481
|
+
const freeze = await this.readReserved(PERIOD_FREEZES_COLLECTION, name);
|
|
5482
|
+
const archive = await this.readReserved(PERIOD_ARCHIVES_COLLECTION, name);
|
|
5483
|
+
let merged = freeze ? this.mergeFreeze(period, freeze) : period;
|
|
5484
|
+
if (archive) merged = this.mergeArchive(merged, archive);
|
|
5485
|
+
const targetPurge = await this.readReserved(PERIOD_TARGET_PURGES_COLLECTION, name);
|
|
5486
|
+
if (targetPurge) merged = this.mergeTargetPurge(merged, targetPurge);
|
|
5487
|
+
return merged;
|
|
5296
5488
|
}
|
|
5297
5489
|
/** Called by the gate bus before put/delete. */
|
|
5298
5490
|
async assertTsWritable(existing, incoming) {
|
|
@@ -5317,11 +5509,12 @@ var VaultPeriods = class {
|
|
|
5317
5509
|
this.periodCache = loaded;
|
|
5318
5510
|
return loaded;
|
|
5319
5511
|
}
|
|
5320
|
-
|
|
5321
|
-
|
|
5512
|
+
/** Generic reserved-collection writer — serves `_periods` and `_period_freezes` alike. */
|
|
5513
|
+
async writeReserved(collection, key, value) {
|
|
5514
|
+
const json = JSON.stringify(value);
|
|
5322
5515
|
let envelope;
|
|
5323
5516
|
if (this.deps.encrypted) {
|
|
5324
|
-
const dek = await this.deps.getDEK(
|
|
5517
|
+
const dek = await this.deps.getDEK(collection);
|
|
5325
5518
|
const { iv, data } = await encrypt(json, dek);
|
|
5326
5519
|
envelope = {
|
|
5327
5520
|
_noydb: NOYDB_FORMAT_VERSION,
|
|
@@ -5341,9 +5534,16 @@ var VaultPeriods = class {
|
|
|
5341
5534
|
_by: this.deps.userId()
|
|
5342
5535
|
};
|
|
5343
5536
|
}
|
|
5344
|
-
await this.deps.adapter.put(this.deps.vault,
|
|
5537
|
+
await this.deps.adapter.put(this.deps.vault, collection, key, envelope);
|
|
5345
5538
|
return envelope;
|
|
5346
5539
|
}
|
|
5540
|
+
/** Generic reserved-collection reader — serves `_period_freezes` companion reads. */
|
|
5541
|
+
async readReserved(collection, key) {
|
|
5542
|
+
const env = await this.deps.adapter.get(this.deps.vault, collection, key);
|
|
5543
|
+
if (!env) return null;
|
|
5544
|
+
const json = this.deps.encrypted ? await openEnvelopeJson(env, await this.deps.getDEK(collection)) : env._data;
|
|
5545
|
+
return JSON.parse(json);
|
|
5546
|
+
}
|
|
5347
5547
|
async decryptPeriodRecord(envelope) {
|
|
5348
5548
|
let json;
|
|
5349
5549
|
if (this.deps.encrypted) {
|
|
@@ -5792,7 +5992,7 @@ var VaultLinks = class {
|
|
|
5792
5992
|
// src/with-shape/links/lazy-handle.ts
|
|
5793
5993
|
function makeLazyLinkSetHandle(d) {
|
|
5794
5994
|
let engine = null;
|
|
5795
|
-
const load = () => engine ??= import("./link-set-
|
|
5995
|
+
const load = () => engine ??= import("./link-set-NSUIX6BR.js").then(
|
|
5796
5996
|
({ LinkSet }) => new LinkSet(d.adapter, d.vault, d.name, d.spec, d.encrypted, d.getDEK, d.actor, d.emitter, d.endpointExists)
|
|
5797
5997
|
);
|
|
5798
5998
|
return {
|
|
@@ -5916,7 +6116,7 @@ function declareSatellite(ctx, collectionName, options, existingRegistry) {
|
|
|
5916
6116
|
ctx.forEachSyncEngine((e) => e.remirrorPairResolvers([spec.base, spec.satellite]));
|
|
5917
6117
|
const registry = reg;
|
|
5918
6118
|
const baseSchema = ctx.getBaseSchema(spec.base);
|
|
5919
|
-
void import("./post-register-
|
|
6119
|
+
void import("./post-register-KOFRTCDD.js").then((m) => m.postRegister(ctx.adapter, ctx.vaultName, spec, ctx.getDEK, baseSchema, registry)).catch(() => {
|
|
5920
6120
|
});
|
|
5921
6121
|
return reg;
|
|
5922
6122
|
}
|
|
@@ -6447,6 +6647,7 @@ var Vault = class {
|
|
|
6447
6647
|
onDirty;
|
|
6448
6648
|
onRegisterConflictResolver;
|
|
6449
6649
|
syncAdapter;
|
|
6650
|
+
getPurgeableTargets;
|
|
6450
6651
|
historyConfig;
|
|
6451
6652
|
/**
|
|
6452
6653
|
* tree-shake seam for the optional blob service. Undefined
|
|
@@ -6712,6 +6913,7 @@ var Vault = class {
|
|
|
6712
6913
|
this.onDirty = opts.onDirty;
|
|
6713
6914
|
this.onRegisterConflictResolver = opts.onRegisterConflictResolver;
|
|
6714
6915
|
this.syncAdapter = opts.syncAdapter;
|
|
6916
|
+
this.getPurgeableTargets = opts.getPurgeableTargets ?? (() => []);
|
|
6715
6917
|
this.blobStrategy = opts.blobStrategy;
|
|
6716
6918
|
this.objectStore = opts.objectStore;
|
|
6717
6919
|
this.archiveStrategy = opts.archiveStrategy;
|
|
@@ -6734,7 +6936,10 @@ var Vault = class {
|
|
|
6734
6936
|
userId: () => this.keyring.userId,
|
|
6735
6937
|
getDEK: (collection) => this.getDEK(collection),
|
|
6736
6938
|
getLedgerOrNull: () => this.getLedgerOrNull(),
|
|
6737
|
-
collection: (name) => this.collection(name)
|
|
6939
|
+
collection: (name) => this.collection(name),
|
|
6940
|
+
purgeDeleteMarkers: (before) => this._purgeDeleteMarkers(before),
|
|
6941
|
+
archiveRecords: (before) => this._archiveClosedPeriod(before),
|
|
6942
|
+
purgeTargets: (before) => this._purgePeriodTargets(before)
|
|
6738
6943
|
});
|
|
6739
6944
|
this.linksEnforcer = new VaultLinks({
|
|
6740
6945
|
refRegistry: this.refRegistry,
|
|
@@ -6937,7 +7142,7 @@ var Vault = class {
|
|
|
6937
7142
|
const strategies = options.schemaUpdate ?? [];
|
|
6938
7143
|
const work = (async () => {
|
|
6939
7144
|
const dek = await this.getDEK(collectionName);
|
|
6940
|
-
const { persistSchemaIfNeeded } = await import("./register-
|
|
7145
|
+
const { persistSchemaIfNeeded } = await import("./register-3D6R2MKN.js");
|
|
6941
7146
|
const result = await persistSchemaIfNeeded({
|
|
6942
7147
|
store: this.adapter,
|
|
6943
7148
|
vault: this.name,
|
|
@@ -7116,7 +7321,7 @@ var Vault = class {
|
|
|
7116
7321
|
const work = (async () => {
|
|
7117
7322
|
try {
|
|
7118
7323
|
const dek = await this.getDEK(collectionName);
|
|
7119
|
-
await (await import("./register-
|
|
7324
|
+
await (await import("./register-3D6R2MKN.js")).persistSchemaIfNeeded({
|
|
7120
7325
|
store: this.adapter,
|
|
7121
7326
|
vault: this.name,
|
|
7122
7327
|
collectionName,
|
|
@@ -7209,27 +7414,65 @@ var Vault = class {
|
|
|
7209
7414
|
* ONLY; #604's period-close lifecycle is what earns that assertion. Do not call
|
|
7210
7415
|
* it on live/unsettled data.
|
|
7211
7416
|
*
|
|
7212
|
-
* Emits no ledger/event
|
|
7213
|
-
* the audit record.
|
|
7417
|
+
* Emits no ledger/event itself — its callers (#604's `freezePeriod`, #615's
|
|
7418
|
+
* `purgePeriodTargets`) own the audit record. The sweep body is shared via
|
|
7419
|
+
* {@link _purgeMarkersOn}, which #615 also aims at push-only sync targets.
|
|
7214
7420
|
*
|
|
7215
|
-
* Purges the local adapter only
|
|
7216
|
-
*
|
|
7217
|
-
*
|
|
7421
|
+
* Purges the local adapter only. Markers already pushed to the vault's
|
|
7422
|
+
* push-only (`backup`/`archive`) sync targets are reclaimed by #615's
|
|
7423
|
+
* `vault.purgePeriodTargets`; `sync-peer` targets are left untouched (purging
|
|
7424
|
+
* them would re-open the resurrection window — the deferred half of #611).
|
|
7218
7425
|
*/
|
|
7219
7426
|
async _purgeDeleteMarkers(before, collections) {
|
|
7220
|
-
|
|
7427
|
+
return this._purgeMarkersOn(this.adapter, before, collections);
|
|
7428
|
+
}
|
|
7429
|
+
/**
|
|
7430
|
+
* @internal #615. Sweep delete markers with `_ts < before` off ANY store
|
|
7431
|
+
* (local adapter or a push-only sync target). Returns the count removed.
|
|
7432
|
+
*/
|
|
7433
|
+
async _purgeMarkersOn(store, before, collections) {
|
|
7434
|
+
const snapshot = await store.loadAll(this.name);
|
|
7221
7435
|
let removed = 0;
|
|
7222
7436
|
for (const [coll, records] of Object.entries(snapshot)) {
|
|
7223
7437
|
if (collections && !collections.includes(coll)) continue;
|
|
7224
7438
|
for (const [id, env] of Object.entries(records)) {
|
|
7225
7439
|
if (isDeleteMarker(env) && env._ts < before) {
|
|
7226
|
-
await
|
|
7440
|
+
await store.delete(this.name, coll, id);
|
|
7227
7441
|
removed++;
|
|
7228
7442
|
}
|
|
7229
7443
|
}
|
|
7230
7444
|
}
|
|
7231
7445
|
return removed;
|
|
7232
7446
|
}
|
|
7447
|
+
/**
|
|
7448
|
+
* @internal #613. Relocate this closed period's in-window records (those
|
|
7449
|
+
* with `_ts < before`) from the hot store to the configured cold tier,
|
|
7450
|
+
* via the routeStore's `compact({ before })`. Returns the count moved.
|
|
7451
|
+
* Requires a `routeStore` with a cold route (the `coldArchival`
|
|
7452
|
+
* capability); throws a clear error otherwise. Non-destructive — reads
|
|
7453
|
+
* fall through to cold, so this does NOT re-open the #589 window.
|
|
7454
|
+
*/
|
|
7455
|
+
async _archiveClosedPeriod(before) {
|
|
7456
|
+
const store = this.adapter;
|
|
7457
|
+
if (store.capabilities?.coldArchival !== true || typeof store.compact !== "function") {
|
|
7458
|
+
throw new ValidationError("archivePeriod: cold archival requires a routeStore with a cold route.");
|
|
7459
|
+
}
|
|
7460
|
+
return store.compact(this.name, { before });
|
|
7461
|
+
}
|
|
7462
|
+
/**
|
|
7463
|
+
* @internal #615. Sweep delete markers with `_ts < before` off each of the
|
|
7464
|
+
* vault's push-only sync targets, returning a per-target count. Skips
|
|
7465
|
+
* `sync-peer` targets by construction (getPurgeableTargets yields only
|
|
7466
|
+
* backup/archive). Never touches the local adapter.
|
|
7467
|
+
*/
|
|
7468
|
+
async _purgePeriodTargets(before) {
|
|
7469
|
+
const out = [];
|
|
7470
|
+
for (const t of this.getPurgeableTargets()) {
|
|
7471
|
+
const purgedCount = await this._purgeMarkersOn(t.store, before);
|
|
7472
|
+
out.push({ ...t.label !== void 0 ? { label: t.label } : {}, role: t.role, purgedCount });
|
|
7473
|
+
}
|
|
7474
|
+
return out;
|
|
7475
|
+
}
|
|
7233
7476
|
/**
|
|
7234
7477
|
* For a detected conflict: capture this tab's clobbered record,
|
|
7235
7478
|
* read the common ancestor from history, converge the cache to the store's
|
|
@@ -8269,7 +8512,7 @@ var Vault = class {
|
|
|
8269
8512
|
async _initDerivations(handles) {
|
|
8270
8513
|
if (handles.length === 0) return;
|
|
8271
8514
|
const [{ DerivationRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
|
|
8272
|
-
import("./registry-
|
|
8515
|
+
import("./registry-WIX6QCV5.js"),
|
|
8273
8516
|
import("./read-only-facade-5ADRJVTM.js")
|
|
8274
8517
|
]);
|
|
8275
8518
|
const registry = new DerivationRegistry();
|
|
@@ -8300,7 +8543,7 @@ var Vault = class {
|
|
|
8300
8543
|
*/
|
|
8301
8544
|
async _initMaterializedViews(handles) {
|
|
8302
8545
|
if (handles.length === 0) return;
|
|
8303
|
-
const { MaterializedViewRegistry } = await import("./registry-
|
|
8546
|
+
const { MaterializedViewRegistry } = await import("./registry-AI4E46PD.js");
|
|
8304
8547
|
const registry = new MaterializedViewRegistry();
|
|
8305
8548
|
this.materializedViewRegistry = registry;
|
|
8306
8549
|
const db = this;
|
|
@@ -8371,13 +8614,13 @@ var Vault = class {
|
|
|
8371
8614
|
if (!reg) {
|
|
8372
8615
|
throw new Error(`refreshView: no MV registered with name "${name}"`);
|
|
8373
8616
|
}
|
|
8374
|
-
const { MaterializedViewExecutor } = await import("./executor-
|
|
8617
|
+
const { MaterializedViewExecutor } = await import("./executor-MHUM2VZK.js");
|
|
8375
8618
|
const result = await MaterializedViewExecutor.refresh(reg, {
|
|
8376
8619
|
getCollection: (n) => this.collection(n),
|
|
8377
8620
|
getActiveTxContext: () => this.noydb._activeTxContextOrNull,
|
|
8378
8621
|
getQueryContext: () => this
|
|
8379
8622
|
});
|
|
8380
|
-
const { clearMVStale } = await import("./stale-
|
|
8623
|
+
const { clearMVStale } = await import("./stale-77LP2EEF.js");
|
|
8381
8624
|
clearMVStale(registry, name);
|
|
8382
8625
|
return result;
|
|
8383
8626
|
}
|
|
@@ -8418,7 +8661,7 @@ var Vault = class {
|
|
|
8418
8661
|
if (!outSpec) continue;
|
|
8419
8662
|
const outputColl = this.collection(outSpec.collection);
|
|
8420
8663
|
if (out.kind === "array") {
|
|
8421
|
-
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-
|
|
8664
|
+
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-NBDKKCHT.js");
|
|
8422
8665
|
const prior = await loadFanoutSidecar(this.adapter, this.name, spec.source, id, key, this.getDEK, this.encrypted);
|
|
8423
8666
|
const prevKeys = new Set(prior?.keys ?? []);
|
|
8424
8667
|
const newKeysList = out.entries.map((e) => e.key);
|
|
@@ -8640,7 +8883,7 @@ var Vault = class {
|
|
|
8640
8883
|
* collection.
|
|
8641
8884
|
*/
|
|
8642
8885
|
async delegate(opts) {
|
|
8643
|
-
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
8886
|
+
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-IHXOASHV.js");
|
|
8644
8887
|
if (!this.keyring.kek) {
|
|
8645
8888
|
throw new ValidationError(
|
|
8646
8889
|
"issueDelegation: keyring.kek is null \u2014 issuing a delegation requires a tier-1 unlock. Re-authenticate at tier 1 (passphrase) first."
|
|
@@ -8662,7 +8905,7 @@ var Vault = class {
|
|
|
8662
8905
|
* if the id does not exist.
|
|
8663
8906
|
*/
|
|
8664
8907
|
async revokeDelegation(id) {
|
|
8665
|
-
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
8908
|
+
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-IHXOASHV.js");
|
|
8666
8909
|
await revokeDelegation(this.adapter, this.name, id);
|
|
8667
8910
|
void DELEGATIONS_COLLECTION;
|
|
8668
8911
|
}
|
|
@@ -8849,6 +9092,38 @@ var Vault = class {
|
|
|
8849
9092
|
async getPeriod(name) {
|
|
8850
9093
|
return this.periods.getPeriod(name);
|
|
8851
9094
|
}
|
|
9095
|
+
/**
|
|
9096
|
+
* Freeze a closed period (#604): purges in-window delete markers and
|
|
9097
|
+
* records a `_period_freezes` companion, never mutating the chained
|
|
9098
|
+
* `_periods` record. Idempotent. Purges the LOCAL adapter only — a
|
|
9099
|
+
* synced target's markers survive there and re-import on pull (benign),
|
|
9100
|
+
* and purging re-opens the #589 resurrection window for a peer offline
|
|
9101
|
+
* since before the cutoff (see periods.ts's "Freeze" section).
|
|
9102
|
+
*/
|
|
9103
|
+
async freezePeriod(name) {
|
|
9104
|
+
return this.periods.freezePeriod(name);
|
|
9105
|
+
}
|
|
9106
|
+
/**
|
|
9107
|
+
* Archive a closed period (#613): relocates its in-window records from the
|
|
9108
|
+
* hot store to the configured cold tier (via the routeStore's cold route),
|
|
9109
|
+
* recording a `_period_archives` companion + ledger entry, never mutating
|
|
9110
|
+
* the chained `_periods` record. Non-destructive (reads fall through to
|
|
9111
|
+
* cold) and idempotent. Requires a routeStore with a cold route.
|
|
9112
|
+
*/
|
|
9113
|
+
async archivePeriod(name) {
|
|
9114
|
+
return this.periods.archivePeriod(name);
|
|
9115
|
+
}
|
|
9116
|
+
/**
|
|
9117
|
+
* Target-purge a closed+frozen period (#615): sweeps delete markers off the
|
|
9118
|
+
* vault's push-only sync targets (`backup`/`archive`), recording a
|
|
9119
|
+
* `_period_target_purges` companion + ledger entry, never mutating the chained
|
|
9120
|
+
* `_periods` record. `sync-peer` targets are skipped. Requires the period be
|
|
9121
|
+
* frozen first. Idempotent; a vault with no push-only targets writes no
|
|
9122
|
+
* companion and is re-runnable.
|
|
9123
|
+
*/
|
|
9124
|
+
async purgePeriodTargets(name) {
|
|
9125
|
+
return this.periods.purgePeriodTargets(name);
|
|
9126
|
+
}
|
|
8852
9127
|
/** @internal — called by the gate bus before put/delete. */
|
|
8853
9128
|
async _assertTsWritable(existing, incoming) {
|
|
8854
9129
|
return this.periods.assertTsWritable(existing, incoming);
|
|
@@ -8878,7 +9153,7 @@ var Vault = class {
|
|
|
8878
9153
|
* @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
|
|
8879
9154
|
*/
|
|
8880
9155
|
async dumpSchema(opts = {}) {
|
|
8881
|
-
const { dumpVaultSchema } = await import("./walk-
|
|
9156
|
+
const { dumpVaultSchema } = await import("./walk-SMAE4IEI.js");
|
|
8882
9157
|
return dumpVaultSchema(this, opts);
|
|
8883
9158
|
}
|
|
8884
9159
|
/**
|
|
@@ -9013,7 +9288,7 @@ var Vault = class {
|
|
|
9013
9288
|
* @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md
|
|
9014
9289
|
*/
|
|
9015
9290
|
async getPublicEnvelope(opts = {}) {
|
|
9016
|
-
const { readPublicEnvelope } = await import("./public-envelope-
|
|
9291
|
+
const { readPublicEnvelope } = await import("./public-envelope-NC7SPNMV.js");
|
|
9017
9292
|
return readPublicEnvelope(this.adapter, this.name, opts);
|
|
9018
9293
|
}
|
|
9019
9294
|
/**
|
|
@@ -9028,7 +9303,7 @@ var Vault = class {
|
|
|
9028
9303
|
* both modes round-trip cleanly.
|
|
9029
9304
|
*/
|
|
9030
9305
|
async dump() {
|
|
9031
|
-
const { dumpVault } = await import("./backup-
|
|
9306
|
+
const { dumpVault } = await import("./backup-WRGNTGJF.js");
|
|
9032
9307
|
return dumpVault(this.backupContext());
|
|
9033
9308
|
}
|
|
9034
9309
|
/**
|
|
@@ -9080,7 +9355,7 @@ var Vault = class {
|
|
|
9080
9355
|
* — there's no chain to verify against.
|
|
9081
9356
|
*/
|
|
9082
9357
|
async load(backupJson) {
|
|
9083
|
-
const { loadVault } = await import("./backup-
|
|
9358
|
+
const { loadVault } = await import("./backup-WRGNTGJF.js");
|
|
9084
9359
|
return loadVault(this.backupContext(), backupJson);
|
|
9085
9360
|
}
|
|
9086
9361
|
/**
|
|
@@ -9112,7 +9387,7 @@ var Vault = class {
|
|
|
9112
9387
|
* way to detect tampering of an in-place vault.
|
|
9113
9388
|
*/
|
|
9114
9389
|
async verifyBackupIntegrity() {
|
|
9115
|
-
const { verifyBackupIntegrity } = await import("./backup-
|
|
9390
|
+
const { verifyBackupIntegrity } = await import("./backup-WRGNTGJF.js");
|
|
9116
9391
|
return verifyBackupIntegrity(this.backupContext());
|
|
9117
9392
|
}
|
|
9118
9393
|
/**
|
|
@@ -9330,7 +9605,7 @@ var Vault = class {
|
|
|
9330
9605
|
* is the live validator object, not a serialization of it).
|
|
9331
9606
|
*/
|
|
9332
9607
|
async exportJSON(opts = {}) {
|
|
9333
|
-
const { exportVaultJSON } = await import("./backup-
|
|
9608
|
+
const { exportVaultJSON } = await import("./backup-WRGNTGJF.js");
|
|
9334
9609
|
return exportVaultJSON(this.backupContext(), opts);
|
|
9335
9610
|
}
|
|
9336
9611
|
};
|
|
@@ -10958,6 +11233,7 @@ function createPlaintextKeyring(userId, debugPlaintext = false) {
|
|
|
10958
11233
|
...debugPlaintext ? { debugPlaintext } : {}
|
|
10959
11234
|
};
|
|
10960
11235
|
}
|
|
11236
|
+
var emptyPullResult = () => ({ pulled: 0, conflicts: [], errors: [] });
|
|
10961
11237
|
var Noydb = class {
|
|
10962
11238
|
options;
|
|
10963
11239
|
emitter = new NoydbEventEmitter();
|
|
@@ -11374,6 +11650,7 @@ var Noydb = class {
|
|
|
11374
11650
|
} : void 0,
|
|
11375
11651
|
onRegisterConflictResolver: syncEngine ? (resolverName, resolver) => syncEngine.registerConflictResolver(resolverName, resolver) : void 0,
|
|
11376
11652
|
syncAdapter: targets.length > 0 ? targets[0].store : void 0,
|
|
11653
|
+
getPurgeableTargets: () => targets.filter((t) => t.role === "backup" || t.role === "archive").map((t) => ({ store: t.store, role: t.role, ...t.label !== void 0 ? { label: t.label } : {} })),
|
|
11377
11654
|
historyConfig: this.options.history,
|
|
11378
11655
|
...this.options.blobStrategy !== void 0 ? { blobStrategy: this.options.blobStrategy } : {},
|
|
11379
11656
|
...this.options.objectStore !== void 0 ? { objectStore: this.options.objectStore } : {},
|
|
@@ -11894,9 +12171,13 @@ var Noydb = class {
|
|
|
11894
12171
|
const engine = this.getSyncEngine(vault);
|
|
11895
12172
|
return engine.push(options);
|
|
11896
12173
|
}
|
|
11897
|
-
/**
|
|
12174
|
+
/**
|
|
12175
|
+
* Pull remote changes to local for a vault. A `backup`/`archive` primary is a
|
|
12176
|
+
* push-only sink and is never pulled from (#616) — returns an empty result.
|
|
12177
|
+
*/
|
|
11898
12178
|
async pull(vault, options) {
|
|
11899
12179
|
const engine = this.getSyncEngine(vault);
|
|
12180
|
+
if (engine.role !== "sync-peer") return emptyPullResult();
|
|
11900
12181
|
return engine.pull(options);
|
|
11901
12182
|
}
|
|
11902
12183
|
/**
|
|
@@ -11905,7 +12186,7 @@ var Noydb = class {
|
|
|
11905
12186
|
*/
|
|
11906
12187
|
async sync(vault, options) {
|
|
11907
12188
|
const primary = this.getSyncEngine(vault);
|
|
11908
|
-
const result = await primary.sync(options);
|
|
12189
|
+
const result = primary.role === "sync-peer" ? await primary.sync(options) : { pull: emptyPullResult(), push: await primary.push(options?.push) };
|
|
11909
12190
|
for (const [key, engine] of this.syncEngines) {
|
|
11910
12191
|
if (key === vault) continue;
|
|
11911
12192
|
if (!key.startsWith(`${vault}::`)) continue;
|
|
@@ -12462,7 +12743,7 @@ var Noydb = class {
|
|
|
12462
12743
|
"setPublicEnvelope: the public-envelope feature is not enabled. Pass `publicEnvelope: true` (or a schema object) to `createNoydb`."
|
|
12463
12744
|
);
|
|
12464
12745
|
}
|
|
12465
|
-
const { loadPublicEnvelope, savePublicEnvelope, resolveSchema, validatePublicEnvelopeInput } = await import("./public-envelope-
|
|
12746
|
+
const { loadPublicEnvelope, savePublicEnvelope, resolveSchema, validatePublicEnvelopeInput } = await import("./public-envelope-NC7SPNMV.js");
|
|
12466
12747
|
const schema = resolveSchema(this.options.publicEnvelope);
|
|
12467
12748
|
validatePublicEnvelopeInput(input, schema);
|
|
12468
12749
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -12491,7 +12772,7 @@ var Noydb = class {
|
|
|
12491
12772
|
* regardless).
|
|
12492
12773
|
*/
|
|
12493
12774
|
async getPublicEnvelope(vault, opts = {}) {
|
|
12494
|
-
const { readPublicEnvelope } = await import("./public-envelope-
|
|
12775
|
+
const { readPublicEnvelope } = await import("./public-envelope-NC7SPNMV.js");
|
|
12495
12776
|
return readPublicEnvelope(this.options.store, vault, opts);
|
|
12496
12777
|
}
|
|
12497
12778
|
// ─── Auth introspection ─────────────────────────────────────────
|
|
@@ -12682,9 +12963,9 @@ async function createNoydb(options) {
|
|
|
12682
12963
|
throw new ValidationError("A secret (passphrase) or getKeyring callback is required when encryption is enabled");
|
|
12683
12964
|
}
|
|
12684
12965
|
if (!options.coordinationStrategy) options = { ...options, coordinationStrategy: await createDefaultCoordinationProvider(options.store) };
|
|
12685
|
-
if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-
|
|
12966
|
+
if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-JDWL67WL.js")).createUserApi };
|
|
12686
12967
|
if (!options.policyFactory) {
|
|
12687
|
-
const policyModule = await import("./policy-
|
|
12968
|
+
const policyModule = await import("./policy-Y7HL2KGA.js");
|
|
12688
12969
|
options = { ...options, policyFactory: policyModule.createNoydbPolicy, policyCheckGateFn: policyModule.checkGate };
|
|
12689
12970
|
}
|
|
12690
12971
|
return new Noydb(options);
|
|
@@ -12719,4 +13000,4 @@ export {
|
|
|
12719
13000
|
Noydb,
|
|
12720
13001
|
createNoydb
|
|
12721
13002
|
};
|
|
12722
|
-
//# sourceMappingURL=chunk-
|
|
13003
|
+
//# sourceMappingURL=chunk-56JB2BGI.js.map
|