@noy-db/hub 0.6.0 → 0.7.0-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/README.md +1 -1
- package/codemods/0.4.0-pre.json +24 -0
- package/codemods/0.6.0-pre.json +18 -0
- package/codemods/0.7.0-pre.json +258 -0
- package/dist/api-EQYRTZO2.js +20 -0
- package/dist/as/index.js +146 -0
- package/dist/as/index.js.map +1 -0
- package/dist/at/index.js +23 -0
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-VL4GRIEW.js → backup-Z7ZBTAQ6.js} +12 -12
- package/dist/blobs/index.js +13 -13
- package/dist/broker/index.js +12 -12
- package/dist/by/index.js +11 -0
- package/dist/cargo/index.js +35 -31
- package/dist/{chunk-JKATP6OE.js → chunk-225O5CXQ.js} +2 -2
- package/dist/{chunk-XINT4VJA.js → chunk-2GXEQUEX.js} +2 -2
- package/dist/chunk-2GXEQUEX.js.map +1 -0
- package/dist/{chunk-CXPOG3ZY.js → chunk-2LPVI4PX.js} +8 -8
- package/dist/{chunk-2J5IT37K.js → chunk-3L2MVE36.js} +5 -5
- package/dist/{chunk-HOPNIR5R.js → chunk-3QARDAYW.js} +2 -2
- package/dist/{chunk-HSJBJIB2.js → chunk-467SKJ65.js} +4 -4
- package/dist/{chunk-YCGLAANM.js → chunk-4A4TYISP.js} +2 -2
- package/dist/{chunk-2CBFYXJX.js → chunk-4G25SDQL.js} +4 -4
- package/dist/{chunk-5LZZQMIC.js → chunk-4LPF226H.js} +5 -5
- package/dist/{chunk-GANFIM2M.js → chunk-4ZPE6SKS.js} +3 -3
- package/dist/{chunk-65JXA63J.js → chunk-5263OEM3.js} +2 -2
- package/dist/{chunk-FNYCT27B.js → chunk-57JTHWLQ.js} +4 -4
- package/dist/{chunk-5IHGJHWC.js → chunk-5ACAVJUI.js} +2 -2
- package/dist/{chunk-3OE2QNSM.js → chunk-5AFMP532.js} +6 -6
- package/dist/{chunk-J6I5VR6P.js → chunk-5W7YXFV5.js} +8 -8
- package/dist/chunk-5W7YXFV5.js.map +1 -0
- package/dist/{chunk-7ZGPQOFV.js → chunk-6EW2UCVF.js} +3 -3
- package/dist/{chunk-GCU42IG7.js → chunk-6FOGTKBY.js} +7 -7
- package/dist/chunk-6FOGTKBY.js.map +1 -0
- package/dist/{chunk-36CEG6CM.js → chunk-7LYUJNU3.js} +2 -2
- package/dist/{chunk-D6SXRMZZ.js → chunk-A2YW5EMU.js} +5 -5
- package/dist/{chunk-OQMCFHUX.js → chunk-AB5P32RE.js} +2 -2
- package/dist/{chunk-JMJSCI7U.js → chunk-ALB64CZM.js} +7 -7
- package/dist/{chunk-RPRASGEY.js → chunk-ALUNQEBY.js} +2 -2
- package/dist/{chunk-ZYZJLYNS.js → chunk-ATV637J7.js} +7 -7
- package/dist/{chunk-LC6NE4IQ.js → chunk-CBRS2NEK.js} +2 -11
- package/dist/chunk-CBRS2NEK.js.map +1 -0
- package/dist/{chunk-W3HAIN6U.js → chunk-CN6B5PEN.js} +5 -5
- package/dist/{chunk-JIHWBKMQ.js → chunk-DBNYPLWY.js} +3 -3
- package/dist/{chunk-ZJUZOJVW.js → chunk-DFAUMLD7.js} +5 -5
- package/dist/{chunk-S6PJ6ZKE.js → chunk-DKWPJOYH.js} +2 -2
- package/dist/{chunk-MPKP6L5E.js → chunk-E6YA6UAP.js} +2 -2
- package/dist/{chunk-LIR2DJWP.js → chunk-F23WQK3G.js} +9 -9
- package/dist/chunk-F23WQK3G.js.map +1 -0
- package/dist/{chunk-S7PM7Z4K.js → chunk-F7ZFRPGQ.js} +2 -2
- package/dist/{chunk-CKKN25P2.js → chunk-FOG7YEJP.js} +3 -3
- package/dist/{chunk-AJGGBXWA.js → chunk-GK4DRVUD.js} +6 -6
- package/dist/chunk-GK4DRVUD.js.map +1 -0
- package/dist/{chunk-4ATF4BLF.js → chunk-H36KSN6X.js} +7 -7
- package/dist/{chunk-YTUFV7U7.js → chunk-H4M7ADXY.js} +10 -10
- package/dist/chunk-H4M7ADXY.js.map +1 -0
- package/dist/{chunk-QQRRKO7W.js → chunk-H7HP56F6.js} +5 -5
- package/dist/{chunk-RJZQ2PVD.js → chunk-HM4JSXX2.js} +3 -3
- package/dist/{chunk-3YGUHUJA.js → chunk-HTGRQZFB.js} +3 -3
- package/dist/{chunk-JXHNUYQO.js → chunk-IESNYJXZ.js} +6 -6
- package/dist/{chunk-OCJ3JA4O.js → chunk-J4MN6XIU.js} +2 -2
- package/dist/{chunk-HWI7GHJZ.js → chunk-J4UJ5FRV.js} +4 -4
- package/dist/{chunk-Z3BZXPRO.js → chunk-JBIV4FLR.js} +1 -1
- package/dist/chunk-JBIV4FLR.js.map +1 -0
- package/dist/{chunk-QVXZFJBU.js → chunk-JVLSU7S2.js} +2 -2
- package/dist/{chunk-7Q3RHOA5.js → chunk-KDJGJR7F.js} +2 -2
- package/dist/{chunk-PJX72ICF.js → chunk-KN4W2OQ4.js} +7 -7
- package/dist/chunk-KN4W2OQ4.js.map +1 -0
- package/dist/{chunk-M7WBE3OR.js → chunk-L6GTLZRK.js} +5 -5
- package/dist/{chunk-2ZT4INZ4.js → chunk-LF6DMX4C.js} +3 -3
- package/dist/chunk-LFUID7OW.js +163 -0
- package/dist/chunk-LFUID7OW.js.map +1 -0
- package/dist/{chunk-4K6BIMLF.js → chunk-LKFKXS5K.js} +2 -2
- package/dist/{chunk-POFYIGQ2.js → chunk-LR4Z47QD.js} +3 -3
- package/dist/{chunk-LUYPYCHY.js → chunk-MTBXJAS4.js} +4 -4
- package/dist/{chunk-FX3UIDCS.js → chunk-N4CNVSUF.js} +2 -2
- package/dist/{chunk-FU5VYEYK.js → chunk-NLKLXXTO.js} +2 -2
- package/dist/{chunk-YYV53EHO.js → chunk-OPXR4PB2.js} +2 -2
- package/dist/{chunk-5F7BZAGV.js → chunk-OWLVBOWO.js} +10 -10
- package/dist/{chunk-6NR36UNB.js → chunk-P6ASQOZR.js} +2 -2
- package/dist/{chunk-5ATC6UT4.js → chunk-PCQDY6QN.js} +6 -6
- package/dist/{chunk-EQOTJL76.js → chunk-PGFKIOR3.js} +3 -3
- package/dist/{chunk-D2YFQ7XG.js → chunk-POS53FG6.js} +2 -2
- package/dist/{chunk-ZY6P7M52.js → chunk-PQ6Z2TAP.js} +2 -2
- package/dist/{chunk-5OT4G5N5.js → chunk-PUJTKLPL.js} +3 -3
- package/dist/{chunk-64WHKBMP.js → chunk-QGJ4XIA7.js} +8 -8
- package/dist/{chunk-DECNV4QK.js → chunk-QHJKK77B.js} +6 -6
- package/dist/{chunk-JHYKSMVX.js → chunk-QI5NWLVW.js} +7 -7
- package/dist/{chunk-BZ3WMOYX.js → chunk-RC4BROYR.js} +3 -3
- package/dist/{chunk-IWQPYT6S.js → chunk-RDHUZ674.js} +4 -4
- package/dist/{chunk-UJ4Z67UQ.js → chunk-RK7N4OQ5.js} +1 -1
- package/dist/chunk-RK7N4OQ5.js.map +1 -0
- package/dist/{chunk-EHW7NLGD.js → chunk-S2VG3ABP.js} +3 -3
- package/dist/chunk-S2VG3ABP.js.map +1 -0
- package/dist/{chunk-7OBIBPCV.js → chunk-S35S77YU.js} +10 -10
- package/dist/{chunk-22GR3O4J.js → chunk-SHILAQH5.js} +2 -2
- package/dist/{chunk-WPZ5FVAS.js → chunk-T3PHCEN4.js} +3 -3
- package/dist/{chunk-GKTW3KLV.js → chunk-TOV6VMHF.js} +5 -5
- package/dist/chunk-TOV6VMHF.js.map +1 -0
- package/dist/{chunk-6RH7PRTL.js → chunk-TVIFAHZR.js} +6 -6
- package/dist/chunk-UBSFPGVJ.js +1 -0
- package/dist/{chunk-323MN67Z.js → chunk-UCUALOSM.js} +2 -2
- package/dist/{chunk-B4CRUZPR.js → chunk-VAG47QHV.js} +2 -2
- package/dist/{chunk-QH47SQLD.js → chunk-VFIWDPXZ.js} +3 -3
- package/dist/{chunk-K6CPIK3R.js → chunk-VTG7327U.js} +4 -4
- package/dist/chunk-VTG7327U.js.map +1 -0
- package/dist/{chunk-ONPVHX2Y.js → chunk-W5LHQXZU.js} +2 -2
- package/dist/{chunk-ZIMQDXTQ.js → chunk-WK5FSW7T.js} +8 -8
- package/dist/{chunk-PFWE7FJG.js → chunk-WLLUM35R.js} +2 -2
- package/dist/{chunk-IWKCJCLP.js → chunk-X62MEF2O.js} +5 -5
- package/dist/chunk-X62MEF2O.js.map +1 -0
- package/dist/{chunk-XPEPMK4Y.js → chunk-X67FCULK.js} +5 -5
- package/dist/chunk-X67FCULK.js.map +1 -0
- package/dist/{chunk-C3XWJCG7.js → chunk-XDVVBETV.js} +2 -2
- package/dist/chunk-XDVVBETV.js.map +1 -0
- package/dist/chunk-XJ3FEKEY.js +15 -0
- package/dist/chunk-XJ3FEKEY.js.map +1 -0
- package/dist/{chunk-EV2TDHQZ.js → chunk-XSN63FUS.js} +2 -2
- package/dist/{chunk-OR2FYRYR.js → chunk-XVU7J43V.js} +2 -2
- package/dist/{chunk-JYPRZWCZ.js → chunk-Y3YLJORD.js} +167 -133
- package/dist/chunk-Y3YLJORD.js.map +1 -0
- package/dist/{chunk-DNKVKO7K.js → chunk-Y6GZ2P4M.js} +2 -2
- package/dist/{chunk-ATY3ZASK.js → chunk-YCSM3GZU.js} +2 -2
- package/dist/{chunk-BMU2DS3S.js → chunk-YKPGQJFU.js} +12 -171
- package/dist/chunk-YKPGQJFU.js.map +1 -0
- package/dist/{chunk-RDB66EKD.js → chunk-YMLQBZFJ.js} +6 -6
- package/dist/{chunk-EHRIDNZX.js → chunk-YPSOHDNC.js} +2 -2
- package/dist/{chunk-KM6ZXG7U.js → chunk-YXA2TCTZ.js} +4 -4
- package/dist/{chunk-TKBB62DN.js → chunk-Z2PWOSCJ.js} +2 -2
- package/dist/{chunk-S2I5MYSA.js → chunk-Z2WK53N6.js} +42 -15
- package/dist/chunk-Z2WK53N6.js.map +1 -0
- package/dist/{chunk-5O5ZSW7N.js → chunk-Z7ZXZL6Y.js} +2 -2
- package/dist/{chunk-2ZCWHCLF.js → chunk-ZO252Q5S.js} +6 -6
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-AZDSDG6V.js → classified-marker-BSQHU4JT.js} +3 -3
- package/dist/collection-facade-LG3NYZVB.js +45 -0
- package/dist/{computed-VG2PCM4L.js → computed-ASBNTLOK.js} +3 -3
- package/dist/consent/index.js +9 -9
- package/dist/cover/index.js +9 -9
- package/dist/custody/index.js +12 -12
- package/dist/{dead-filter-JNQNB3TA.js → dead-filter-QKU56XTQ.js} +2 -2
- package/dist/debug/index.js +1 -1
- package/dist/{delegation-5F36DRDH.js → delegation-XWRPYODW.js} +11 -11
- package/dist/derivations/index.js +12 -12
- package/dist/derive-CXHCY46K.js +22 -0
- package/dist/directory/index.js +10 -10
- package/dist/{dispatch-3ZA733EY.js → dispatch-4AP4PUZU.js} +18 -18
- package/dist/{dispatch-TNM5CRLZ.js → dispatch-VR4LRXZ7.js} +5 -5
- package/dist/{enclave-Y2ALNDRD.js → enclave-NYPT7WA7.js} +9 -9
- package/dist/executor-3KFRQETS.js +29 -0
- package/dist/executor-AFHQYRAU.js +9 -0
- package/dist/executor-YYDW6XQI.js +9 -0
- package/dist/export-accessible-BX2ILB4C.js +23 -0
- package/dist/extract-partition-UPOVITFI.js +38 -0
- package/dist/{fanout-sidecar-3QZU7ZZX.js → fanout-sidecar-IWP3R4RC.js} +9 -9
- package/dist/{fence-watcher-DHQ775JB.js → fence-watcher-ZVSMLKQD.js} +1 -1
- package/dist/fence-watcher-ZVSMLKQD.js.map +1 -0
- package/dist/find-SZBL2HPB.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +7 -7
- package/dist/history/index.js +13 -13
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +5 -5
- package/dist/index.js +134 -131
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/introspection/index.js +12 -11
- package/dist/issue-G53NB6EW.js +19 -0
- package/dist/kernel/collection-config.d.ts +9 -9
- package/dist/kernel/collection.d.ts +1 -1
- package/dist/kernel/errors.d.ts +2 -2
- package/dist/kernel/noydb.d.ts +6 -6
- package/dist/kernel/secret-mode.d.ts +1 -1
- package/dist/kernel/types.d.ts +34 -15
- package/dist/kernel/vault.d.ts +10 -1
- package/dist/kernel/via/compose.d.ts +3 -3
- package/dist/kernel/via/index.d.ts +4 -4
- package/dist/kernel/via/pipeline.d.ts +6 -6
- package/dist/kernel/via/reconcile.d.ts +2 -2
- package/dist/kernel/via/taint-binding.d.ts +3 -3
- package/dist/{ledger-MQIIOTZB.js → ledger-T5K4P2D7.js} +11 -11
- package/dist/liberate-VEOZRESE.js +25 -0
- package/dist/{link-set-5PJBBR63.js → link-set-76JZ6YB4.js} +11 -11
- package/dist/{managed-secret-ETDG6AAE.js → managed-secret-6YC32VXG.js} +12 -12
- package/dist/materialized-views/index.js +25 -25
- package/dist/{migrate-cek-V3VDRV24.js → migrate-cek-LBRKYUZZ.js} +2 -2
- package/dist/money/index.js +4 -4
- package/dist/noydb-EDJA4JNJ.js +86 -0
- package/dist/on/index.js +1 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -12
- package/dist/pod/index.js +58 -57
- package/dist/{pod-handle-AZ3CXY5Y.js → pod-handle-P6DPBM5U.js} +9 -9
- package/dist/policy/index.js +10 -10
- package/dist/port/as/active.d.ts +10 -0
- package/dist/port/as/index.d.ts +32 -0
- package/dist/port/as/types.d.ts +113 -0
- package/dist/port/at/index.d.ts +37 -0
- package/dist/port/by/default-provider.d.ts +3 -3
- package/dist/port/by/index.d.ts +32 -10
- package/dist/port/by/types.d.ts +29 -11
- package/dist/port/on/index.d.ts +50 -0
- package/dist/port/with/computed-strategy.d.ts +1 -1
- package/dist/port/with/device-seal-strategy.d.ts +2 -2
- package/dist/port/with/formats-strategy.d.ts +76 -0
- package/dist/port/with/strategies.d.ts +11 -5
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-QCJYRMIK.js → post-register-53O7AJRZ.js} +6 -6
- package/dist/query/index.js +3 -3
- package/dist/reduce/index.js +4 -4
- package/dist/register-6TCBR6XD.js +32 -0
- package/dist/registry-DH2L4O2V.js +18 -0
- package/dist/registry-IWFMXCHX.js +9 -0
- package/dist/registry-Q3FG3OAX.js +9 -0
- package/dist/registry-YC3IFG3A.js +19 -0
- package/dist/request-withdrawal-NM5VYR6F.js +31 -0
- package/dist/{reveal-W7BKZSUP.js → reveal-XBIMHAXR.js} +6 -6
- package/dist/revoke-MJNYWO72.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +4 -4
- package/dist/{seed-55FPOMYP.js → seed-NSNIGYXE.js} +12 -12
- package/dist/sequence/index.js +9 -9
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-6XVS2AU3.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/{stale-TH7SSVRV.js → stale-MCS46TFO.js} +10 -10
- package/dist/stale-MCS46TFO.js.map +1 -0
- package/dist/storage-ZXUT476I.js +23 -0
- package/dist/storage-ZXUT476I.js.map +1 -0
- package/dist/{store-coordination-provider-R27VRD6K.js → store-coordination-provider-6FM26VQM.js} +14 -13
- package/dist/store-coordination-provider-6FM26VQM.js.map +1 -0
- package/dist/sync/index.js +10 -10
- package/dist/team/index.js +17 -17
- package/dist/tiers/index.js +11 -11
- package/dist/to/index.js +1 -1
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/vault-diff-FE5J35NJ.js +9 -0
- package/dist/vault-diff-FE5J35NJ.js.map +1 -0
- package/dist/vault-head/index.js +8 -8
- package/dist/{verify-M5LQH43C.js → verify-WYOFLSNA.js} +5 -5
- package/dist/via/blob/binding.d.ts +6 -6
- package/dist/via/classified/binding.d.ts +9 -9
- package/dist/via/computed/binding.d.ts +2 -2
- package/dist/via/i18n/binding.d.ts +4 -4
- package/dist/via/lookup/binding.d.ts +5 -5
- package/dist/via/lookup/index.d.ts +1 -1
- package/dist/via/lookup/snapshot.d.ts +1 -1
- package/dist/via/money/binding.d.ts +3 -3
- package/dist/via/money/normalize.d.ts +1 -1
- package/dist/via/money/where.d.ts +3 -3
- package/dist/walk-JNEOYCAU.js +21 -0
- package/dist/walk-JNEOYCAU.js.map +1 -0
- package/dist/with-cargo/adopt-partition.d.ts +6 -6
- package/dist/with-cargo/floor.d.ts +1 -1
- package/dist/with-cargo/index.d.ts +1 -1
- package/dist/with-party/team/deed.d.ts +4 -4
- package/dist/with-party/team/device-seal.d.ts +5 -5
- package/dist/with-party/team/echo-ceremony.d.ts +2 -2
- package/dist/with-party/team/echo-secret.d.ts +4 -4
- package/dist/with-party/team/index.d.ts +2 -2
- package/dist/with-party/team/keyring.d.ts +2 -2
- package/dist/with-party/team/managed-secret.d.ts +21 -11
- package/dist/with-party/team/noydb-facade.d.ts +2 -2
- package/dist/with-party/team/{shamir-recovery-provider.d.ts → noydb-shamir.d.ts} +1 -1
- package/dist/with-party/team/recovery.d.ts +3 -3
- package/dist/with-party/team/rotate-recover.d.ts +5 -5
- package/dist/with-pod/format.d.ts +1 -1
- package/dist/with-pod/pod.d.ts +6 -6
- package/dist/with-shape/introspection/describe.d.ts +2 -2
- package/dist/with-shape/schema-update/fence-controller.d.ts +4 -4
- package/dist/with-shape/schema-update/fence-watcher.d.ts +4 -4
- package/dist/with-shape/schema-update/store-coordination-provider.d.ts +7 -6
- package/dist/withdraw-accessible-ILTSXTIE.js +28 -0
- package/dist/withdraw-accessible-ILTSXTIE.js.map +1 -0
- package/package.json +23 -5
- package/dist/api-6X2VLZ7J.js +0 -20
- package/dist/chunk-AJGGBXWA.js.map +0 -1
- package/dist/chunk-BMU2DS3S.js.map +0 -1
- package/dist/chunk-C3XWJCG7.js.map +0 -1
- package/dist/chunk-EHW7NLGD.js.map +0 -1
- package/dist/chunk-GCU42IG7.js.map +0 -1
- package/dist/chunk-GKTW3KLV.js.map +0 -1
- package/dist/chunk-IWKCJCLP.js.map +0 -1
- package/dist/chunk-J6I5VR6P.js.map +0 -1
- package/dist/chunk-JYPRZWCZ.js.map +0 -1
- package/dist/chunk-K6CPIK3R.js.map +0 -1
- package/dist/chunk-LC6NE4IQ.js.map +0 -1
- package/dist/chunk-LIR2DJWP.js.map +0 -1
- package/dist/chunk-PJX72ICF.js.map +0 -1
- package/dist/chunk-S2I5MYSA.js.map +0 -1
- package/dist/chunk-UJ4Z67UQ.js.map +0 -1
- package/dist/chunk-XINT4VJA.js.map +0 -1
- package/dist/chunk-XPEPMK4Y.js.map +0 -1
- package/dist/chunk-YTUFV7U7.js.map +0 -1
- package/dist/chunk-Z3BZXPRO.js.map +0 -1
- package/dist/collection-facade-WSUAYFJ4.js +0 -45
- package/dist/derive-MPOGZ4NR.js +0 -22
- package/dist/executor-BBEEUFO3.js +0 -9
- package/dist/executor-G6G3YEWR.js +0 -9
- package/dist/executor-ZUTUMTPA.js +0 -29
- package/dist/export-accessible-S3KEB763.js +0 -23
- package/dist/extract-partition-KVCTSUVE.js +0 -38
- package/dist/fence-watcher-DHQ775JB.js.map +0 -1
- package/dist/find-V4FN5ITT.js +0 -11
- package/dist/issue-5CFBWBRX.js +0 -19
- package/dist/liberate-LW7OKVBH.js +0 -25
- package/dist/noydb-LFDRMYZ5.js +0 -85
- package/dist/register-JBOEHTVX.js +0 -32
- package/dist/registry-5DYHQFJS.js +0 -9
- package/dist/registry-EANV44W2.js +0 -9
- package/dist/registry-J25H6VB4.js +0 -19
- package/dist/registry-R23SQUQH.js +0 -18
- package/dist/request-withdrawal-KQ4W4UT5.js +0 -31
- package/dist/revoke-H3VSTAIE.js +0 -24
- package/dist/signer-53AQ3BU2.js +0 -25
- package/dist/storage-WSF7ZKTL.js +0 -23
- package/dist/store-coordination-provider-R27VRD6K.js.map +0 -1
- package/dist/walk-NABCHDZN.js +0 -21
- package/dist/withdraw-accessible-VCINIG6V.js +0 -28
- /package/dist/{api-6X2VLZ7J.js.map → api-EQYRTZO2.js.map} +0 -0
- /package/dist/{collection-facade-WSUAYFJ4.js.map → at/index.js.map} +0 -0
- /package/dist/{backup-VL4GRIEW.js.map → backup-Z7ZBTAQ6.js.map} +0 -0
- /package/dist/{computed-VG2PCM4L.js.map → by/index.js.map} +0 -0
- /package/dist/{chunk-JKATP6OE.js.map → chunk-225O5CXQ.js.map} +0 -0
- /package/dist/{chunk-CXPOG3ZY.js.map → chunk-2LPVI4PX.js.map} +0 -0
- /package/dist/{chunk-2J5IT37K.js.map → chunk-3L2MVE36.js.map} +0 -0
- /package/dist/{chunk-HOPNIR5R.js.map → chunk-3QARDAYW.js.map} +0 -0
- /package/dist/{chunk-HSJBJIB2.js.map → chunk-467SKJ65.js.map} +0 -0
- /package/dist/{chunk-YCGLAANM.js.map → chunk-4A4TYISP.js.map} +0 -0
- /package/dist/{chunk-2CBFYXJX.js.map → chunk-4G25SDQL.js.map} +0 -0
- /package/dist/{chunk-5LZZQMIC.js.map → chunk-4LPF226H.js.map} +0 -0
- /package/dist/{chunk-GANFIM2M.js.map → chunk-4ZPE6SKS.js.map} +0 -0
- /package/dist/{chunk-65JXA63J.js.map → chunk-5263OEM3.js.map} +0 -0
- /package/dist/{chunk-FNYCT27B.js.map → chunk-57JTHWLQ.js.map} +0 -0
- /package/dist/{chunk-5IHGJHWC.js.map → chunk-5ACAVJUI.js.map} +0 -0
- /package/dist/{chunk-3OE2QNSM.js.map → chunk-5AFMP532.js.map} +0 -0
- /package/dist/{chunk-7ZGPQOFV.js.map → chunk-6EW2UCVF.js.map} +0 -0
- /package/dist/{chunk-36CEG6CM.js.map → chunk-7LYUJNU3.js.map} +0 -0
- /package/dist/{chunk-D6SXRMZZ.js.map → chunk-A2YW5EMU.js.map} +0 -0
- /package/dist/{chunk-OQMCFHUX.js.map → chunk-AB5P32RE.js.map} +0 -0
- /package/dist/{chunk-JMJSCI7U.js.map → chunk-ALB64CZM.js.map} +0 -0
- /package/dist/{chunk-RPRASGEY.js.map → chunk-ALUNQEBY.js.map} +0 -0
- /package/dist/{chunk-ZYZJLYNS.js.map → chunk-ATV637J7.js.map} +0 -0
- /package/dist/{chunk-W3HAIN6U.js.map → chunk-CN6B5PEN.js.map} +0 -0
- /package/dist/{chunk-JIHWBKMQ.js.map → chunk-DBNYPLWY.js.map} +0 -0
- /package/dist/{chunk-ZJUZOJVW.js.map → chunk-DFAUMLD7.js.map} +0 -0
- /package/dist/{chunk-S6PJ6ZKE.js.map → chunk-DKWPJOYH.js.map} +0 -0
- /package/dist/{chunk-MPKP6L5E.js.map → chunk-E6YA6UAP.js.map} +0 -0
- /package/dist/{chunk-S7PM7Z4K.js.map → chunk-F7ZFRPGQ.js.map} +0 -0
- /package/dist/{chunk-CKKN25P2.js.map → chunk-FOG7YEJP.js.map} +0 -0
- /package/dist/{chunk-4ATF4BLF.js.map → chunk-H36KSN6X.js.map} +0 -0
- /package/dist/{chunk-QQRRKO7W.js.map → chunk-H7HP56F6.js.map} +0 -0
- /package/dist/{chunk-RJZQ2PVD.js.map → chunk-HM4JSXX2.js.map} +0 -0
- /package/dist/{chunk-3YGUHUJA.js.map → chunk-HTGRQZFB.js.map} +0 -0
- /package/dist/{chunk-JXHNUYQO.js.map → chunk-IESNYJXZ.js.map} +0 -0
- /package/dist/{chunk-OCJ3JA4O.js.map → chunk-J4MN6XIU.js.map} +0 -0
- /package/dist/{chunk-HWI7GHJZ.js.map → chunk-J4UJ5FRV.js.map} +0 -0
- /package/dist/{chunk-QVXZFJBU.js.map → chunk-JVLSU7S2.js.map} +0 -0
- /package/dist/{chunk-7Q3RHOA5.js.map → chunk-KDJGJR7F.js.map} +0 -0
- /package/dist/{chunk-M7WBE3OR.js.map → chunk-L6GTLZRK.js.map} +0 -0
- /package/dist/{chunk-2ZT4INZ4.js.map → chunk-LF6DMX4C.js.map} +0 -0
- /package/dist/{chunk-4K6BIMLF.js.map → chunk-LKFKXS5K.js.map} +0 -0
- /package/dist/{chunk-POFYIGQ2.js.map → chunk-LR4Z47QD.js.map} +0 -0
- /package/dist/{chunk-LUYPYCHY.js.map → chunk-MTBXJAS4.js.map} +0 -0
- /package/dist/{chunk-FX3UIDCS.js.map → chunk-N4CNVSUF.js.map} +0 -0
- /package/dist/{chunk-FU5VYEYK.js.map → chunk-NLKLXXTO.js.map} +0 -0
- /package/dist/{chunk-YYV53EHO.js.map → chunk-OPXR4PB2.js.map} +0 -0
- /package/dist/{chunk-5F7BZAGV.js.map → chunk-OWLVBOWO.js.map} +0 -0
- /package/dist/{chunk-6NR36UNB.js.map → chunk-P6ASQOZR.js.map} +0 -0
- /package/dist/{chunk-5ATC6UT4.js.map → chunk-PCQDY6QN.js.map} +0 -0
- /package/dist/{chunk-EQOTJL76.js.map → chunk-PGFKIOR3.js.map} +0 -0
- /package/dist/{chunk-D2YFQ7XG.js.map → chunk-POS53FG6.js.map} +0 -0
- /package/dist/{chunk-ZY6P7M52.js.map → chunk-PQ6Z2TAP.js.map} +0 -0
- /package/dist/{chunk-5OT4G5N5.js.map → chunk-PUJTKLPL.js.map} +0 -0
- /package/dist/{chunk-64WHKBMP.js.map → chunk-QGJ4XIA7.js.map} +0 -0
- /package/dist/{chunk-DECNV4QK.js.map → chunk-QHJKK77B.js.map} +0 -0
- /package/dist/{chunk-JHYKSMVX.js.map → chunk-QI5NWLVW.js.map} +0 -0
- /package/dist/{chunk-BZ3WMOYX.js.map → chunk-RC4BROYR.js.map} +0 -0
- /package/dist/{chunk-IWQPYT6S.js.map → chunk-RDHUZ674.js.map} +0 -0
- /package/dist/{chunk-7OBIBPCV.js.map → chunk-S35S77YU.js.map} +0 -0
- /package/dist/{chunk-22GR3O4J.js.map → chunk-SHILAQH5.js.map} +0 -0
- /package/dist/{chunk-WPZ5FVAS.js.map → chunk-T3PHCEN4.js.map} +0 -0
- /package/dist/{chunk-6RH7PRTL.js.map → chunk-TVIFAHZR.js.map} +0 -0
- /package/dist/{derive-MPOGZ4NR.js.map → chunk-UBSFPGVJ.js.map} +0 -0
- /package/dist/{chunk-323MN67Z.js.map → chunk-UCUALOSM.js.map} +0 -0
- /package/dist/{chunk-B4CRUZPR.js.map → chunk-VAG47QHV.js.map} +0 -0
- /package/dist/{chunk-QH47SQLD.js.map → chunk-VFIWDPXZ.js.map} +0 -0
- /package/dist/{chunk-ONPVHX2Y.js.map → chunk-W5LHQXZU.js.map} +0 -0
- /package/dist/{chunk-ZIMQDXTQ.js.map → chunk-WK5FSW7T.js.map} +0 -0
- /package/dist/{chunk-PFWE7FJG.js.map → chunk-WLLUM35R.js.map} +0 -0
- /package/dist/{chunk-EV2TDHQZ.js.map → chunk-XSN63FUS.js.map} +0 -0
- /package/dist/{chunk-OR2FYRYR.js.map → chunk-XVU7J43V.js.map} +0 -0
- /package/dist/{chunk-DNKVKO7K.js.map → chunk-Y6GZ2P4M.js.map} +0 -0
- /package/dist/{chunk-ATY3ZASK.js.map → chunk-YCSM3GZU.js.map} +0 -0
- /package/dist/{chunk-RDB66EKD.js.map → chunk-YMLQBZFJ.js.map} +0 -0
- /package/dist/{chunk-EHRIDNZX.js.map → chunk-YPSOHDNC.js.map} +0 -0
- /package/dist/{chunk-KM6ZXG7U.js.map → chunk-YXA2TCTZ.js.map} +0 -0
- /package/dist/{chunk-TKBB62DN.js.map → chunk-Z2PWOSCJ.js.map} +0 -0
- /package/dist/{chunk-5O5ZSW7N.js.map → chunk-Z7ZXZL6Y.js.map} +0 -0
- /package/dist/{chunk-2ZCWHCLF.js.map → chunk-ZO252Q5S.js.map} +0 -0
- /package/dist/{classified-marker-AZDSDG6V.js.map → classified-marker-BSQHU4JT.js.map} +0 -0
- /package/dist/{enclave-Y2ALNDRD.js.map → collection-facade-LG3NYZVB.js.map} +0 -0
- /package/dist/{executor-BBEEUFO3.js.map → computed-ASBNTLOK.js.map} +0 -0
- /package/dist/{dead-filter-JNQNB3TA.js.map → dead-filter-QKU56XTQ.js.map} +0 -0
- /package/dist/{delegation-5F36DRDH.js.map → delegation-XWRPYODW.js.map} +0 -0
- /package/dist/{executor-G6G3YEWR.js.map → derive-CXHCY46K.js.map} +0 -0
- /package/dist/{dispatch-3ZA733EY.js.map → dispatch-4AP4PUZU.js.map} +0 -0
- /package/dist/{dispatch-TNM5CRLZ.js.map → dispatch-VR4LRXZ7.js.map} +0 -0
- /package/dist/{executor-ZUTUMTPA.js.map → enclave-NYPT7WA7.js.map} +0 -0
- /package/dist/{export-accessible-S3KEB763.js.map → executor-3KFRQETS.js.map} +0 -0
- /package/dist/{extract-partition-KVCTSUVE.js.map → executor-AFHQYRAU.js.map} +0 -0
- /package/dist/{find-V4FN5ITT.js.map → executor-YYDW6XQI.js.map} +0 -0
- /package/dist/{issue-5CFBWBRX.js.map → export-accessible-BX2ILB4C.js.map} +0 -0
- /package/dist/{ledger-MQIIOTZB.js.map → extract-partition-UPOVITFI.js.map} +0 -0
- /package/dist/{fanout-sidecar-3QZU7ZZX.js.map → fanout-sidecar-IWP3R4RC.js.map} +0 -0
- /package/dist/{liberate-LW7OKVBH.js.map → find-SZBL2HPB.js.map} +0 -0
- /package/dist/{link-set-5PJBBR63.js.map → issue-G53NB6EW.js.map} +0 -0
- /package/dist/{managed-secret-ETDG6AAE.js.map → ledger-T5K4P2D7.js.map} +0 -0
- /package/dist/{noydb-LFDRMYZ5.js.map → liberate-VEOZRESE.js.map} +0 -0
- /package/dist/{register-JBOEHTVX.js.map → link-set-76JZ6YB4.js.map} +0 -0
- /package/dist/{registry-5DYHQFJS.js.map → managed-secret-6YC32VXG.js.map} +0 -0
- /package/dist/{migrate-cek-V3VDRV24.js.map → migrate-cek-LBRKYUZZ.js.map} +0 -0
- /package/dist/{registry-EANV44W2.js.map → noydb-EDJA4JNJ.js.map} +0 -0
- /package/dist/{registry-J25H6VB4.js.map → on/index.js.map} +0 -0
- /package/dist/{pod-handle-AZ3CXY5Y.js.map → pod-handle-P6DPBM5U.js.map} +0 -0
- /package/dist/{post-register-QCJYRMIK.js.map → post-register-53O7AJRZ.js.map} +0 -0
- /package/dist/{registry-R23SQUQH.js.map → register-6TCBR6XD.js.map} +0 -0
- /package/dist/{request-withdrawal-KQ4W4UT5.js.map → registry-DH2L4O2V.js.map} +0 -0
- /package/dist/{revoke-H3VSTAIE.js.map → registry-IWFMXCHX.js.map} +0 -0
- /package/dist/{signer-53AQ3BU2.js.map → registry-Q3FG3OAX.js.map} +0 -0
- /package/dist/{stale-TH7SSVRV.js.map → registry-YC3IFG3A.js.map} +0 -0
- /package/dist/{storage-WSF7ZKTL.js.map → request-withdrawal-NM5VYR6F.js.map} +0 -0
- /package/dist/{reveal-W7BKZSUP.js.map → reveal-XBIMHAXR.js.map} +0 -0
- /package/dist/{walk-NABCHDZN.js.map → revoke-MJNYWO72.js.map} +0 -0
- /package/dist/{seed-55FPOMYP.js.map → seed-NSNIGYXE.js.map} +0 -0
- /package/dist/{withdraw-accessible-VCINIG6V.js.map → signer-6XVS2AU3.js.map} +0 -0
- /package/dist/{verify-M5LQH43C.js.map → verify-WYOFLSNA.js.map} +0 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import {
|
|
2
|
+
diff
|
|
3
|
+
} from "./chunk-SVLR4POP.js";
|
|
4
|
+
|
|
5
|
+
// src/with-cargo/vault-diff.ts
|
|
6
|
+
async function diffVault(vault, candidate, options = {}) {
|
|
7
|
+
const idKey = options.idKey ?? "id";
|
|
8
|
+
const filter = options.collections ? new Set(options.collections) : null;
|
|
9
|
+
const compareFn = options.compareFn ?? ((a, b) => diff(a, b).length === 0);
|
|
10
|
+
const live = /* @__PURE__ */ new Map();
|
|
11
|
+
for await (const chunk of vault.exportStream({ granularity: "collection" })) {
|
|
12
|
+
if (filter && !filter.has(chunk.collection)) continue;
|
|
13
|
+
const collection = live.get(chunk.collection) ?? /* @__PURE__ */ new Map();
|
|
14
|
+
for (const record of chunk.records) {
|
|
15
|
+
const id = readIdField(record, idKey);
|
|
16
|
+
if (!id) continue;
|
|
17
|
+
collection.set(id, record);
|
|
18
|
+
}
|
|
19
|
+
live.set(chunk.collection, collection);
|
|
20
|
+
}
|
|
21
|
+
const cand = await normaliseCandidate(candidate, idKey, filter);
|
|
22
|
+
const added = [];
|
|
23
|
+
const modified = [];
|
|
24
|
+
const deleted = [];
|
|
25
|
+
const unchanged = options.includeUnchanged ? [] : void 0;
|
|
26
|
+
const collectionNames = /* @__PURE__ */ new Set([...live.keys(), ...cand.keys()]);
|
|
27
|
+
for (const collection of [...collectionNames].sort()) {
|
|
28
|
+
const liveColl = live.get(collection) ?? /* @__PURE__ */ new Map();
|
|
29
|
+
const candColl = cand.get(collection) ?? /* @__PURE__ */ new Map();
|
|
30
|
+
const allIds = /* @__PURE__ */ new Set([...liveColl.keys(), ...candColl.keys()]);
|
|
31
|
+
for (const id of [...allIds].sort()) {
|
|
32
|
+
const before = liveColl.get(id);
|
|
33
|
+
const after = candColl.get(id);
|
|
34
|
+
if (before === void 0 && after !== void 0) {
|
|
35
|
+
added.push({ collection, id, record: after });
|
|
36
|
+
} else if (before !== void 0 && after === void 0) {
|
|
37
|
+
const metadata = options.includeMetadata ? await vault.collection(collection).getMetadata(id) ?? void 0 : void 0;
|
|
38
|
+
deleted.push({ collection, id, record: before, ...metadata !== void 0 ? { metadata } : {} });
|
|
39
|
+
} else if (before !== void 0 && after !== void 0) {
|
|
40
|
+
if (compareFn(before, after)) {
|
|
41
|
+
unchanged?.push({ collection, id, record: after });
|
|
42
|
+
} else {
|
|
43
|
+
const metadata = options.includeMetadata ? await vault.collection(collection).getMetadata(id) ?? void 0 : void 0;
|
|
44
|
+
const fieldDiffs = diff(before, after);
|
|
45
|
+
const fieldsChanged = uniqueTopLevelKeys(fieldDiffs);
|
|
46
|
+
modified.push({
|
|
47
|
+
collection,
|
|
48
|
+
id,
|
|
49
|
+
record: after,
|
|
50
|
+
before,
|
|
51
|
+
fieldsChanged,
|
|
52
|
+
fieldDiffs,
|
|
53
|
+
...metadata !== void 0 ? { metadata } : {}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const summary = {
|
|
60
|
+
add: added.length,
|
|
61
|
+
modify: modified.length,
|
|
62
|
+
delete: deleted.length,
|
|
63
|
+
total: added.length + modified.length + deleted.length
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
added,
|
|
67
|
+
modified,
|
|
68
|
+
deleted,
|
|
69
|
+
unchanged,
|
|
70
|
+
summary,
|
|
71
|
+
format(opts) {
|
|
72
|
+
return formatDiff(opts?.detail ?? "full", { added, modified, deleted, summary });
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async function normaliseCandidate(candidate, idKey, filter) {
|
|
77
|
+
const out = /* @__PURE__ */ new Map();
|
|
78
|
+
if (typeof candidate === "object" && candidate !== null && "exportStream" in candidate && typeof candidate.exportStream === "function") {
|
|
79
|
+
for await (const chunk of candidate.exportStream({ granularity: "collection" })) {
|
|
80
|
+
if (filter && !filter.has(chunk.collection)) continue;
|
|
81
|
+
const collection = out.get(chunk.collection) ?? /* @__PURE__ */ new Map();
|
|
82
|
+
for (const record of chunk.records) {
|
|
83
|
+
const id = readIdField(record, idKey);
|
|
84
|
+
if (!id) continue;
|
|
85
|
+
collection.set(id, record);
|
|
86
|
+
}
|
|
87
|
+
out.set(chunk.collection, collection);
|
|
88
|
+
}
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
if (typeof candidate === "string") {
|
|
92
|
+
let parsed;
|
|
93
|
+
try {
|
|
94
|
+
parsed = JSON.parse(candidate);
|
|
95
|
+
} catch (err) {
|
|
96
|
+
throw new Error(
|
|
97
|
+
`diffVault: candidate string is not valid JSON (${err.message})`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
return collectionsFromObject(parsed, idKey, filter);
|
|
101
|
+
}
|
|
102
|
+
return collectionsFromObject(candidate, idKey, filter);
|
|
103
|
+
}
|
|
104
|
+
function collectionsFromObject(raw, idKey, filter) {
|
|
105
|
+
const out = /* @__PURE__ */ new Map();
|
|
106
|
+
if (raw === null || typeof raw !== "object") {
|
|
107
|
+
throw new Error("diffVault: candidate must be a Vault, an object, or a JSON string");
|
|
108
|
+
}
|
|
109
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
110
|
+
if (key.startsWith("_")) continue;
|
|
111
|
+
if (filter && !filter.has(key)) continue;
|
|
112
|
+
if (!Array.isArray(value)) continue;
|
|
113
|
+
const collection = /* @__PURE__ */ new Map();
|
|
114
|
+
for (const record of value) {
|
|
115
|
+
if (record === null || typeof record !== "object") continue;
|
|
116
|
+
const id = readIdField(record, idKey);
|
|
117
|
+
if (!id) continue;
|
|
118
|
+
collection.set(id, record);
|
|
119
|
+
}
|
|
120
|
+
out.set(key, collection);
|
|
121
|
+
}
|
|
122
|
+
return out;
|
|
123
|
+
}
|
|
124
|
+
function uniqueTopLevelKeys(diffs) {
|
|
125
|
+
const keys = /* @__PURE__ */ new Set();
|
|
126
|
+
for (const d of diffs) {
|
|
127
|
+
const m = /^[^.[]+/.exec(d.path);
|
|
128
|
+
if (m) keys.add(m[0]);
|
|
129
|
+
}
|
|
130
|
+
return [...keys];
|
|
131
|
+
}
|
|
132
|
+
function readIdField(record, idKey) {
|
|
133
|
+
if (record === null || typeof record !== "object") return "";
|
|
134
|
+
const v = record[idKey];
|
|
135
|
+
if (typeof v === "string") return v;
|
|
136
|
+
if (typeof v === "number" && Number.isFinite(v)) return String(v);
|
|
137
|
+
return "";
|
|
138
|
+
}
|
|
139
|
+
function formatDiff(detail, b) {
|
|
140
|
+
const head = `${b.summary.add} added \xB7 ${b.summary.modify} modified \xB7 ${b.summary.delete} deleted`;
|
|
141
|
+
if (detail === "count") return head;
|
|
142
|
+
if (b.summary.total === 0) return head + "\n(no changes)";
|
|
143
|
+
if (detail === "one-line") return head;
|
|
144
|
+
const rows = [head, ""];
|
|
145
|
+
for (const e of b.added) rows.push(`${e.collection}/${e.id} added`);
|
|
146
|
+
for (const e of b.modified) {
|
|
147
|
+
const fields = e.fieldDiffs.map((f) => `${f.path}: ${shortJSON(f.from)} \u2192 ${shortJSON(f.to)}`).join(", ");
|
|
148
|
+
rows.push(`${e.collection}/${e.id} modified ${fields}`);
|
|
149
|
+
}
|
|
150
|
+
for (const e of b.deleted) rows.push(`${e.collection}/${e.id} deleted`);
|
|
151
|
+
return rows.join("\n");
|
|
152
|
+
}
|
|
153
|
+
function shortJSON(value) {
|
|
154
|
+
if (value === void 0) return "undefined";
|
|
155
|
+
const s = JSON.stringify(value);
|
|
156
|
+
if (typeof s !== "string") return "<unrepresentable>";
|
|
157
|
+
return s.length > 60 ? s.slice(0, 57) + "..." : s;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export {
|
|
161
|
+
diffVault
|
|
162
|
+
};
|
|
163
|
+
//# sourceMappingURL=chunk-LFUID7OW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-cargo/vault-diff.ts"],"sourcesContent":["/**\n * Vault-level diff orchestrator.\n *\n * Compares a live `Vault`'s plaintext state against a candidate state\n * (another vault, a plain `{ collection: records[] }` map, or a vault\n * dump JSON) and returns a structured `VaultDiff` plan listing the\n * records that would be added, modified, or deleted to bring the live\n * vault into the candidate's shape.\n *\n * Builds on two existing record-level helpers:\n *\n * 1. `diff(a, b)` from `./history/diff.ts` — emits dot-pathed\n * `DiffEntry[]` with `type: 'added' | 'removed' | 'changed'` for\n * each changed field of two records. Used here for the\n * `fieldDiffs` of every `modified` entry, and (with empty result)\n * as the default deep-equal check.\n *\n * 2. `Vault.exportStream()` from `./vault.ts` — the canonical\n * decrypt-and-stream-records iterator. Used to walk both sides\n * when the candidate is itself a `Vault`. ACL-scoped: collections\n * the caller can't read silently drop out, the same way every\n * other plaintext-emitting export pipeline filters them.\n *\n * The new orchestration is the **vault-level** enumeration: bucket\n * each record id into added (only in candidate), deleted (only in\n * vault), or modified (in both with field changes); leave the\n * field-level granularity to the existing `diff()`.\n *\n * Use cases:\n *\n * - Import preview (`@noy-db/as-*` `fromString` returns a plan\n * whose body is a `VaultDiff`).\n * - Backup verification (\"does this `.noydb` bundle from yesterday\n * match the current vault?\").\n * - Two-vault reconciliation (\"what's different between Office A\n * and Office B before we sync?\").\n * - Test assertions (golden-file testing with one-liner\n * `expect(plan.summary).toEqual(...)`).\n *\n * @module\n */\n\nimport type { Vault } from '../kernel/vault.js'\nimport { diff as fieldDiff, type DiffEntry as FieldDiffEntry } from '../with-commit/history/diff.js'\n\n// ─── Public types ──────────────────────────────────────────────────────\n\n/** Per-record entry shape — added and deleted records carry only the record value. */\nexport interface VaultDiffEntry<T = unknown> {\n readonly collection: string\n readonly id: string\n readonly record: T\n /**\n * Unencrypted envelope metadata for the RECEIVER-side record.\n * Populated only when `diffVault` is called with `{includeMetadata: true}`.\n * Default: `undefined` (zero extra reads, no behavior change).\n *\n * Populated for `modified` (the CURRENT receiver state, before the candidate\n * is applied) and `deleted` (the receiver envelope of the record being\n * removed). `added` entries have no receiver envelope at diff time, so their\n * `metadata` is always absent.\n */\n readonly metadata?: {\n readonly version: number\n readonly timestamp: string\n readonly by?: string\n readonly source?: string\n readonly sourceTs?: string\n }\n}\n\n/** Modified records carry both halves of the diff plus the field-level breakdown. */\nexport interface VaultDiffModifiedEntry<T = unknown> extends VaultDiffEntry<T> {\n /** The record as it stands in the live vault. */\n readonly before: T\n /** Top-level keys whose values differ between `before` and `record`. */\n readonly fieldsChanged: readonly string[]\n /**\n * Field-level diff entries from `diff(before, record)`. Reuses the\n * existing per-record diff helper so consumers can render git-style\n * `path: from → to` rows without re-walking the records.\n */\n readonly fieldDiffs: readonly FieldDiffEntry[]\n}\n\nexport interface VaultDiff<T = unknown> {\n readonly added: readonly VaultDiffEntry<T>[]\n readonly modified: readonly VaultDiffModifiedEntry<T>[]\n readonly deleted: readonly VaultDiffEntry<T>[]\n /** Only populated when `options.includeUnchanged: true`. */\n readonly unchanged: readonly VaultDiffEntry<T>[] | undefined\n readonly summary: {\n readonly add: number\n readonly modify: number\n readonly delete: number\n readonly total: number\n }\n /**\n * Format the diff as a human-readable string.\n *\n * - `'count'` — one line, just the numbers (`12 added · 3 modified · 0 deleted`)\n * - `'one-line'` — count plus a single overview line\n * - `'full'` — count + one row per added/modified/deleted record (default)\n */\n format(opts?: { detail?: 'count' | 'one-line' | 'full' }): string\n}\n\nexport interface DiffOptions {\n /** Restrict the diff to a subset of collections. */\n readonly collections?: readonly string[]\n /** Field on each record that carries its id. Defaults to `'id'`. */\n readonly idKey?: string\n /** Override the default deep-equal check for \"modified vs unchanged\". */\n readonly compareFn?: (a: unknown, b: unknown) => boolean\n /** If true, include unchanged records in the diff (off by default to save memory). */\n readonly includeUnchanged?: boolean\n /**\n * When `true`, each entry in `added`, `modified`, and `deleted` will carry a\n * `metadata` field with the RECEIVER-side envelope metadata\n * (`version`, `timestamp`, `by?`, `source?`, `sourceTs?`).\n *\n * Off by default — no extra adapter reads, no behavior change for existing callers.\n */\n readonly includeMetadata?: boolean\n}\n\n/**\n * Candidate state to diff the vault against:\n *\n * - A `Vault` instance — both sides are walked via `exportStream()`.\n * - A `Record<collection, records[]>` map — same shape `as-json.toObject()`\n * produces. Useful for diffing parsed file content against the live vault.\n * - A `VaultDump` (output of `vault.dump()`) — a JSON string carrying the\n * full vault state. Parsed and reduced to the map shape above.\n */\nexport type DiffCandidate<T = unknown> =\n | Vault\n | Record<string, readonly T[]>\n | string\n\n// ─── Implementation ────────────────────────────────────────────────────\n\n/**\n * Compute the diff between a live vault and a candidate state.\n *\n * Ungated shared import/merge infrastructure: the `as-*` exporters call this\n * internally from their `fromString`/import merge logic, so it is always\n * available (not behind `withCargo()`). Only `extractPartition` is a gated\n * cargo capability.\n *\n * Returns a fully buffered `VaultDiff` — no streaming. Memory cost is\n * O(n + m) in the row count of vault + candidate. For documented\n * 1K-50K-record vaults this is fine; a streaming variant lands as a\n * follow-up if a > 100K-record consumer arrives.\n */\nexport async function diffVault<T = unknown>(\n vault: Vault,\n candidate: DiffCandidate<T>,\n options: DiffOptions = {},\n): Promise<VaultDiff<T>> {\n const idKey = options.idKey ?? 'id'\n const filter = options.collections ? new Set(options.collections) : null\n const compareFn =\n options.compareFn ?? ((a: unknown, b: unknown) => fieldDiff(a, b).length === 0)\n\n // Side A — walk the live vault via exportStream(). Each chunk arrives\n // already decrypted and ACL-scoped, so collections the caller can't\n // read silently drop out. exportStream's records are typed `unknown[]`\n // — diffVault is the type-erasure boundary; the caller asserts the\n // record shape via the function's `<T>` generic.\n const live = new Map<string, Map<string, T>>()\n for await (const chunk of vault.exportStream({ granularity: 'collection' })) {\n if (filter && !filter.has(chunk.collection)) continue\n const collection = live.get(chunk.collection) ?? new Map<string, T>()\n for (const record of chunk.records) {\n const id = readIdField(record, idKey)\n if (!id) continue\n collection.set(id, record as T)\n }\n live.set(chunk.collection, collection)\n }\n\n // Side B — normalise the candidate into the same shape.\n const cand = await normaliseCandidate<T>(candidate, idKey, filter)\n\n // Walk every (collection, id) on either side and bucket.\n const added: VaultDiffEntry<T>[] = []\n const modified: VaultDiffModifiedEntry<T>[] = []\n const deleted: VaultDiffEntry<T>[] = []\n const unchanged: VaultDiffEntry<T>[] | undefined = options.includeUnchanged ? [] : undefined\n\n const collectionNames = new Set([...live.keys(), ...cand.keys()])\n for (const collection of [...collectionNames].sort()) {\n const liveColl = live.get(collection) ?? new Map<string, T>()\n const candColl = cand.get(collection) ?? new Map<string, T>()\n const allIds = new Set([...liveColl.keys(), ...candColl.keys()])\n\n for (const id of [...allIds].sort()) {\n const before = liveColl.get(id)\n const after = candColl.get(id)\n\n if (before === undefined && after !== undefined) {\n // added: record only in candidate — no receiver envelope\n added.push({ collection, id, record: after })\n } else if (before !== undefined && after === undefined) {\n // deleted: record only in receiver — attach metadata if requested\n const metadata = options.includeMetadata\n ? (await vault.collection(collection).getMetadata(id)) ?? undefined\n : undefined\n deleted.push({ collection, id, record: before, ...(metadata !== undefined ? { metadata } : {}) })\n } else if (before !== undefined && after !== undefined) {\n if (compareFn(before, after)) {\n unchanged?.push({ collection, id, record: after })\n } else {\n // modified: record in both — attach receiver-side metadata if requested\n const metadata = options.includeMetadata\n ? (await vault.collection(collection).getMetadata(id)) ?? undefined\n : undefined\n const fieldDiffs = fieldDiff(before, after)\n const fieldsChanged = uniqueTopLevelKeys(fieldDiffs)\n modified.push({\n collection,\n id,\n record: after,\n before,\n fieldsChanged,\n fieldDiffs,\n ...(metadata !== undefined ? { metadata } : {}),\n })\n }\n }\n }\n }\n\n const summary = {\n add: added.length,\n modify: modified.length,\n delete: deleted.length,\n total: added.length + modified.length + deleted.length,\n }\n\n return {\n added,\n modified,\n deleted,\n unchanged,\n summary,\n format(opts) {\n return formatDiff(opts?.detail ?? 'full', { added, modified, deleted, summary })\n },\n }\n}\n\n// ─── Internals ─────────────────────────────────────────────────────────\n\nasync function normaliseCandidate<T>(\n candidate: DiffCandidate<T>,\n idKey: string,\n filter: Set<string> | null,\n): Promise<Map<string, Map<string, T>>> {\n const out = new Map<string, Map<string, T>>()\n\n // Vault instance — duck-type via the exportStream method (matches\n // vault.ts's structural shape without forcing a runtime instanceof check\n // that would import the class and risk circular deps).\n if (\n typeof candidate === 'object' &&\n candidate !== null &&\n 'exportStream' in candidate &&\n typeof (candidate as Vault).exportStream === 'function'\n ) {\n for await (const chunk of (candidate as Vault).exportStream({ granularity: 'collection' })) {\n if (filter && !filter.has(chunk.collection)) continue\n const collection = out.get(chunk.collection) ?? new Map<string, T>()\n for (const record of chunk.records) {\n const id = readIdField(record, idKey)\n if (!id) continue\n collection.set(id, record as T)\n }\n out.set(chunk.collection, collection)\n }\n return out\n }\n\n // String — assume a vault.dump() JSON string. Parse and reduce to the map shape.\n if (typeof candidate === 'string') {\n let parsed: unknown\n try {\n parsed = JSON.parse(candidate)\n } catch (err) {\n throw new Error(\n `diffVault: candidate string is not valid JSON (${(err as Error).message})`,\n )\n }\n return collectionsFromObject<T>(parsed, idKey, filter)\n }\n\n // Plain object — `Record<collection, records[]>` (same shape as-json.toObject() returns).\n return collectionsFromObject<T>(candidate, idKey, filter)\n}\n\nfunction collectionsFromObject<T>(\n raw: unknown,\n idKey: string,\n filter: Set<string> | null,\n): Map<string, Map<string, T>> {\n const out = new Map<string, Map<string, T>>()\n if (raw === null || typeof raw !== 'object') {\n throw new Error('diffVault: candidate must be a Vault, an object, or a JSON string')\n }\n // A vault dump JSON has a top-level shape like { _compartment, _keyring, <coll>: <records[]> }.\n // We accept both: keys starting with `_` are skipped (they're metadata), the rest are collections.\n for (const [key, value] of Object.entries(raw)) {\n if (key.startsWith('_')) continue\n if (filter && !filter.has(key)) continue\n if (!Array.isArray(value)) continue\n const collection = new Map<string, T>()\n for (const record of value as readonly T[]) {\n if (record === null || typeof record !== 'object') continue\n const id = readIdField(record, idKey)\n if (!id) continue\n collection.set(id, record)\n }\n out.set(key, collection)\n }\n return out\n}\n\nfunction uniqueTopLevelKeys(diffs: readonly FieldDiffEntry[]): readonly string[] {\n const keys = new Set<string>()\n for (const d of diffs) {\n // path is dot-separated; the top-level key is everything before the\n // first `.` or `[`. (`a.b.c` → `a`, `tags[0]` → `tags`, `(root)` → `(root)`).\n const m = /^[^.[]+/.exec(d.path)\n if (m) keys.add(m[0])\n }\n return [...keys]\n}\n\n/**\n * Pull the id field off a record without going through `String(obj)`,\n * which would emit `[object Object]` for nested objects and silently\n * collapse rows that share the same parent. Only string and number ids\n * are accepted; anything else returns the empty string and the record\n * is skipped at the call site.\n */\nfunction readIdField(record: unknown, idKey: string): string {\n if (record === null || typeof record !== 'object') return ''\n const v = (record as Record<string, unknown>)[idKey]\n if (typeof v === 'string') return v\n if (typeof v === 'number' && Number.isFinite(v)) return String(v)\n return ''\n}\n\ninterface FormatBuckets<T> {\n readonly added: readonly VaultDiffEntry<T>[]\n readonly modified: readonly VaultDiffModifiedEntry<T>[]\n readonly deleted: readonly VaultDiffEntry<T>[]\n readonly summary: VaultDiff<T>['summary']\n}\n\nfunction formatDiff<T>(\n detail: 'count' | 'one-line' | 'full',\n b: FormatBuckets<T>,\n): string {\n const head = `${b.summary.add} added · ${b.summary.modify} modified · ${b.summary.delete} deleted`\n if (detail === 'count') return head\n if (b.summary.total === 0) return head + '\\n(no changes)'\n if (detail === 'one-line') return head\n\n const rows: string[] = [head, '']\n for (const e of b.added) rows.push(`${e.collection}/${e.id}\\tadded`)\n for (const e of b.modified) {\n const fields = e.fieldDiffs\n .map((f) => `${f.path}: ${shortJSON(f.from)} → ${shortJSON(f.to)}`)\n .join(', ')\n rows.push(`${e.collection}/${e.id}\\tmodified\\t${fields}`)\n }\n for (const e of b.deleted) rows.push(`${e.collection}/${e.id}\\tdeleted`)\n return rows.join('\\n')\n}\n\nfunction shortJSON(value: unknown): string {\n if (value === undefined) return 'undefined'\n const s = JSON.stringify(value)\n // JSON.stringify returns string for any JSON value except `undefined`\n // (handled above), `function`, and `symbol`. Fall back to a static\n // tag for those — never let an arbitrary object hit the default\n // stringifier (which the lint rule explicitly bans).\n if (typeof s !== 'string') return '<unrepresentable>'\n return s.length > 60 ? s.slice(0, 57) + '...' : s\n}\n"],"mappings":"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","names":[]}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-LP7BEXCT.js";
|
|
6
6
|
import {
|
|
7
7
|
bufferToBase64
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-W5LHQXZU.js";
|
|
9
9
|
|
|
10
10
|
// src/kernel/enclave/classify/bidx.ts
|
|
11
11
|
var subtle = globalThis.crypto.subtle;
|
|
@@ -66,4 +66,4 @@ export {
|
|
|
66
66
|
mintBidxTag,
|
|
67
67
|
computeBidxTarget
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=chunk-
|
|
69
|
+
//# sourceMappingURL=chunk-LKFKXS5K.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadVaultPolicy,
|
|
3
3
|
saveVaultPolicy
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PQ6Z2TAP.js";
|
|
5
5
|
import {
|
|
6
6
|
PolicyDeniedError,
|
|
7
7
|
ValidationError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JBIV4FLR.js";
|
|
9
9
|
|
|
10
10
|
// src/with-party/policy/presets.ts
|
|
11
11
|
var PERSONAL_POLICY = Object.freeze({
|
|
@@ -364,4 +364,4 @@ export {
|
|
|
364
364
|
describeGate,
|
|
365
365
|
createNoydbPolicy
|
|
366
366
|
};
|
|
367
|
-
//# sourceMappingURL=chunk-
|
|
367
|
+
//# sourceMappingURL=chunk-LR4Z47QD.js.map
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
buildRecordAad,
|
|
6
6
|
openEnvelopeJson
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2LPVI4PX.js";
|
|
8
8
|
import {
|
|
9
9
|
buildRecordEnvelope
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-N4CNVSUF.js";
|
|
11
11
|
import {
|
|
12
12
|
encrypt
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W5LHQXZU.js";
|
|
14
14
|
|
|
15
15
|
// src/with-audit/consent/consent.ts
|
|
16
16
|
var CONSENT_AUDIT_COLLECTION = "_consent_audit";
|
|
@@ -66,4 +66,4 @@ export {
|
|
|
66
66
|
writeConsentEntry,
|
|
67
67
|
loadConsentEntries
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=chunk-
|
|
69
|
+
//# sourceMappingURL=chunk-MTBXJAS4.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NOYDB_FORMAT_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RK7N4OQ5.js";
|
|
4
4
|
|
|
5
5
|
// src/kernel/enclave/record-envelope.ts
|
|
6
6
|
function buildRecordEnvelope(identity, body) {
|
|
@@ -63,4 +63,4 @@ export {
|
|
|
63
63
|
isDeleteMarker,
|
|
64
64
|
buildDeleteMarker
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-N4CNVSUF.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IllegalTransitionError,
|
|
3
3
|
RecordLockedError,
|
|
4
4
|
ValidationError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JBIV4FLR.js";
|
|
6
6
|
|
|
7
7
|
// src/with-audit/guards/with-guard.ts
|
|
8
8
|
function withGuard(strategy) {
|
|
@@ -124,4 +124,4 @@ export {
|
|
|
124
124
|
immutableGuard,
|
|
125
125
|
transitionGuard
|
|
126
126
|
};
|
|
127
|
-
//# sourceMappingURL=chunk-
|
|
127
|
+
//# sourceMappingURL=chunk-NLKLXXTO.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ValidationError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JBIV4FLR.js";
|
|
4
4
|
|
|
5
5
|
// src/with-formula/overlay-views/with-overlayed-view.ts
|
|
6
6
|
function withOverlayedView(spec) {
|
|
@@ -33,4 +33,4 @@ function withOverlayedView(spec) {
|
|
|
33
33
|
export {
|
|
34
34
|
withOverlayedView
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-OPXR4PB2.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SCHEMAS_COLLECTION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YXA2TCTZ.js";
|
|
4
4
|
import {
|
|
5
5
|
assemblePodContainer,
|
|
6
6
|
buildExtractedPartitionWrapper
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6FOGTKBY.js";
|
|
8
8
|
import {
|
|
9
9
|
BLOB_CHUNKS_COLLECTION,
|
|
10
10
|
BLOB_COLLECTION,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
BLOB_INTENT_COLLECTION,
|
|
13
13
|
BLOB_SLOTS_PREFIX,
|
|
14
14
|
BLOB_VERSIONS_PREFIX
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ALB64CZM.js";
|
|
16
16
|
import {
|
|
17
17
|
generateULID
|
|
18
18
|
} from "./chunk-4AOERLTV.js";
|
|
@@ -23,16 +23,16 @@ import {
|
|
|
23
23
|
canonicalJson,
|
|
24
24
|
envelopePayloadHash,
|
|
25
25
|
hashEntry
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RC4BROYR.js";
|
|
27
27
|
import {
|
|
28
28
|
buildRecordAad,
|
|
29
29
|
openEnvelopeJson,
|
|
30
30
|
recordAadFor,
|
|
31
31
|
writeEnvelopeBody
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-2LPVI4PX.js";
|
|
33
33
|
import {
|
|
34
34
|
buildRecordEnvelope
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-N4CNVSUF.js";
|
|
36
36
|
import {
|
|
37
37
|
bufferToBase64,
|
|
38
38
|
decrypt,
|
|
@@ -42,13 +42,13 @@ import {
|
|
|
42
42
|
generateDEK,
|
|
43
43
|
unwrapCek,
|
|
44
44
|
wrapCek
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-W5LHQXZU.js";
|
|
46
46
|
import {
|
|
47
47
|
NOYDB_BACKUP_VERSION
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-RK7N4OQ5.js";
|
|
49
49
|
import {
|
|
50
50
|
PartitionExtractionError
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-JBIV4FLR.js";
|
|
52
52
|
|
|
53
53
|
// src/with-cargo/walk-closure.ts
|
|
54
54
|
async function walkClosure(vault, opts) {
|
|
@@ -494,4 +494,4 @@ export {
|
|
|
494
494
|
extractPartition,
|
|
495
495
|
extractPartitionCore
|
|
496
496
|
};
|
|
497
|
-
//# sourceMappingURL=chunk-
|
|
497
|
+
//# sourceMappingURL=chunk-OWLVBOWO.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-Y2NBBT6K.js";
|
|
4
4
|
import {
|
|
5
5
|
sha256Hex
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W5LHQXZU.js";
|
|
7
7
|
|
|
8
8
|
// src/with-shape/persisted-schemas/derive.ts
|
|
9
9
|
function isZodSchema(value) {
|
|
@@ -79,4 +79,4 @@ export {
|
|
|
79
79
|
isZod4Schema,
|
|
80
80
|
derivePersistedSchema
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-P6ASQOZR.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PERIODS_COLLECTION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z7ZXZL6Y.js";
|
|
4
4
|
import {
|
|
5
5
|
canonicalJson,
|
|
6
6
|
sha256Hex
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RC4BROYR.js";
|
|
8
8
|
import {
|
|
9
9
|
isDeleteMarker
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-N4CNVSUF.js";
|
|
11
11
|
import {
|
|
12
12
|
PeriodClosedError,
|
|
13
13
|
ValidationError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JBIV4FLR.js";
|
|
15
15
|
|
|
16
16
|
// src/with-audit/periods/periods.ts
|
|
17
17
|
function resolveReopenState(events) {
|
|
@@ -124,7 +124,7 @@ function validatePeriodName(name, existing, partition) {
|
|
|
124
124
|
}
|
|
125
125
|
async function appendPeriodLedgerEntry(ledger, actor, envelope, name, collection = PERIODS_COLLECTION) {
|
|
126
126
|
if (!ledger) return;
|
|
127
|
-
const { envelopePayloadHash } = await import("./ledger-
|
|
127
|
+
const { envelopePayloadHash } = await import("./ledger-T5K4P2D7.js");
|
|
128
128
|
await ledger.append({
|
|
129
129
|
op: "put",
|
|
130
130
|
collection,
|
|
@@ -198,4 +198,4 @@ export {
|
|
|
198
198
|
purgeMarkersOn,
|
|
199
199
|
withPeriods
|
|
200
200
|
};
|
|
201
|
-
//# sourceMappingURL=chunk-
|
|
201
|
+
//# sourceMappingURL=chunk-PCQDY6QN.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-5D2ALSM5.js";
|
|
4
4
|
import {
|
|
5
5
|
RecordCodec
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2LPVI4PX.js";
|
|
7
7
|
|
|
8
8
|
// src/with-formula/materialized-views/stale.ts
|
|
9
|
-
var loadMVExecutor = lazy(() => import("./executor-
|
|
9
|
+
var loadMVExecutor = lazy(() => import("./executor-3KFRQETS.js"));
|
|
10
10
|
var _staleByRegistry = /* @__PURE__ */ new WeakMap();
|
|
11
11
|
function markMVStale(registry, mvName) {
|
|
12
12
|
let set = _staleByRegistry.get(registry);
|
|
@@ -134,4 +134,4 @@ export {
|
|
|
134
134
|
clearMVStale,
|
|
135
135
|
clearMVStaleFully
|
|
136
136
|
};
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-PGFKIOR3.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TierWriteRefusedError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JBIV4FLR.js";
|
|
4
4
|
|
|
5
5
|
// src/kernel/tier-visibility.ts
|
|
6
6
|
async function peekLiveTier(adapter, vault, name, id) {
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
dekKey,
|
|
50
50
|
parseDekKey
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
52
|
+
//# sourceMappingURL=chunk-POS53FG6.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildRecordEnvelope
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N4CNVSUF.js";
|
|
4
4
|
|
|
5
5
|
// src/with-party/policy/storage.ts
|
|
6
6
|
var META_COLLECTION = "_meta";
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
loadVaultPolicy,
|
|
37
37
|
saveVaultPolicy
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-PQ6Z2TAP.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validateProjectionLegs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4ZPE6SKS.js";
|
|
4
4
|
import {
|
|
5
5
|
MaterializedViewConfigError,
|
|
6
6
|
ValidationError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JBIV4FLR.js";
|
|
8
8
|
|
|
9
9
|
// src/with-formula/materialized-views/with-materialized-view.ts
|
|
10
10
|
function withMaterializedView(spec) {
|
|
@@ -181,4 +181,4 @@ function withMaterializedView(spec) {
|
|
|
181
181
|
export {
|
|
182
182
|
withMaterializedView
|
|
183
183
|
};
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-PUJTKLPL.js.map
|
|
@@ -2,33 +2,33 @@ import {
|
|
|
2
2
|
isCollectLeg,
|
|
3
3
|
resolveLegOwner,
|
|
4
4
|
wrapDbWithPredicates
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4ZPE6SKS.js";
|
|
6
6
|
import {
|
|
7
7
|
canonicalizeMoneyFieldsAsDecimal,
|
|
8
8
|
decodeMoneyFields,
|
|
9
9
|
exactMath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TOV6VMHF.js";
|
|
11
11
|
import {
|
|
12
12
|
putDerivedOutput
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VTG7327U.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_JOIN_MAX_ROWS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XSN63FUS.js";
|
|
17
17
|
import {
|
|
18
18
|
groupAndReduce
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4G25SDQL.js";
|
|
20
20
|
import {
|
|
21
21
|
canonicalGroupKey
|
|
22
22
|
} from "./chunk-XZHEOSQ2.js";
|
|
23
23
|
import {
|
|
24
24
|
applyI18nLocale
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-X67FCULK.js";
|
|
26
26
|
import {
|
|
27
27
|
JoinTooLargeError,
|
|
28
28
|
LocaleNotSpecifiedError,
|
|
29
29
|
MaterializedViewConfigError,
|
|
30
30
|
MaterializedViewTooLargeError
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JBIV4FLR.js";
|
|
32
32
|
|
|
33
33
|
// src/with-formula/materialized-views/executor.ts
|
|
34
34
|
var DEFAULT_MAX_ROWS = 1e5;
|
|
@@ -342,4 +342,4 @@ async function listOutputIds(outputColl) {
|
|
|
342
342
|
export {
|
|
343
343
|
MaterializedViewExecutor
|
|
344
344
|
};
|
|
345
|
-
//# sourceMappingURL=chunk-
|
|
345
|
+
//# sourceMappingURL=chunk-QGJ4XIA7.js.map
|
|
@@ -3,22 +3,22 @@ import {
|
|
|
3
3
|
} from "./chunk-EPFF7LOX.js";
|
|
4
4
|
import {
|
|
5
5
|
loadFence
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Y6GZ2P4M.js";
|
|
7
7
|
import {
|
|
8
8
|
SCHEMAS_COLLECTION,
|
|
9
9
|
loadPersistedSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YXA2TCTZ.js";
|
|
11
11
|
import {
|
|
12
12
|
canonicalJson,
|
|
13
13
|
sha256Hex
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RC4BROYR.js";
|
|
15
15
|
import {
|
|
16
16
|
openEnvelopeJson,
|
|
17
17
|
writeEnvelopeBody
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2LPVI4PX.js";
|
|
19
19
|
import {
|
|
20
20
|
buildSealedRecordEnvelope
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-N4CNVSUF.js";
|
|
22
22
|
|
|
23
23
|
// src/with-shape/manifest/types.ts
|
|
24
24
|
var MANIFEST_SCHEMA_RECORD_ID = "schema";
|
|
@@ -86,4 +86,4 @@ export {
|
|
|
86
86
|
saveSchemaManifest,
|
|
87
87
|
deriveSchemaManifest
|
|
88
88
|
};
|
|
89
|
-
//# sourceMappingURL=chunk-
|
|
89
|
+
//# sourceMappingURL=chunk-QHJKK77B.js.map
|
|
@@ -7,28 +7,28 @@ import {
|
|
|
7
7
|
deriveSchemaManifest,
|
|
8
8
|
loadSchemaManifestEntry,
|
|
9
9
|
saveSchemaManifest
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QHJKK77B.js";
|
|
11
11
|
import {
|
|
12
12
|
MANIFEST_COLLECTION
|
|
13
13
|
} from "./chunk-EPFF7LOX.js";
|
|
14
14
|
import {
|
|
15
15
|
loadFence,
|
|
16
16
|
saveFence
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Y6GZ2P4M.js";
|
|
18
18
|
import {
|
|
19
19
|
derivePersistedSchema
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-P6ASQOZR.js";
|
|
21
21
|
import {
|
|
22
22
|
loadPersistedSchemaEntry,
|
|
23
23
|
savePersistedSchema
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YXA2TCTZ.js";
|
|
25
25
|
import {
|
|
26
26
|
envelopePayloadHash
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-RC4BROYR.js";
|
|
28
28
|
import {
|
|
29
29
|
ManifestConflictError,
|
|
30
30
|
isConflictError
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JBIV4FLR.js";
|
|
32
32
|
|
|
33
33
|
// src/with-shape/persisted-schemas/field-ids.ts
|
|
34
34
|
var BASE32URL_ALPHABET = "abcdefghijklmnopqrstuvwxyz234567";
|
|
@@ -257,4 +257,4 @@ export {
|
|
|
257
257
|
persistClassifiedMarker,
|
|
258
258
|
persistSatelliteMarker
|
|
259
259
|
};
|
|
260
|
-
//# sourceMappingURL=chunk-
|
|
260
|
+
//# sourceMappingURL=chunk-QI5NWLVW.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
envelopeBodyForHash
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2LPVI4PX.js";
|
|
4
4
|
import {
|
|
5
5
|
sha256Hex
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W5LHQXZU.js";
|
|
7
7
|
|
|
8
8
|
// src/with-commit/history/ledger/entry.ts
|
|
9
9
|
function canonicalJson(value) {
|
|
@@ -67,4 +67,4 @@ export {
|
|
|
67
67
|
parseIndex,
|
|
68
68
|
envelopePayloadHash
|
|
69
69
|
};
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
70
|
+
//# sourceMappingURL=chunk-RC4BROYR.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViaGraph
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5263OEM3.js";
|
|
4
4
|
import {
|
|
5
5
|
sha256Hex
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W5LHQXZU.js";
|
|
7
7
|
import {
|
|
8
8
|
DerivationCycleError,
|
|
9
9
|
DuplicateBehaviorNameError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JBIV4FLR.js";
|
|
11
11
|
|
|
12
12
|
// src/with-formula/derivations/strategy-hash.ts
|
|
13
13
|
async function computeStrategyHash(source, outputKeys, derive, sources) {
|
|
@@ -172,4 +172,4 @@ var DerivationRegistry = class {
|
|
|
172
172
|
export {
|
|
173
173
|
DerivationRegistry
|
|
174
174
|
};
|
|
175
|
-
//# sourceMappingURL=chunk-
|
|
175
|
+
//# sourceMappingURL=chunk-RDHUZ674.js.map
|