@noy-db/hub 0.2.0-pre.6 → 0.2.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/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.js +4 -4
- package/dist/attestation/index.cjs.map +1 -1
- package/dist/attestation/index.d.cts +4 -4
- package/dist/attestation/index.d.ts +4 -4
- package/dist/attestation/index.js +6 -6
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +5 -5
- package/dist/blobs/index.d.ts +5 -5
- package/dist/blobs/index.js +5 -5
- package/dist/bundle/index.cjs +420 -29
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +6 -6
- package/dist/bundle/index.d.ts +6 -6
- package/dist/bundle/index.js +12 -12
- package/dist/{chunk-JICBEFBT.js → chunk-22DWZL57.js} +63 -27
- package/dist/chunk-22DWZL57.js.map +1 -0
- package/dist/{chunk-XDW37COG.js → chunk-2GLDA55J.js} +212 -7
- package/dist/chunk-2GLDA55J.js.map +1 -0
- package/dist/{chunk-RIHZBSWJ.js → chunk-2WUSG3IT.js} +3 -3
- package/dist/{chunk-JSYTGEX4.js → chunk-3BFJOWSU.js} +3 -3
- package/dist/{chunk-Y3P5DEMZ.js → chunk-3YPCK6JX.js} +6 -6
- package/dist/{chunk-A4JNVBPF.js → chunk-53XBRIRT.js} +5 -5
- package/dist/{chunk-CKH247ZR.js → chunk-5T22KDPN.js} +4 -4
- package/dist/{chunk-PX3MJ6RB.js → chunk-5XHKQ56N.js} +3 -3
- package/dist/{chunk-W277AG6N.js → chunk-6774ZOQ7.js} +170 -57
- package/dist/chunk-6774ZOQ7.js.map +1 -0
- package/dist/chunk-6STK5TQP.js +139 -0
- package/dist/chunk-6STK5TQP.js.map +1 -0
- package/dist/{chunk-6HJ2ZALB.js → chunk-B6PB7JLN.js} +66 -2
- package/dist/chunk-B6PB7JLN.js.map +1 -0
- package/dist/{chunk-5QPF2MJ5.js → chunk-BVRYKATC.js} +3 -3
- package/dist/{chunk-UGVDIOY7.js → chunk-DE6GKS6G.js} +2 -2
- package/dist/{chunk-R4LTCI6O.js → chunk-DFMLEQZB.js} +2 -2
- package/dist/{chunk-34XGYMQT.js → chunk-DJHHA6XH.js} +2 -2
- package/dist/{chunk-OPD3PZOG.js → chunk-DL3HWOQ5.js} +4 -4
- package/dist/{chunk-DFCINPB5.js → chunk-DO7C2TOG.js} +2 -2
- package/dist/{chunk-T6MTNGBM.js → chunk-DONMZAD2.js} +4 -4
- package/dist/{chunk-ARZAHCCF.js → chunk-F3GDRNUT.js} +3 -3
- package/dist/{chunk-XVJFFGTG.js → chunk-H2X3ISXG.js} +3 -3
- package/dist/{chunk-R7JTYCRX.js → chunk-HNRHLRDC.js} +2 -2
- package/dist/{chunk-E225X5CQ.js → chunk-I5FOWO4J.js} +3 -3
- package/dist/{chunk-ZQMYB56Z.js → chunk-JWRVQKRZ.js} +3 -3
- package/dist/{chunk-LWFQYT4N.js → chunk-K3DK3NU5.js} +2 -2
- package/dist/{chunk-WEA4TDTJ.js → chunk-ML236QKC.js} +3 -3
- package/dist/{chunk-G26QAQNI.js → chunk-NONAAENK.js} +2 -2
- package/dist/{chunk-YEHUEUNP.js → chunk-O3VZPBZG.js} +4 -4
- package/dist/{chunk-HIELMTUK.js → chunk-OIF6LZUR.js} +2 -2
- package/dist/{chunk-ED3E3OLO.js → chunk-OQ6PIGHA.js} +2 -2
- package/dist/{chunk-6A4AMQ2H.js → chunk-PE2FR4J3.js} +4 -4
- package/dist/{chunk-EKTOYEZ3.js → chunk-PP6W64Y3.js} +2 -2
- package/dist/{chunk-SGSHQ4PH.js → chunk-PX35GA7L.js} +5 -5
- package/dist/{chunk-YJ46RFCD.js → chunk-QEILDE6R.js} +2 -2
- package/dist/{chunk-KGFV72WK.js → chunk-QODLLGQ7.js} +5 -5
- package/dist/{chunk-2GMRNNI3.js → chunk-RAZ4OVLL.js} +2 -2
- package/dist/{chunk-25WFLKOH.js → chunk-SYMWGEET.js} +2 -2
- package/dist/{chunk-7TX7HN42.js → chunk-T7JEBOGN.js} +20 -3
- package/dist/chunk-T7JEBOGN.js.map +1 -0
- package/dist/{chunk-LJO6Q3X6.js → chunk-TFBP23BX.js} +3 -3
- package/dist/{chunk-ICH4AIGL.js → chunk-TV3YZ35S.js} +5 -1
- package/dist/chunk-TV3YZ35S.js.map +1 -0
- package/dist/{chunk-TNBIWSQ7.js → chunk-U26HQ6KJ.js} +2 -2
- package/dist/{chunk-CGJFCT3X.js → chunk-VTKGMEPP.js} +2 -2
- package/dist/{chunk-5VMTAX4Y.js → chunk-W6EQLGMB.js} +2 -2
- package/dist/{chunk-5OVIFUQE.js → chunk-WIRRPTFH.js} +1 -1
- package/dist/chunk-WIRRPTFH.js.map +1 -0
- package/dist/{chunk-PS5G6A3Y.js → chunk-WPLVTJ5D.js} +4 -4
- package/dist/{chunk-MDIC4FAU.js → chunk-XJFLDA7A.js} +2 -2
- package/dist/{chunk-CCC25PA7.js → chunk-ZYWZWG6G.js} +5 -5
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-5UDZZL26.js → crypto-HTZ4FJOP.js} +3 -3
- package/dist/{delegation-42LO4WFO.js → delegation-RI54P6I5.js} +5 -5
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +6 -6
- package/dist/derivations/index.d.ts +6 -6
- package/dist/derivations/index.js +4 -4
- package/dist/{dev-unlock-Dy1qVpkL.d.cts → dev-unlock-M4VAWNq_.d.cts} +1 -1
- package/dist/{dev-unlock-Cvo-xCQC.d.ts → dev-unlock-p3ysikWP.d.ts} +1 -1
- package/dist/executor-5PNY7LGW.js +8 -0
- package/dist/executor-B4QIYGZX.js +8 -0
- package/dist/executor-BWXXDQ7K.js +11 -0
- package/dist/{fanout-sidecar-EVICRM46.js → fanout-sidecar-OKPMMPLG.js} +2 -2
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +6 -6
- package/dist/guards/index.d.ts +6 -6
- package/dist/guards/index.js +3 -3
- package/dist/{hash-BgEQklQc.d.cts → hash-BPsYPcv_.d.cts} +1 -1
- package/dist/{hash-BAlWR4WD.d.ts → hash-C1GtiOhR.d.ts} +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +6 -6
- package/dist/history/index.d.ts +6 -6
- package/dist/history/index.js +5 -5
- package/dist/i18n/index.cjs +217 -22
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +5 -5
- package/dist/i18n/index.d.ts +5 -5
- package/dist/i18n/index.js +16 -5
- package/dist/i18n/index.js.map +1 -1
- package/dist/{index-5I0MZ0jQ.d.cts → index-4fBVt8j9.d.cts} +104 -7
- package/dist/{index-fIPPh5dg.d.ts → index-D8I_pyJD.d.ts} +104 -7
- package/dist/index.cjs +625 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +70 -52
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs +4 -0
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.d.cts +3 -3
- package/dist/indexing/index.d.ts +3 -3
- package/dist/indexing/index.js +4 -4
- package/dist/issue-VGDPP4B5.js +12 -0
- package/dist/{lazy-builder-D1MyR1qH.d.ts → lazy-builder-7tIpFyWN.d.ts} +1 -1
- package/dist/{lazy-builder-DXlSCNCJ.d.cts → lazy-builder-wY4pMCEe.d.cts} +1 -1
- package/dist/{ledger-UX4QIHWI.js → ledger-TMRZYNVJ.js} +5 -5
- package/dist/materialized-views/index.cjs +18 -1
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +10 -8
- package/dist/materialized-views/index.d.ts +10 -8
- package/dist/materialized-views/index.js +12 -12
- package/dist/noydb-LZBH3XDK.js +34 -0
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +6 -6
- package/dist/overlay-views/index.d.ts +6 -6
- package/dist/overlay-views/index.js +6 -6
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +5 -5
- package/dist/periods/index.d.ts +5 -5
- package/dist/periods/index.js +5 -5
- package/dist/{predicate-B0IKeBXx.d.cts → predicate-BSAGEyu5.d.cts} +26 -2
- package/dist/{predicate-B0IKeBXx.d.ts → predicate-BSAGEyu5.d.ts} +26 -2
- package/dist/{public-envelope-YKHKP74C.js → public-envelope-BW6OXORV.js} +4 -4
- package/dist/query/index.cjs +244 -4
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +2 -2
- package/dist/query/index.d.ts +2 -2
- package/dist/query/index.js +12 -6
- package/dist/registry-3QP3YKQS.js +8 -0
- package/dist/{registry-4NEW7LQY.js → registry-OJIOSBV6.js} +3 -3
- package/dist/registry-USRVT6YF.js +8 -0
- package/dist/{revoke-R5NIQ74J.js → revoke-JCC7N56X.js} +6 -6
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +6 -6
- package/dist/session/index.d.ts +6 -6
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +5 -5
- package/dist/shadow/index.d.ts +5 -5
- package/dist/shadow/index.js +2 -2
- package/dist/{signer-WGDJNWSU.js → signer-72QAUSVW.js} +5 -5
- package/dist/snapshots/index.cjs +903 -0
- package/dist/snapshots/index.cjs.map +1 -0
- package/dist/snapshots/index.d.cts +21 -0
- package/dist/snapshots/index.d.ts +21 -0
- package/dist/snapshots/index.js +118 -0
- package/dist/snapshots/index.js.map +1 -0
- package/dist/{stale-74WGLVZ2.js → stale-6ZDBTQT7.js} +2 -2
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +5 -5
- package/dist/store/index.d.ts +5 -5
- package/dist/store/index.js +2 -2
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +4 -4
- package/dist/sync/index.d.ts +4 -4
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +5 -5
- package/dist/team/index.d.ts +5 -5
- package/dist/team/index.js +8 -8
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +5 -5
- package/dist/tx/index.d.ts +5 -5
- package/dist/tx/index.js +3 -3
- package/dist/{types-DlnZh1_i.d.ts → types-DGU60JDt.d.ts} +235 -7
- package/dist/{types-DVlvNn2c.d.cts → types-DjunxzJa.d.cts} +235 -7
- package/dist/{ulid-CzPONlhG.d.ts → ulid-BFJkYRRW.d.ts} +1 -1
- package/dist/{ulid-r98nkjVd.d.cts → ulid-DPeuPgi3.d.cts} +1 -1
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/{with-derivation-BMQ9pIHe.d.cts → with-derivation-Df0kMlED.d.cts} +1 -1
- package/dist/{with-derivation-B98shCV8.d.ts → with-derivation-DfOpKjFw.d.ts} +1 -1
- package/dist/{with-guard-DmT50nVG.d.ts → with-guard-0KksDtSR.d.ts} +1 -1
- package/dist/{with-guard-DUnC3JDN.d.cts → with-guard-C6W5RVrH.d.cts} +1 -1
- package/dist/{with-materialized-view-Bp_M3sNG.d.ts → with-materialized-view-BiasFcYx.d.ts} +1 -1
- package/dist/{with-materialized-view-eMTZ65_J.d.cts → with-materialized-view-BmDKyHrm.d.cts} +1 -1
- package/dist/{with-overlayed-view-BoY6PB3n.d.cts → with-overlayed-view-CA66vhHz.d.cts} +1 -1
- package/dist/{with-overlayed-view-zzSnRQmS.d.ts → with-overlayed-view-CQViuko_.d.ts} +1 -1
- package/package.json +15 -4
- package/dist/chunk-5OVIFUQE.js.map +0 -1
- package/dist/chunk-6HJ2ZALB.js.map +0 -1
- package/dist/chunk-7TX7HN42.js.map +0 -1
- package/dist/chunk-ICH4AIGL.js.map +0 -1
- package/dist/chunk-JICBEFBT.js.map +0 -1
- package/dist/chunk-W277AG6N.js.map +0 -1
- package/dist/chunk-XDW37COG.js.map +0 -1
- package/dist/executor-AWCHQ2KN.js +0 -8
- package/dist/executor-RWICJI7J.js +0 -11
- package/dist/executor-SOLEQVUB.js +0 -8
- package/dist/issue-IODMTPME.js +0 -12
- package/dist/noydb-FY2666NY.js +0 -34
- package/dist/registry-446I2NMN.js +0 -8
- package/dist/registry-524KJZG4.js +0 -8
- /package/dist/{chunk-RIHZBSWJ.js.map → chunk-2WUSG3IT.js.map} +0 -0
- /package/dist/{chunk-JSYTGEX4.js.map → chunk-3BFJOWSU.js.map} +0 -0
- /package/dist/{chunk-Y3P5DEMZ.js.map → chunk-3YPCK6JX.js.map} +0 -0
- /package/dist/{chunk-A4JNVBPF.js.map → chunk-53XBRIRT.js.map} +0 -0
- /package/dist/{chunk-CKH247ZR.js.map → chunk-5T22KDPN.js.map} +0 -0
- /package/dist/{chunk-PX3MJ6RB.js.map → chunk-5XHKQ56N.js.map} +0 -0
- /package/dist/{chunk-5QPF2MJ5.js.map → chunk-BVRYKATC.js.map} +0 -0
- /package/dist/{chunk-UGVDIOY7.js.map → chunk-DE6GKS6G.js.map} +0 -0
- /package/dist/{chunk-R4LTCI6O.js.map → chunk-DFMLEQZB.js.map} +0 -0
- /package/dist/{chunk-34XGYMQT.js.map → chunk-DJHHA6XH.js.map} +0 -0
- /package/dist/{chunk-OPD3PZOG.js.map → chunk-DL3HWOQ5.js.map} +0 -0
- /package/dist/{chunk-DFCINPB5.js.map → chunk-DO7C2TOG.js.map} +0 -0
- /package/dist/{chunk-T6MTNGBM.js.map → chunk-DONMZAD2.js.map} +0 -0
- /package/dist/{chunk-ARZAHCCF.js.map → chunk-F3GDRNUT.js.map} +0 -0
- /package/dist/{chunk-XVJFFGTG.js.map → chunk-H2X3ISXG.js.map} +0 -0
- /package/dist/{chunk-R7JTYCRX.js.map → chunk-HNRHLRDC.js.map} +0 -0
- /package/dist/{chunk-E225X5CQ.js.map → chunk-I5FOWO4J.js.map} +0 -0
- /package/dist/{chunk-ZQMYB56Z.js.map → chunk-JWRVQKRZ.js.map} +0 -0
- /package/dist/{chunk-LWFQYT4N.js.map → chunk-K3DK3NU5.js.map} +0 -0
- /package/dist/{chunk-WEA4TDTJ.js.map → chunk-ML236QKC.js.map} +0 -0
- /package/dist/{chunk-G26QAQNI.js.map → chunk-NONAAENK.js.map} +0 -0
- /package/dist/{chunk-YEHUEUNP.js.map → chunk-O3VZPBZG.js.map} +0 -0
- /package/dist/{chunk-HIELMTUK.js.map → chunk-OIF6LZUR.js.map} +0 -0
- /package/dist/{chunk-ED3E3OLO.js.map → chunk-OQ6PIGHA.js.map} +0 -0
- /package/dist/{chunk-6A4AMQ2H.js.map → chunk-PE2FR4J3.js.map} +0 -0
- /package/dist/{chunk-EKTOYEZ3.js.map → chunk-PP6W64Y3.js.map} +0 -0
- /package/dist/{chunk-SGSHQ4PH.js.map → chunk-PX35GA7L.js.map} +0 -0
- /package/dist/{chunk-YJ46RFCD.js.map → chunk-QEILDE6R.js.map} +0 -0
- /package/dist/{chunk-KGFV72WK.js.map → chunk-QODLLGQ7.js.map} +0 -0
- /package/dist/{chunk-2GMRNNI3.js.map → chunk-RAZ4OVLL.js.map} +0 -0
- /package/dist/{chunk-25WFLKOH.js.map → chunk-SYMWGEET.js.map} +0 -0
- /package/dist/{chunk-LJO6Q3X6.js.map → chunk-TFBP23BX.js.map} +0 -0
- /package/dist/{chunk-TNBIWSQ7.js.map → chunk-U26HQ6KJ.js.map} +0 -0
- /package/dist/{chunk-CGJFCT3X.js.map → chunk-VTKGMEPP.js.map} +0 -0
- /package/dist/{chunk-5VMTAX4Y.js.map → chunk-W6EQLGMB.js.map} +0 -0
- /package/dist/{chunk-PS5G6A3Y.js.map → chunk-WPLVTJ5D.js.map} +0 -0
- /package/dist/{chunk-MDIC4FAU.js.map → chunk-XJFLDA7A.js.map} +0 -0
- /package/dist/{chunk-CCC25PA7.js.map → chunk-ZYWZWG6G.js.map} +0 -0
- /package/dist/{crypto-5UDZZL26.js.map → crypto-HTZ4FJOP.js.map} +0 -0
- /package/dist/{delegation-42LO4WFO.js.map → delegation-RI54P6I5.js.map} +0 -0
- /package/dist/{executor-AWCHQ2KN.js.map → executor-5PNY7LGW.js.map} +0 -0
- /package/dist/{executor-RWICJI7J.js.map → executor-B4QIYGZX.js.map} +0 -0
- /package/dist/{executor-SOLEQVUB.js.map → executor-BWXXDQ7K.js.map} +0 -0
- /package/dist/{fanout-sidecar-EVICRM46.js.map → fanout-sidecar-OKPMMPLG.js.map} +0 -0
- /package/dist/{issue-IODMTPME.js.map → issue-VGDPP4B5.js.map} +0 -0
- /package/dist/{ledger-UX4QIHWI.js.map → ledger-TMRZYNVJ.js.map} +0 -0
- /package/dist/{noydb-FY2666NY.js.map → noydb-LZBH3XDK.js.map} +0 -0
- /package/dist/{public-envelope-YKHKP74C.js.map → public-envelope-BW6OXORV.js.map} +0 -0
- /package/dist/{registry-446I2NMN.js.map → registry-3QP3YKQS.js.map} +0 -0
- /package/dist/{registry-4NEW7LQY.js.map → registry-OJIOSBV6.js.map} +0 -0
- /package/dist/{registry-524KJZG4.js.map → registry-USRVT6YF.js.map} +0 -0
- /package/dist/{revoke-R5NIQ74J.js.map → revoke-JCC7N56X.js.map} +0 -0
- /package/dist/{signer-WGDJNWSU.js.map → signer-72QAUSVW.js.map} +0 -0
- /package/dist/{stale-74WGLVZ2.js.map → stale-6ZDBTQT7.js.map} +0 -0
|
@@ -4,36 +4,37 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
TxContext,
|
|
6
6
|
revertExecuted
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TFBP23BX.js";
|
|
8
8
|
import {
|
|
9
9
|
OverlayedCollection
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DJHHA6XH.js";
|
|
11
11
|
import {
|
|
12
12
|
LazyQuery,
|
|
13
13
|
decodeIdxId,
|
|
14
14
|
encodeIdxId
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2WUSG3IT.js";
|
|
16
16
|
import {
|
|
17
17
|
SCHEMAS_COLLECTION,
|
|
18
18
|
loadPersistedSchema,
|
|
19
19
|
resolveManagedSecret,
|
|
20
20
|
savePersistedSchema,
|
|
21
21
|
saveSealedPassphrase
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-I5FOWO4J.js";
|
|
23
23
|
import {
|
|
24
24
|
loadPublicEnvelope,
|
|
25
25
|
readPublicEnvelope,
|
|
26
26
|
savePublicEnvelope,
|
|
27
27
|
validatePublicEnvelopeInput
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ML236QKC.js";
|
|
29
29
|
import {
|
|
30
30
|
PERIODS_COLLECTION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JWRVQKRZ.js";
|
|
32
32
|
import {
|
|
33
33
|
getAtPath,
|
|
34
34
|
isDictCollectionName,
|
|
35
|
+
resolvePolicy,
|
|
35
36
|
setAtPathInPlace
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-22DWZL57.js";
|
|
37
38
|
import {
|
|
38
39
|
ManagedRecoveryNotEnrolledError,
|
|
39
40
|
PolicyDeniedError,
|
|
@@ -55,11 +56,11 @@ import {
|
|
|
55
56
|
saveShamirRecoveryEntries,
|
|
56
57
|
updateAuthenticator,
|
|
57
58
|
writeMagicLinkGrant
|
|
58
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-3YPCK6JX.js";
|
|
59
60
|
import {
|
|
60
61
|
assertTierAccess,
|
|
61
62
|
dekKey
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-U26HQ6KJ.js";
|
|
63
64
|
import {
|
|
64
65
|
USER_ENVELOPE_COLLECTION,
|
|
65
66
|
buildRecipientKeyringFile,
|
|
@@ -83,7 +84,7 @@ import {
|
|
|
83
84
|
rotateKeys,
|
|
84
85
|
saveUserEnvelope,
|
|
85
86
|
updateKeyringIdentity
|
|
86
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-DONMZAD2.js";
|
|
87
88
|
import {
|
|
88
89
|
INDEXED_STORE_POLICY
|
|
89
90
|
} from "./chunk-2QR2PQTT.js";
|
|
@@ -93,7 +94,7 @@ import {
|
|
|
93
94
|
import {
|
|
94
95
|
LEDGER_COLLECTION,
|
|
95
96
|
LEDGER_DELTAS_COLLECTION
|
|
96
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-PE2FR4J3.js";
|
|
97
98
|
import {
|
|
98
99
|
sha256Hex as sha256Hex2
|
|
99
100
|
} from "./chunk-Z6FNBOTC.js";
|
|
@@ -101,22 +102,22 @@ import {
|
|
|
101
102
|
NO_AGGREGATE,
|
|
102
103
|
Query,
|
|
103
104
|
ScanBuilder
|
|
104
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-2GLDA55J.js";
|
|
105
106
|
import {
|
|
106
107
|
EXPORT_AUDIT_COLLECTION,
|
|
107
108
|
createExportBlobsHandle,
|
|
108
109
|
runCompaction
|
|
109
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-3BFJOWSU.js";
|
|
110
111
|
import {
|
|
111
112
|
NOYDB_BACKUP_VERSION,
|
|
112
113
|
NOYDB_FORMAT_VERSION
|
|
113
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-WIRRPTFH.js";
|
|
114
115
|
import {
|
|
115
116
|
decrypt,
|
|
116
117
|
encrypt,
|
|
117
118
|
encryptDeterministic,
|
|
118
119
|
sha256Hex
|
|
119
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-PP6W64Y3.js";
|
|
120
121
|
import {
|
|
121
122
|
AlreadyElevatedError,
|
|
122
123
|
AttestationError,
|
|
@@ -129,6 +130,7 @@ import {
|
|
|
129
130
|
IndexWriteFailureError,
|
|
130
131
|
InvalidKeyError,
|
|
131
132
|
KeyringCorruptError,
|
|
133
|
+
LocaleNotSpecifiedError,
|
|
132
134
|
MigrationRequiredError,
|
|
133
135
|
NoAccessError,
|
|
134
136
|
NoydbError,
|
|
@@ -143,7 +145,7 @@ import {
|
|
|
143
145
|
TierNotGrantedError,
|
|
144
146
|
TranslatorNotConfiguredError,
|
|
145
147
|
ValidationError
|
|
146
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-B6PB7JLN.js";
|
|
147
149
|
|
|
148
150
|
// src/policy/storage.ts
|
|
149
151
|
var META_COLLECTION = "_meta";
|
|
@@ -331,6 +333,9 @@ var NO_I18N = {
|
|
|
331
333
|
validateI18nTextValue() {
|
|
332
334
|
throw notEnabled("i18nText field validation");
|
|
333
335
|
},
|
|
336
|
+
enforceScript(value) {
|
|
337
|
+
return { value, warnings: [] };
|
|
338
|
+
},
|
|
334
339
|
buildDictionaryHandle() {
|
|
335
340
|
throw notEnabled("vault.dictionary()");
|
|
336
341
|
}
|
|
@@ -646,7 +651,7 @@ async function resolveStaleOnRead(accessor, outputCollection, id) {
|
|
|
646
651
|
}
|
|
647
652
|
const sourceWithId = { ...source, id };
|
|
648
653
|
if (DerivationExecutor === null) {
|
|
649
|
-
({ DerivationExecutor } = await import("./executor-
|
|
654
|
+
({ DerivationExecutor } = await import("./executor-B4QIYGZX.js"));
|
|
650
655
|
}
|
|
651
656
|
const ctx = { vault: accessor.getReadOnlyFacade() };
|
|
652
657
|
const result = await DerivationExecutor.run(spec, sourceWithId, 0, strategyHash, ctx);
|
|
@@ -1114,7 +1119,7 @@ var Collection = class {
|
|
|
1114
1119
|
}
|
|
1115
1120
|
}
|
|
1116
1121
|
if (this.materializedViewSource !== void 0) {
|
|
1117
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
1122
|
+
const { resolveStaleMVOnRead } = await import("./stale-6ZDBTQT7.js");
|
|
1118
1123
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name);
|
|
1119
1124
|
}
|
|
1120
1125
|
let record;
|
|
@@ -1313,6 +1318,22 @@ var Collection = class {
|
|
|
1313
1318
|
setAtPathInPlace(obj, field, translated);
|
|
1314
1319
|
}
|
|
1315
1320
|
}
|
|
1321
|
+
if (this.i18nFields) {
|
|
1322
|
+
const obj = record;
|
|
1323
|
+
for (const [field, descriptor] of Object.entries(this.i18nFields)) {
|
|
1324
|
+
if (!descriptor.options.script) continue;
|
|
1325
|
+
for (const leaf of getAtPath(obj, field)) {
|
|
1326
|
+
if (!leaf || typeof leaf !== "object" || Array.isArray(leaf)) continue;
|
|
1327
|
+
const leafMap = leaf;
|
|
1328
|
+
const { value: cleaned } = this.i18nStrategy.enforceScript(
|
|
1329
|
+
leafMap,
|
|
1330
|
+
field,
|
|
1331
|
+
descriptor
|
|
1332
|
+
);
|
|
1333
|
+
if (cleaned !== leafMap) Object.assign(leafMap, cleaned);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1316
1337
|
if (this.i18nPutValidator !== void 0) {
|
|
1317
1338
|
this.i18nPutValidator(record);
|
|
1318
1339
|
}
|
|
@@ -1485,7 +1506,7 @@ var Collection = class {
|
|
|
1485
1506
|
if (mode === "eager") {
|
|
1486
1507
|
if (executor === null) {
|
|
1487
1508
|
;
|
|
1488
|
-
({ MaterializedViewExecutor: executor } = await import("./executor-
|
|
1509
|
+
({ MaterializedViewExecutor: executor } = await import("./executor-BWXXDQ7K.js"));
|
|
1489
1510
|
}
|
|
1490
1511
|
await executor.refresh(reg, {
|
|
1491
1512
|
getCollection: (name) => this.materializedViewSource.getCollection(name),
|
|
@@ -1494,7 +1515,7 @@ var Collection = class {
|
|
|
1494
1515
|
});
|
|
1495
1516
|
} else if (mode === "lazy") {
|
|
1496
1517
|
if (staleHelpers === null) {
|
|
1497
|
-
staleHelpers = await import("./stale-
|
|
1518
|
+
staleHelpers = await import("./stale-6ZDBTQT7.js");
|
|
1498
1519
|
}
|
|
1499
1520
|
staleHelpers.markMVStale(registry, reg.spec.name);
|
|
1500
1521
|
}
|
|
@@ -1523,7 +1544,7 @@ var Collection = class {
|
|
|
1523
1544
|
const mode = typeof spec.lifecycle === "string" ? spec.lifecycle : spec.lifecycle.mode;
|
|
1524
1545
|
if (mode === "eager") {
|
|
1525
1546
|
if (DerivationExecutor === null) {
|
|
1526
|
-
({ DerivationExecutor } = await import("./executor-
|
|
1547
|
+
({ DerivationExecutor } = await import("./executor-B4QIYGZX.js"));
|
|
1527
1548
|
}
|
|
1528
1549
|
const sourceWithId = { ...incoming, id };
|
|
1529
1550
|
const ctx = { vault: this.derivationSource.getReadOnlyFacade() };
|
|
@@ -1542,7 +1563,7 @@ var Collection = class {
|
|
|
1542
1563
|
const outputCollection = this.derivationSource.getCollection(outSpec.collection);
|
|
1543
1564
|
const txCtx = this.derivationSource.getActiveTxContext();
|
|
1544
1565
|
if (out.kind === "array") {
|
|
1545
|
-
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-
|
|
1566
|
+
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-OKPMMPLG.js");
|
|
1546
1567
|
const prior = await loadFanoutSidecar(
|
|
1547
1568
|
this.adapter,
|
|
1548
1569
|
this.vault,
|
|
@@ -1834,7 +1855,7 @@ var Collection = class {
|
|
|
1834
1855
|
for (const [outputKey, outSpec] of Object.entries(spec.outputs)) {
|
|
1835
1856
|
if (outSpec.shape !== "array") continue;
|
|
1836
1857
|
if (helpers === null) {
|
|
1837
|
-
helpers = await import("./fanout-sidecar-
|
|
1858
|
+
helpers = await import("./fanout-sidecar-OKPMMPLG.js");
|
|
1838
1859
|
}
|
|
1839
1860
|
const sidecar = await helpers.loadFanoutSidecar(
|
|
1840
1861
|
this.adapter,
|
|
@@ -1874,7 +1895,7 @@ var Collection = class {
|
|
|
1874
1895
|
if (mode === "eager") {
|
|
1875
1896
|
if (executor === null) {
|
|
1876
1897
|
;
|
|
1877
|
-
({ MaterializedViewExecutor: executor } = await import("./executor-
|
|
1898
|
+
({ MaterializedViewExecutor: executor } = await import("./executor-BWXXDQ7K.js"));
|
|
1878
1899
|
}
|
|
1879
1900
|
await executor.refresh(reg, {
|
|
1880
1901
|
getCollection: (name) => this.materializedViewSource.getCollection(name),
|
|
@@ -1883,7 +1904,7 @@ var Collection = class {
|
|
|
1883
1904
|
});
|
|
1884
1905
|
} else if (mode === "lazy") {
|
|
1885
1906
|
if (staleHelpers === null) {
|
|
1886
|
-
staleHelpers = await import("./stale-
|
|
1907
|
+
staleHelpers = await import("./stale-6ZDBTQT7.js");
|
|
1887
1908
|
}
|
|
1888
1909
|
staleHelpers.markMVStale(registry, reg.spec.name);
|
|
1889
1910
|
}
|
|
@@ -1906,7 +1927,7 @@ var Collection = class {
|
|
|
1906
1927
|
);
|
|
1907
1928
|
}
|
|
1908
1929
|
if (this.materializedViewSource !== void 0) {
|
|
1909
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
1930
|
+
const { resolveStaleMVOnRead } = await import("./stale-6ZDBTQT7.js");
|
|
1910
1931
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name);
|
|
1911
1932
|
}
|
|
1912
1933
|
await this.ensureHydrated();
|
|
@@ -2755,17 +2776,52 @@ var Collection = class {
|
|
|
2755
2776
|
}
|
|
2756
2777
|
if (hasDict && this.dictKeyFields && this.dictLabelResolver && locale !== "raw") {
|
|
2757
2778
|
const withLabels = { ...result };
|
|
2779
|
+
const resolver = this.dictLabelResolver;
|
|
2758
2780
|
for (const [field, desc] of Object.entries(this.dictKeyFields)) {
|
|
2759
|
-
const
|
|
2760
|
-
|
|
2761
|
-
const
|
|
2762
|
-
desc.name,
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2781
|
+
const policy = desc.onMissing ? resolvePolicy(desc.onMissing, "read") : "null";
|
|
2782
|
+
const fallback = policy === "substitute" ? localeOpts?.fallback ?? desc.substitute : localeOpts?.fallback;
|
|
2783
|
+
const resolveKey = async (key) => {
|
|
2784
|
+
const label = await resolver(desc.name, key, locale, fallback);
|
|
2785
|
+
if (label === void 0) {
|
|
2786
|
+
if (policy === "throw") {
|
|
2787
|
+
throw new LocaleNotSpecifiedError(
|
|
2788
|
+
field,
|
|
2789
|
+
`dictKey "${field}": no label for key "${key}" in locale "${locale}".`
|
|
2790
|
+
);
|
|
2791
|
+
}
|
|
2792
|
+
return null;
|
|
2793
|
+
}
|
|
2794
|
+
return label;
|
|
2795
|
+
};
|
|
2796
|
+
if (field.includes("[].")) {
|
|
2797
|
+
const parts = field.split("[].");
|
|
2798
|
+
const arrayKey = parts[0];
|
|
2799
|
+
const leaf = parts[1];
|
|
2800
|
+
if (!leaf || leaf.includes(".")) continue;
|
|
2801
|
+
const arr = withLabels[arrayKey];
|
|
2802
|
+
if (!Array.isArray(arr)) continue;
|
|
2803
|
+
const labelKey = `${leaf}Label`;
|
|
2804
|
+
withLabels[arrayKey] = await Promise.all(
|
|
2805
|
+
arr.map(async (el) => {
|
|
2806
|
+
if (!el || typeof el !== "object" || Array.isArray(el)) return el;
|
|
2807
|
+
const k = el[leaf];
|
|
2808
|
+
if (typeof k !== "string") return el;
|
|
2809
|
+
return { ...el, [labelKey]: await resolveKey(k) };
|
|
2810
|
+
})
|
|
2811
|
+
);
|
|
2812
|
+
continue;
|
|
2813
|
+
}
|
|
2814
|
+
const val = result[field];
|
|
2815
|
+
if (Array.isArray(val)) {
|
|
2816
|
+
withLabels[`${field}Label`] = await Promise.all(
|
|
2817
|
+
val.map(async (k) => ({
|
|
2818
|
+
key: k,
|
|
2819
|
+
label: typeof k === "string" ? await resolveKey(k) : null
|
|
2820
|
+
}))
|
|
2821
|
+
);
|
|
2822
|
+
} else if (typeof val === "string") {
|
|
2823
|
+
const label = await resolveKey(val);
|
|
2824
|
+
if (label !== null) withLabels[`${field}Label`] = label;
|
|
2769
2825
|
}
|
|
2770
2826
|
}
|
|
2771
2827
|
result = withLabels;
|
|
@@ -5339,12 +5395,12 @@ var Vault = class {
|
|
|
5339
5395
|
if (!fieldSchema) {
|
|
5340
5396
|
throw new AttestationError(`issueAttestation: collection '${collectionName}' has no attestation field-schema. Declare it via vault.collection('${collectionName}', { attestation: { fields: [...] } }).`);
|
|
5341
5397
|
}
|
|
5342
|
-
const { issueAttestationCore } = await import("./issue-
|
|
5398
|
+
const { issueAttestationCore } = await import("./issue-VGDPP4B5.js");
|
|
5343
5399
|
const out = await issueAttestationCore(this.makeIssueContext(), { collection: collectionName, id, fieldSchema });
|
|
5344
5400
|
return { docId: out.docId, qr: out.qr, keyId: out.keyId, publicKeyB64: out.publicKeyB64 };
|
|
5345
5401
|
}
|
|
5346
5402
|
async getDocumentSigningPublicKey() {
|
|
5347
|
-
const { loadSigner, loadOrCreateSigner } = await import("./signer-
|
|
5403
|
+
const { loadSigner, loadOrCreateSigner } = await import("./signer-72QAUSVW.js");
|
|
5348
5404
|
const existing = await loadSigner(this.adapter, this.name, this.getDEK);
|
|
5349
5405
|
if (existing) return { keyId: existing.keyId, publicKeyB64: existing.publicKeyB64 };
|
|
5350
5406
|
if (this.keyring.role !== "owner") {
|
|
@@ -5370,19 +5426,19 @@ var Vault = class {
|
|
|
5370
5426
|
};
|
|
5371
5427
|
}
|
|
5372
5428
|
async revokeAttestation(docId) {
|
|
5373
|
-
const { revokeDocCore } = await import("./revoke-
|
|
5429
|
+
const { revokeDocCore } = await import("./revoke-JCC7N56X.js");
|
|
5374
5430
|
await revokeDocCore(this.makeRevokeContext(), docId);
|
|
5375
5431
|
}
|
|
5376
5432
|
async unrevokeAttestation(docId) {
|
|
5377
|
-
const { unrevokeDocCore } = await import("./revoke-
|
|
5433
|
+
const { unrevokeDocCore } = await import("./revoke-JCC7N56X.js");
|
|
5378
5434
|
await unrevokeDocCore(this.makeRevokeContext(), docId);
|
|
5379
5435
|
}
|
|
5380
5436
|
async getRevokedDocIds() {
|
|
5381
|
-
const { getRevokedDocIdsCore } = await import("./revoke-
|
|
5437
|
+
const { getRevokedDocIdsCore } = await import("./revoke-JCC7N56X.js");
|
|
5382
5438
|
return getRevokedDocIdsCore(this.makeRevokeContext());
|
|
5383
5439
|
}
|
|
5384
5440
|
async publishRevocationList() {
|
|
5385
|
-
const { publishRevocationListCore } = await import("./revoke-
|
|
5441
|
+
const { publishRevocationListCore } = await import("./revoke-JCC7N56X.js");
|
|
5386
5442
|
return publishRevocationListCore(this.makeRevokeContext());
|
|
5387
5443
|
}
|
|
5388
5444
|
makeRevokeContext() {
|
|
@@ -5699,7 +5755,7 @@ var Vault = class {
|
|
|
5699
5755
|
async _initDerivations(handles) {
|
|
5700
5756
|
if (handles.length === 0) return;
|
|
5701
5757
|
const [{ DerivationRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
|
|
5702
|
-
import("./registry-
|
|
5758
|
+
import("./registry-3QP3YKQS.js"),
|
|
5703
5759
|
import("./read-only-facade-ITU6L7BL.js")
|
|
5704
5760
|
]);
|
|
5705
5761
|
const registry = new DerivationRegistry();
|
|
@@ -5730,7 +5786,7 @@ var Vault = class {
|
|
|
5730
5786
|
*/
|
|
5731
5787
|
async _initMaterializedViews(handles) {
|
|
5732
5788
|
if (handles.length === 0) return;
|
|
5733
|
-
const { MaterializedViewRegistry } = await import("./registry-
|
|
5789
|
+
const { MaterializedViewRegistry } = await import("./registry-OJIOSBV6.js");
|
|
5734
5790
|
const registry = new MaterializedViewRegistry();
|
|
5735
5791
|
this.materializedViewRegistry = registry;
|
|
5736
5792
|
const db = this;
|
|
@@ -5754,7 +5810,7 @@ var Vault = class {
|
|
|
5754
5810
|
*/
|
|
5755
5811
|
async _initOverlayedViews(handles) {
|
|
5756
5812
|
if (handles.length === 0) return;
|
|
5757
|
-
const { OverlayedViewRegistry } = await import("./registry-
|
|
5813
|
+
const { OverlayedViewRegistry } = await import("./registry-USRVT6YF.js");
|
|
5758
5814
|
const registry = new OverlayedViewRegistry();
|
|
5759
5815
|
const mvRegistry = this.materializedViewRegistry;
|
|
5760
5816
|
const overlayNames = /* @__PURE__ */ new Set();
|
|
@@ -5801,13 +5857,13 @@ var Vault = class {
|
|
|
5801
5857
|
if (!reg) {
|
|
5802
5858
|
throw new Error(`refreshView: no MV registered with name "${name}"`);
|
|
5803
5859
|
}
|
|
5804
|
-
const { MaterializedViewExecutor } = await import("./executor-
|
|
5860
|
+
const { MaterializedViewExecutor } = await import("./executor-BWXXDQ7K.js");
|
|
5805
5861
|
const result = await MaterializedViewExecutor.refresh(reg, {
|
|
5806
5862
|
getCollection: (n) => this.collection(n),
|
|
5807
5863
|
getActiveTxContext: () => this.noydb._activeTxContextOrNull,
|
|
5808
5864
|
getQueryContext: () => this
|
|
5809
5865
|
});
|
|
5810
|
-
const { clearMVStale } = await import("./stale-
|
|
5866
|
+
const { clearMVStale } = await import("./stale-6ZDBTQT7.js");
|
|
5811
5867
|
clearMVStale(registry, name);
|
|
5812
5868
|
return result;
|
|
5813
5869
|
}
|
|
@@ -5823,7 +5879,7 @@ var Vault = class {
|
|
|
5823
5879
|
if (registry === null) return { derived: 0, failed: 0 };
|
|
5824
5880
|
const strategies = registry.strategiesForSource(sourceCollection);
|
|
5825
5881
|
if (strategies.length === 0) return { derived: 0, failed: 0 };
|
|
5826
|
-
const { DerivationExecutor } = await import("./executor-
|
|
5882
|
+
const { DerivationExecutor } = await import("./executor-B4QIYGZX.js");
|
|
5827
5883
|
const sourceColl = this.collection(sourceCollection);
|
|
5828
5884
|
const records = await sourceColl.list();
|
|
5829
5885
|
const ctx = { vault: this.readOnlyFacade ?? new (await import("./read-only-facade-ITU6L7BL.js")).ReadOnlyVaultFacade(this) };
|
|
@@ -5848,7 +5904,7 @@ var Vault = class {
|
|
|
5848
5904
|
if (!outSpec) continue;
|
|
5849
5905
|
const outputColl = this.collection(outSpec.collection);
|
|
5850
5906
|
if (out.kind === "array") {
|
|
5851
|
-
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-
|
|
5907
|
+
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-OKPMMPLG.js");
|
|
5852
5908
|
const prior = await loadFanoutSidecar(this.adapter, this.name, spec.source, id, key);
|
|
5853
5909
|
const prevKeys = new Set(prior?.keys ?? []);
|
|
5854
5910
|
const newKeysList = out.entries.map((e) => e.key);
|
|
@@ -6069,7 +6125,7 @@ var Vault = class {
|
|
|
6069
6125
|
* collection.
|
|
6070
6126
|
*/
|
|
6071
6127
|
async delegate(opts) {
|
|
6072
|
-
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
6128
|
+
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-RI54P6I5.js");
|
|
6073
6129
|
if (!this.keyring.kek) {
|
|
6074
6130
|
throw new ValidationError(
|
|
6075
6131
|
"issueDelegation: keyring.kek is null \u2014 issuing a delegation requires a tier-1 unlock. Re-authenticate at tier 1 (passphrase) first."
|
|
@@ -6091,7 +6147,7 @@ var Vault = class {
|
|
|
6091
6147
|
* if the id does not exist.
|
|
6092
6148
|
*/
|
|
6093
6149
|
async revokeDelegation(id) {
|
|
6094
|
-
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
6150
|
+
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-RI54P6I5.js");
|
|
6095
6151
|
await revokeDelegation(this.adapter, this.name, id);
|
|
6096
6152
|
void DELEGATIONS_COLLECTION;
|
|
6097
6153
|
}
|
|
@@ -6560,7 +6616,7 @@ var Vault = class {
|
|
|
6560
6616
|
* @see docs/subsystems/public-envelope.md
|
|
6561
6617
|
*/
|
|
6562
6618
|
async getPublicEnvelope(opts = {}) {
|
|
6563
|
-
const { readPublicEnvelope: readPublicEnvelope2 } = await import("./public-envelope-
|
|
6619
|
+
const { readPublicEnvelope: readPublicEnvelope2 } = await import("./public-envelope-BW6OXORV.js");
|
|
6564
6620
|
return readPublicEnvelope2(this.adapter, this.name, opts);
|
|
6565
6621
|
}
|
|
6566
6622
|
/**
|
|
@@ -7624,16 +7680,32 @@ var QuickUnlockStore = class {
|
|
|
7624
7680
|
}
|
|
7625
7681
|
};
|
|
7626
7682
|
|
|
7627
|
-
// src/
|
|
7683
|
+
// src/snapshots/strategy.ts
|
|
7628
7684
|
var NOT_ENABLED4 = new Error(
|
|
7685
|
+
'Snapshots require the snapshot strategy. Import `{ withSnapshots }` from "@noy-db/hub/snapshots" and pass it to `createNoydb({ snapshotStrategy: withSnapshots({ store }) })`.'
|
|
7686
|
+
);
|
|
7687
|
+
var NO_SNAPSHOTS = {
|
|
7688
|
+
async snapshot() {
|
|
7689
|
+
throw NOT_ENABLED4;
|
|
7690
|
+
},
|
|
7691
|
+
async listSnapshots() {
|
|
7692
|
+
throw NOT_ENABLED4;
|
|
7693
|
+
},
|
|
7694
|
+
async restoreSnapshot() {
|
|
7695
|
+
throw NOT_ENABLED4;
|
|
7696
|
+
}
|
|
7697
|
+
};
|
|
7698
|
+
|
|
7699
|
+
// src/tx/strategy.ts
|
|
7700
|
+
var NOT_ENABLED5 = new Error(
|
|
7629
7701
|
'Multi-record transactions require the tx strategy. Import `{ withTransactions }` from "@noy-db/hub/tx" and pass it to `createNoydb({ txStrategy: withTransactions() })`.'
|
|
7630
7702
|
);
|
|
7631
7703
|
var NO_TX = {
|
|
7632
7704
|
async runTransaction() {
|
|
7633
|
-
throw
|
|
7705
|
+
throw NOT_ENABLED5;
|
|
7634
7706
|
},
|
|
7635
7707
|
async runDryRun() {
|
|
7636
|
-
throw
|
|
7708
|
+
throw NOT_ENABLED5;
|
|
7637
7709
|
}
|
|
7638
7710
|
};
|
|
7639
7711
|
|
|
@@ -7976,6 +8048,7 @@ var Noydb = class {
|
|
|
7976
8048
|
txStrategy;
|
|
7977
8049
|
sessionStrategy;
|
|
7978
8050
|
syncStrategy;
|
|
8051
|
+
snapshotStrategy;
|
|
7979
8052
|
/**
|
|
7980
8053
|
* Currently-running multi-record transaction, set by
|
|
7981
8054
|
* `runTransaction` at the start of Phase 2 (commit) and cleared in
|
|
@@ -8000,6 +8073,7 @@ var Noydb = class {
|
|
|
8000
8073
|
this.txStrategy = options.txStrategy ?? NO_TX;
|
|
8001
8074
|
this.sessionStrategy = options.sessionStrategy ?? NO_SESSION;
|
|
8002
8075
|
this.syncStrategy = options.syncStrategy ?? NO_SYNC;
|
|
8076
|
+
this.snapshotStrategy = options.snapshotStrategy ?? NO_SNAPSHOTS;
|
|
8003
8077
|
this.publicEnvelopeSchema = resolveSchema(options.publicEnvelope);
|
|
8004
8078
|
if (options.sessionPolicy) {
|
|
8005
8079
|
this.sessionStrategy.validateSessionPolicy(options.sessionPolicy);
|
|
@@ -8035,7 +8109,7 @@ var Noydb = class {
|
|
|
8035
8109
|
if (!facade) return;
|
|
8036
8110
|
const ctx = { existing, vault: facade, userId: e.userId, role: e.role };
|
|
8037
8111
|
await registry.runChecks(e.collection, incoming, ctx);
|
|
8038
|
-
const { GuardExecutor } = await import("./executor-
|
|
8112
|
+
const { GuardExecutor } = await import("./executor-5PNY7LGW.js");
|
|
8039
8113
|
for (const g of guards) {
|
|
8040
8114
|
await GuardExecutor.checkFrozenFields(g, e.docId, existing, incoming);
|
|
8041
8115
|
}
|
|
@@ -9986,6 +10060,45 @@ var Noydb = class {
|
|
|
9986
10060
|
this.keyringCache.set(vault, keyring);
|
|
9987
10061
|
return keyring;
|
|
9988
10062
|
}
|
|
10063
|
+
/**
|
|
10064
|
+
* Take an on-demand checkpoint of the given vault.
|
|
10065
|
+
* Requires `snapshotStrategy: withSnapshots({ store })` in `createNoydb`.
|
|
10066
|
+
* @throws ValidationError when the vault is not open
|
|
10067
|
+
*/
|
|
10068
|
+
async snapshot(vault, opts) {
|
|
10069
|
+
if (this.closed) throw new ValidationError("Instance is closed");
|
|
10070
|
+
const v = this.vaultCache.get(vault);
|
|
10071
|
+
if (!v) {
|
|
10072
|
+
throw new ValidationError(
|
|
10073
|
+
`Vault "${vault}" is not open. Call openVault() first.`
|
|
10074
|
+
);
|
|
10075
|
+
}
|
|
10076
|
+
return this.snapshotStrategy.snapshot(v, this.options.user, opts);
|
|
10077
|
+
}
|
|
10078
|
+
/**
|
|
10079
|
+
* List all snapshots for the given vault, newest first.
|
|
10080
|
+
* Reads only the sidecar index — does not download snapshot bytes.
|
|
10081
|
+
*/
|
|
10082
|
+
async listSnapshots(vault) {
|
|
10083
|
+
if (this.closed) throw new ValidationError("Instance is closed");
|
|
10084
|
+
return this.snapshotStrategy.listSnapshots(vault);
|
|
10085
|
+
}
|
|
10086
|
+
/**
|
|
10087
|
+
* Restore the vault to a previously snapshotted state.
|
|
10088
|
+
* Runs `verifyBackupIntegrity()` automatically on restore.
|
|
10089
|
+
* @throws SnapshotNotFoundError when `version` doesn't exist in the store
|
|
10090
|
+
* @throws ValidationError when the vault is not open
|
|
10091
|
+
*/
|
|
10092
|
+
async restoreSnapshot(vault, version) {
|
|
10093
|
+
if (this.closed) throw new ValidationError("Instance is closed");
|
|
10094
|
+
const v = this.vaultCache.get(vault);
|
|
10095
|
+
if (!v) {
|
|
10096
|
+
throw new ValidationError(
|
|
10097
|
+
`Vault "${vault}" is not open. Call openVault() first.`
|
|
10098
|
+
);
|
|
10099
|
+
}
|
|
10100
|
+
return this.snapshotStrategy.restoreSnapshot(v, version);
|
|
10101
|
+
}
|
|
9989
10102
|
};
|
|
9990
10103
|
async function createNoydb(options) {
|
|
9991
10104
|
const encrypted = options.encrypt !== false;
|
|
@@ -10060,4 +10173,4 @@ export {
|
|
|
10060
10173
|
Noydb,
|
|
10061
10174
|
createNoydb
|
|
10062
10175
|
};
|
|
10063
|
-
//# sourceMappingURL=chunk-
|
|
10176
|
+
//# sourceMappingURL=chunk-6774ZOQ7.js.map
|