@noy-db/hub 0.2.0-pre.8 → 0.3.0-pre.1
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/README.md +129 -3
- package/dist/adapter/index.d.ts +5 -0
- package/dist/adapter/index.js +15 -0
- package/dist/aggregate/index.d.ts +6 -2
- package/dist/aggregate/index.js +24 -16
- package/dist/aggregate/index.js.map +1 -1
- package/dist/api-RW3KP7WU.js +14 -0
- package/dist/as/index.d.ts +7 -0
- package/dist/as/index.js +24 -0
- package/dist/at/index.d.ts +5 -0
- package/dist/at/index.js +1 -0
- package/dist/attestation/index.d.ts +15 -47
- package/dist/attestation/index.js +54 -10
- package/dist/attestation/index.js.map +1 -1
- package/dist/backup-XV3IOEGB.js +217 -0
- package/dist/backup-XV3IOEGB.js.map +1 -0
- package/dist/blobs/index.d.ts +6 -8
- package/dist/blobs/index.js +19 -12
- package/dist/blobs/index.js.map +1 -1
- package/dist/bundle/index.d.ts +16 -70
- package/dist/bundle/index.js +39 -476
- package/dist/bundle/index.js.map +1 -1
- package/dist/{ulid-BFJkYRRW.d.ts → bundle-CH-H06dp.d.ts} +31 -86
- package/dist/by/index.d.ts +1 -0
- package/dist/by/index.js +11 -0
- package/dist/cargo/index.d.ts +9 -0
- package/dist/cargo/index.js +89 -0
- package/dist/chunk-26LGBE4T.js +42 -0
- package/dist/chunk-26LGBE4T.js.map +1 -0
- package/dist/chunk-2P2HZEXU.js +233 -0
- package/dist/chunk-2P2HZEXU.js.map +1 -0
- package/dist/{chunk-K3DK3NU5.js → chunk-3YFXJ3ZP.js} +20 -5
- package/dist/chunk-3YFXJ3ZP.js.map +1 -0
- package/dist/chunk-4Q6HSHHL.js +90 -0
- package/dist/chunk-4Q6HSHHL.js.map +1 -0
- package/dist/chunk-5LUY7UTV.js +380 -0
- package/dist/chunk-5LUY7UTV.js.map +1 -0
- package/dist/chunk-5N6CZTCY.js +367 -0
- package/dist/chunk-5N6CZTCY.js.map +1 -0
- package/dist/chunk-5O3AOPDT.js +992 -0
- package/dist/chunk-5O3AOPDT.js.map +1 -0
- package/dist/chunk-5R3ERCDH.js +239 -0
- package/dist/chunk-5R3ERCDH.js.map +1 -0
- package/dist/{chunk-6774ZOQ7.js → chunk-5R5JW2JT.js} +7095 -4769
- package/dist/chunk-5R5JW2JT.js.map +1 -0
- package/dist/chunk-5TDJ56JE.js +32 -0
- package/dist/chunk-5TDJ56JE.js.map +1 -0
- package/dist/{chunk-T7JEBOGN.js → chunk-62QYRORB.js} +18 -11
- package/dist/chunk-62QYRORB.js.map +1 -0
- package/dist/{chunk-J66GRPNH.js → chunk-6S7T6WC4.js} +2 -2
- package/dist/chunk-6S7T6WC4.js.map +1 -0
- package/dist/chunk-76722EBH.js +451 -0
- package/dist/chunk-76722EBH.js.map +1 -0
- package/dist/{chunk-Z6FNBOTC.js → chunk-AIWULCUO.js} +13 -17
- package/dist/chunk-AIWULCUO.js.map +1 -0
- package/dist/{chunk-O3VZPBZG.js → chunk-AQTBSL7R.js} +47 -11
- package/dist/chunk-AQTBSL7R.js.map +1 -0
- package/dist/chunk-AURFOK3D.js +35 -0
- package/dist/chunk-AURFOK3D.js.map +1 -0
- package/dist/{chunk-53XBRIRT.js → chunk-AXRXJTE2.js} +9 -9
- package/dist/chunk-AXRXJTE2.js.map +1 -0
- package/dist/chunk-AZAOEIKW.js +155 -0
- package/dist/chunk-AZAOEIKW.js.map +1 -0
- package/dist/{chunk-HNRHLRDC.js → chunk-BG3SPSR4.js} +3 -3
- package/dist/chunk-BG3SPSR4.js.map +1 -0
- package/dist/chunk-BGIZAFY7.js +1 -0
- package/dist/chunk-CHFZDSE4.js +1 -0
- package/dist/{chunk-DJHHA6XH.js → chunk-CMGR4ZEW.js} +50 -20
- package/dist/chunk-CMGR4ZEW.js.map +1 -0
- package/dist/chunk-CWPPNPOH.js +23 -0
- package/dist/chunk-CWPPNPOH.js.map +1 -0
- package/dist/{chunk-QODLLGQ7.js → chunk-DFEMTNPJ.js} +371 -38
- package/dist/chunk-DFEMTNPJ.js.map +1 -0
- package/dist/{chunk-ZYWZWG6G.js → chunk-DGDI2D4M.js} +10 -10
- package/dist/chunk-DGDI2D4M.js.map +1 -0
- package/dist/{chunk-SYMWGEET.js → chunk-EIZUR2XW.js} +3 -3
- package/dist/chunk-EIZUR2XW.js.map +1 -0
- package/dist/{chunk-BVRYKATC.js → chunk-FISN7WE4.js} +36 -33
- package/dist/chunk-FISN7WE4.js.map +1 -0
- package/dist/chunk-GHVIKOHT.js +1 -0
- package/dist/chunk-GYGWYIOZ.js +200 -0
- package/dist/chunk-GYGWYIOZ.js.map +1 -0
- package/dist/chunk-HCIPRAGS.js +45 -0
- package/dist/chunk-HCIPRAGS.js.map +1 -0
- package/dist/{chunk-PX35GA7L.js → chunk-I2NOIW44.js} +10 -10
- package/dist/chunk-I2NOIW44.js.map +1 -0
- package/dist/{chunk-OIF6LZUR.js → chunk-I3TIKTJO.js} +3 -3
- package/dist/chunk-I3TIKTJO.js.map +1 -0
- package/dist/chunk-I7FD46FF.js +9 -0
- package/dist/chunk-I7FD46FF.js.map +1 -0
- package/dist/chunk-IAGBDSCS.js +40 -0
- package/dist/chunk-IAGBDSCS.js.map +1 -0
- package/dist/{chunk-JWRVQKRZ.js → chunk-IELYAOGG.js} +6 -18
- package/dist/chunk-IELYAOGG.js.map +1 -0
- package/dist/chunk-IGUYVGGI.js +205 -0
- package/dist/chunk-IGUYVGGI.js.map +1 -0
- package/dist/{chunk-U26HQ6KJ.js → chunk-IO6GRPT6.js} +4 -4
- package/dist/chunk-IO6GRPT6.js.map +1 -0
- package/dist/chunk-IPB7FTQX.js +273 -0
- package/dist/chunk-IPB7FTQX.js.map +1 -0
- package/dist/chunk-ITNUCOXM.js +148 -0
- package/dist/chunk-ITNUCOXM.js.map +1 -0
- package/dist/{chunk-WPLVTJ5D.js → chunk-IUEN57TV.js} +10 -10
- package/dist/chunk-IUEN57TV.js.map +1 -0
- package/dist/{chunk-DL3HWOQ5.js → chunk-JNUWZ6D3.js} +9 -9
- package/dist/chunk-JNUWZ6D3.js.map +1 -0
- package/dist/chunk-K2WCO3NX.js +1 -0
- package/dist/chunk-KVOXU4T5.js +30 -0
- package/dist/chunk-KVOXU4T5.js.map +1 -0
- package/dist/chunk-KXGNJJXB.js +135 -0
- package/dist/chunk-KXGNJJXB.js.map +1 -0
- package/dist/chunk-LB7FD65R.js +163 -0
- package/dist/chunk-LB7FD65R.js.map +1 -0
- package/dist/{chunk-22DWZL57.js → chunk-LFLXAY2W.js} +43 -218
- package/dist/chunk-LFLXAY2W.js.map +1 -0
- package/dist/chunk-LMTH2RM6.js +129 -0
- package/dist/chunk-LMTH2RM6.js.map +1 -0
- package/dist/{aggregate/index.cjs → chunk-LV7M27WM.js} +390 -219
- package/dist/chunk-LV7M27WM.js.map +1 -0
- package/dist/{chunk-PE2FR4J3.js → chunk-LXQT4WMP.js} +16 -18
- package/dist/chunk-LXQT4WMP.js.map +1 -0
- package/dist/chunk-M2YKN37S.js +524 -0
- package/dist/chunk-M2YKN37S.js.map +1 -0
- package/dist/chunk-M6OST55S.js +14 -0
- package/dist/chunk-M6OST55S.js.map +1 -0
- package/dist/{chunk-F3GDRNUT.js → chunk-MD3Y6J3L.js} +35 -69
- package/dist/chunk-MD3Y6J3L.js.map +1 -0
- package/dist/{chunk-XJFLDA7A.js → chunk-MTMJVJ5W.js} +8 -7
- package/dist/chunk-MTMJVJ5W.js.map +1 -0
- package/dist/{chunk-DFMLEQZB.js → chunk-NF5JWERG.js} +5 -10
- package/dist/chunk-NF5JWERG.js.map +1 -0
- package/dist/{chunk-DO7C2TOG.js → chunk-PKHL44ER.js} +3 -3
- package/dist/{chunk-DO7C2TOG.js.map → chunk-PKHL44ER.js.map} +1 -1
- package/dist/chunk-PSMV73A5.js +117 -0
- package/dist/chunk-PSMV73A5.js.map +1 -0
- package/dist/chunk-PY4KJPYU.js +9 -0
- package/dist/chunk-PY4KJPYU.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/{chunk-DE6GKS6G.js → chunk-Q7SS3IME.js} +50 -9
- package/dist/chunk-Q7SS3IME.js.map +1 -0
- package/dist/chunk-QHJW5EXU.js +54 -0
- package/dist/chunk-QHJW5EXU.js.map +1 -0
- package/dist/{chunk-NONAAENK.js → chunk-RUEKROOS.js} +11 -4
- package/dist/chunk-RUEKROOS.js.map +1 -0
- package/dist/chunk-RUIMKQTA.js +23 -0
- package/dist/chunk-RUIMKQTA.js.map +1 -0
- package/dist/{chunk-TFBP23BX.js → chunk-SKF73JOP.js} +66 -7
- package/dist/chunk-SKF73JOP.js.map +1 -0
- package/dist/chunk-SM3AVUHC.js +42 -0
- package/dist/chunk-SM3AVUHC.js.map +1 -0
- package/dist/{chunk-ML236QKC.js → chunk-SMXWYP24.js} +5 -5
- package/dist/chunk-SMXWYP24.js.map +1 -0
- package/dist/chunk-SRB2XEWB.js +148 -0
- package/dist/chunk-SRB2XEWB.js.map +1 -0
- package/dist/chunk-SVLR4POP.js +64 -0
- package/dist/chunk-SVLR4POP.js.map +1 -0
- package/dist/chunk-TA66UMI4.js +123 -0
- package/dist/chunk-TA66UMI4.js.map +1 -0
- package/dist/chunk-TEILUWOI.js +664 -0
- package/dist/chunk-TEILUWOI.js.map +1 -0
- package/dist/chunk-TJYQIGAP.js +82 -0
- package/dist/chunk-TJYQIGAP.js.map +1 -0
- package/dist/{chunk-H2X3ISXG.js → chunk-UAG5KWVA.js} +7 -7
- package/dist/chunk-UAG5KWVA.js.map +1 -0
- package/dist/chunk-UDRIWL7A.js +382 -0
- package/dist/chunk-UDRIWL7A.js.map +1 -0
- package/dist/{chunk-2GLDA55J.js → chunk-UIU2THRG.js} +498 -133
- package/dist/chunk-UIU2THRG.js.map +1 -0
- package/dist/{chunk-3YPCK6JX.js → chunk-UPJNJGGA.js} +165 -423
- package/dist/chunk-UPJNJGGA.js.map +1 -0
- package/dist/chunk-UV5MFVO3.js +21 -0
- package/dist/chunk-UV5MFVO3.js.map +1 -0
- package/dist/{chunk-2WUSG3IT.js → chunk-V7RWQRG7.js} +5 -5
- package/dist/chunk-V7RWQRG7.js.map +1 -0
- package/dist/{chunk-VTKGMEPP.js → chunk-VCTFO5CO.js} +13 -3
- package/dist/chunk-VCTFO5CO.js.map +1 -0
- package/dist/{chunk-5T22KDPN.js → chunk-VFQGRQIH.js} +8 -8
- package/dist/chunk-VFQGRQIH.js.map +1 -0
- package/dist/{chunk-2QR2PQTT.js → chunk-VQNJ7UZL.js} +5 -3
- package/dist/chunk-VQNJ7UZL.js.map +1 -0
- package/dist/{chunk-DONMZAD2.js → chunk-WWGT2MDV.js} +43 -165
- package/dist/chunk-WWGT2MDV.js.map +1 -0
- package/dist/{chunk-EMIGCR7X.js → chunk-WXSYDNBT.js} +2 -2
- package/dist/chunk-WXSYDNBT.js.map +1 -0
- package/dist/chunk-WYSO2NIH.js +30 -0
- package/dist/chunk-WYSO2NIH.js.map +1 -0
- package/dist/chunk-XXYIOFUB.js +164 -0
- package/dist/chunk-XXYIOFUB.js.map +1 -0
- package/dist/{chunk-3BFJOWSU.js → chunk-Y22T3KQE.js} +35 -7
- package/dist/chunk-Y22T3KQE.js.map +1 -0
- package/dist/{chunk-A3JMGXPG.js → chunk-YMUGBZN2.js} +2 -2
- package/dist/chunk-YMUGBZN2.js.map +1 -0
- package/dist/{chunk-I5FOWO4J.js → chunk-ZCGAHGUS.js} +52 -73
- package/dist/chunk-ZCGAHGUS.js.map +1 -0
- package/dist/{chunk-FZU343FL.js → chunk-ZJADGNYF.js} +2 -2
- package/dist/chunk-ZJADGNYF.js.map +1 -0
- package/dist/{chunk-B6PB7JLN.js → chunk-ZYUC53LT.js} +427 -6
- package/dist/chunk-ZYUC53LT.js.map +1 -0
- package/dist/collection-facade-GQAOGJP2.js +33 -0
- package/dist/consent/index.d.ts +5 -7
- package/dist/consent/index.js +7 -5
- package/dist/consent/index.js.map +1 -1
- package/dist/crdt/index.d.ts +6 -2
- package/dist/crdt/index.js +3 -2
- package/dist/crdt/index.js.map +1 -1
- package/dist/decrypt-partition-IHtxEnTi.d.ts +21 -0
- package/dist/delegation-UL5HKLER.js +19 -0
- package/dist/derivations/index.d.ts +7 -9
- package/dist/derivations/index.js +11 -6
- package/dist/describe/index.d.ts +1 -0
- package/dist/describe/index.js +1 -0
- package/dist/describe-aBkJR2sd.d.ts +131 -0
- package/dist/{dev-unlock-p3ysikWP.d.ts → dev-unlock-C9Ro3v_O.d.ts} +1 -1
- package/dist/discriminant-BN9REW3o.d.ts +60 -0
- package/dist/enclave-UL5LW66V.js +88 -0
- package/dist/executor-2FWQRLMG.js +15 -0
- package/dist/executor-QZ7BXICW.js +9 -0
- package/dist/executor-Z5ZLJVTV.js +9 -0
- package/dist/export-accessible-KRV5W4GH.js +17 -0
- package/dist/extract-partition-GLKBOXFQ.js +30 -0
- package/dist/{fanout-sidecar-OKPMMPLG.js → fanout-sidecar-GF3DJ6KR.js} +34 -14
- package/dist/fanout-sidecar-GF3DJ6KR.js.map +1 -0
- package/dist/forget/index.d.ts +36 -0
- package/dist/forget/index.js +19 -0
- package/dist/forget/index.js.map +1 -0
- package/dist/guards/index.d.ts +13 -9
- package/dist/guards/index.js +12 -5
- package/dist/{hash-BPsYPcv_.d.cts → hash-Cp5uwiox.d.ts} +5 -1
- package/dist/history/index.d.ts +6 -8
- package/dist/history/index.js +19 -12
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.d.ts +5 -7
- package/dist/i18n/index.js +104 -15
- package/dist/i18n/index.js.map +1 -1
- package/dist/in/index.d.ts +5 -0
- package/dist/in/index.js +1 -0
- package/dist/in/index.js.map +1 -0
- package/dist/index-B9QdHytu.d.ts +123 -0
- package/dist/index-BF9_96A5.d.ts +123 -0
- package/dist/{types-DGU60JDt.d.ts → index-BzUo1B6n.d.ts} +16306 -8352
- package/dist/index.d.ts +1088 -450
- package/dist/index.js +1165 -293
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.d.ts +6 -3
- package/dist/indexing/index.js +6 -5
- package/dist/indexing/index.js.map +1 -1
- package/dist/issue-Y6UVIR43.js +13 -0
- package/dist/issue-Y6UVIR43.js.map +1 -0
- package/dist/kernel/index.d.ts +32 -0
- package/dist/kernel/index.js +53 -0
- package/dist/kernel/index.js.map +1 -0
- package/dist/{ledger-TMRZYNVJ.js → ledger-RYI35CDS.js} +12 -9
- package/dist/ledger-RYI35CDS.js.map +1 -0
- package/dist/liberate-CRPZEV7O.js +18 -0
- package/dist/liberate-CRPZEV7O.js.map +1 -0
- package/dist/materialized-views/index.d.ts +6 -19
- package/dist/materialized-views/index.js +16 -12
- package/dist/mime-magic-CGhw37_E.d.ts +103 -0
- package/dist/noydb-367AM4HT.js +50 -0
- package/dist/noydb-367AM4HT.js.map +1 -0
- package/dist/on/index.d.ts +5 -0
- package/dist/on/index.js +11 -0
- package/dist/on/index.js.map +1 -0
- package/dist/overlay-views/index.d.ts +27 -11
- package/dist/overlay-views/index.js +7 -6
- package/dist/periods/index.d.ts +5 -7
- package/dist/periods/index.js +13 -9
- package/dist/pod/index.d.ts +63 -0
- package/dist/pod/index.js +61 -0
- package/dist/pod/index.js.map +1 -0
- package/dist/policy-IXK4FVXP.js +41 -0
- package/dist/policy-IXK4FVXP.js.map +1 -0
- package/dist/portability/index.d.ts +20 -0
- package/dist/portability/index.js +43 -0
- package/dist/portability/index.js.map +1 -0
- package/dist/{public-envelope-BW6OXORV.js → public-envelope-JHDQCPSX.js} +6 -5
- package/dist/public-envelope-JHDQCPSX.js.map +1 -0
- package/dist/query/index.d.ts +5 -3
- package/dist/query/index.js +21 -13
- package/dist/read-only-facade-5ADRJVTM.js +8 -0
- package/dist/read-only-facade-5ADRJVTM.js.map +1 -0
- package/dist/registry-45RJNWGU.js +9 -0
- package/dist/registry-45RJNWGU.js.map +1 -0
- package/dist/registry-5GRV5VXI.js +13 -0
- package/dist/registry-5GRV5VXI.js.map +1 -0
- package/dist/registry-VW6P6A3J.js +8 -0
- package/dist/registry-VW6P6A3J.js.map +1 -0
- package/dist/registry-WEUCHBO4.js +11 -0
- package/dist/registry-WEUCHBO4.js.map +1 -0
- package/dist/request-withdrawal-GBPH2FDY.js +25 -0
- package/dist/request-withdrawal-GBPH2FDY.js.map +1 -0
- package/dist/revoke-TUFRGI6S.js +18 -0
- package/dist/revoke-TUFRGI6S.js.map +1 -0
- package/dist/sealed-record/index.d.ts +69 -0
- package/dist/sealed-record/index.js +65 -0
- package/dist/sealed-record/index.js.map +1 -0
- package/dist/session/index.d.ts +6 -8
- package/dist/session/index.js +7 -5
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.d.ts +5 -7
- package/dist/shadow/index.js +4 -3
- package/dist/shadow/index.js.map +1 -1
- package/dist/{signer-72QAUSVW.js → signer-PNKTBVF7.js} +6 -5
- package/dist/signer-PNKTBVF7.js.map +1 -0
- package/dist/snapshots/index.d.ts +16 -11
- package/dist/snapshots/index.js +49 -13
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-6ZDBTQT7.js → stale-3JWHNDIY.js} +3 -2
- package/dist/stale-3JWHNDIY.js.map +1 -0
- package/dist/store-coordination-provider-3I7XWZZK.js +142 -0
- package/dist/store-coordination-provider-3I7XWZZK.js.map +1 -0
- package/dist/subject-index-O75wKshW.d.ts +362 -0
- package/dist/sync/index.d.ts +4 -6
- package/dist/sync/index.js +7 -6
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.d.ts +5 -7
- package/dist/team/index.js +20 -16
- package/dist/tiers/index.d.ts +5 -0
- package/dist/tiers/index.js +33 -0
- package/dist/tiers/index.js.map +1 -0
- package/dist/to/index.d.ts +5 -0
- package/dist/to/index.js +17 -0
- package/dist/to/index.js.map +1 -0
- package/dist/transition-guard-C7ol6oPw.d.ts +165 -0
- package/dist/tx/index.d.ts +23 -9
- package/dist/tx/index.js +13 -8
- package/dist/tx/index.js.map +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ulid-DRH25k3y.d.ts +66 -0
- package/dist/ulid-PTAIMDG4.js +10 -0
- package/dist/ulid-PTAIMDG4.js.map +1 -0
- package/dist/util/index.d.ts +2 -0
- package/dist/util/index.js +7 -2
- package/dist/util/index.js.map +1 -1
- package/dist/vault-diff-B5fYNBL7.d.ts +147 -0
- package/dist/with/index.d.ts +38 -0
- package/dist/with/index.js +25 -0
- package/dist/with/index.js.map +1 -0
- package/dist/{with-materialized-view-BiasFcYx.d.ts → with-materialized-view-6p0Fk8bL.d.ts} +1 -1
- package/dist/{with-overlayed-view-CQViuko_.d.ts → with-overlayed-view-BJ6mXGMd.d.ts} +2 -3
- package/dist/with-rollup-BvQo3ROo.d.ts +47 -0
- package/dist/withdraw-accessible-FFS46EOD.js +22 -0
- package/dist/withdraw-accessible-FFS46EOD.js.map +1 -0
- package/dist/zod-HAJM7LMS.js +14763 -0
- package/dist/zod-HAJM7LMS.js.map +1 -0
- package/package.json +121 -201
- package/dist/aggregate/index.cjs.map +0 -1
- package/dist/aggregate/index.d.cts +0 -38
- package/dist/attestation/index.cjs +0 -305
- package/dist/attestation/index.cjs.map +0 -1
- package/dist/attestation/index.d.cts +0 -52
- package/dist/blobs/index.cjs +0 -1480
- package/dist/blobs/index.cjs.map +0 -1
- package/dist/blobs/index.d.cts +0 -46
- package/dist/bundle/index.cjs +0 -19104
- package/dist/bundle/index.cjs.map +0 -1
- package/dist/bundle/index.d.cts +0 -176
- package/dist/chunk-22DWZL57.js.map +0 -1
- package/dist/chunk-2GLDA55J.js.map +0 -1
- package/dist/chunk-2QR2PQTT.js.map +0 -1
- package/dist/chunk-2WUSG3IT.js.map +0 -1
- package/dist/chunk-3BFJOWSU.js.map +0 -1
- package/dist/chunk-3YPCK6JX.js.map +0 -1
- package/dist/chunk-53XBRIRT.js.map +0 -1
- package/dist/chunk-5T22KDPN.js.map +0 -1
- package/dist/chunk-5XHKQ56N.js +0 -340
- package/dist/chunk-5XHKQ56N.js.map +0 -1
- package/dist/chunk-6774ZOQ7.js.map +0 -1
- package/dist/chunk-6STK5TQP.js +0 -139
- package/dist/chunk-6STK5TQP.js.map +0 -1
- package/dist/chunk-A3JMGXPG.js.map +0 -1
- package/dist/chunk-B6PB7JLN.js.map +0 -1
- package/dist/chunk-BVRYKATC.js.map +0 -1
- package/dist/chunk-DE6GKS6G.js.map +0 -1
- package/dist/chunk-DFMLEQZB.js.map +0 -1
- package/dist/chunk-DJHHA6XH.js.map +0 -1
- package/dist/chunk-DL3HWOQ5.js.map +0 -1
- package/dist/chunk-DONMZAD2.js.map +0 -1
- package/dist/chunk-EMIGCR7X.js.map +0 -1
- package/dist/chunk-F3GDRNUT.js.map +0 -1
- package/dist/chunk-FZU343FL.js.map +0 -1
- package/dist/chunk-H2X3ISXG.js.map +0 -1
- package/dist/chunk-HNRHLRDC.js.map +0 -1
- package/dist/chunk-I5FOWO4J.js.map +0 -1
- package/dist/chunk-J66GRPNH.js.map +0 -1
- package/dist/chunk-JWRVQKRZ.js.map +0 -1
- package/dist/chunk-K3DK3NU5.js.map +0 -1
- package/dist/chunk-ML236QKC.js.map +0 -1
- package/dist/chunk-NONAAENK.js.map +0 -1
- package/dist/chunk-O3VZPBZG.js.map +0 -1
- package/dist/chunk-OIF6LZUR.js.map +0 -1
- package/dist/chunk-OQ6PIGHA.js +0 -19
- package/dist/chunk-OQ6PIGHA.js.map +0 -1
- package/dist/chunk-PE2FR4J3.js.map +0 -1
- package/dist/chunk-PP6W64Y3.js +0 -275
- package/dist/chunk-PP6W64Y3.js.map +0 -1
- package/dist/chunk-PX35GA7L.js.map +0 -1
- package/dist/chunk-QEILDE6R.js +0 -793
- package/dist/chunk-QEILDE6R.js.map +0 -1
- package/dist/chunk-QODLLGQ7.js.map +0 -1
- package/dist/chunk-RAZ4OVLL.js +0 -51
- package/dist/chunk-RAZ4OVLL.js.map +0 -1
- package/dist/chunk-SYMWGEET.js.map +0 -1
- package/dist/chunk-T7JEBOGN.js.map +0 -1
- package/dist/chunk-TFBP23BX.js.map +0 -1
- package/dist/chunk-TV3YZ35S.js +0 -90
- package/dist/chunk-TV3YZ35S.js.map +0 -1
- package/dist/chunk-U26HQ6KJ.js.map +0 -1
- package/dist/chunk-UF3BUNQZ.js +0 -1
- package/dist/chunk-UMLVJTYV.js +0 -20
- package/dist/chunk-UMLVJTYV.js.map +0 -1
- package/dist/chunk-VTKGMEPP.js.map +0 -1
- package/dist/chunk-W6EQLGMB.js +0 -100
- package/dist/chunk-W6EQLGMB.js.map +0 -1
- package/dist/chunk-WIRRPTFH.js +0 -17
- package/dist/chunk-WIRRPTFH.js.map +0 -1
- package/dist/chunk-WPLVTJ5D.js.map +0 -1
- package/dist/chunk-XJFLDA7A.js.map +0 -1
- package/dist/chunk-Z6FNBOTC.js.map +0 -1
- package/dist/chunk-ZYWZWG6G.js.map +0 -1
- package/dist/consent/index.cjs +0 -204
- package/dist/consent/index.cjs.map +0 -1
- package/dist/consent/index.d.cts +0 -25
- package/dist/crdt/index.cjs +0 -152
- package/dist/crdt/index.cjs.map +0 -1
- package/dist/crdt/index.d.cts +0 -30
- package/dist/crypto-HTZ4FJOP.js +0 -44
- package/dist/delegation-RI54P6I5.js +0 -17
- package/dist/derivations/index.cjs +0 -351
- package/dist/derivations/index.cjs.map +0 -1
- package/dist/derivations/index.d.cts +0 -72
- package/dist/dev-unlock-M4VAWNq_.d.cts +0 -263
- package/dist/executor-5PNY7LGW.js +0 -8
- package/dist/executor-B4QIYGZX.js +0 -8
- package/dist/executor-BWXXDQ7K.js +0 -11
- package/dist/fanout-sidecar-OKPMMPLG.js.map +0 -1
- package/dist/guards/index.cjs +0 -322
- package/dist/guards/index.cjs.map +0 -1
- package/dist/guards/index.d.cts +0 -31
- package/dist/hash-C1GtiOhR.d.ts +0 -63
- package/dist/history/index.cjs +0 -1222
- package/dist/history/index.cjs.map +0 -1
- package/dist/history/index.d.cts +0 -63
- package/dist/i18n/index.cjs +0 -1100
- package/dist/i18n/index.cjs.map +0 -1
- package/dist/i18n/index.d.cts +0 -39
- package/dist/index-4fBVt8j9.d.cts +0 -2387
- package/dist/index-D8I_pyJD.d.ts +0 -2387
- package/dist/index.cjs +0 -24334
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -776
- package/dist/indexing/index.cjs +0 -742
- package/dist/indexing/index.cjs.map +0 -1
- package/dist/indexing/index.d.cts +0 -36
- package/dist/issue-VGDPP4B5.js +0 -12
- package/dist/lazy-builder-7tIpFyWN.d.ts +0 -304
- package/dist/lazy-builder-wY4pMCEe.d.cts +0 -304
- package/dist/materialized-views/index.cjs +0 -854
- package/dist/materialized-views/index.cjs.map +0 -1
- package/dist/materialized-views/index.d.cts +0 -186
- package/dist/mime-magic-CBBSOkjm.d.cts +0 -50
- package/dist/mime-magic-CBBSOkjm.d.ts +0 -50
- package/dist/noydb-LZBH3XDK.js +0 -34
- package/dist/overlay-views/index.cjs +0 -359
- package/dist/overlay-views/index.cjs.map +0 -1
- package/dist/overlay-views/index.d.cts +0 -82
- package/dist/periods/index.cjs +0 -1041
- package/dist/periods/index.cjs.map +0 -1
- package/dist/periods/index.d.cts +0 -22
- package/dist/predicate-BSAGEyu5.d.cts +0 -209
- package/dist/predicate-BSAGEyu5.d.ts +0 -209
- package/dist/query/index.cjs +0 -2375
- package/dist/query/index.cjs.map +0 -1
- package/dist/query/index.d.cts +0 -3
- package/dist/read-only-facade-ITU6L7BL.js +0 -7
- package/dist/registry-3QP3YKQS.js +0 -8
- package/dist/registry-DKEXOJVO.js +0 -7
- package/dist/registry-OJIOSBV6.js +0 -10
- package/dist/registry-USRVT6YF.js +0 -8
- package/dist/revoke-JCC7N56X.js +0 -17
- package/dist/session/index.cjs +0 -495
- package/dist/session/index.cjs.map +0 -1
- package/dist/session/index.d.cts +0 -46
- package/dist/shadow/index.cjs +0 -133
- package/dist/shadow/index.cjs.map +0 -1
- package/dist/shadow/index.d.cts +0 -17
- package/dist/snapshots/index.cjs +0 -903
- package/dist/snapshots/index.cjs.map +0 -1
- package/dist/snapshots/index.d.cts +0 -21
- package/dist/store/index.cjs +0 -1083
- package/dist/store/index.cjs.map +0 -1
- package/dist/store/index.d.cts +0 -492
- package/dist/store/index.d.ts +0 -492
- package/dist/store/index.js +0 -37
- package/dist/strategy-BSxFXGzb.d.cts +0 -110
- package/dist/strategy-BSxFXGzb.d.ts +0 -110
- package/dist/strategy-DSTrsZ8t.d.cts +0 -601
- package/dist/strategy-DSTrsZ8t.d.ts +0 -601
- package/dist/sync/index.cjs +0 -1062
- package/dist/sync/index.cjs.map +0 -1
- package/dist/sync/index.d.cts +0 -43
- package/dist/team/index.cjs +0 -2798
- package/dist/team/index.cjs.map +0 -1
- package/dist/team/index.d.cts +0 -118
- package/dist/tx/index.cjs +0 -544
- package/dist/tx/index.cjs.map +0 -1
- package/dist/tx/index.d.cts +0 -21
- package/dist/types-DjunxzJa.d.cts +0 -12776
- package/dist/ulid-COREQ2RQ.js +0 -9
- package/dist/ulid-DPeuPgi3.d.cts +0 -603
- package/dist/util/index.cjs +0 -230
- package/dist/util/index.cjs.map +0 -1
- package/dist/util/index.d.cts +0 -77
- package/dist/with-derivation-Df0kMlED.d.cts +0 -13
- package/dist/with-derivation-DfOpKjFw.d.ts +0 -13
- package/dist/with-guard-0KksDtSR.d.ts +0 -18
- package/dist/with-guard-C6W5RVrH.d.cts +0 -18
- package/dist/with-materialized-view-BmDKyHrm.d.cts +0 -27
- package/dist/with-overlayed-view-CA66vhHz.d.cts +0 -13
- /package/dist/{store → adapter}/index.js.map +0 -0
- /package/dist/{chunk-UF3BUNQZ.js.map → api-RW3KP7WU.js.map} +0 -0
- /package/dist/{crypto-HTZ4FJOP.js.map → as/index.js.map} +0 -0
- /package/dist/{delegation-RI54P6I5.js.map → at/index.js.map} +0 -0
- /package/dist/{executor-5PNY7LGW.js.map → by/index.js.map} +0 -0
- /package/dist/{executor-B4QIYGZX.js.map → cargo/index.js.map} +0 -0
- /package/dist/{executor-BWXXDQ7K.js.map → chunk-BGIZAFY7.js.map} +0 -0
- /package/dist/{issue-VGDPP4B5.js.map → chunk-CHFZDSE4.js.map} +0 -0
- /package/dist/{ledger-TMRZYNVJ.js.map → chunk-GHVIKOHT.js.map} +0 -0
- /package/dist/{noydb-LZBH3XDK.js.map → chunk-K2WCO3NX.js.map} +0 -0
- /package/dist/{public-envelope-BW6OXORV.js.map → chunk-PZ5AY32C.js.map} +0 -0
- /package/dist/{read-only-facade-ITU6L7BL.js.map → collection-facade-GQAOGJP2.js.map} +0 -0
- /package/dist/{registry-3QP3YKQS.js.map → delegation-UL5HKLER.js.map} +0 -0
- /package/dist/{registry-DKEXOJVO.js.map → describe/index.js.map} +0 -0
- /package/dist/{registry-OJIOSBV6.js.map → enclave-UL5LW66V.js.map} +0 -0
- /package/dist/{registry-USRVT6YF.js.map → executor-2FWQRLMG.js.map} +0 -0
- /package/dist/{revoke-JCC7N56X.js.map → executor-QZ7BXICW.js.map} +0 -0
- /package/dist/{signer-72QAUSVW.js.map → executor-Z5ZLJVTV.js.map} +0 -0
- /package/dist/{stale-6ZDBTQT7.js.map → export-accessible-KRV5W4GH.js.map} +0 -0
- /package/dist/{ulid-COREQ2RQ.js.map → extract-partition-GLKBOXFQ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,88 +1,202 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
DEFAULT_FRESHNESS_MS,
|
|
3
|
+
PERSONAL_POLICY,
|
|
4
|
+
STRICT_POLICY,
|
|
5
|
+
checkGate,
|
|
6
|
+
describeGate,
|
|
7
|
+
mergePolicy
|
|
8
|
+
} from "./chunk-5N6CZTCY.js";
|
|
7
9
|
import {
|
|
8
10
|
Collection,
|
|
9
|
-
|
|
11
|
+
ComputedFieldError,
|
|
10
12
|
ELEVATION_AUDIT_COLLECTION,
|
|
11
13
|
ElevatedHandle,
|
|
14
|
+
LinkEndpointError,
|
|
15
|
+
LinkIntegrityError,
|
|
12
16
|
Lru,
|
|
13
|
-
META_COLLECTION,
|
|
14
17
|
Noydb,
|
|
15
|
-
PERSONAL_POLICY,
|
|
16
|
-
POLICY_RECORD_ID,
|
|
17
18
|
QuickUnlockStore,
|
|
18
19
|
RefIntegrityError,
|
|
19
20
|
RefRegistry,
|
|
20
21
|
RefScopeError,
|
|
21
|
-
STRICT_POLICY,
|
|
22
|
-
UserApi,
|
|
23
22
|
Vault,
|
|
24
|
-
checkGate,
|
|
25
23
|
createNoydb,
|
|
26
24
|
derivePersistedSchema,
|
|
27
25
|
describeAllUsersAuth,
|
|
28
26
|
describeAuthConfig,
|
|
29
|
-
describeGate,
|
|
30
27
|
describeUserAuth,
|
|
31
28
|
diagramAuthConfig,
|
|
32
29
|
estimateRecordBytes,
|
|
30
|
+
evalComputedFields,
|
|
31
|
+
isLinkCollectionName,
|
|
32
|
+
isRefArray,
|
|
33
33
|
isZodSchema,
|
|
34
|
-
|
|
35
|
-
mergePolicy,
|
|
34
|
+
memoryStore,
|
|
36
35
|
parseBytes,
|
|
37
36
|
persistSchemaIfNeeded,
|
|
38
37
|
ref,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
refArray,
|
|
39
|
+
withArchive
|
|
40
|
+
} from "./chunk-5R5JW2JT.js";
|
|
41
|
+
import {
|
|
42
|
+
META_COLLECTION,
|
|
43
|
+
POLICY_RECORD_ID,
|
|
44
|
+
loadVaultPolicy,
|
|
45
|
+
saveVaultPolicy
|
|
46
|
+
} from "./chunk-SM3AVUHC.js";
|
|
47
|
+
import {
|
|
48
|
+
DELEGATIONS_COLLECTION,
|
|
49
|
+
issueDelegation,
|
|
50
|
+
loadActiveDelegations,
|
|
51
|
+
revokeDelegation
|
|
52
|
+
} from "./chunk-VFQGRQIH.js";
|
|
43
53
|
import {
|
|
44
54
|
DEFAULT_PUBLIC_ENVELOPE_SCHEMA,
|
|
45
55
|
PUBLIC_ENVELOPE_FIELDS,
|
|
46
56
|
resolveSchema
|
|
47
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-WXSYDNBT.js";
|
|
58
|
+
import {
|
|
59
|
+
NO_SEQUENCE,
|
|
60
|
+
SequenceStore,
|
|
61
|
+
compileSequenceFormat,
|
|
62
|
+
resolveSequenceKey,
|
|
63
|
+
withSequence
|
|
64
|
+
} from "./chunk-GYGWYIOZ.js";
|
|
65
|
+
import {
|
|
66
|
+
UserApi
|
|
67
|
+
} from "./chunk-UDRIWL7A.js";
|
|
68
|
+
import {
|
|
69
|
+
WithdrawalRequestError,
|
|
70
|
+
approveWithdrawal,
|
|
71
|
+
listWithdrawalRequests,
|
|
72
|
+
rejectWithdrawal,
|
|
73
|
+
requestWithdrawal
|
|
74
|
+
} from "./chunk-XXYIOFUB.js";
|
|
75
|
+
import "./chunk-IAGBDSCS.js";
|
|
76
|
+
import {
|
|
77
|
+
NO_SEARCH,
|
|
78
|
+
tokenize,
|
|
79
|
+
withSearch
|
|
80
|
+
} from "./chunk-TEILUWOI.js";
|
|
81
|
+
import "./chunk-5R3ERCDH.js";
|
|
82
|
+
import {
|
|
83
|
+
isDiscriminant
|
|
84
|
+
} from "./chunk-PY4KJPYU.js";
|
|
85
|
+
import "./chunk-WYSO2NIH.js";
|
|
86
|
+
import "./chunk-IPB7FTQX.js";
|
|
87
|
+
import "./chunk-KVOXU4T5.js";
|
|
88
|
+
import {
|
|
89
|
+
withCargo
|
|
90
|
+
} from "./chunk-M6OST55S.js";
|
|
91
|
+
import {
|
|
92
|
+
CustodyApi,
|
|
93
|
+
NO_CARGO,
|
|
94
|
+
NO_CUSTODY,
|
|
95
|
+
withCustody
|
|
96
|
+
} from "./chunk-TJYQIGAP.js";
|
|
97
|
+
import {
|
|
98
|
+
DEED_RECORD_ID,
|
|
99
|
+
createDeedOwner,
|
|
100
|
+
isDeedVault,
|
|
101
|
+
liberateVault,
|
|
102
|
+
loadDeedMarker
|
|
103
|
+
} from "./chunk-KXGNJJXB.js";
|
|
104
|
+
import {
|
|
105
|
+
withdrawAccessibleData
|
|
106
|
+
} from "./chunk-PSMV73A5.js";
|
|
107
|
+
import {
|
|
108
|
+
exportAccessibleData
|
|
109
|
+
} from "./chunk-HCIPRAGS.js";
|
|
110
|
+
import {
|
|
111
|
+
diffVault
|
|
112
|
+
} from "./chunk-LB7FD65R.js";
|
|
113
|
+
import "./chunk-BGIZAFY7.js";
|
|
114
|
+
import {
|
|
115
|
+
fuseRetrieval
|
|
116
|
+
} from "./chunk-AURFOK3D.js";
|
|
117
|
+
import "./chunk-QHJW5EXU.js";
|
|
118
|
+
import {
|
|
119
|
+
immutableGuard,
|
|
120
|
+
transitionGuard,
|
|
121
|
+
withGuard
|
|
122
|
+
} from "./chunk-TA66UMI4.js";
|
|
123
|
+
import "./chunk-YMUGBZN2.js";
|
|
124
|
+
import "./chunk-RUIMKQTA.js";
|
|
125
|
+
import "./chunk-RUEKROOS.js";
|
|
126
|
+
import {
|
|
127
|
+
CollectionFrame,
|
|
128
|
+
VaultFrame
|
|
129
|
+
} from "./chunk-NF5JWERG.js";
|
|
48
130
|
import {
|
|
49
131
|
TxCollection,
|
|
50
132
|
TxContext,
|
|
51
133
|
TxVault,
|
|
52
134
|
runTransaction
|
|
53
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-SKF73JOP.js";
|
|
54
136
|
import {
|
|
55
|
-
withDerivation
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
import "./chunk-
|
|
137
|
+
withDerivation,
|
|
138
|
+
withRollup
|
|
139
|
+
} from "./chunk-LMTH2RM6.js";
|
|
140
|
+
import "./chunk-Q7SS3IME.js";
|
|
141
|
+
import "./chunk-PKHL44ER.js";
|
|
59
142
|
import {
|
|
60
143
|
withMaterializedView
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
144
|
+
} from "./chunk-3YFXJ3ZP.js";
|
|
145
|
+
import "./chunk-AQTBSL7R.js";
|
|
146
|
+
import "./chunk-62QYRORB.js";
|
|
147
|
+
import "./chunk-BG3SPSR4.js";
|
|
65
148
|
import {
|
|
66
149
|
withOverlayedView
|
|
67
|
-
} from "./chunk-
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import
|
|
150
|
+
} from "./chunk-EIZUR2XW.js";
|
|
151
|
+
import "./chunk-CMGR4ZEW.js";
|
|
152
|
+
import "./chunk-VCTFO5CO.js";
|
|
153
|
+
import {
|
|
154
|
+
importExternalObjects,
|
|
155
|
+
memoryObjectProjection
|
|
156
|
+
} from "./chunk-4Q6HSHHL.js";
|
|
157
|
+
import "./chunk-Y22T3KQE.js";
|
|
158
|
+
import "./chunk-V7RWQRG7.js";
|
|
71
159
|
import {
|
|
72
160
|
mergeCrdtStates,
|
|
73
161
|
resolveCrdtSnapshot
|
|
74
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-6S7T6WC4.js";
|
|
163
|
+
import {
|
|
164
|
+
decryptExtractedPartition
|
|
165
|
+
} from "./chunk-2P2HZEXU.js";
|
|
166
|
+
import {
|
|
167
|
+
SCHEMAS_COLLECTION,
|
|
168
|
+
loadPersistedSchema,
|
|
169
|
+
savePersistedSchema
|
|
170
|
+
} from "./chunk-26LGBE4T.js";
|
|
75
171
|
import {
|
|
76
172
|
MemoryRecipientSealer,
|
|
77
173
|
MemorySealingKeyProvider,
|
|
78
|
-
SCHEMAS_COLLECTION,
|
|
79
174
|
SEALED_PASSPHRASE_RECORD_ID,
|
|
80
|
-
|
|
175
|
+
aesGcmOpen,
|
|
81
176
|
loadSealedPassphrase,
|
|
177
|
+
parseRsaOaepTlv,
|
|
82
178
|
parseSealedEnvelope,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
} from "./chunk-
|
|
179
|
+
saveSealedPassphrase,
|
|
180
|
+
sealRsaOaepTlv
|
|
181
|
+
} from "./chunk-ZCGAHGUS.js";
|
|
182
|
+
import {
|
|
183
|
+
BLOB_CHUNKS_COLLECTION,
|
|
184
|
+
BLOB_COLLECTION,
|
|
185
|
+
BLOB_INDEX_COLLECTION,
|
|
186
|
+
BLOB_SLOTS_PREFIX,
|
|
187
|
+
BLOB_VERSIONS_PREFIX,
|
|
188
|
+
BlobSet,
|
|
189
|
+
DEFAULT_CHUNK_SIZE,
|
|
190
|
+
detectMagic,
|
|
191
|
+
detectMimeType,
|
|
192
|
+
isPreCompressed
|
|
193
|
+
} from "./chunk-DFEMTNPJ.js";
|
|
194
|
+
import {
|
|
195
|
+
createBundleStore,
|
|
196
|
+
createPodStore,
|
|
197
|
+
wrapBundleStore,
|
|
198
|
+
wrapPodStore
|
|
199
|
+
} from "./chunk-AZAOEIKW.js";
|
|
86
200
|
import {
|
|
87
201
|
NOYDB_BUNDLE_FORMAT_VERSION,
|
|
88
202
|
NOYDB_BUNDLE_MAGIC,
|
|
@@ -91,9 +205,12 @@ import {
|
|
|
91
205
|
readNoydbBundle,
|
|
92
206
|
readNoydbBundleHeader,
|
|
93
207
|
readNoydbBundlePublicEnvelope,
|
|
208
|
+
readPod,
|
|
209
|
+
readPodHeader,
|
|
94
210
|
resetBrotliSupportCache,
|
|
95
|
-
writeNoydbBundle
|
|
96
|
-
|
|
211
|
+
writeNoydbBundle,
|
|
212
|
+
writePod
|
|
213
|
+
} from "./chunk-FISN7WE4.js";
|
|
97
214
|
import {
|
|
98
215
|
PUBLIC_ENVELOPE_RECORD_ID,
|
|
99
216
|
isPublicEnvelope,
|
|
@@ -101,54 +218,25 @@ import {
|
|
|
101
218
|
readPublicEnvelope,
|
|
102
219
|
savePublicEnvelope,
|
|
103
220
|
validatePublicEnvelopeInput
|
|
104
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-SMXWYP24.js";
|
|
105
222
|
import {
|
|
106
223
|
CONSENT_AUDIT_COLLECTION
|
|
107
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-MTMJVJ5W.js";
|
|
225
|
+
import "./chunk-CWPPNPOH.js";
|
|
108
226
|
import {
|
|
109
227
|
PERIODS_COLLECTION
|
|
110
|
-
} from "./chunk-
|
|
111
|
-
import "./chunk-
|
|
112
|
-
import {
|
|
113
|
-
withGuard
|
|
114
|
-
} from "./chunk-OQ6PIGHA.js";
|
|
115
|
-
import "./chunk-A3JMGXPG.js";
|
|
116
|
-
import "./chunk-UMLVJTYV.js";
|
|
117
|
-
import "./chunk-NONAAENK.js";
|
|
118
|
-
import {
|
|
119
|
-
CollectionFrame,
|
|
120
|
-
VaultFrame
|
|
121
|
-
} from "./chunk-DFMLEQZB.js";
|
|
122
|
-
import {
|
|
123
|
-
enforceScript,
|
|
124
|
-
inferScripts
|
|
125
|
-
} from "./chunk-6STK5TQP.js";
|
|
228
|
+
} from "./chunk-IELYAOGG.js";
|
|
229
|
+
import "./chunk-GHVIKOHT.js";
|
|
126
230
|
import {
|
|
127
231
|
DICT_COLLECTION_PREFIX,
|
|
128
232
|
DictionaryHandle,
|
|
129
|
-
applyI18nLocale,
|
|
130
233
|
dictCollectionName,
|
|
131
234
|
dictKey,
|
|
132
|
-
i18nText,
|
|
133
235
|
isDictCollectionName,
|
|
134
236
|
isDictKeyDescriptor,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
validateI18nTextValue
|
|
139
|
-
} from "./chunk-22DWZL57.js";
|
|
140
|
-
import {
|
|
141
|
-
createBundleStore,
|
|
142
|
-
routeStore,
|
|
143
|
-
withCache,
|
|
144
|
-
withCircuitBreaker,
|
|
145
|
-
withHealthCheck,
|
|
146
|
-
withLogging,
|
|
147
|
-
withMetrics,
|
|
148
|
-
withRetry,
|
|
149
|
-
wrapBundleStore,
|
|
150
|
-
wrapStore
|
|
151
|
-
} from "./chunk-QEILDE6R.js";
|
|
237
|
+
isStaticDictDescriptor,
|
|
238
|
+
staticDict
|
|
239
|
+
} from "./chunk-LFLXAY2W.js";
|
|
152
240
|
import {
|
|
153
241
|
SYNC_CREDENTIALS_COLLECTION,
|
|
154
242
|
credentialStatus,
|
|
@@ -156,85 +244,83 @@ import {
|
|
|
156
244
|
getCredential,
|
|
157
245
|
listCredentials,
|
|
158
246
|
putCredential
|
|
159
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-DGDI2D4M.js";
|
|
160
248
|
import {
|
|
161
249
|
MAGIC_LINK_CONTENT_INFO_PREFIX,
|
|
162
250
|
MAGIC_LINK_GRANTS_COLLECTION,
|
|
163
251
|
MAGIC_LINK_KEK_INFO_PREFIX,
|
|
164
|
-
ManagedRecoveryNotEnrolledError,
|
|
165
|
-
PolicyDeniedError,
|
|
166
|
-
RecoveryNotEnrolledError,
|
|
167
|
-
RecoveryProfileNotImplementedError,
|
|
168
|
-
burnPaperRecoveryEntry,
|
|
169
252
|
deriveMagicLinkContentKey,
|
|
170
253
|
enrollAuthenticator,
|
|
171
254
|
findAuthenticator,
|
|
172
|
-
hasRecoveryEnrolled,
|
|
173
255
|
isMagicLinkGrantExpired,
|
|
174
256
|
listMagicLinkGrants,
|
|
175
|
-
loadPaperRecoveryEntries,
|
|
176
|
-
loadShamirRecoveryEntries,
|
|
177
257
|
magicLinkGrantRecordId,
|
|
178
|
-
mintPaperRecoveryEntry,
|
|
179
|
-
mintShamirRecoveryEntry,
|
|
180
|
-
mintWrappedDeksBlob,
|
|
181
258
|
readMagicLinkGrantRecord,
|
|
182
259
|
recoverPassphrase,
|
|
183
260
|
recoverUser,
|
|
184
261
|
removeAuthenticator,
|
|
185
262
|
revokeMagicLinkGrant,
|
|
186
263
|
rotatePassphrase,
|
|
264
|
+
unwrapMagicLinkGrant,
|
|
265
|
+
writeMagicLinkGrant
|
|
266
|
+
} from "./chunk-UPJNJGGA.js";
|
|
267
|
+
import {
|
|
268
|
+
burnPaperRecoveryEntry,
|
|
269
|
+
hasRecoveryEnrolled,
|
|
270
|
+
loadPaperRecoveryEntries,
|
|
271
|
+
loadShamirRecoveryEntries,
|
|
272
|
+
mintPaperRecoveryEntry,
|
|
273
|
+
mintShamirRecoveryEntry,
|
|
274
|
+
mintWrappedDeksBlob,
|
|
187
275
|
savePaperRecoveryEntries,
|
|
188
276
|
saveShamirRecoveryEntries,
|
|
189
277
|
unwrapDeksFromBlob,
|
|
190
278
|
unwrapDeksFromPaperEntry,
|
|
191
|
-
unwrapDeksFromShamirEntry
|
|
192
|
-
|
|
193
|
-
writeMagicLinkGrant
|
|
194
|
-
} from "./chunk-3YPCK6JX.js";
|
|
279
|
+
unwrapDeksFromShamirEntry
|
|
280
|
+
} from "./chunk-IGUYVGGI.js";
|
|
195
281
|
import {
|
|
196
282
|
assertTierAccess,
|
|
197
283
|
dekKey,
|
|
198
284
|
effectiveClearance
|
|
199
|
-
} from "./chunk-
|
|
285
|
+
} from "./chunk-IO6GRPT6.js";
|
|
200
286
|
import {
|
|
201
287
|
PresenceHandle,
|
|
202
288
|
SyncEngine,
|
|
203
289
|
SyncTransaction
|
|
204
|
-
} from "./chunk-
|
|
290
|
+
} from "./chunk-IUEN57TV.js";
|
|
291
|
+
import {
|
|
292
|
+
BUNDLE_STORE_POLICY,
|
|
293
|
+
INDEXED_STORE_POLICY,
|
|
294
|
+
POD_STORE_POLICY,
|
|
295
|
+
SyncScheduler
|
|
296
|
+
} from "./chunk-VQNJ7UZL.js";
|
|
205
297
|
import {
|
|
206
|
-
DIRECTORY_RECORD_ID,
|
|
207
|
-
USER_ENVELOPE_COLLECTION,
|
|
208
|
-
USER_ENVELOPE_MAX_BYTES,
|
|
209
|
-
UserEnvelopeOversizedError,
|
|
210
|
-
VISIBILITY_RECORD_PREFIX,
|
|
211
298
|
WeakPassphraseError,
|
|
212
299
|
assertStrongPassphrase,
|
|
213
300
|
buildRecipientKeyringFile,
|
|
214
|
-
deleteUserEnvelope,
|
|
215
|
-
deleteUserVisibility,
|
|
216
301
|
estimateEntropy,
|
|
217
302
|
evaluateExportCapability,
|
|
218
303
|
evaluateImportCapability,
|
|
219
304
|
hasExportCapability,
|
|
220
305
|
hasImportCapability,
|
|
221
|
-
listUserEnvelopeIds,
|
|
222
306
|
listUsers,
|
|
223
307
|
listUsersWithEnvelopes,
|
|
308
|
+
validatePassphrase
|
|
309
|
+
} from "./chunk-WWGT2MDV.js";
|
|
310
|
+
import {
|
|
311
|
+
DIRECTORY_RECORD_ID,
|
|
312
|
+
VISIBILITY_RECORD_PREFIX,
|
|
313
|
+
deleteUserEnvelope,
|
|
314
|
+
deleteUserVisibility,
|
|
315
|
+
listUserEnvelopeIds,
|
|
224
316
|
loadUserEnvelope,
|
|
225
317
|
persistDirectoryConfig,
|
|
226
318
|
persistUserVisibility,
|
|
227
319
|
readDirectoryConfig,
|
|
228
320
|
readUserVisibility,
|
|
229
321
|
saveUserEnvelope,
|
|
230
|
-
validatePassphrase,
|
|
231
322
|
visibilityRecordId
|
|
232
|
-
} from "./chunk-
|
|
233
|
-
import {
|
|
234
|
-
BUNDLE_STORE_POLICY,
|
|
235
|
-
INDEXED_STORE_POLICY,
|
|
236
|
-
SyncScheduler
|
|
237
|
-
} from "./chunk-2QR2PQTT.js";
|
|
323
|
+
} from "./chunk-ITNUCOXM.js";
|
|
238
324
|
import {
|
|
239
325
|
PolicyEnforcer,
|
|
240
326
|
activeSessionCount,
|
|
@@ -249,24 +335,28 @@ import {
|
|
|
249
335
|
revokeAllSessions,
|
|
250
336
|
revokeSession,
|
|
251
337
|
validateSessionPolicy
|
|
252
|
-
} from "./chunk-
|
|
338
|
+
} from "./chunk-UAG5KWVA.js";
|
|
253
339
|
import {
|
|
254
340
|
generateULID,
|
|
255
341
|
isULID
|
|
256
|
-
} from "./chunk-
|
|
342
|
+
} from "./chunk-ZJADGNYF.js";
|
|
257
343
|
import {
|
|
258
344
|
CollectionInstant,
|
|
259
|
-
VaultInstant
|
|
345
|
+
VaultInstant
|
|
346
|
+
} from "./chunk-MD3Y6J3L.js";
|
|
347
|
+
import {
|
|
260
348
|
diff,
|
|
261
349
|
formatDiff
|
|
262
|
-
} from "./chunk-
|
|
350
|
+
} from "./chunk-SVLR4POP.js";
|
|
263
351
|
import {
|
|
264
|
-
LEDGER_COLLECTION,
|
|
265
|
-
LEDGER_DELTAS_COLLECTION,
|
|
266
352
|
LedgerStore,
|
|
267
353
|
applyPatch,
|
|
268
354
|
computePatch
|
|
269
|
-
} from "./chunk-
|
|
355
|
+
} from "./chunk-LXQT4WMP.js";
|
|
356
|
+
import {
|
|
357
|
+
LEDGER_COLLECTION,
|
|
358
|
+
LEDGER_DELTAS_COLLECTION
|
|
359
|
+
} from "./chunk-I7FD46FF.js";
|
|
270
360
|
import {
|
|
271
361
|
canonicalJson,
|
|
272
362
|
envelopePayloadHash,
|
|
@@ -274,7 +364,28 @@ import {
|
|
|
274
364
|
paddedIndex,
|
|
275
365
|
parseIndex,
|
|
276
366
|
sha256Hex
|
|
277
|
-
} from "./chunk-
|
|
367
|
+
} from "./chunk-AIWULCUO.js";
|
|
368
|
+
import "./chunk-SRB2XEWB.js";
|
|
369
|
+
import "./chunk-UV5MFVO3.js";
|
|
370
|
+
import {
|
|
371
|
+
base64ToBuffer,
|
|
372
|
+
bufferToBase64,
|
|
373
|
+
decryptBytes,
|
|
374
|
+
decryptDeterministic,
|
|
375
|
+
derivePresenceKey,
|
|
376
|
+
encryptBytes,
|
|
377
|
+
encryptDeterministic,
|
|
378
|
+
validateSchemaInput,
|
|
379
|
+
validateSchemaOutput
|
|
380
|
+
} from "./chunk-5O3AOPDT.js";
|
|
381
|
+
import {
|
|
382
|
+
NOYDB_BACKUP_VERSION,
|
|
383
|
+
NOYDB_FORMAT_VERSION,
|
|
384
|
+
NOYDB_KEYRING_VERSION,
|
|
385
|
+
NOYDB_SYNC_VERSION,
|
|
386
|
+
SealedHandle,
|
|
387
|
+
createStore
|
|
388
|
+
} from "./chunk-5TDJ56JE.js";
|
|
278
389
|
import {
|
|
279
390
|
DEFAULT_CROSS_JOIN_MAX_ROWS,
|
|
280
391
|
DEFAULT_JOIN_MAX_ROWS,
|
|
@@ -284,17 +395,10 @@ import {
|
|
|
284
395
|
buildLiveQuery,
|
|
285
396
|
executePlan,
|
|
286
397
|
resetJoinWarnings
|
|
287
|
-
} from "./chunk-
|
|
398
|
+
} from "./chunk-UIU2THRG.js";
|
|
288
399
|
import {
|
|
289
400
|
CollectionIndexes
|
|
290
|
-
} from "./chunk-
|
|
291
|
-
import {
|
|
292
|
-
avg,
|
|
293
|
-
count,
|
|
294
|
-
max,
|
|
295
|
-
min,
|
|
296
|
-
sum
|
|
297
|
-
} from "./chunk-W6EQLGMB.js";
|
|
401
|
+
} from "./chunk-I3TIKTJO.js";
|
|
298
402
|
import {
|
|
299
403
|
Aggregation,
|
|
300
404
|
GROUPBY_MAX_CARDINALITY,
|
|
@@ -302,56 +406,62 @@ import {
|
|
|
302
406
|
GroupedAggregation,
|
|
303
407
|
GroupedQuery,
|
|
304
408
|
GroupedQueryN,
|
|
409
|
+
avg,
|
|
410
|
+
count,
|
|
305
411
|
groupAndReduce,
|
|
306
|
-
|
|
307
|
-
|
|
412
|
+
max,
|
|
413
|
+
min,
|
|
414
|
+
moneyMax,
|
|
415
|
+
moneyMin,
|
|
416
|
+
moneySum,
|
|
417
|
+
reduceRecords,
|
|
418
|
+
reducerBuilder,
|
|
419
|
+
sum
|
|
420
|
+
} from "./chunk-LV7M27WM.js";
|
|
308
421
|
import {
|
|
422
|
+
MoneyCurrencyError,
|
|
423
|
+
MoneyPrecisionError,
|
|
424
|
+
MoneyUnsupportedError,
|
|
425
|
+
decimalScaleOf,
|
|
309
426
|
evaluateClause,
|
|
310
427
|
evaluateFieldClause,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
BlobSet,
|
|
320
|
-
DEFAULT_CHUNK_SIZE,
|
|
321
|
-
detectMagic,
|
|
322
|
-
detectMimeType,
|
|
323
|
-
isPreCompressed
|
|
324
|
-
} from "./chunk-QODLLGQ7.js";
|
|
325
|
-
import "./chunk-3BFJOWSU.js";
|
|
326
|
-
import {
|
|
327
|
-
NOYDB_BACKUP_VERSION,
|
|
328
|
-
NOYDB_FORMAT_VERSION,
|
|
329
|
-
NOYDB_KEYRING_VERSION,
|
|
330
|
-
NOYDB_SYNC_VERSION,
|
|
331
|
-
createStore
|
|
332
|
-
} from "./chunk-WIRRPTFH.js";
|
|
428
|
+
formatScaledInt,
|
|
429
|
+
isMoneyDescriptor,
|
|
430
|
+
money,
|
|
431
|
+
parseToScaledInt,
|
|
432
|
+
readPath,
|
|
433
|
+
rescaleScaledInt,
|
|
434
|
+
scaleForCurrency
|
|
435
|
+
} from "./chunk-M2YKN37S.js";
|
|
333
436
|
import {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
437
|
+
applyI18nLocale,
|
|
438
|
+
enforceScript,
|
|
439
|
+
i18nText,
|
|
440
|
+
inferScripts,
|
|
441
|
+
isI18nTextDescriptor,
|
|
442
|
+
resolveI18nText,
|
|
443
|
+
resolvePolicy,
|
|
444
|
+
validateI18nTextValue
|
|
445
|
+
} from "./chunk-5LUY7UTV.js";
|
|
342
446
|
import {
|
|
343
447
|
AlreadyElevatedError,
|
|
344
448
|
AmendmentForbiddenError,
|
|
345
449
|
AttestationError,
|
|
450
|
+
AttestationNotEnabledError,
|
|
346
451
|
BackupCorruptedError,
|
|
347
452
|
BackupLedgerError,
|
|
348
453
|
BundleIntegrityError,
|
|
349
454
|
BundleSealMismatchError,
|
|
350
455
|
BundleVersionConflictError,
|
|
456
|
+
CargoNotEnabledError,
|
|
351
457
|
ConflictError,
|
|
352
458
|
CrossJoinSourceUnknownError,
|
|
353
459
|
CrossJoinTooLargeError,
|
|
460
|
+
CustodyNotEnabledError,
|
|
354
461
|
DanglingReferenceError,
|
|
462
|
+
DataResidencyError,
|
|
463
|
+
DebugPlaintextError,
|
|
464
|
+
DebugReservedFieldError,
|
|
355
465
|
DecryptionError,
|
|
356
466
|
DelegationTargetMissingError,
|
|
357
467
|
DerivationCapExceededError,
|
|
@@ -363,10 +473,15 @@ import {
|
|
|
363
473
|
DictKeyMissingError,
|
|
364
474
|
DirectoryDisabledError,
|
|
365
475
|
ElevationExpiredError,
|
|
476
|
+
EmbeddingDimMismatchError,
|
|
477
|
+
EmbeddingModelMismatchError,
|
|
478
|
+
EnclaveNotSupportedError,
|
|
366
479
|
ExportCapabilityError,
|
|
367
480
|
FieldFrozenError,
|
|
368
481
|
FilenameSanitizationError,
|
|
482
|
+
ForgetStrategyNotConfiguredError,
|
|
369
483
|
GroupCardinalityError,
|
|
484
|
+
IllegalTransitionError,
|
|
370
485
|
ImportCapabilityError,
|
|
371
486
|
IndexRequiredError,
|
|
372
487
|
IndexWriteFailureError,
|
|
@@ -377,6 +492,7 @@ import {
|
|
|
377
492
|
KeyringExpiredError,
|
|
378
493
|
LedgerContentionError,
|
|
379
494
|
LocaleNotSpecifiedError,
|
|
495
|
+
ManagedRecoveryNotEnrolledError,
|
|
380
496
|
MaterializedViewConfigError,
|
|
381
497
|
MaterializedViewCycleError,
|
|
382
498
|
MaterializedViewSourceUnknownError,
|
|
@@ -388,6 +504,7 @@ import {
|
|
|
388
504
|
NonAdditiveSchemaChangeError,
|
|
389
505
|
NotFoundError,
|
|
390
506
|
NoydbError,
|
|
507
|
+
NumberingUncertaintyError,
|
|
391
508
|
OverlayBaseIsVirtualError,
|
|
392
509
|
OverlayCollectionUnavailableError,
|
|
393
510
|
OverlayIdMismatchError,
|
|
@@ -395,31 +512,76 @@ import {
|
|
|
395
512
|
PathEscapeError,
|
|
396
513
|
PeriodClosedError,
|
|
397
514
|
PermissionDeniedError,
|
|
515
|
+
PodVersionConflictError,
|
|
516
|
+
PolicyDeniedError,
|
|
517
|
+
PortabilityNotEnabledError,
|
|
398
518
|
PrivilegeEscalationError,
|
|
399
519
|
QuiesceTimeoutError,
|
|
400
520
|
ReadOnlyAtInstantError,
|
|
401
521
|
ReadOnlyError,
|
|
402
522
|
ReadOnlyFrameError,
|
|
523
|
+
RecordCekNotFoundError,
|
|
403
524
|
RecordLockedError,
|
|
525
|
+
RecoveryNotEnrolledError,
|
|
526
|
+
RecoveryProfileNotImplementedError,
|
|
404
527
|
ReservedCollectionNameError,
|
|
528
|
+
ReservedVaultNameError,
|
|
529
|
+
STATE_VAULT_NAME,
|
|
405
530
|
SchemaFenceError,
|
|
406
531
|
SchemaLockedError,
|
|
407
532
|
SchemaUpdateError,
|
|
408
533
|
SchemaValidationError,
|
|
409
534
|
ScriptViolationError,
|
|
535
|
+
SealedRecordExpiredError,
|
|
536
|
+
SealedRecordMismatchError,
|
|
537
|
+
SealedRecordNotEnabledError,
|
|
538
|
+
SearchNotEnabledError,
|
|
539
|
+
SequenceContentionError,
|
|
540
|
+
SequenceNotEnabledError,
|
|
541
|
+
SequenceOfflineError,
|
|
410
542
|
SessionExpiredError,
|
|
411
543
|
SessionNotFoundError,
|
|
412
544
|
SessionPolicyError,
|
|
545
|
+
ShardProvisioningError,
|
|
413
546
|
SnapshotNotFoundError,
|
|
547
|
+
StaticDictReadonlyError,
|
|
414
548
|
StoreCapabilityError,
|
|
415
549
|
TamperedError,
|
|
416
550
|
TierDemoteDeniedError,
|
|
417
551
|
TierNotGrantedError,
|
|
552
|
+
TiersNotEnabledError,
|
|
418
553
|
TranslatorNotConfiguredError,
|
|
419
|
-
|
|
420
|
-
|
|
554
|
+
USER_ENVELOPE_COLLECTION,
|
|
555
|
+
USER_ENVELOPE_MAX_BYTES,
|
|
556
|
+
UniqueConstraintError,
|
|
557
|
+
UnknownDictCodeError,
|
|
558
|
+
UnknownShardError,
|
|
559
|
+
UnsupportedIndexOptionError,
|
|
560
|
+
UserEnvelopeOversizedError,
|
|
561
|
+
ValidationError,
|
|
562
|
+
VaultTemplateNotFoundError
|
|
563
|
+
} from "./chunk-ZYUC53LT.js";
|
|
564
|
+
import "./chunk-PZ5AY32C.js";
|
|
421
565
|
|
|
422
|
-
// src/
|
|
566
|
+
// src/kernel/debug.ts
|
|
567
|
+
function readPlaintextRecord(envelope) {
|
|
568
|
+
if (envelope._iv !== "") {
|
|
569
|
+
throw new Error(
|
|
570
|
+
"readPlaintextRecord: envelope is encrypted (non-empty _iv) \u2014 decrypt via the vault, not this helper"
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
if (envelope._debug !== void 0) {
|
|
574
|
+
const record = {};
|
|
575
|
+
for (const [key, value] of Object.entries(envelope)) {
|
|
576
|
+
if (!key.startsWith("_")) record[key] = value;
|
|
577
|
+
}
|
|
578
|
+
return record;
|
|
579
|
+
}
|
|
580
|
+
if (!envelope._data) return null;
|
|
581
|
+
return JSON.parse(envelope._data);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
// src/with-shape/schema-update/strategies.ts
|
|
423
585
|
function blindUpdate() {
|
|
424
586
|
return { name: "blindUpdate", onSchemaDelta: () => ({ action: "allow" }) };
|
|
425
587
|
}
|
|
@@ -457,7 +619,7 @@ function lockSchema(opts) {
|
|
|
457
619
|
};
|
|
458
620
|
}
|
|
459
621
|
|
|
460
|
-
// src/schema-update/cutover.ts
|
|
622
|
+
// src/with-shape/schema-update/cutover.ts
|
|
461
623
|
function coordinatedCutover(opts) {
|
|
462
624
|
return {
|
|
463
625
|
name: "coordinatedCutover",
|
|
@@ -470,162 +632,770 @@ function coordinatedCutover(opts) {
|
|
|
470
632
|
};
|
|
471
633
|
}
|
|
472
634
|
|
|
473
|
-
// src/
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
635
|
+
// src/with-store/route-store.ts
|
|
636
|
+
var BLOB_CHUNKS = "_blob_chunks";
|
|
637
|
+
var BLOB_INDEX = "_blob_index";
|
|
638
|
+
var BLOB_SLOTS = "_blob_slots_";
|
|
639
|
+
var BLOB_VERSIONS = "_blob_versions_";
|
|
640
|
+
function routeStore(opts) {
|
|
641
|
+
const primary = opts.default;
|
|
642
|
+
const blobsIsSimple = opts.blobs && "get" in opts.blobs;
|
|
643
|
+
const simpleBlobStore = blobsIsSimple ? opts.blobs : void 0;
|
|
644
|
+
const tieredBlobs = !blobsIsSimple ? opts.blobs : void 0;
|
|
645
|
+
const blobThreshold = tieredBlobs?.threshold ?? 400 * 1024;
|
|
646
|
+
const allStores = /* @__PURE__ */ new Set([primary]);
|
|
647
|
+
if (simpleBlobStore) allStores.add(simpleBlobStore);
|
|
648
|
+
if (tieredBlobs?.large) allStores.add(tieredBlobs.large);
|
|
649
|
+
if (tieredBlobs?.small) allStores.add(tieredBlobs.small);
|
|
650
|
+
if (opts.age?.cold) allStores.add(opts.age.cold);
|
|
651
|
+
if (opts.routes) for (const s of Object.values(opts.routes)) allStores.add(s);
|
|
652
|
+
if (opts.vaultRoutes) for (const s of Object.values(opts.vaultRoutes)) allStores.add(s);
|
|
653
|
+
if (opts.blobRoutes) for (const s of Object.values(opts.blobRoutes)) allStores.add(s);
|
|
654
|
+
if (opts.overflow) allStores.add(opts.overflow);
|
|
655
|
+
if (opts.blobLifecycle?.archiveStore) allStores.add(opts.blobLifecycle.archiveStore);
|
|
656
|
+
const overrides = /* @__PURE__ */ new Map();
|
|
657
|
+
const suspended = /* @__PURE__ */ new Set();
|
|
658
|
+
const writeQueues = /* @__PURE__ */ new Map();
|
|
659
|
+
const NULL_STORE = {
|
|
660
|
+
name: "suspended",
|
|
661
|
+
async get() {
|
|
662
|
+
return null;
|
|
663
|
+
},
|
|
664
|
+
async put() {
|
|
665
|
+
},
|
|
666
|
+
async delete() {
|
|
667
|
+
},
|
|
668
|
+
async list() {
|
|
669
|
+
return [];
|
|
670
|
+
},
|
|
671
|
+
async loadAll() {
|
|
672
|
+
return {};
|
|
673
|
+
},
|
|
674
|
+
async saveAll() {
|
|
486
675
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
const deleted = [];
|
|
493
|
-
const unchanged = options.includeUnchanged ? [] : void 0;
|
|
494
|
-
const collectionNames = /* @__PURE__ */ new Set([...live.keys(), ...cand.keys()]);
|
|
495
|
-
for (const collection of [...collectionNames].sort()) {
|
|
496
|
-
const liveColl = live.get(collection) ?? /* @__PURE__ */ new Map();
|
|
497
|
-
const candColl = cand.get(collection) ?? /* @__PURE__ */ new Map();
|
|
498
|
-
const allIds = /* @__PURE__ */ new Set([...liveColl.keys(), ...candColl.keys()]);
|
|
499
|
-
for (const id of [...allIds].sort()) {
|
|
500
|
-
const before = liveColl.get(id);
|
|
501
|
-
const after = candColl.get(id);
|
|
502
|
-
if (before === void 0 && after !== void 0) {
|
|
503
|
-
added.push({ collection, id, record: after });
|
|
504
|
-
} else if (before !== void 0 && after === void 0) {
|
|
505
|
-
deleted.push({ collection, id, record: before });
|
|
506
|
-
} else if (before !== void 0 && after !== void 0) {
|
|
507
|
-
if (compareFn(before, after)) {
|
|
508
|
-
unchanged?.push({ collection, id, record: after });
|
|
509
|
-
} else {
|
|
510
|
-
const fieldDiffs = diff(before, after);
|
|
511
|
-
const fieldsChanged = uniqueTopLevelKeys(fieldDiffs);
|
|
512
|
-
modified.push({
|
|
513
|
-
collection,
|
|
514
|
-
id,
|
|
515
|
-
record: after,
|
|
516
|
-
before,
|
|
517
|
-
fieldsChanged,
|
|
518
|
-
fieldDiffs
|
|
519
|
-
});
|
|
520
|
-
}
|
|
676
|
+
};
|
|
677
|
+
function routeNameFor(vault, collection) {
|
|
678
|
+
if (opts.vaultRoutes) {
|
|
679
|
+
for (const prefix of Object.keys(opts.vaultRoutes)) {
|
|
680
|
+
if (vault.startsWith(prefix)) return prefix;
|
|
521
681
|
}
|
|
522
682
|
}
|
|
683
|
+
if (opts.routes && !collection.startsWith("_") && opts.routes[collection]) {
|
|
684
|
+
return collection;
|
|
685
|
+
}
|
|
686
|
+
if (isBlobChunks(collection) && (simpleBlobStore || tieredBlobs)) return "blobs";
|
|
687
|
+
if (opts.routeBlobMeta && isBlobMeta(collection) && (simpleBlobStore || tieredBlobs)) return "blobs";
|
|
688
|
+
if (opts.age && !collection.startsWith("_")) {
|
|
689
|
+
}
|
|
690
|
+
return "default";
|
|
523
691
|
}
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
692
|
+
const quotaExceeded = false;
|
|
693
|
+
function resolveOriginalStore(route) {
|
|
694
|
+
if (route === "blobs") return simpleBlobStore ?? tieredBlobs?.large ?? primary;
|
|
695
|
+
if (route === "cold") return opts.age?.cold ?? primary;
|
|
696
|
+
if (opts.routes?.[route]) return opts.routes[route];
|
|
697
|
+
if (opts.vaultRoutes?.[route]) return opts.vaultRoutes[route];
|
|
698
|
+
return primary;
|
|
699
|
+
}
|
|
700
|
+
function maybeQueueWrite(routeName, method, vault, collection, id, envelope, expectedVersion) {
|
|
701
|
+
if (!suspended.has(routeName)) return false;
|
|
702
|
+
const queue = writeQueues.get(routeName);
|
|
703
|
+
if (!queue) return false;
|
|
704
|
+
if (queue.writes.length >= queue.maxSize) {
|
|
705
|
+
queue.writes.shift();
|
|
706
|
+
}
|
|
707
|
+
queue.writes.push({
|
|
708
|
+
method,
|
|
709
|
+
vault,
|
|
710
|
+
collection,
|
|
711
|
+
id,
|
|
712
|
+
...envelope !== void 0 ? { envelope } : {},
|
|
713
|
+
...expectedVersion !== void 0 ? { expectedVersion } : {}
|
|
714
|
+
});
|
|
715
|
+
return true;
|
|
716
|
+
}
|
|
717
|
+
function isBlobChunks(collection) {
|
|
718
|
+
return collection === BLOB_CHUNKS;
|
|
719
|
+
}
|
|
720
|
+
function isBlobMeta(collection) {
|
|
721
|
+
return collection === BLOB_INDEX || collection.startsWith(BLOB_SLOTS) || collection.startsWith(BLOB_VERSIONS);
|
|
722
|
+
}
|
|
723
|
+
function isInternal(collection) {
|
|
724
|
+
return collection.startsWith("_");
|
|
725
|
+
}
|
|
726
|
+
function storeFor(vault, collection) {
|
|
727
|
+
const rName = routeNameFor(vault, collection);
|
|
728
|
+
if (suspended.has(rName)) return NULL_STORE;
|
|
729
|
+
if (overrides.has(rName)) return overrides.get(rName);
|
|
730
|
+
if (opts.vaultRoutes) {
|
|
731
|
+
for (const [prefix, store2] of Object.entries(opts.vaultRoutes)) {
|
|
732
|
+
if (vault.startsWith(prefix)) return store2;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
if (opts.routes && !isInternal(collection) && opts.routes[collection]) {
|
|
736
|
+
return opts.routes[collection];
|
|
737
|
+
}
|
|
738
|
+
if (isBlobChunks(collection)) {
|
|
739
|
+
if (simpleBlobStore) return simpleBlobStore;
|
|
740
|
+
if (tieredBlobs) return tieredBlobs.large;
|
|
741
|
+
}
|
|
742
|
+
if (opts.routeBlobMeta && isBlobMeta(collection)) {
|
|
743
|
+
if (simpleBlobStore) return simpleBlobStore;
|
|
744
|
+
if (tieredBlobs) return tieredBlobs.large;
|
|
745
|
+
}
|
|
746
|
+
if (quotaExceeded && opts.overflow) return opts.overflow;
|
|
747
|
+
return primary;
|
|
748
|
+
}
|
|
749
|
+
function blobStoreForSize(dataSize) {
|
|
750
|
+
if (!tieredBlobs) return simpleBlobStore ?? primary;
|
|
751
|
+
if (dataSize <= blobThreshold) {
|
|
752
|
+
return tieredBlobs.small ?? primary;
|
|
753
|
+
}
|
|
754
|
+
return tieredBlobs.large;
|
|
755
|
+
}
|
|
756
|
+
function isCold(collection, envelope) {
|
|
757
|
+
if (!opts.age) return false;
|
|
758
|
+
if (isInternal(collection)) return false;
|
|
759
|
+
if (opts.age.collections && opts.age.collections.length > 0) {
|
|
760
|
+
if (!opts.age.collections.includes(collection)) return false;
|
|
761
|
+
}
|
|
762
|
+
const cutoff = Date.now() - opts.age.coldAfterDays * 24 * 60 * 60 * 1e3;
|
|
763
|
+
const ts = new Date(envelope._ts).getTime();
|
|
764
|
+
return ts < cutoff;
|
|
765
|
+
}
|
|
766
|
+
const store = {
|
|
767
|
+
name: buildName(),
|
|
768
|
+
async get(vault, collection, id) {
|
|
769
|
+
const s = storeFor(vault, collection);
|
|
770
|
+
const result = await s.get(vault, collection, id);
|
|
771
|
+
if (result === null && opts.age && !isInternal(collection)) {
|
|
772
|
+
if (!opts.age.collections?.length || opts.age.collections.includes(collection)) {
|
|
773
|
+
return opts.age.cold.get(vault, collection, id);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
return result;
|
|
777
|
+
},
|
|
778
|
+
async put(vault, collection, id, envelope, expectedVersion) {
|
|
779
|
+
const rn = routeNameFor(vault, collection);
|
|
780
|
+
if (maybeQueueWrite(rn, "put", vault, collection, id, envelope, expectedVersion)) return;
|
|
781
|
+
if (isBlobChunks(collection) && tieredBlobs) {
|
|
782
|
+
const dataSize = envelope._data.length;
|
|
783
|
+
const s2 = blobStoreForSize(dataSize);
|
|
784
|
+
return s2.put(vault, collection, id, envelope, expectedVersion);
|
|
785
|
+
}
|
|
786
|
+
const s = storeFor(vault, collection);
|
|
787
|
+
if (opts.age && !isInternal(collection)) {
|
|
788
|
+
opts.age.cold.delete(vault, collection, id).catch(() => {
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
return s.put(vault, collection, id, envelope, expectedVersion);
|
|
792
|
+
},
|
|
793
|
+
async delete(vault, collection, id) {
|
|
794
|
+
const rn = routeNameFor(vault, collection);
|
|
795
|
+
if (maybeQueueWrite(rn, "delete", vault, collection, id)) return;
|
|
796
|
+
const s = storeFor(vault, collection);
|
|
797
|
+
await s.delete(vault, collection, id);
|
|
798
|
+
if (opts.age && !isInternal(collection)) {
|
|
799
|
+
await opts.age.cold.delete(vault, collection, id).catch(() => {
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
async list(vault, collection) {
|
|
804
|
+
const s = storeFor(vault, collection);
|
|
805
|
+
const ids = await s.list(vault, collection);
|
|
806
|
+
if (opts.age && !isInternal(collection)) {
|
|
807
|
+
if (!opts.age.collections?.length || opts.age.collections.includes(collection)) {
|
|
808
|
+
const coldIds = await opts.age.cold.list(vault, collection).catch(() => []);
|
|
809
|
+
if (coldIds.length > 0) {
|
|
810
|
+
const merged = new Set(ids);
|
|
811
|
+
for (const id of coldIds) merged.add(id);
|
|
812
|
+
return [...merged];
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
return ids;
|
|
817
|
+
},
|
|
818
|
+
async loadAll(vault) {
|
|
819
|
+
const stores = getStoresForVault(vault);
|
|
820
|
+
const snapshots = await Promise.all(
|
|
821
|
+
stores.map((s) => s.loadAll(vault).catch(() => ({})))
|
|
822
|
+
);
|
|
823
|
+
return mergeSnapshots(snapshots);
|
|
824
|
+
},
|
|
825
|
+
async saveAll(vault, data) {
|
|
826
|
+
const partitioned = /* @__PURE__ */ new Map();
|
|
827
|
+
for (const [collection, records] of Object.entries(data)) {
|
|
828
|
+
const s = storeFor(vault, collection);
|
|
829
|
+
if (!partitioned.has(s)) partitioned.set(s, {});
|
|
830
|
+
partitioned.get(s)[collection] = records;
|
|
831
|
+
}
|
|
832
|
+
await Promise.all(
|
|
833
|
+
[...partitioned.entries()].map(([s, snap]) => s.saveAll(vault, snap))
|
|
834
|
+
);
|
|
835
|
+
},
|
|
836
|
+
async compact(vault) {
|
|
837
|
+
if (!opts.age) return 0;
|
|
838
|
+
let migrated = 0;
|
|
839
|
+
const collections = opts.age.collections?.length ? opts.age.collections : await primary.list(vault, "").catch(() => []);
|
|
840
|
+
for (const collection of collections) {
|
|
841
|
+
const ids = await primary.list(vault, collection).catch(() => []);
|
|
842
|
+
for (const id of ids) {
|
|
843
|
+
const envelope = await primary.get(vault, collection, id);
|
|
844
|
+
if (!envelope) continue;
|
|
845
|
+
if (isCold(collection, envelope)) {
|
|
846
|
+
await opts.age.cold.put(vault, collection, id, envelope);
|
|
847
|
+
await primary.delete(vault, collection, id);
|
|
848
|
+
migrated++;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
return migrated;
|
|
853
|
+
},
|
|
854
|
+
// ── Runtime override / suspend ──────────────────────
|
|
855
|
+
override(route, overrideStore, overrideOpts) {
|
|
856
|
+
if (overrideOpts?.hydrate) {
|
|
857
|
+
return (async () => {
|
|
858
|
+
overrides.set(route, overrideStore);
|
|
859
|
+
})();
|
|
860
|
+
}
|
|
861
|
+
overrides.set(route, overrideStore);
|
|
862
|
+
},
|
|
863
|
+
clearOverride(route) {
|
|
864
|
+
overrides.delete(route);
|
|
865
|
+
},
|
|
866
|
+
suspend(route, suspendOpts) {
|
|
867
|
+
suspended.add(route);
|
|
868
|
+
if (suspendOpts?.queue) {
|
|
869
|
+
writeQueues.set(route, {
|
|
870
|
+
writes: [],
|
|
871
|
+
maxSize: suspendOpts.maxQueueSize ?? 1e4
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
async resume(route) {
|
|
876
|
+
suspended.delete(route);
|
|
877
|
+
const queue = writeQueues.get(route);
|
|
878
|
+
if (!queue || queue.writes.length === 0) {
|
|
879
|
+
writeQueues.delete(route);
|
|
880
|
+
return 0;
|
|
881
|
+
}
|
|
882
|
+
let replayed = 0;
|
|
883
|
+
const target = overrides.get(route) ?? resolveOriginalStore(route);
|
|
884
|
+
for (const write of queue.writes) {
|
|
885
|
+
try {
|
|
886
|
+
if (write.method === "put" && write.envelope) {
|
|
887
|
+
await target.put(write.vault, write.collection, write.id, write.envelope, write.expectedVersion);
|
|
888
|
+
} else if (write.method === "delete") {
|
|
889
|
+
await target.delete(write.vault, write.collection, write.id);
|
|
890
|
+
}
|
|
891
|
+
replayed++;
|
|
892
|
+
} catch {
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
writeQueues.delete(route);
|
|
896
|
+
return replayed;
|
|
897
|
+
},
|
|
898
|
+
routeStatus() {
|
|
899
|
+
const ov = {};
|
|
900
|
+
for (const [k, v] of overrides) ov[k] = v.name ?? "unnamed";
|
|
901
|
+
const q = {};
|
|
902
|
+
for (const [k, v] of writeQueues) q[k] = v.writes.length;
|
|
903
|
+
return { overrides: ov, suspended: [...suspended], queued: q };
|
|
904
|
+
},
|
|
905
|
+
resolveBackend(vaultId) {
|
|
906
|
+
if (opts.vaultRoutes) {
|
|
907
|
+
for (const [prefix, s] of Object.entries(opts.vaultRoutes)) {
|
|
908
|
+
if (vaultId.startsWith(prefix)) return s;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
return primary;
|
|
538
912
|
}
|
|
539
913
|
};
|
|
914
|
+
if (anyHas("listVaults")) {
|
|
915
|
+
store.listVaults = async () => {
|
|
916
|
+
const results = await Promise.all(
|
|
917
|
+
[...allStores].filter((s) => s.listVaults !== void 0).map((s) => s.listVaults().catch(() => []))
|
|
918
|
+
);
|
|
919
|
+
return [...new Set(results.flat())];
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
if (anyHas("ping")) {
|
|
923
|
+
store.ping = async () => {
|
|
924
|
+
const results = await Promise.all(
|
|
925
|
+
[...allStores].filter((s) => s.ping !== void 0).map((s) => s.ping().catch(() => false))
|
|
926
|
+
);
|
|
927
|
+
return results.some(Boolean);
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
return store;
|
|
931
|
+
function buildName() {
|
|
932
|
+
const names = [...allStores].map((s) => s.name ?? "?").join("+");
|
|
933
|
+
return `route(${names})`;
|
|
934
|
+
}
|
|
935
|
+
function anyHas(method) {
|
|
936
|
+
return [...allStores].some((s) => s[method]);
|
|
937
|
+
}
|
|
938
|
+
function getStoresForVault(vault) {
|
|
939
|
+
const stores = /* @__PURE__ */ new Set();
|
|
940
|
+
if (opts.vaultRoutes) {
|
|
941
|
+
for (const [prefix, s] of Object.entries(opts.vaultRoutes)) {
|
|
942
|
+
if (vault.startsWith(prefix)) {
|
|
943
|
+
stores.add(s);
|
|
944
|
+
return [...stores];
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
stores.add(primary);
|
|
949
|
+
if (simpleBlobStore) stores.add(simpleBlobStore);
|
|
950
|
+
if (tieredBlobs?.large) stores.add(tieredBlobs.large);
|
|
951
|
+
if (tieredBlobs?.small && tieredBlobs.small !== primary) stores.add(tieredBlobs.small);
|
|
952
|
+
if (opts.age?.cold) stores.add(opts.age.cold);
|
|
953
|
+
if (opts.routes) {
|
|
954
|
+
for (const s of Object.values(opts.routes)) stores.add(s);
|
|
955
|
+
}
|
|
956
|
+
return [...stores];
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
function mergeSnapshots(snapshots) {
|
|
960
|
+
const merged = {};
|
|
961
|
+
for (const snap of snapshots) {
|
|
962
|
+
for (const [collection, records] of Object.entries(snap)) {
|
|
963
|
+
if (!merged[collection]) {
|
|
964
|
+
merged[collection] = { ...records };
|
|
965
|
+
continue;
|
|
966
|
+
}
|
|
967
|
+
for (const [id, envelope] of Object.entries(records)) {
|
|
968
|
+
const existing = merged[collection][id];
|
|
969
|
+
if (!existing || envelope._ts >= existing._ts) {
|
|
970
|
+
merged[collection][id] = envelope;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
return merged;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
// src/with-store/store-middleware.ts
|
|
979
|
+
function wrapStore(store, ...middlewares) {
|
|
980
|
+
let result = store;
|
|
981
|
+
for (let i = middlewares.length - 1; i >= 0; i--) {
|
|
982
|
+
result = middlewares[i](result);
|
|
983
|
+
}
|
|
984
|
+
return result;
|
|
985
|
+
}
|
|
986
|
+
function withRetry(opts = {}) {
|
|
987
|
+
const maxRetries = opts.maxRetries ?? 3;
|
|
988
|
+
const backoffMs = opts.backoffMs ?? 500;
|
|
989
|
+
const jitter = opts.jitter ?? 0.3;
|
|
990
|
+
const retryOn = opts.retryOn ? new Set(opts.retryOn) : null;
|
|
991
|
+
function shouldRetry(err) {
|
|
992
|
+
if (!retryOn) return true;
|
|
993
|
+
if (err && typeof err === "object" && "code" in err) {
|
|
994
|
+
return retryOn.has(err.code);
|
|
995
|
+
}
|
|
996
|
+
return true;
|
|
997
|
+
}
|
|
998
|
+
async function retryable(fn) {
|
|
999
|
+
let lastError;
|
|
1000
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
1001
|
+
try {
|
|
1002
|
+
return await fn();
|
|
1003
|
+
} catch (err) {
|
|
1004
|
+
lastError = err;
|
|
1005
|
+
if (attempt >= maxRetries || !shouldRetry(err)) throw err;
|
|
1006
|
+
const delay = backoffMs * Math.pow(2, attempt) * (1 + Math.random() * jitter);
|
|
1007
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
throw lastError;
|
|
1011
|
+
}
|
|
1012
|
+
return (next) => ({
|
|
1013
|
+
...next,
|
|
1014
|
+
name: next.name ? `retry(${next.name})` : "retry",
|
|
1015
|
+
get: (v, c, id) => retryable(() => next.get(v, c, id)),
|
|
1016
|
+
put: (v, c, id, env, ev) => retryable(() => next.put(v, c, id, env, ev)),
|
|
1017
|
+
delete: (v, c, id) => retryable(() => next.delete(v, c, id)),
|
|
1018
|
+
list: (v, c) => retryable(() => next.list(v, c)),
|
|
1019
|
+
loadAll: (v) => retryable(() => next.loadAll(v)),
|
|
1020
|
+
saveAll: (v, d) => retryable(() => next.saveAll(v, d))
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
var LOG_LEVELS = { debug: 0, info: 1, warn: 2, error: 3 };
|
|
1024
|
+
function withLogging(opts = {}) {
|
|
1025
|
+
const minLevel = LOG_LEVELS[opts.level ?? "info"];
|
|
1026
|
+
const logger = opts.logger ?? console;
|
|
1027
|
+
const logData = opts.logData ?? false;
|
|
1028
|
+
function log(level, method, args, durationMs) {
|
|
1029
|
+
if (LOG_LEVELS[level] < minLevel) return;
|
|
1030
|
+
const parts = [`[noydb:${method}]`, ...Object.entries(args).map(([k, v]) => `${k}=${String(v)}`)];
|
|
1031
|
+
if (durationMs !== void 0) parts.push(`${durationMs}ms`);
|
|
1032
|
+
logger[level](parts.join(" "));
|
|
1033
|
+
}
|
|
1034
|
+
function timed(method, args, fn) {
|
|
1035
|
+
const start = Date.now();
|
|
1036
|
+
return fn().then(
|
|
1037
|
+
(result) => {
|
|
1038
|
+
log("debug", method, args, Date.now() - start);
|
|
1039
|
+
return result;
|
|
1040
|
+
},
|
|
1041
|
+
(err) => {
|
|
1042
|
+
log("error", method, { ...args, error: err.message }, Date.now() - start);
|
|
1043
|
+
throw err;
|
|
1044
|
+
}
|
|
1045
|
+
);
|
|
1046
|
+
}
|
|
1047
|
+
return (next) => ({
|
|
1048
|
+
...next,
|
|
1049
|
+
name: next.name ? `log(${next.name})` : "log",
|
|
1050
|
+
get: (v, c, id) => timed("get", { vault: v, collection: c, id }, () => next.get(v, c, id)),
|
|
1051
|
+
put: (v, c, id, env, ev) => timed("put", {
|
|
1052
|
+
vault: v,
|
|
1053
|
+
collection: c,
|
|
1054
|
+
id,
|
|
1055
|
+
version: env._v,
|
|
1056
|
+
...logData ? { data: env._data.slice(0, 40) + "..." } : {}
|
|
1057
|
+
}, () => next.put(v, c, id, env, ev)),
|
|
1058
|
+
delete: (v, c, id) => timed("delete", { vault: v, collection: c, id }, () => next.delete(v, c, id)),
|
|
1059
|
+
list: (v, c) => timed("list", { vault: v, collection: c }, () => next.list(v, c)),
|
|
1060
|
+
loadAll: (v) => timed("loadAll", { vault: v }, () => next.loadAll(v)),
|
|
1061
|
+
saveAll: (v, d) => timed("saveAll", { vault: v }, () => next.saveAll(v, d))
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
function withMetrics(opts) {
|
|
1065
|
+
function tracked(method, vault, fn, collection, id) {
|
|
1066
|
+
const start = Date.now();
|
|
1067
|
+
return fn().then(
|
|
1068
|
+
(result) => {
|
|
1069
|
+
opts.onOperation({
|
|
1070
|
+
method,
|
|
1071
|
+
vault,
|
|
1072
|
+
...collection !== void 0 ? { collection } : {},
|
|
1073
|
+
...id !== void 0 ? { id } : {},
|
|
1074
|
+
durationMs: Date.now() - start,
|
|
1075
|
+
success: true
|
|
1076
|
+
});
|
|
1077
|
+
return result;
|
|
1078
|
+
},
|
|
1079
|
+
(err) => {
|
|
1080
|
+
opts.onOperation({
|
|
1081
|
+
method,
|
|
1082
|
+
vault,
|
|
1083
|
+
...collection !== void 0 ? { collection } : {},
|
|
1084
|
+
...id !== void 0 ? { id } : {},
|
|
1085
|
+
durationMs: Date.now() - start,
|
|
1086
|
+
success: false,
|
|
1087
|
+
error: err
|
|
1088
|
+
});
|
|
1089
|
+
throw err;
|
|
1090
|
+
}
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1093
|
+
return (next) => ({
|
|
1094
|
+
...next,
|
|
1095
|
+
name: next.name ? `metrics(${next.name})` : "metrics",
|
|
1096
|
+
get: (v, c, id) => tracked("get", v, () => next.get(v, c, id), c, id),
|
|
1097
|
+
put: (v, c, id, env, ev) => tracked("put", v, () => next.put(v, c, id, env, ev), c, id),
|
|
1098
|
+
delete: (v, c, id) => tracked("delete", v, () => next.delete(v, c, id), c, id),
|
|
1099
|
+
list: (v, c) => tracked("list", v, () => next.list(v, c), c),
|
|
1100
|
+
loadAll: (v) => tracked("loadAll", v, () => next.loadAll(v)),
|
|
1101
|
+
saveAll: (v, d) => tracked("saveAll", v, () => next.saveAll(v, d))
|
|
1102
|
+
});
|
|
540
1103
|
}
|
|
541
|
-
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
1104
|
+
function withCircuitBreaker(opts = {}) {
|
|
1105
|
+
const threshold = opts.failureThreshold ?? 5;
|
|
1106
|
+
const resetMs = opts.resetTimeoutMs ?? 3e4;
|
|
1107
|
+
let state = "closed";
|
|
1108
|
+
let failures = 0;
|
|
1109
|
+
let lastFailureTime = 0;
|
|
1110
|
+
function recordSuccess() {
|
|
1111
|
+
if (state === "half-open") {
|
|
1112
|
+
state = "closed";
|
|
1113
|
+
failures = 0;
|
|
1114
|
+
opts.onClose?.();
|
|
1115
|
+
}
|
|
1116
|
+
failures = 0;
|
|
1117
|
+
}
|
|
1118
|
+
function recordFailure() {
|
|
1119
|
+
failures++;
|
|
1120
|
+
lastFailureTime = Date.now();
|
|
1121
|
+
if (failures >= threshold && state === "closed") {
|
|
1122
|
+
state = "open";
|
|
1123
|
+
opts.onOpen?.();
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
function canAttempt() {
|
|
1127
|
+
if (state === "closed") return true;
|
|
1128
|
+
if (state === "open") {
|
|
1129
|
+
if (Date.now() - lastFailureTime >= resetMs) {
|
|
1130
|
+
state = "half-open";
|
|
1131
|
+
return true;
|
|
551
1132
|
}
|
|
552
|
-
|
|
1133
|
+
return false;
|
|
553
1134
|
}
|
|
554
|
-
return
|
|
1135
|
+
return true;
|
|
555
1136
|
}
|
|
556
|
-
|
|
557
|
-
|
|
1137
|
+
async function guarded(fn, fallback) {
|
|
1138
|
+
if (!canAttempt()) return fallback;
|
|
558
1139
|
try {
|
|
559
|
-
|
|
1140
|
+
const result = await fn();
|
|
1141
|
+
recordSuccess();
|
|
1142
|
+
return result;
|
|
560
1143
|
} catch (err) {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
1144
|
+
recordFailure();
|
|
1145
|
+
throw err;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
return (next) => ({
|
|
1149
|
+
...next,
|
|
1150
|
+
name: next.name ? `cb(${next.name})` : "cb",
|
|
1151
|
+
get: (v, c, id) => guarded(() => next.get(v, c, id), null),
|
|
1152
|
+
put: (v, c, id, env, ev) => guarded(() => next.put(v, c, id, env, ev), void 0),
|
|
1153
|
+
delete: (v, c, id) => guarded(() => next.delete(v, c, id), void 0),
|
|
1154
|
+
list: (v, c) => guarded(() => next.list(v, c), []),
|
|
1155
|
+
loadAll: (v) => guarded(() => next.loadAll(v), {}),
|
|
1156
|
+
saveAll: (v, d) => guarded(() => next.saveAll(v, d), void 0)
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
function withCache(opts = {}) {
|
|
1160
|
+
const maxEntries = opts.maxEntries ?? 500;
|
|
1161
|
+
const ttlMs = opts.ttlMs ?? 6e4;
|
|
1162
|
+
const cache = /* @__PURE__ */ new Map();
|
|
1163
|
+
function cacheKey(vault, collection, id) {
|
|
1164
|
+
return `${vault}\0${collection}\0${id}`;
|
|
1165
|
+
}
|
|
1166
|
+
function getFromCache(key) {
|
|
1167
|
+
const entry = cache.get(key);
|
|
1168
|
+
if (!entry) return void 0;
|
|
1169
|
+
if (ttlMs > 0 && Date.now() - entry.cachedAt > ttlMs) {
|
|
1170
|
+
cache.delete(key);
|
|
1171
|
+
return void 0;
|
|
1172
|
+
}
|
|
1173
|
+
cache.delete(key);
|
|
1174
|
+
cache.set(key, entry);
|
|
1175
|
+
return entry.envelope;
|
|
1176
|
+
}
|
|
1177
|
+
function setInCache(key, envelope) {
|
|
1178
|
+
if (cache.size >= maxEntries) {
|
|
1179
|
+
const oldest = cache.keys().next().value;
|
|
1180
|
+
if (oldest !== void 0) cache.delete(oldest);
|
|
1181
|
+
}
|
|
1182
|
+
cache.set(key, { envelope, cachedAt: Date.now() });
|
|
1183
|
+
}
|
|
1184
|
+
function invalidate(key) {
|
|
1185
|
+
cache.delete(key);
|
|
1186
|
+
}
|
|
1187
|
+
return (next) => ({
|
|
1188
|
+
...next,
|
|
1189
|
+
name: next.name ? `cache(${next.name})` : "cache",
|
|
1190
|
+
async get(vault, collection, id) {
|
|
1191
|
+
const key = cacheKey(vault, collection, id);
|
|
1192
|
+
const cached = getFromCache(key);
|
|
1193
|
+
if (cached !== void 0) return cached;
|
|
1194
|
+
const result = await next.get(vault, collection, id);
|
|
1195
|
+
setInCache(key, result);
|
|
1196
|
+
return result;
|
|
1197
|
+
},
|
|
1198
|
+
async put(vault, collection, id, env, ev) {
|
|
1199
|
+
invalidate(cacheKey(vault, collection, id));
|
|
1200
|
+
await next.put(vault, collection, id, env, ev);
|
|
1201
|
+
setInCache(cacheKey(vault, collection, id), env);
|
|
1202
|
+
},
|
|
1203
|
+
async delete(vault, collection, id) {
|
|
1204
|
+
invalidate(cacheKey(vault, collection, id));
|
|
1205
|
+
await next.delete(vault, collection, id);
|
|
1206
|
+
},
|
|
1207
|
+
list: (v, c) => next.list(v, c),
|
|
1208
|
+
loadAll: (v) => next.loadAll(v),
|
|
1209
|
+
saveAll: (v, d) => next.saveAll(v, d)
|
|
1210
|
+
});
|
|
1211
|
+
}
|
|
1212
|
+
function withHealthCheck(opts = {}) {
|
|
1213
|
+
const intervalMs = opts.checkIntervalMs ?? 3e4;
|
|
1214
|
+
const failThreshold = opts.suspendAfterFailures ?? 3;
|
|
1215
|
+
const successThreshold = opts.resumeAfterSuccess ?? 1;
|
|
1216
|
+
let isSuspended = false;
|
|
1217
|
+
let consecutiveFailures = 0;
|
|
1218
|
+
let consecutiveSuccesses = 0;
|
|
1219
|
+
return (next) => {
|
|
1220
|
+
const checkFn = opts.check ?? (next.ping ? () => next.ping() : async () => {
|
|
1221
|
+
await next.list("__health__", "__ping__");
|
|
1222
|
+
return true;
|
|
1223
|
+
});
|
|
1224
|
+
async function doCheck() {
|
|
1225
|
+
try {
|
|
1226
|
+
const ok = await checkFn();
|
|
1227
|
+
if (ok) {
|
|
1228
|
+
consecutiveFailures = 0;
|
|
1229
|
+
consecutiveSuccesses++;
|
|
1230
|
+
if (isSuspended && consecutiveSuccesses >= successThreshold) {
|
|
1231
|
+
isSuspended = false;
|
|
1232
|
+
consecutiveSuccesses = 0;
|
|
1233
|
+
opts.onResume?.();
|
|
1234
|
+
}
|
|
1235
|
+
} else {
|
|
1236
|
+
throw new Error("Health check returned false");
|
|
1237
|
+
}
|
|
1238
|
+
} catch {
|
|
1239
|
+
consecutiveSuccesses = 0;
|
|
1240
|
+
consecutiveFailures++;
|
|
1241
|
+
if (!isSuspended && consecutiveFailures >= failThreshold) {
|
|
1242
|
+
isSuspended = true;
|
|
1243
|
+
consecutiveFailures = 0;
|
|
1244
|
+
opts.onSuspend?.();
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
setInterval(() => {
|
|
1249
|
+
void doCheck();
|
|
1250
|
+
}, intervalMs);
|
|
1251
|
+
const wrapped = {
|
|
1252
|
+
...next,
|
|
1253
|
+
name: next.name ? `health(${next.name})` : "health",
|
|
1254
|
+
async get(v, c, id) {
|
|
1255
|
+
return isSuspended ? null : next.get(v, c, id);
|
|
1256
|
+
},
|
|
1257
|
+
async put(v, c, id, env, ev) {
|
|
1258
|
+
if (!isSuspended) await next.put(v, c, id, env, ev);
|
|
1259
|
+
},
|
|
1260
|
+
async delete(v, c, id) {
|
|
1261
|
+
if (!isSuspended) await next.delete(v, c, id);
|
|
1262
|
+
},
|
|
1263
|
+
async list(v, c) {
|
|
1264
|
+
return isSuspended ? [] : next.list(v, c);
|
|
1265
|
+
},
|
|
1266
|
+
async loadAll(v) {
|
|
1267
|
+
return isSuspended ? {} : next.loadAll(v);
|
|
1268
|
+
},
|
|
1269
|
+
async saveAll(v, d) {
|
|
1270
|
+
if (!isSuspended) await next.saveAll(v, d);
|
|
1271
|
+
}
|
|
1272
|
+
};
|
|
1273
|
+
return wrapped;
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
// src/with-commit/numbering/descriptor.ts
|
|
1278
|
+
function withDeferredNumbering(config) {
|
|
1279
|
+
return {
|
|
1280
|
+
series: config.series,
|
|
1281
|
+
collection: config.collection,
|
|
1282
|
+
field: config.field,
|
|
1283
|
+
settleWindowMs: config.settleWindowMs ?? 0
|
|
1284
|
+
};
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
// src/with-shape/money/arith.ts
|
|
1288
|
+
function parseAmount(label, amount, scale, rounding) {
|
|
1289
|
+
const r = parseToScaledInt(amount, scale, rounding);
|
|
1290
|
+
if (!r.ok) {
|
|
1291
|
+
throw new MoneyUnsupportedError(
|
|
1292
|
+
r.reason === "precision" ? `${label}: amount ${JSON.stringify(amount)} has more precision than scale ${scale} and no rounding mode is configured` : `${label}: amount ${JSON.stringify(amount)} is not a finite decimal`
|
|
1293
|
+
);
|
|
1294
|
+
}
|
|
1295
|
+
return r.value;
|
|
1296
|
+
}
|
|
1297
|
+
function resolveScale(label, amount, explicit) {
|
|
1298
|
+
if (explicit !== void 0) {
|
|
1299
|
+
if (!Number.isInteger(explicit) || explicit < 0) {
|
|
1300
|
+
throw new MoneyUnsupportedError(`${label}: scale must be a non-negative integer`);
|
|
564
1301
|
}
|
|
565
|
-
return
|
|
1302
|
+
return explicit;
|
|
1303
|
+
}
|
|
1304
|
+
const inferred = decimalScaleOf(amount);
|
|
1305
|
+
if (inferred === null) {
|
|
1306
|
+
throw new MoneyUnsupportedError(`${label}: amount ${JSON.stringify(amount)} is not a finite decimal`);
|
|
566
1307
|
}
|
|
567
|
-
return
|
|
1308
|
+
return inferred;
|
|
568
1309
|
}
|
|
569
|
-
function
|
|
570
|
-
const
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
1310
|
+
function mulRate(amount, rate, opts = {}) {
|
|
1311
|
+
const scale = resolveScale("mulRate", amount, opts.scale);
|
|
1312
|
+
const rounding = opts.rounding ?? "half-up";
|
|
1313
|
+
const a = parseAmount("mulRate", amount, scale, rounding);
|
|
1314
|
+
const rateScale = decimalScaleOf(rate);
|
|
1315
|
+
if (rateScale === null) {
|
|
1316
|
+
throw new MoneyUnsupportedError(`mulRate: rate ${JSON.stringify(rate)} is not a finite decimal`);
|
|
1317
|
+
}
|
|
1318
|
+
const r = parseToScaledInt(rate, rateScale);
|
|
1319
|
+
if (!r.ok) {
|
|
1320
|
+
throw new MoneyUnsupportedError(`mulRate: rate ${JSON.stringify(rate)} is not a finite decimal`);
|
|
1321
|
+
}
|
|
1322
|
+
const product = a * r.value;
|
|
1323
|
+
return formatScaledInt(rescaleScaledInt(product, scale + rateScale, scale, rounding), scale);
|
|
1324
|
+
}
|
|
1325
|
+
function allocate(amount, weights, opts = {}) {
|
|
1326
|
+
if (weights.length === 0) {
|
|
1327
|
+
throw new MoneyUnsupportedError("allocate: weights must not be empty");
|
|
1328
|
+
}
|
|
1329
|
+
const scale = resolveScale("allocate", amount, opts.scale);
|
|
1330
|
+
const a = parseAmount("allocate", amount, scale);
|
|
1331
|
+
let weightScale = 0;
|
|
1332
|
+
for (const w of weights) {
|
|
1333
|
+
const s = decimalScaleOf(w);
|
|
1334
|
+
if (s === null) {
|
|
1335
|
+
throw new MoneyUnsupportedError(`allocate: weight ${JSON.stringify(w)} is not a finite decimal`);
|
|
1336
|
+
}
|
|
1337
|
+
if (s > weightScale) weightScale = s;
|
|
1338
|
+
}
|
|
1339
|
+
const scaledWeights = weights.map((w) => {
|
|
1340
|
+
const r = parseToScaledInt(w, weightScale);
|
|
1341
|
+
if (!r.ok || r.value < 0n) {
|
|
1342
|
+
throw new MoneyUnsupportedError(`allocate: weight ${JSON.stringify(w)} must be a non-negative decimal`);
|
|
584
1343
|
}
|
|
585
|
-
|
|
1344
|
+
return r.value;
|
|
1345
|
+
});
|
|
1346
|
+
const sumW = scaledWeights.reduce((acc, w) => acc + w, 0n);
|
|
1347
|
+
if (sumW === 0n) {
|
|
1348
|
+
throw new MoneyUnsupportedError("allocate: weights must not all be zero");
|
|
1349
|
+
}
|
|
1350
|
+
const negative = a < 0n;
|
|
1351
|
+
const mag = negative ? -a : a;
|
|
1352
|
+
const base = [];
|
|
1353
|
+
const remainders = [];
|
|
1354
|
+
let distributed = 0n;
|
|
1355
|
+
for (let i = 0; i < scaledWeights.length; i++) {
|
|
1356
|
+
const product = mag * scaledWeights[i];
|
|
1357
|
+
const share = product / sumW;
|
|
1358
|
+
base.push(share);
|
|
1359
|
+
distributed += share;
|
|
1360
|
+
remainders.push({ index: i, rem: product % sumW });
|
|
1361
|
+
}
|
|
1362
|
+
let leftover = mag - distributed;
|
|
1363
|
+
remainders.sort((x, y) => y.rem > x.rem ? 1 : y.rem < x.rem ? -1 : x.index - y.index);
|
|
1364
|
+
for (const { index } of remainders) {
|
|
1365
|
+
if (leftover === 0n) break;
|
|
1366
|
+
base[index] = base[index] + 1n;
|
|
1367
|
+
leftover -= 1n;
|
|
586
1368
|
}
|
|
587
|
-
return
|
|
1369
|
+
return base.map((p) => formatScaledInt(negative && p !== 0n ? -p : p, scale));
|
|
588
1370
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
1371
|
+
|
|
1372
|
+
// src/with-shape/money/branded.ts
|
|
1373
|
+
function asMoney(value) {
|
|
1374
|
+
if (!isMoneyLike(value)) {
|
|
1375
|
+
throw new MoneyUnsupportedError(`asMoney: ${JSON.stringify(value)} is not a finite decimal`);
|
|
594
1376
|
}
|
|
595
|
-
return
|
|
1377
|
+
return String(value).trim();
|
|
596
1378
|
}
|
|
597
|
-
function
|
|
598
|
-
|
|
599
|
-
const v = record[idKey];
|
|
600
|
-
if (typeof v === "string") return v;
|
|
601
|
-
if (typeof v === "number" && Number.isFinite(v)) return String(v);
|
|
602
|
-
return "";
|
|
1379
|
+
function isMoneyString(value) {
|
|
1380
|
+
return typeof value === "string" && isMoneyLike(value);
|
|
603
1381
|
}
|
|
604
|
-
function
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
const rows = [head, ""];
|
|
610
|
-
for (const e of b.added) rows.push(`${e.collection}/${e.id} added`);
|
|
611
|
-
for (const e of b.modified) {
|
|
612
|
-
const fields = e.fieldDiffs.map((f) => `${f.path}: ${shortJSON(f.from)} \u2192 ${shortJSON(f.to)}`).join(", ");
|
|
613
|
-
rows.push(`${e.collection}/${e.id} modified ${fields}`);
|
|
614
|
-
}
|
|
615
|
-
for (const e of b.deleted) rows.push(`${e.collection}/${e.id} deleted`);
|
|
616
|
-
return rows.join("\n");
|
|
1382
|
+
function moneyNumber(value) {
|
|
1383
|
+
if (!isMoneyLike(value)) {
|
|
1384
|
+
throw new MoneyUnsupportedError(`moneyNumber: ${JSON.stringify(value)} is not a finite decimal`);
|
|
1385
|
+
}
|
|
1386
|
+
return Number(value);
|
|
617
1387
|
}
|
|
618
|
-
function
|
|
619
|
-
if (value ===
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
return s.length > 60 ? s.slice(0, 57) + "..." : s;
|
|
1388
|
+
function isMoneyLike(value) {
|
|
1389
|
+
if (typeof value === "number") return Number.isFinite(value);
|
|
1390
|
+
if (typeof value !== "string") return false;
|
|
1391
|
+
return decimalScaleOf(value) !== null;
|
|
623
1392
|
}
|
|
624
1393
|
export {
|
|
625
1394
|
Aggregation,
|
|
626
1395
|
AlreadyElevatedError,
|
|
627
1396
|
AmendmentForbiddenError,
|
|
628
1397
|
AttestationError,
|
|
1398
|
+
AttestationNotEnabledError,
|
|
629
1399
|
BLOB_CHUNKS_COLLECTION,
|
|
630
1400
|
BLOB_COLLECTION,
|
|
631
1401
|
BLOB_INDEX_COLLECTION,
|
|
@@ -639,13 +1409,18 @@ export {
|
|
|
639
1409
|
BundleSealMismatchError,
|
|
640
1410
|
BundleVersionConflictError,
|
|
641
1411
|
CONSENT_AUDIT_COLLECTION,
|
|
1412
|
+
CargoNotEnabledError,
|
|
642
1413
|
Collection,
|
|
643
1414
|
CollectionFrame,
|
|
644
1415
|
CollectionIndexes,
|
|
645
1416
|
CollectionInstant,
|
|
1417
|
+
ComputedFieldError,
|
|
646
1418
|
ConflictError,
|
|
647
1419
|
CrossJoinSourceUnknownError,
|
|
648
1420
|
CrossJoinTooLargeError,
|
|
1421
|
+
CustodyApi,
|
|
1422
|
+
CustodyNotEnabledError,
|
|
1423
|
+
DEED_RECORD_ID,
|
|
649
1424
|
DEFAULT_CHUNK_SIZE,
|
|
650
1425
|
DEFAULT_CROSS_JOIN_MAX_ROWS,
|
|
651
1426
|
DEFAULT_FRESHNESS_MS,
|
|
@@ -655,6 +1430,9 @@ export {
|
|
|
655
1430
|
DICT_COLLECTION_PREFIX,
|
|
656
1431
|
DIRECTORY_RECORD_ID,
|
|
657
1432
|
DanglingReferenceError,
|
|
1433
|
+
DataResidencyError,
|
|
1434
|
+
DebugPlaintextError,
|
|
1435
|
+
DebugReservedFieldError,
|
|
658
1436
|
DecryptionError,
|
|
659
1437
|
DelegationTargetMissingError,
|
|
660
1438
|
DerivationCapExceededError,
|
|
@@ -669,9 +1447,13 @@ export {
|
|
|
669
1447
|
ELEVATION_AUDIT_COLLECTION,
|
|
670
1448
|
ElevatedHandle,
|
|
671
1449
|
ElevationExpiredError,
|
|
1450
|
+
EmbeddingDimMismatchError,
|
|
1451
|
+
EmbeddingModelMismatchError,
|
|
1452
|
+
EnclaveNotSupportedError,
|
|
672
1453
|
ExportCapabilityError,
|
|
673
1454
|
FieldFrozenError,
|
|
674
1455
|
FilenameSanitizationError,
|
|
1456
|
+
ForgetStrategyNotConfiguredError,
|
|
675
1457
|
GROUPBY_MAX_CARDINALITY,
|
|
676
1458
|
GROUPBY_WARN_CARDINALITY,
|
|
677
1459
|
GroupCardinalityError,
|
|
@@ -679,6 +1461,7 @@ export {
|
|
|
679
1461
|
GroupedQuery,
|
|
680
1462
|
GroupedQueryN,
|
|
681
1463
|
INDEXED_STORE_POLICY,
|
|
1464
|
+
IllegalTransitionError,
|
|
682
1465
|
ImportCapabilityError,
|
|
683
1466
|
IndexRequiredError,
|
|
684
1467
|
IndexWriteFailureError,
|
|
@@ -691,6 +1474,8 @@ export {
|
|
|
691
1474
|
LEDGER_DELTAS_COLLECTION,
|
|
692
1475
|
LedgerContentionError,
|
|
693
1476
|
LedgerStore,
|
|
1477
|
+
LinkEndpointError,
|
|
1478
|
+
LinkIntegrityError,
|
|
694
1479
|
LocaleNotSpecifiedError,
|
|
695
1480
|
Lru,
|
|
696
1481
|
MAGIC_LINK_CONTENT_INFO_PREFIX,
|
|
@@ -706,6 +1491,9 @@ export {
|
|
|
706
1491
|
MemorySealingKeyProvider,
|
|
707
1492
|
MigrationRequiredError,
|
|
708
1493
|
MissingTranslationError,
|
|
1494
|
+
MoneyCurrencyError,
|
|
1495
|
+
MoneyPrecisionError,
|
|
1496
|
+
MoneyUnsupportedError,
|
|
709
1497
|
NOYDB_BACKUP_VERSION,
|
|
710
1498
|
NOYDB_BUNDLE_FORMAT_VERSION,
|
|
711
1499
|
NOYDB_BUNDLE_MAGIC,
|
|
@@ -713,26 +1501,34 @@ export {
|
|
|
713
1501
|
NOYDB_FORMAT_VERSION,
|
|
714
1502
|
NOYDB_KEYRING_VERSION,
|
|
715
1503
|
NOYDB_SYNC_VERSION,
|
|
1504
|
+
NO_CARGO,
|
|
1505
|
+
NO_CUSTODY,
|
|
1506
|
+
NO_SEARCH,
|
|
1507
|
+
NO_SEQUENCE,
|
|
716
1508
|
NetworkError,
|
|
717
1509
|
NoAccessError,
|
|
718
1510
|
NonAdditiveSchemaChangeError,
|
|
719
1511
|
NotFoundError,
|
|
720
1512
|
Noydb,
|
|
721
1513
|
NoydbError,
|
|
1514
|
+
NumberingUncertaintyError,
|
|
722
1515
|
OverlayBaseIsVirtualError,
|
|
723
1516
|
OverlayCollectionUnavailableError,
|
|
724
1517
|
OverlayIdMismatchError,
|
|
725
1518
|
OverlayNameCollisionError,
|
|
726
1519
|
PERIODS_COLLECTION,
|
|
727
1520
|
PERSONAL_POLICY,
|
|
1521
|
+
POD_STORE_POLICY,
|
|
728
1522
|
POLICY_RECORD_ID,
|
|
729
1523
|
PUBLIC_ENVELOPE_FIELDS,
|
|
730
1524
|
PUBLIC_ENVELOPE_RECORD_ID,
|
|
731
1525
|
PathEscapeError,
|
|
732
1526
|
PeriodClosedError,
|
|
733
1527
|
PermissionDeniedError,
|
|
1528
|
+
PodVersionConflictError,
|
|
734
1529
|
PolicyDeniedError,
|
|
735
1530
|
PolicyEnforcer,
|
|
1531
|
+
PortabilityNotEnabledError,
|
|
736
1532
|
PresenceHandle,
|
|
737
1533
|
PrivilegeEscalationError,
|
|
738
1534
|
Query,
|
|
@@ -741,6 +1537,7 @@ export {
|
|
|
741
1537
|
ReadOnlyAtInstantError,
|
|
742
1538
|
ReadOnlyError,
|
|
743
1539
|
ReadOnlyFrameError,
|
|
1540
|
+
RecordCekNotFoundError,
|
|
744
1541
|
RecordLockedError,
|
|
745
1542
|
RecoveryNotEnrolledError,
|
|
746
1543
|
RecoveryProfileNotImplementedError,
|
|
@@ -748,8 +1545,10 @@ export {
|
|
|
748
1545
|
RefRegistry,
|
|
749
1546
|
RefScopeError,
|
|
750
1547
|
ReservedCollectionNameError,
|
|
1548
|
+
ReservedVaultNameError,
|
|
751
1549
|
SCHEMAS_COLLECTION,
|
|
752
1550
|
SEALED_PASSPHRASE_RECORD_ID,
|
|
1551
|
+
STATE_VAULT_NAME,
|
|
753
1552
|
STRICT_POLICY,
|
|
754
1553
|
SYNC_CREDENTIALS_COLLECTION,
|
|
755
1554
|
ScanBuilder,
|
|
@@ -758,10 +1557,21 @@ export {
|
|
|
758
1557
|
SchemaUpdateError,
|
|
759
1558
|
SchemaValidationError,
|
|
760
1559
|
ScriptViolationError,
|
|
1560
|
+
SealedHandle,
|
|
1561
|
+
SealedRecordExpiredError,
|
|
1562
|
+
SealedRecordMismatchError,
|
|
1563
|
+
SealedRecordNotEnabledError,
|
|
1564
|
+
SearchNotEnabledError,
|
|
1565
|
+
SequenceContentionError,
|
|
1566
|
+
SequenceNotEnabledError,
|
|
1567
|
+
SequenceOfflineError,
|
|
1568
|
+
SequenceStore,
|
|
761
1569
|
SessionExpiredError,
|
|
762
1570
|
SessionNotFoundError,
|
|
763
1571
|
SessionPolicyError,
|
|
1572
|
+
ShardProvisioningError,
|
|
764
1573
|
SnapshotNotFoundError,
|
|
1574
|
+
StaticDictReadonlyError,
|
|
765
1575
|
StoreCapabilityError,
|
|
766
1576
|
SyncEngine,
|
|
767
1577
|
SyncScheduler,
|
|
@@ -769,12 +1579,17 @@ export {
|
|
|
769
1579
|
TamperedError,
|
|
770
1580
|
TierDemoteDeniedError,
|
|
771
1581
|
TierNotGrantedError,
|
|
1582
|
+
TiersNotEnabledError,
|
|
772
1583
|
TranslatorNotConfiguredError,
|
|
773
1584
|
TxCollection,
|
|
774
1585
|
TxContext,
|
|
775
1586
|
TxVault,
|
|
776
1587
|
USER_ENVELOPE_COLLECTION,
|
|
777
1588
|
USER_ENVELOPE_MAX_BYTES,
|
|
1589
|
+
UniqueConstraintError,
|
|
1590
|
+
UnknownDictCodeError,
|
|
1591
|
+
UnknownShardError,
|
|
1592
|
+
UnsupportedIndexOptionError,
|
|
778
1593
|
UserApi,
|
|
779
1594
|
UserEnvelopeOversizedError,
|
|
780
1595
|
VISIBILITY_RECORD_PREFIX,
|
|
@@ -782,12 +1597,18 @@ export {
|
|
|
782
1597
|
Vault,
|
|
783
1598
|
VaultFrame,
|
|
784
1599
|
VaultInstant,
|
|
1600
|
+
VaultTemplateNotFoundError,
|
|
785
1601
|
WeakPassphraseError,
|
|
1602
|
+
WithdrawalRequestError,
|
|
786
1603
|
activeSessionCount,
|
|
787
1604
|
additiveOnly,
|
|
1605
|
+
aesGcmOpen,
|
|
1606
|
+
allocate,
|
|
788
1607
|
applyI18nLocale,
|
|
789
1608
|
applyJoins,
|
|
790
1609
|
applyPatch,
|
|
1610
|
+
approveWithdrawal,
|
|
1611
|
+
asMoney,
|
|
791
1612
|
assertStrongPassphrase,
|
|
792
1613
|
assertTierAccess,
|
|
793
1614
|
avg,
|
|
@@ -800,17 +1621,21 @@ export {
|
|
|
800
1621
|
canonicalJson,
|
|
801
1622
|
checkGate,
|
|
802
1623
|
clearDevUnlock,
|
|
1624
|
+
compileSequenceFormat,
|
|
803
1625
|
computePatch,
|
|
804
1626
|
coordinatedCutover,
|
|
805
1627
|
count,
|
|
806
1628
|
createBundleStore,
|
|
1629
|
+
createDeedOwner,
|
|
807
1630
|
createEnforcer,
|
|
808
1631
|
createNoydb,
|
|
1632
|
+
createPodStore,
|
|
809
1633
|
createSession,
|
|
810
1634
|
createStore,
|
|
811
1635
|
credentialStatus,
|
|
812
1636
|
decryptBytes,
|
|
813
1637
|
decryptDeterministic,
|
|
1638
|
+
decryptExtractedPartition,
|
|
814
1639
|
dekKey,
|
|
815
1640
|
deleteCredential,
|
|
816
1641
|
deleteUserEnvelope,
|
|
@@ -838,13 +1663,16 @@ export {
|
|
|
838
1663
|
envelopePayloadHash,
|
|
839
1664
|
estimateEntropy,
|
|
840
1665
|
estimateRecordBytes,
|
|
1666
|
+
evalComputedFields,
|
|
841
1667
|
evaluateClause,
|
|
842
1668
|
evaluateExportCapability,
|
|
843
1669
|
evaluateFieldClause,
|
|
844
1670
|
evaluateImportCapability,
|
|
845
1671
|
executePlan,
|
|
1672
|
+
exportAccessibleData,
|
|
846
1673
|
findAuthenticator,
|
|
847
1674
|
formatDiff,
|
|
1675
|
+
fuseRetrieval,
|
|
848
1676
|
generateULID,
|
|
849
1677
|
getCredential,
|
|
850
1678
|
groupAndReduce,
|
|
@@ -854,26 +1682,38 @@ export {
|
|
|
854
1682
|
hasRecoveryEnrolled,
|
|
855
1683
|
hashEntry,
|
|
856
1684
|
i18nText,
|
|
1685
|
+
immutableGuard,
|
|
1686
|
+
importExternalObjects,
|
|
857
1687
|
inferScripts,
|
|
1688
|
+
isDeedVault,
|
|
858
1689
|
isDevUnlockActive,
|
|
859
1690
|
isDictCollectionName,
|
|
860
1691
|
isDictKeyDescriptor,
|
|
1692
|
+
isDiscriminant,
|
|
861
1693
|
isI18nTextDescriptor,
|
|
1694
|
+
isLinkCollectionName,
|
|
862
1695
|
isMagicLinkGrantExpired,
|
|
1696
|
+
isMoneyDescriptor,
|
|
1697
|
+
isMoneyString,
|
|
863
1698
|
isPreCompressed,
|
|
864
1699
|
isPublicEnvelope,
|
|
1700
|
+
isRefArray,
|
|
865
1701
|
isSessionAlive,
|
|
1702
|
+
isStaticDictDescriptor,
|
|
866
1703
|
isULID,
|
|
867
1704
|
isZodSchema,
|
|
868
1705
|
issueDelegation,
|
|
869
1706
|
recoverPassphrase as keyringRecoverPassphrase,
|
|
870
1707
|
rotatePassphrase as keyringRotatePassphrase,
|
|
1708
|
+
liberateVault,
|
|
871
1709
|
listCredentials,
|
|
872
1710
|
listMagicLinkGrants,
|
|
873
1711
|
listUserEnvelopeIds,
|
|
874
1712
|
listUsers,
|
|
875
1713
|
listUsersWithEnvelopes,
|
|
1714
|
+
listWithdrawalRequests,
|
|
876
1715
|
loadActiveDelegations,
|
|
1716
|
+
loadDeedMarker,
|
|
877
1717
|
loadDevUnlock,
|
|
878
1718
|
loadPaperRecoveryEntries,
|
|
879
1719
|
loadPersistedSchema,
|
|
@@ -885,15 +1725,24 @@ export {
|
|
|
885
1725
|
lockSchema,
|
|
886
1726
|
magicLinkGrantRecordId,
|
|
887
1727
|
max,
|
|
1728
|
+
memoryObjectProjection,
|
|
1729
|
+
memoryStore,
|
|
888
1730
|
mergeCrdtStates,
|
|
889
1731
|
mergePolicy,
|
|
890
1732
|
min,
|
|
891
1733
|
mintPaperRecoveryEntry,
|
|
892
1734
|
mintShamirRecoveryEntry,
|
|
893
1735
|
mintWrappedDeksBlob,
|
|
1736
|
+
money,
|
|
1737
|
+
moneyMax,
|
|
1738
|
+
moneyMin,
|
|
1739
|
+
moneyNumber,
|
|
1740
|
+
moneySum,
|
|
1741
|
+
mulRate,
|
|
894
1742
|
paddedIndex,
|
|
895
1743
|
parseBytes,
|
|
896
1744
|
parseIndex,
|
|
1745
|
+
parseRsaOaepTlv,
|
|
897
1746
|
parseSealedEnvelope,
|
|
898
1747
|
persistDirectoryConfig,
|
|
899
1748
|
persistSchemaIfNeeded,
|
|
@@ -905,18 +1754,26 @@ export {
|
|
|
905
1754
|
readNoydbBundleHeader,
|
|
906
1755
|
readNoydbBundlePublicEnvelope,
|
|
907
1756
|
readPath,
|
|
1757
|
+
readPlaintextRecord,
|
|
1758
|
+
readPod,
|
|
1759
|
+
readPodHeader,
|
|
908
1760
|
readPublicEnvelope,
|
|
909
1761
|
readUserVisibility,
|
|
910
1762
|
recoverUser,
|
|
911
1763
|
reduceRecords,
|
|
1764
|
+
reducerBuilder,
|
|
912
1765
|
ref,
|
|
1766
|
+
refArray,
|
|
1767
|
+
rejectWithdrawal,
|
|
913
1768
|
removeAuthenticator,
|
|
1769
|
+
requestWithdrawal,
|
|
914
1770
|
resetBrotliSupportCache,
|
|
915
1771
|
resetJoinWarnings,
|
|
916
1772
|
resolveCrdtSnapshot,
|
|
917
1773
|
resolveI18nText,
|
|
918
1774
|
resolvePolicy,
|
|
919
1775
|
resolveSchema as resolvePublicEnvelopeSchema,
|
|
1776
|
+
resolveSequenceKey,
|
|
920
1777
|
resolveSession,
|
|
921
1778
|
revokeAllSessions,
|
|
922
1779
|
revokeDelegation,
|
|
@@ -931,8 +1788,13 @@ export {
|
|
|
931
1788
|
saveShamirRecoveryEntries,
|
|
932
1789
|
saveUserEnvelope,
|
|
933
1790
|
saveVaultPolicy,
|
|
1791
|
+
scaleForCurrency,
|
|
1792
|
+
sealRsaOaepTlv,
|
|
934
1793
|
sha256Hex,
|
|
1794
|
+
staticDict,
|
|
935
1795
|
sum,
|
|
1796
|
+
tokenize,
|
|
1797
|
+
transitionGuard,
|
|
936
1798
|
unwrapDeksFromBlob,
|
|
937
1799
|
unwrapDeksFromPaperEntry,
|
|
938
1800
|
unwrapDeksFromShamirEntry,
|
|
@@ -944,8 +1806,12 @@ export {
|
|
|
944
1806
|
validateSchemaOutput,
|
|
945
1807
|
validateSessionPolicy,
|
|
946
1808
|
visibilityRecordId,
|
|
1809
|
+
withArchive,
|
|
947
1810
|
withCache,
|
|
1811
|
+
withCargo,
|
|
948
1812
|
withCircuitBreaker,
|
|
1813
|
+
withCustody,
|
|
1814
|
+
withDeferredNumbering,
|
|
949
1815
|
withDerivation,
|
|
950
1816
|
withGuard,
|
|
951
1817
|
withHealthCheck,
|
|
@@ -954,9 +1820,15 @@ export {
|
|
|
954
1820
|
withMetrics,
|
|
955
1821
|
withOverlayedView,
|
|
956
1822
|
withRetry,
|
|
1823
|
+
withRollup,
|
|
1824
|
+
withSearch,
|
|
1825
|
+
withSequence,
|
|
1826
|
+
withdrawAccessibleData,
|
|
957
1827
|
wrapBundleStore,
|
|
1828
|
+
wrapPodStore,
|
|
958
1829
|
wrapStore,
|
|
959
1830
|
writeMagicLinkGrant,
|
|
960
|
-
writeNoydbBundle
|
|
1831
|
+
writeNoydbBundle,
|
|
1832
|
+
writePod
|
|
961
1833
|
};
|
|
962
1834
|
//# sourceMappingURL=index.js.map
|