@noy-db/hub 0.4.0-pre.9 → 0.5.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/dist/api-M7REIE7H.js +20 -0
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-PTSVXDDW.js → backup-ENTZYW37.js} +11 -11
- package/dist/blobs/index.js +13 -13
- package/dist/broker/index.js +12 -12
- package/dist/cargo/index.js +31 -31
- package/dist/{chunk-6ZNSB3H6.js → chunk-3LYMOSY7.js} +2 -2
- package/dist/{chunk-OLSARBZU.js → chunk-4DGBZEV6.js} +2 -2
- package/dist/{chunk-GP3UWP22.js → chunk-4MSNAB64.js} +4 -4
- package/dist/{chunk-MXUT7FTE.js → chunk-4SG5TOXK.js} +2 -2
- package/dist/{chunk-W66AM5IB.js → chunk-4TXO442D.js} +2 -2
- package/dist/{chunk-MTJLOC3Y.js → chunk-55LKVALY.js} +106 -10
- package/dist/chunk-55LKVALY.js.map +1 -0
- package/dist/{chunk-UADPR6F4.js → chunk-5EKL6BXI.js} +3 -3
- package/dist/{chunk-OW5Y6HA6.js → chunk-5UKUOMO6.js} +417 -202
- package/dist/chunk-5UKUOMO6.js.map +1 -0
- package/dist/{chunk-RZPOZPZU.js → chunk-623QEHDB.js} +8 -8
- package/dist/{chunk-FRMW23UK.js → chunk-653KOQ7A.js} +7 -7
- package/dist/{chunk-WZ3NCMK6.js → chunk-6PFST3FC.js} +5 -5
- package/dist/{chunk-CCDP6EPB.js → chunk-6RDTG6E5.js} +5 -5
- package/dist/{chunk-GZACYEOB.js → chunk-77AEMXFA.js} +1 -1
- package/dist/chunk-77AEMXFA.js.map +1 -0
- package/dist/{chunk-ZFUFAHZ3.js → chunk-7P4LL3JH.js} +4 -4
- package/dist/{chunk-FO6RNKKW.js → chunk-AJAOXFCF.js} +8 -8
- package/dist/chunk-AJAOXFCF.js.map +1 -0
- package/dist/{chunk-L3YYLT4E.js → chunk-ALUVACKT.js} +2 -2
- package/dist/{chunk-QZWTRENR.js → chunk-AR5D76T2.js} +5 -1
- package/dist/chunk-AR5D76T2.js.map +1 -0
- package/dist/{chunk-5DRROK5W.js → chunk-BFG7LD6Z.js} +2 -2
- package/dist/{chunk-OLIWCCFM.js → chunk-CLE3TMIS.js} +2 -2
- package/dist/{chunk-6UBZ6I5Z.js → chunk-DDB626I7.js} +2 -2
- package/dist/{chunk-W3G5REIU.js → chunk-EAN4TAPC.js} +2 -2
- package/dist/{chunk-4JQK3L4V.js → chunk-EBETHILL.js} +2 -2
- package/dist/{chunk-ZWBKDKXC.js → chunk-ECGDJU5R.js} +3 -3
- package/dist/{chunk-VH6SOCXH.js → chunk-EFJAAFBW.js} +2 -2
- package/dist/{chunk-NQSO4UAH.js → chunk-ELJOLQIG.js} +15 -14
- package/dist/chunk-ELJOLQIG.js.map +1 -0
- package/dist/{chunk-N5PLUFH2.js → chunk-F2WWHKO7.js} +5 -5
- package/dist/{chunk-NJ4DYYO5.js → chunk-F5UWVF6Z.js} +2 -2
- package/dist/{chunk-JIDLU57U.js → chunk-FHK6WWUE.js} +3 -3
- package/dist/{chunk-SHEEBRZ4.js → chunk-FT5Y4VSP.js} +2 -2
- package/dist/{chunk-BN4HRYAZ.js → chunk-FUECZSRM.js} +2 -2
- package/dist/{chunk-KPXM4WO6.js → chunk-FZAP4JNC.js} +5 -5
- package/dist/{chunk-TE6LH6J2.js → chunk-G3ORJ3IQ.js} +5 -5
- package/dist/{chunk-KW42W6SV.js → chunk-G7ZIMGPQ.js} +6 -6
- package/dist/{chunk-QJNCB5SK.js → chunk-GIGLOQL7.js} +2 -2
- package/dist/{chunk-TIVK6PRK.js → chunk-GTQF32TP.js} +7 -7
- package/dist/{chunk-JYJFGD2H.js → chunk-GYJRDALN.js} +2 -2
- package/dist/{chunk-MANUDU7I.js → chunk-HGDXJVK2.js} +6 -6
- package/dist/{chunk-C25JXSOR.js → chunk-IHYSIPEK.js} +8 -8
- package/dist/{chunk-5GQEU4DN.js → chunk-IJV56FWY.js} +2 -2
- package/dist/{chunk-XIDQKFZF.js → chunk-IM2KST7E.js} +3 -3
- package/dist/{chunk-IMRB2C4O.js → chunk-IQ423YMK.js} +3 -3
- package/dist/{chunk-WO4T4OD5.js → chunk-J7YVY7TW.js} +2 -2
- package/dist/{chunk-Y6VZQGGH.js → chunk-JLBCK7XM.js} +9 -9
- package/dist/chunk-JLBCK7XM.js.map +1 -0
- package/dist/{chunk-Y6B6HVKC.js → chunk-K5OFKXUG.js} +42 -18
- package/dist/chunk-K5OFKXUG.js.map +1 -0
- package/dist/{chunk-SGQ4N5FS.js → chunk-KDWBVCIX.js} +5 -5
- package/dist/{chunk-6L3DKWRY.js → chunk-KJNMTE2W.js} +6 -6
- package/dist/{chunk-NFZGZ4AK.js → chunk-L67H6FAQ.js} +2 -2
- package/dist/{chunk-DGBIHDVK.js → chunk-LQVRK2XJ.js} +5 -5
- package/dist/{chunk-MHMLXJ3I.js → chunk-LXRVTJ5D.js} +2 -2
- package/dist/{chunk-2NMEGSFV.js → chunk-MDRCEA56.js} +11 -11
- package/dist/{chunk-KRCBZYTZ.js → chunk-MFW466PX.js} +4 -4
- package/dist/{chunk-RO5NM6UI.js → chunk-MGXUAID4.js} +2 -2
- package/dist/{chunk-NEX7JCMO.js → chunk-MPW6AHTC.js} +4 -4
- package/dist/{chunk-35NMVJ7I.js → chunk-MYSNNMJ3.js} +3 -3
- package/dist/{chunk-JYV4JJV2.js → chunk-NG4AQIYJ.js} +5 -5
- package/dist/{chunk-BLBAQRBM.js → chunk-NIKQQXI2.js} +2 -2
- package/dist/{chunk-55LX6FSX.js → chunk-NJHQE4LT.js} +2 -2
- package/dist/{chunk-SKM35Y4Q.js → chunk-NMYH55MW.js} +4 -4
- package/dist/{chunk-NGSJZFGL.js → chunk-NWK6SVBM.js} +87 -25
- package/dist/chunk-NWK6SVBM.js.map +1 -0
- package/dist/{chunk-DZAF24PG.js → chunk-NZEGQWQ5.js} +5 -5
- package/dist/{chunk-FMNU7IUG.js → chunk-ODCEOSJF.js} +3 -3
- package/dist/{chunk-NYEFP7DY.js → chunk-OKBNFUUX.js} +2 -2
- package/dist/{chunk-SGDPRCC4.js → chunk-OKRXXFZZ.js} +3 -3
- package/dist/{chunk-IG6KUWBX.js → chunk-P6UIVLZK.js} +2 -2
- package/dist/{chunk-V6UQZA2H.js → chunk-PKBONLCP.js} +2 -2
- package/dist/{chunk-MSMJJB4J.js → chunk-PTSVGKSR.js} +2 -2
- package/dist/{chunk-IXNCZTWA.js → chunk-PWEMRXPO.js} +2 -2
- package/dist/{chunk-PTHKZWEH.js → chunk-PZRYKOKP.js} +2 -2
- package/dist/{chunk-56IIVAEO.js → chunk-Q2SEJMP2.js} +2 -2
- package/dist/{chunk-OBPVWOSQ.js → chunk-Q6MXHDSE.js} +4 -4
- package/dist/{chunk-6R6Q3MRN.js → chunk-QITP2JGX.js} +7 -7
- package/dist/{chunk-WBKZUO5V.js → chunk-QMCWYN6O.js} +3 -3
- package/dist/{chunk-4ZKNC6A6.js → chunk-QQL6XPPG.js} +2 -2
- package/dist/{chunk-TG634KCO.js → chunk-QTMZDMJ6.js} +2 -2
- package/dist/{chunk-AT2JJEKJ.js → chunk-RM4FIXY2.js} +4 -4
- package/dist/{chunk-AKKRXT23.js → chunk-RPWMDIGK.js} +2 -2
- package/dist/{chunk-EBKCYQ2D.js → chunk-RQILGK3N.js} +9 -9
- package/dist/chunk-RQILGK3N.js.map +1 -0
- package/dist/{chunk-EZNTORXE.js → chunk-SBGXQK5I.js} +2 -2
- package/dist/chunk-SBGXQK5I.js.map +1 -0
- package/dist/{chunk-3XKESW5E.js → chunk-SL3PLML2.js} +3 -3
- package/dist/{chunk-BYFXLDVV.js → chunk-TJOUKMWF.js} +9 -9
- package/dist/{chunk-QD46HPZG.js → chunk-U2ID5A2I.js} +2 -2
- package/dist/{chunk-X4MVWPHV.js → chunk-UC5Y7OEJ.js} +3 -3
- package/dist/chunk-US2AR4BI.js +25 -0
- package/dist/chunk-US2AR4BI.js.map +1 -0
- package/dist/{chunk-ISRKW4YN.js → chunk-V3EGXDFN.js} +3 -3
- package/dist/{chunk-KFRPNHWR.js → chunk-V4O6YZSP.js} +4 -4
- package/dist/{chunk-3HUYRN24.js → chunk-W7C7MMIS.js} +3 -3
- package/dist/{chunk-BXHMZ2XW.js → chunk-WFYKIDCS.js} +51 -22
- package/dist/chunk-WFYKIDCS.js.map +1 -0
- package/dist/{chunk-6M2I3DKF.js → chunk-WK7ULBTP.js} +2 -2
- package/dist/{chunk-HFUAFR6B.js → chunk-XID22NOA.js} +6 -6
- package/dist/{chunk-E23UGFVC.js → chunk-XVK7TULT.js} +2 -2
- package/dist/{chunk-IF6WNGAK.js → chunk-XX7YB5BI.js} +5 -5
- package/dist/{chunk-ZTLOXFPB.js → chunk-Y2PTKKIN.js} +2 -2
- package/dist/{chunk-QADFHRQM.js → chunk-YA7Y3EZP.js} +10 -10
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-EOOSMWFC.js → classified-marker-ZALWKOBC.js} +3 -3
- package/dist/collection-facade-KI53O6QB.js +45 -0
- package/dist/{computed-AB45PS4V.js → computed-YOQCGUCS.js} +3 -3
- package/dist/consent/index.js +9 -9
- package/dist/cover/index.js +3 -3
- package/dist/custody/index.js +11 -11
- package/dist/{dead-filter-6DYY7S64.js → dead-filter-6DVWST6U.js} +2 -2
- package/dist/debug/index.js +29 -0
- package/dist/debug/index.js.map +1 -0
- package/dist/{delegation-ONOZVPIP.js → delegation-WMO3Q3O5.js} +10 -10
- package/dist/derivations/index.js +12 -12
- package/dist/derive-P2NXWUNB.js +22 -0
- package/dist/directory/index.js +10 -10
- package/dist/{dispatch-7T45NN7C.js → dispatch-TKV4UCKB.js} +18 -18
- package/dist/{dispatch-RPTLK7LJ.js → dispatch-VNR3TLBX.js} +5 -5
- package/dist/{enclave-CLJVSDFG.js → enclave-YWP3QAIQ.js} +9 -9
- package/dist/executor-M4ZZNX6S.js +28 -0
- package/dist/executor-TI64S4LE.js +9 -0
- package/dist/executor-YBK3I2OT.js +9 -0
- package/dist/export-accessible-GBLYLGW4.js +23 -0
- package/dist/extract-partition-SFV35U2R.js +38 -0
- package/dist/{fanout-sidecar-TV7CXAJ6.js → fanout-sidecar-WYXO6QQT.js} +9 -9
- package/dist/find-HUSSZRBR.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +5 -5
- package/dist/history/index.js +12 -12
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +8 -8
- package/dist/index.js +188 -134
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/introspection/index.js +11 -11
- package/dist/issue-6TIJYWKS.js +19 -0
- package/dist/kernel/collection-config.d.ts +4 -0
- package/dist/kernel/collection.d.ts +113 -8
- package/dist/kernel/debug.d.ts +11 -0
- package/dist/kernel/errors.d.ts +15 -0
- package/dist/kernel/noydb.d.ts +3 -3
- package/dist/kernel/prepared-write.d.ts +70 -0
- package/dist/kernel/put-many-atomic.d.ts +45 -0
- package/dist/kernel/sync-policy.d.ts +75 -3
- package/dist/kernel/types.d.ts +27 -8
- package/dist/kernel/vault.d.ts +14 -0
- package/dist/{ledger-XY6NP3J2.js → ledger-BLYDYRTQ.js} +11 -11
- package/dist/liberate-TSOW7IG5.js +24 -0
- package/dist/{link-set-POQB7BU5.js → link-set-7F5ZPDEB.js} +11 -11
- package/dist/materialized-views/index.js +19 -19
- package/dist/money/index.js +3 -3
- package/dist/noydb-KFN6M6UJ.js +81 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +13 -13
- package/dist/pod/index.js +11 -11
- package/dist/policy/index.js +4 -4
- package/dist/port/with/strategies.d.ts +1 -1
- package/dist/port/with/write-hooks.d.ts +6 -0
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-URQANI3B.js → post-register-PQSY544J.js} +6 -6
- package/dist/query/index.js +3 -3
- package/dist/reduce/index.js +4 -4
- package/dist/register-S3ECUZPV.js +25 -0
- package/dist/registry-FZOHKUME.js +18 -0
- package/dist/registry-RISV7IDZ.js +19 -0
- package/dist/registry-ZE35A7WC.js +9 -0
- package/dist/request-withdrawal-KXVTQKR5.js +31 -0
- package/dist/{reveal-BXZGWIOP.js → reveal-HY7DZST4.js} +6 -6
- package/dist/revoke-J473JJ22.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-F7YYQTRC.js → seed-ALU3BHFS.js} +15 -15
- package/dist/seed-ALU3BHFS.js.map +1 -0
- package/dist/sequence/index.js +9 -9
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-XLUKCCH3.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/{stale-JOE7GBAE.js → stale-U3WO5MYN.js} +10 -10
- package/dist/storage-IQONEOYY.js +23 -0
- package/dist/{store-coordination-provider-5LX2UFU2.js → store-coordination-provider-AHGFEMFA.js} +3 -3
- package/dist/sync/index.js +14 -15
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +14 -36
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -1
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/{verify-7XWHJWUN.js → verify-JEIXSK5U.js} +5 -5
- package/dist/walk-BF36V4SR.js +21 -0
- package/dist/with-commit/tx/atomic-eligibility.d.ts +49 -0
- package/dist/with-commit/tx/transaction.d.ts +22 -9
- package/dist/with-party/broker/seed.d.ts +1 -1
- package/dist/with-party/team/index.d.ts +0 -5
- package/dist/{with-party/team/sync-active.d.ts → with-sync/active.d.ts} +1 -1
- package/dist/{with-party/team/sync-credentials.d.ts → with-sync/credentials.d.ts} +3 -3
- package/dist/{with-party/team/sync.d.ts → with-sync/engine.d.ts} +18 -5
- package/dist/{with-party/sync → with-sync}/index.d.ts +3 -3
- package/dist/{with-party/team/sync-period-scope.d.ts → with-sync/period-scope.d.ts} +2 -2
- package/dist/{with-party/team → with-sync}/presence.d.ts +2 -2
- package/dist/{with-party/team/sync-strategy.d.ts → with-sync/strategy.d.ts} +6 -6
- package/dist/{with-party/team/sync-transaction.d.ts → with-sync/transaction.d.ts} +3 -3
- package/dist/withdraw-accessible-TYTA23XH.js +28 -0
- package/package.json +8 -4
- package/dist/api-3NKVNZPM.js +0 -20
- package/dist/chunk-BXHMZ2XW.js.map +0 -1
- package/dist/chunk-EBKCYQ2D.js.map +0 -1
- package/dist/chunk-EP5L47XV.js +0 -22
- package/dist/chunk-EP5L47XV.js.map +0 -1
- package/dist/chunk-EZNTORXE.js.map +0 -1
- package/dist/chunk-FO6RNKKW.js.map +0 -1
- package/dist/chunk-GZACYEOB.js.map +0 -1
- package/dist/chunk-MTJLOC3Y.js.map +0 -1
- package/dist/chunk-NGSJZFGL.js.map +0 -1
- package/dist/chunk-NQSO4UAH.js.map +0 -1
- package/dist/chunk-OW5Y6HA6.js.map +0 -1
- package/dist/chunk-QZWTRENR.js.map +0 -1
- package/dist/chunk-SHYIA73K.js +0 -99
- package/dist/chunk-SHYIA73K.js.map +0 -1
- package/dist/chunk-Y6B6HVKC.js.map +0 -1
- package/dist/chunk-Y6VZQGGH.js.map +0 -1
- package/dist/collection-facade-TTRF5NFJ.js +0 -45
- package/dist/derive-IGGVSUPH.js +0 -22
- package/dist/executor-IEBLTBCW.js +0 -9
- package/dist/executor-RM7XWQDU.js +0 -9
- package/dist/executor-XZYM4KHT.js +0 -28
- package/dist/export-accessible-24XCCD3A.js +0 -23
- package/dist/extract-partition-H2TPEEOF.js +0 -38
- package/dist/find-OZMTRIK3.js +0 -11
- package/dist/issue-55HJE7JF.js +0 -19
- package/dist/liberate-LXOJ2EMB.js +0 -24
- package/dist/noydb-MGPOYDOD.js +0 -82
- package/dist/register-5W6CG4RM.js +0 -25
- package/dist/registry-7Y5WF7GS.js +0 -9
- package/dist/registry-MCSGBZXI.js +0 -18
- package/dist/registry-UJFP3NWF.js +0 -19
- package/dist/request-withdrawal-IWYDM4SO.js +0 -31
- package/dist/revoke-TINYPHYY.js +0 -24
- package/dist/seed-F7YYQTRC.js.map +0 -1
- package/dist/signer-WMZKCNKC.js +0 -25
- package/dist/storage-B3WBKXKT.js +0 -23
- package/dist/walk-6OHAWGBS.js +0 -21
- package/dist/withdraw-accessible-DEUCOO4F.js +0 -28
- /package/dist/{api-3NKVNZPM.js.map → api-M7REIE7H.js.map} +0 -0
- /package/dist/{backup-PTSVXDDW.js.map → backup-ENTZYW37.js.map} +0 -0
- /package/dist/{chunk-6ZNSB3H6.js.map → chunk-3LYMOSY7.js.map} +0 -0
- /package/dist/{chunk-OLSARBZU.js.map → chunk-4DGBZEV6.js.map} +0 -0
- /package/dist/{chunk-GP3UWP22.js.map → chunk-4MSNAB64.js.map} +0 -0
- /package/dist/{chunk-MXUT7FTE.js.map → chunk-4SG5TOXK.js.map} +0 -0
- /package/dist/{chunk-W66AM5IB.js.map → chunk-4TXO442D.js.map} +0 -0
- /package/dist/{chunk-UADPR6F4.js.map → chunk-5EKL6BXI.js.map} +0 -0
- /package/dist/{chunk-RZPOZPZU.js.map → chunk-623QEHDB.js.map} +0 -0
- /package/dist/{chunk-FRMW23UK.js.map → chunk-653KOQ7A.js.map} +0 -0
- /package/dist/{chunk-WZ3NCMK6.js.map → chunk-6PFST3FC.js.map} +0 -0
- /package/dist/{chunk-CCDP6EPB.js.map → chunk-6RDTG6E5.js.map} +0 -0
- /package/dist/{chunk-ZFUFAHZ3.js.map → chunk-7P4LL3JH.js.map} +0 -0
- /package/dist/{chunk-L3YYLT4E.js.map → chunk-ALUVACKT.js.map} +0 -0
- /package/dist/{chunk-5DRROK5W.js.map → chunk-BFG7LD6Z.js.map} +0 -0
- /package/dist/{chunk-OLIWCCFM.js.map → chunk-CLE3TMIS.js.map} +0 -0
- /package/dist/{chunk-6UBZ6I5Z.js.map → chunk-DDB626I7.js.map} +0 -0
- /package/dist/{chunk-W3G5REIU.js.map → chunk-EAN4TAPC.js.map} +0 -0
- /package/dist/{chunk-4JQK3L4V.js.map → chunk-EBETHILL.js.map} +0 -0
- /package/dist/{chunk-ZWBKDKXC.js.map → chunk-ECGDJU5R.js.map} +0 -0
- /package/dist/{chunk-VH6SOCXH.js.map → chunk-EFJAAFBW.js.map} +0 -0
- /package/dist/{chunk-N5PLUFH2.js.map → chunk-F2WWHKO7.js.map} +0 -0
- /package/dist/{chunk-NJ4DYYO5.js.map → chunk-F5UWVF6Z.js.map} +0 -0
- /package/dist/{chunk-JIDLU57U.js.map → chunk-FHK6WWUE.js.map} +0 -0
- /package/dist/{chunk-SHEEBRZ4.js.map → chunk-FT5Y4VSP.js.map} +0 -0
- /package/dist/{chunk-BN4HRYAZ.js.map → chunk-FUECZSRM.js.map} +0 -0
- /package/dist/{chunk-KPXM4WO6.js.map → chunk-FZAP4JNC.js.map} +0 -0
- /package/dist/{chunk-TE6LH6J2.js.map → chunk-G3ORJ3IQ.js.map} +0 -0
- /package/dist/{chunk-KW42W6SV.js.map → chunk-G7ZIMGPQ.js.map} +0 -0
- /package/dist/{chunk-QJNCB5SK.js.map → chunk-GIGLOQL7.js.map} +0 -0
- /package/dist/{chunk-TIVK6PRK.js.map → chunk-GTQF32TP.js.map} +0 -0
- /package/dist/{chunk-JYJFGD2H.js.map → chunk-GYJRDALN.js.map} +0 -0
- /package/dist/{chunk-MANUDU7I.js.map → chunk-HGDXJVK2.js.map} +0 -0
- /package/dist/{chunk-C25JXSOR.js.map → chunk-IHYSIPEK.js.map} +0 -0
- /package/dist/{chunk-5GQEU4DN.js.map → chunk-IJV56FWY.js.map} +0 -0
- /package/dist/{chunk-XIDQKFZF.js.map → chunk-IM2KST7E.js.map} +0 -0
- /package/dist/{chunk-IMRB2C4O.js.map → chunk-IQ423YMK.js.map} +0 -0
- /package/dist/{chunk-WO4T4OD5.js.map → chunk-J7YVY7TW.js.map} +0 -0
- /package/dist/{chunk-SGQ4N5FS.js.map → chunk-KDWBVCIX.js.map} +0 -0
- /package/dist/{chunk-6L3DKWRY.js.map → chunk-KJNMTE2W.js.map} +0 -0
- /package/dist/{chunk-NFZGZ4AK.js.map → chunk-L67H6FAQ.js.map} +0 -0
- /package/dist/{chunk-DGBIHDVK.js.map → chunk-LQVRK2XJ.js.map} +0 -0
- /package/dist/{chunk-MHMLXJ3I.js.map → chunk-LXRVTJ5D.js.map} +0 -0
- /package/dist/{chunk-2NMEGSFV.js.map → chunk-MDRCEA56.js.map} +0 -0
- /package/dist/{chunk-KRCBZYTZ.js.map → chunk-MFW466PX.js.map} +0 -0
- /package/dist/{chunk-RO5NM6UI.js.map → chunk-MGXUAID4.js.map} +0 -0
- /package/dist/{chunk-NEX7JCMO.js.map → chunk-MPW6AHTC.js.map} +0 -0
- /package/dist/{chunk-35NMVJ7I.js.map → chunk-MYSNNMJ3.js.map} +0 -0
- /package/dist/{chunk-JYV4JJV2.js.map → chunk-NG4AQIYJ.js.map} +0 -0
- /package/dist/{chunk-BLBAQRBM.js.map → chunk-NIKQQXI2.js.map} +0 -0
- /package/dist/{chunk-55LX6FSX.js.map → chunk-NJHQE4LT.js.map} +0 -0
- /package/dist/{chunk-SKM35Y4Q.js.map → chunk-NMYH55MW.js.map} +0 -0
- /package/dist/{chunk-DZAF24PG.js.map → chunk-NZEGQWQ5.js.map} +0 -0
- /package/dist/{chunk-FMNU7IUG.js.map → chunk-ODCEOSJF.js.map} +0 -0
- /package/dist/{chunk-NYEFP7DY.js.map → chunk-OKBNFUUX.js.map} +0 -0
- /package/dist/{chunk-SGDPRCC4.js.map → chunk-OKRXXFZZ.js.map} +0 -0
- /package/dist/{chunk-IG6KUWBX.js.map → chunk-P6UIVLZK.js.map} +0 -0
- /package/dist/{chunk-V6UQZA2H.js.map → chunk-PKBONLCP.js.map} +0 -0
- /package/dist/{chunk-MSMJJB4J.js.map → chunk-PTSVGKSR.js.map} +0 -0
- /package/dist/{chunk-IXNCZTWA.js.map → chunk-PWEMRXPO.js.map} +0 -0
- /package/dist/{chunk-PTHKZWEH.js.map → chunk-PZRYKOKP.js.map} +0 -0
- /package/dist/{chunk-56IIVAEO.js.map → chunk-Q2SEJMP2.js.map} +0 -0
- /package/dist/{chunk-OBPVWOSQ.js.map → chunk-Q6MXHDSE.js.map} +0 -0
- /package/dist/{chunk-6R6Q3MRN.js.map → chunk-QITP2JGX.js.map} +0 -0
- /package/dist/{chunk-WBKZUO5V.js.map → chunk-QMCWYN6O.js.map} +0 -0
- /package/dist/{chunk-4ZKNC6A6.js.map → chunk-QQL6XPPG.js.map} +0 -0
- /package/dist/{chunk-TG634KCO.js.map → chunk-QTMZDMJ6.js.map} +0 -0
- /package/dist/{chunk-AT2JJEKJ.js.map → chunk-RM4FIXY2.js.map} +0 -0
- /package/dist/{chunk-AKKRXT23.js.map → chunk-RPWMDIGK.js.map} +0 -0
- /package/dist/{chunk-3XKESW5E.js.map → chunk-SL3PLML2.js.map} +0 -0
- /package/dist/{chunk-BYFXLDVV.js.map → chunk-TJOUKMWF.js.map} +0 -0
- /package/dist/{chunk-QD46HPZG.js.map → chunk-U2ID5A2I.js.map} +0 -0
- /package/dist/{chunk-X4MVWPHV.js.map → chunk-UC5Y7OEJ.js.map} +0 -0
- /package/dist/{chunk-ISRKW4YN.js.map → chunk-V3EGXDFN.js.map} +0 -0
- /package/dist/{chunk-KFRPNHWR.js.map → chunk-V4O6YZSP.js.map} +0 -0
- /package/dist/{chunk-3HUYRN24.js.map → chunk-W7C7MMIS.js.map} +0 -0
- /package/dist/{chunk-6M2I3DKF.js.map → chunk-WK7ULBTP.js.map} +0 -0
- /package/dist/{chunk-HFUAFR6B.js.map → chunk-XID22NOA.js.map} +0 -0
- /package/dist/{chunk-E23UGFVC.js.map → chunk-XVK7TULT.js.map} +0 -0
- /package/dist/{chunk-IF6WNGAK.js.map → chunk-XX7YB5BI.js.map} +0 -0
- /package/dist/{chunk-ZTLOXFPB.js.map → chunk-Y2PTKKIN.js.map} +0 -0
- /package/dist/{chunk-QADFHRQM.js.map → chunk-YA7Y3EZP.js.map} +0 -0
- /package/dist/{classified-marker-EOOSMWFC.js.map → classified-marker-ZALWKOBC.js.map} +0 -0
- /package/dist/{collection-facade-TTRF5NFJ.js.map → collection-facade-KI53O6QB.js.map} +0 -0
- /package/dist/{computed-AB45PS4V.js.map → computed-YOQCGUCS.js.map} +0 -0
- /package/dist/{dead-filter-6DYY7S64.js.map → dead-filter-6DVWST6U.js.map} +0 -0
- /package/dist/{delegation-ONOZVPIP.js.map → delegation-WMO3Q3O5.js.map} +0 -0
- /package/dist/{derive-IGGVSUPH.js.map → derive-P2NXWUNB.js.map} +0 -0
- /package/dist/{dispatch-7T45NN7C.js.map → dispatch-TKV4UCKB.js.map} +0 -0
- /package/dist/{dispatch-RPTLK7LJ.js.map → dispatch-VNR3TLBX.js.map} +0 -0
- /package/dist/{enclave-CLJVSDFG.js.map → enclave-YWP3QAIQ.js.map} +0 -0
- /package/dist/{executor-IEBLTBCW.js.map → executor-M4ZZNX6S.js.map} +0 -0
- /package/dist/{executor-RM7XWQDU.js.map → executor-TI64S4LE.js.map} +0 -0
- /package/dist/{executor-XZYM4KHT.js.map → executor-YBK3I2OT.js.map} +0 -0
- /package/dist/{export-accessible-24XCCD3A.js.map → export-accessible-GBLYLGW4.js.map} +0 -0
- /package/dist/{extract-partition-H2TPEEOF.js.map → extract-partition-SFV35U2R.js.map} +0 -0
- /package/dist/{fanout-sidecar-TV7CXAJ6.js.map → fanout-sidecar-WYXO6QQT.js.map} +0 -0
- /package/dist/{find-OZMTRIK3.js.map → find-HUSSZRBR.js.map} +0 -0
- /package/dist/{issue-55HJE7JF.js.map → issue-6TIJYWKS.js.map} +0 -0
- /package/dist/{ledger-XY6NP3J2.js.map → ledger-BLYDYRTQ.js.map} +0 -0
- /package/dist/{liberate-LXOJ2EMB.js.map → liberate-TSOW7IG5.js.map} +0 -0
- /package/dist/{link-set-POQB7BU5.js.map → link-set-7F5ZPDEB.js.map} +0 -0
- /package/dist/{noydb-MGPOYDOD.js.map → noydb-KFN6M6UJ.js.map} +0 -0
- /package/dist/{post-register-URQANI3B.js.map → post-register-PQSY544J.js.map} +0 -0
- /package/dist/{register-5W6CG4RM.js.map → register-S3ECUZPV.js.map} +0 -0
- /package/dist/{registry-7Y5WF7GS.js.map → registry-FZOHKUME.js.map} +0 -0
- /package/dist/{registry-MCSGBZXI.js.map → registry-RISV7IDZ.js.map} +0 -0
- /package/dist/{registry-UJFP3NWF.js.map → registry-ZE35A7WC.js.map} +0 -0
- /package/dist/{request-withdrawal-IWYDM4SO.js.map → request-withdrawal-KXVTQKR5.js.map} +0 -0
- /package/dist/{reveal-BXZGWIOP.js.map → reveal-HY7DZST4.js.map} +0 -0
- /package/dist/{revoke-TINYPHYY.js.map → revoke-J473JJ22.js.map} +0 -0
- /package/dist/{signer-WMZKCNKC.js.map → signer-XLUKCCH3.js.map} +0 -0
- /package/dist/{stale-JOE7GBAE.js.map → stale-U3WO5MYN.js.map} +0 -0
- /package/dist/{storage-B3WBKXKT.js.map → storage-IQONEOYY.js.map} +0 -0
- /package/dist/{store-coordination-provider-5LX2UFU2.js.map → store-coordination-provider-AHGFEMFA.js.map} +0 -0
- /package/dist/{verify-7XWHJWUN.js.map → verify-JEIXSK5U.js.map} +0 -0
- /package/dist/{walk-6OHAWGBS.js.map → walk-BF36V4SR.js.map} +0 -0
- /package/dist/{with-party → with-sync}/tab-coordination.d.ts +0 -0
- /package/dist/{with-party → with-sync}/tab-write-relay.d.ts +0 -0
- /package/dist/{withdraw-accessible-DEUCOO4F.js.map → withdraw-accessible-TYTA23XH.js.map} +0 -0
|
@@ -1,59 +1,68 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveStaleOnRead
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F5UWVF6Z.js";
|
|
4
4
|
import {
|
|
5
5
|
LinkIntegrityError,
|
|
6
6
|
isLinkCollectionName,
|
|
7
7
|
linkCollectionName,
|
|
8
8
|
linkRowKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EBETHILL.js";
|
|
10
10
|
import {
|
|
11
11
|
hashFields,
|
|
12
12
|
validateSatelliteDeclaration
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FT5Y4VSP.js";
|
|
14
|
+
import {
|
|
15
|
+
isBaseLive,
|
|
16
|
+
liveBaseIdSet
|
|
17
|
+
} from "./chunk-GYGLAVCX.js";
|
|
14
18
|
import {
|
|
15
19
|
loadFence
|
|
16
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WK7ULBTP.js";
|
|
17
21
|
import {
|
|
18
22
|
VectorSet,
|
|
19
23
|
buildPersistedIndexCallbacks,
|
|
20
24
|
encodeVecId,
|
|
21
25
|
syncTierSearch
|
|
22
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6RDTG6E5.js";
|
|
23
27
|
import {
|
|
24
28
|
SchemaUpdateGate
|
|
25
29
|
} from "./chunk-6LJY7X5A.js";
|
|
26
30
|
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
NO_CLASSIFIED,
|
|
32
|
+
guardClassifiedCompat,
|
|
33
|
+
resolveClassifiedFields
|
|
34
|
+
} from "./chunk-7P4LL3JH.js";
|
|
30
35
|
import {
|
|
31
36
|
NO_TIERS,
|
|
32
37
|
classifySealedShred,
|
|
33
38
|
syncDerivedOutputs
|
|
34
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-QITP2JGX.js";
|
|
35
40
|
import {
|
|
36
41
|
NO_PORTABILITY
|
|
37
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-NIKQQXI2.js";
|
|
38
43
|
import {
|
|
39
44
|
NO_CARGO,
|
|
40
45
|
runDrainBarrier
|
|
41
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-QTMZDMJ6.js";
|
|
42
47
|
import {
|
|
43
48
|
resolveManagedSecret,
|
|
44
49
|
saveSealedSecret
|
|
45
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-CLE3TMIS.js";
|
|
46
51
|
import {
|
|
47
52
|
jsonSchemaToFields
|
|
48
53
|
} from "./chunk-VYYM3MEN.js";
|
|
49
54
|
import {
|
|
50
55
|
derivePersistedSchema,
|
|
51
56
|
isZod4Schema
|
|
52
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-3LYMOSY7.js";
|
|
58
|
+
import {
|
|
59
|
+
CustodyApi,
|
|
60
|
+
NO_CUSTODY
|
|
61
|
+
} from "./chunk-NMYH55MW.js";
|
|
53
62
|
import {
|
|
54
63
|
DEFAULT_POSTURE,
|
|
55
64
|
ViaGraph
|
|
56
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-QQL6XPPG.js";
|
|
57
66
|
import {
|
|
58
67
|
buildLookupAltIndex,
|
|
59
68
|
buildLookupSnapshotRows,
|
|
@@ -77,24 +86,30 @@ import {
|
|
|
77
86
|
selfWriteFieldEqual,
|
|
78
87
|
touchFor,
|
|
79
88
|
updateReferencingRecords
|
|
80
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-4MSNAB64.js";
|
|
81
90
|
import {
|
|
82
91
|
OverlayedCollection
|
|
83
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-Y2PTKKIN.js";
|
|
84
93
|
import {
|
|
94
|
+
INDEXED_STORE_POLICY,
|
|
85
95
|
NO_SYNC
|
|
86
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-55LKVALY.js";
|
|
87
97
|
import {
|
|
88
98
|
NO_ATTESTATION
|
|
89
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-IJV56FWY.js";
|
|
90
100
|
import {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
resolveClassifiedFields
|
|
94
|
-
} from "./chunk-ZFUFAHZ3.js";
|
|
101
|
+
NO_CONSENT
|
|
102
|
+
} from "./chunk-PEOZ34EM.js";
|
|
95
103
|
import {
|
|
96
104
|
NO_PERIODS
|
|
97
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-F2WWHKO7.js";
|
|
106
|
+
import {
|
|
107
|
+
PERIODS_COLLECTION,
|
|
108
|
+
PERIOD_ARCHIVES_COLLECTION,
|
|
109
|
+
PERIOD_FREEZES_COLLECTION,
|
|
110
|
+
PERIOD_TARGET_PURGES_COLLECTION,
|
|
111
|
+
periodExclusiveUpperBound
|
|
112
|
+
} from "./chunk-SBGXQK5I.js";
|
|
98
113
|
import {
|
|
99
114
|
NO_SHADOW
|
|
100
115
|
} from "./chunk-SMY5X46Z.js";
|
|
@@ -103,9 +118,8 @@ import {
|
|
|
103
118
|
} from "./chunk-DZFQVICS.js";
|
|
104
119
|
import {
|
|
105
120
|
TxContext,
|
|
106
|
-
bestEffortRevert
|
|
107
|
-
|
|
108
|
-
} from "./chunk-NGSJZFGL.js";
|
|
121
|
+
bestEffortRevert
|
|
122
|
+
} from "./chunk-NWK6SVBM.js";
|
|
109
123
|
import {
|
|
110
124
|
lazy
|
|
111
125
|
} from "./chunk-5D2ALSM5.js";
|
|
@@ -113,33 +127,29 @@ import {
|
|
|
113
127
|
InvertedIndex,
|
|
114
128
|
MemoryIndexStore,
|
|
115
129
|
NO_SEARCH
|
|
116
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-YA7Y3EZP.js";
|
|
117
131
|
import {
|
|
118
132
|
NO_SEQUENCE,
|
|
119
133
|
SEQUENCE_COLLECTION,
|
|
120
134
|
compileSequenceFormat,
|
|
121
135
|
resolveSequenceKey
|
|
122
|
-
} from "./chunk-
|
|
123
|
-
import {
|
|
124
|
-
CustodyApi,
|
|
125
|
-
NO_CUSTODY
|
|
126
|
-
} from "./chunk-SKM35Y4Q.js";
|
|
136
|
+
} from "./chunk-RQILGK3N.js";
|
|
127
137
|
import {
|
|
128
138
|
Query,
|
|
129
139
|
ScanBuilder
|
|
130
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-QMCWYN6O.js";
|
|
131
141
|
import {
|
|
132
142
|
EXPORT_AUDIT_COLLECTION,
|
|
133
143
|
NO_BLOBS,
|
|
134
144
|
createExportBlobsHandle,
|
|
135
145
|
runCompaction
|
|
136
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-XX7YB5BI.js";
|
|
137
147
|
import {
|
|
138
148
|
LazyQuery,
|
|
139
149
|
NO_INDEXING,
|
|
140
150
|
decodeIdxId,
|
|
141
151
|
encodeIdxId
|
|
142
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-ALUVACKT.js";
|
|
143
153
|
import {
|
|
144
154
|
IMPLICIT_LAZY,
|
|
145
155
|
Lru,
|
|
@@ -157,12 +167,9 @@ import {
|
|
|
157
167
|
import {
|
|
158
168
|
NO_CRDT
|
|
159
169
|
} from "./chunk-PVEWA2DU.js";
|
|
160
|
-
import {
|
|
161
|
-
NO_CONSENT
|
|
162
|
-
} from "./chunk-PEOZ34EM.js";
|
|
163
170
|
import {
|
|
164
171
|
dictCollectionName
|
|
165
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-MPW6AHTC.js";
|
|
166
173
|
import {
|
|
167
174
|
NO_I18N,
|
|
168
175
|
getAtPath,
|
|
@@ -170,11 +177,11 @@ import {
|
|
|
170
177
|
isDictKeyDescriptor,
|
|
171
178
|
isI18nTextDescriptor,
|
|
172
179
|
isStaticDictDescriptor
|
|
173
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-5EKL6BXI.js";
|
|
174
181
|
import {
|
|
175
182
|
isViaInstalled,
|
|
176
183
|
viaBinder
|
|
177
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-DDB626I7.js";
|
|
178
185
|
import {
|
|
179
186
|
NO_TEAM,
|
|
180
187
|
describeAllUsersAuth,
|
|
@@ -197,17 +204,7 @@ import {
|
|
|
197
204
|
saveShamirRecoveryEntries,
|
|
198
205
|
updateAuthenticator,
|
|
199
206
|
writeMagicLinkGrant
|
|
200
|
-
} from "./chunk-
|
|
201
|
-
import {
|
|
202
|
-
INDEXED_STORE_POLICY
|
|
203
|
-
} from "./chunk-MTJLOC3Y.js";
|
|
204
|
-
import {
|
|
205
|
-
PERIODS_COLLECTION,
|
|
206
|
-
PERIOD_ARCHIVES_COLLECTION,
|
|
207
|
-
PERIOD_FREEZES_COLLECTION,
|
|
208
|
-
PERIOD_TARGET_PURGES_COLLECTION,
|
|
209
|
-
periodExclusiveUpperBound
|
|
210
|
-
} from "./chunk-EZNTORXE.js";
|
|
207
|
+
} from "./chunk-IHYSIPEK.js";
|
|
211
208
|
import {
|
|
212
209
|
assertKeyringOpenAllowed,
|
|
213
210
|
buildRecipientKeyringFile,
|
|
@@ -222,15 +219,15 @@ import {
|
|
|
222
219
|
listUsers,
|
|
223
220
|
loadKeyring,
|
|
224
221
|
updateKeyringIdentity
|
|
225
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-FZAP4JNC.js";
|
|
226
223
|
import {
|
|
227
224
|
persistDirectoryConfig,
|
|
228
225
|
readDirectoryConfig
|
|
229
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-6PFST3FC.js";
|
|
230
227
|
import {
|
|
231
228
|
NO_BROKER,
|
|
232
229
|
buildCredentialBrokerHandle
|
|
233
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-PWEMRXPO.js";
|
|
234
231
|
import {
|
|
235
232
|
NO_SESSION
|
|
236
233
|
} from "./chunk-VKQCVU2Z.js";
|
|
@@ -244,10 +241,10 @@ import {
|
|
|
244
241
|
assertCutoverTierSafe,
|
|
245
242
|
assertTierWritable,
|
|
246
243
|
liveRecordIsElevated
|
|
247
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-GYJRDALN.js";
|
|
248
245
|
import {
|
|
249
246
|
sha256Hex
|
|
250
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-V3EGXDFN.js";
|
|
251
248
|
import {
|
|
252
249
|
NO_FORGET,
|
|
253
250
|
addSubjectRef,
|
|
@@ -256,10 +253,10 @@ import {
|
|
|
256
253
|
readDottedPath,
|
|
257
254
|
rebuildSubjectIndex,
|
|
258
255
|
removeSubjectRef
|
|
259
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-V4O6YZSP.js";
|
|
260
257
|
import {
|
|
261
258
|
NO_SEALED_RECORD
|
|
262
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-U2ID5A2I.js";
|
|
263
260
|
import {
|
|
264
261
|
RecordCodec,
|
|
265
262
|
SEALED_CEK_NS,
|
|
@@ -270,20 +267,20 @@ import {
|
|
|
270
267
|
queryByDet,
|
|
271
268
|
resolveStableCek,
|
|
272
269
|
validateSchemaInput
|
|
273
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-623QEHDB.js";
|
|
274
271
|
import {
|
|
275
272
|
buildDeleteMarker,
|
|
276
273
|
buildTombstone,
|
|
277
274
|
isDeleteMarker,
|
|
278
275
|
isTombstone
|
|
279
|
-
} from "./chunk-
|
|
276
|
+
} from "./chunk-EFJAAFBW.js";
|
|
280
277
|
import {
|
|
281
278
|
encrypt
|
|
282
|
-
} from "./chunk-
|
|
279
|
+
} from "./chunk-RPWMDIGK.js";
|
|
283
280
|
import {
|
|
284
281
|
NOYDB_FORMAT_VERSION,
|
|
285
282
|
SealedHandle
|
|
286
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-77AEMXFA.js";
|
|
287
284
|
import {
|
|
288
285
|
AlreadyElevatedError,
|
|
289
286
|
AttestationError,
|
|
@@ -323,8 +320,9 @@ import {
|
|
|
323
320
|
UniqueConstraintError,
|
|
324
321
|
UnsupportedIndexOptionError,
|
|
325
322
|
UnsupportedTierCompositionError,
|
|
326
|
-
ValidationError
|
|
327
|
-
|
|
323
|
+
ValidationError,
|
|
324
|
+
isConflictError
|
|
325
|
+
} from "./chunk-AR5D76T2.js";
|
|
328
326
|
|
|
329
327
|
// src/with-commit/tx/strategy.ts
|
|
330
328
|
var NOT_ENABLED = new Error(
|
|
@@ -390,7 +388,7 @@ function resolveStrategies(options) {
|
|
|
390
388
|
|
|
391
389
|
// src/port/by/default-provider.ts
|
|
392
390
|
async function createDefaultCoordinationProvider(store) {
|
|
393
|
-
const { StoreCoordinationProvider } = await import("./store-coordination-provider-
|
|
391
|
+
const { StoreCoordinationProvider } = await import("./store-coordination-provider-AHGFEMFA.js");
|
|
394
392
|
return new StoreCoordinationProvider(store);
|
|
395
393
|
}
|
|
396
394
|
|
|
@@ -1712,6 +1710,109 @@ function buildDescription(input) {
|
|
|
1712
1710
|
};
|
|
1713
1711
|
}
|
|
1714
1712
|
|
|
1713
|
+
// src/kernel/put-many-atomic.ts
|
|
1714
|
+
var toRevertLeg = ({ op, priorEnvelope }) => ({
|
|
1715
|
+
vaultName: op.vaultName,
|
|
1716
|
+
collectionName: op.collectionName,
|
|
1717
|
+
id: op.id,
|
|
1718
|
+
prior: priorEnvelope
|
|
1719
|
+
});
|
|
1720
|
+
async function runPutManyAtomic(ctx, entries) {
|
|
1721
|
+
const { store, vault, name } = ctx;
|
|
1722
|
+
const priors = /* @__PURE__ */ new Map();
|
|
1723
|
+
let duplicateId = false;
|
|
1724
|
+
for (const [id, , opts] of entries) {
|
|
1725
|
+
if (priors.has(id)) duplicateId = true;
|
|
1726
|
+
else priors.set(id, await store.get(vault, name, id));
|
|
1727
|
+
if (opts?.expectedVersion !== void 0) {
|
|
1728
|
+
const actual = priors.get(id)?._v ?? 0;
|
|
1729
|
+
if (actual !== opts.expectedVersion) {
|
|
1730
|
+
throw new ConflictError(
|
|
1731
|
+
actual,
|
|
1732
|
+
`putMany atomic: ${vault}/${name}/${id} expected v${opts.expectedVersion}, found v${actual}`
|
|
1733
|
+
);
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
if (!duplicateId && store.capabilities?.txAtomic === true && typeof store.tx === "function" && ctx.host._txAtomicSafe("put")) {
|
|
1738
|
+
return commitViaStoreTx(ctx, entries, priors);
|
|
1739
|
+
}
|
|
1740
|
+
return commitSequentially(ctx, entries, priors);
|
|
1741
|
+
}
|
|
1742
|
+
async function commitViaStoreTx(ctx, entries, priors) {
|
|
1743
|
+
const { host, store, vault, name } = ctx;
|
|
1744
|
+
await host._assertWriteGates();
|
|
1745
|
+
const executed = [];
|
|
1746
|
+
const legs = [];
|
|
1747
|
+
for (const [id, record] of entries) {
|
|
1748
|
+
const prior = priors.get(id) ?? null;
|
|
1749
|
+
executed.push({ op: { type: "put", vaultName: vault, collectionName: name, id }, priorEnvelope: prior });
|
|
1750
|
+
const prepared = await host._preparePut(id, record);
|
|
1751
|
+
legs.push({
|
|
1752
|
+
prepared,
|
|
1753
|
+
// Every leg carries CAS against the Phase-1 snapshot, so a writer
|
|
1754
|
+
// landing between prepare and the batch reaching the store loses.
|
|
1755
|
+
txOp: { type: "put", vault, collection: name, id, expectedVersion: prior?._v ?? 0, envelope: prepared.envelope }
|
|
1756
|
+
});
|
|
1757
|
+
}
|
|
1758
|
+
await store.tx(legs.map((l) => l.txOp));
|
|
1759
|
+
try {
|
|
1760
|
+
for (const leg of legs) {
|
|
1761
|
+
await host._finalizePut(leg.prepared);
|
|
1762
|
+
await host._fireAtomicAfterWrite("put", leg.prepared);
|
|
1763
|
+
}
|
|
1764
|
+
} catch (err) {
|
|
1765
|
+
await bestEffortRevert(executed.map(toRevertLeg), store);
|
|
1766
|
+
for (const { op } of [...executed].reverse()) {
|
|
1767
|
+
try {
|
|
1768
|
+
await host._invalidateCacheEntry(op.id);
|
|
1769
|
+
} catch {
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
throw err;
|
|
1773
|
+
}
|
|
1774
|
+
return { ok: true, success: entries.map(([id]) => id), failures: [] };
|
|
1775
|
+
}
|
|
1776
|
+
async function commitSequentially(ctx, entries, priors) {
|
|
1777
|
+
const { host, store, vault, name, derivationSource } = ctx;
|
|
1778
|
+
const txCtx = derivationSource?.createTxContext() ?? null;
|
|
1779
|
+
if (txCtx !== null && derivationSource) {
|
|
1780
|
+
derivationSource.setActiveTxContext(txCtx);
|
|
1781
|
+
}
|
|
1782
|
+
const localExecuted = [];
|
|
1783
|
+
try {
|
|
1784
|
+
for (const [id, record] of entries) {
|
|
1785
|
+
const entry = {
|
|
1786
|
+
op: { type: "put", vaultName: vault, collectionName: name, id },
|
|
1787
|
+
priorEnvelope: priors.get(id) ?? null
|
|
1788
|
+
};
|
|
1789
|
+
if (txCtx !== null) txCtx._executed.push(entry);
|
|
1790
|
+
else localExecuted.push(entry);
|
|
1791
|
+
await host.put(id, record);
|
|
1792
|
+
}
|
|
1793
|
+
return { ok: true, success: entries.map(([id]) => id), failures: [] };
|
|
1794
|
+
} catch (err) {
|
|
1795
|
+
const executedForRevert = txCtx !== null ? txCtx._executed : localExecuted;
|
|
1796
|
+
await bestEffortRevert(executedForRevert.map(toRevertLeg), store);
|
|
1797
|
+
for (const { op } of [...executedForRevert].reverse()) {
|
|
1798
|
+
if (op.vaultName !== vault) continue;
|
|
1799
|
+
try {
|
|
1800
|
+
if (op.collectionName === name) {
|
|
1801
|
+
await host._invalidateCacheEntry(op.id);
|
|
1802
|
+
} else if (derivationSource) {
|
|
1803
|
+
await derivationSource.getCollection(op.collectionName)._invalidateCacheEntry(op.id);
|
|
1804
|
+
}
|
|
1805
|
+
} catch {
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
throw err;
|
|
1809
|
+
} finally {
|
|
1810
|
+
if (txCtx !== null && derivationSource) {
|
|
1811
|
+
derivationSource.clearActiveTxContext(txCtx);
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1715
1816
|
// src/kernel/via/compose.ts
|
|
1716
1817
|
function via(...descriptors) {
|
|
1717
1818
|
if (descriptors.length === 0) {
|
|
@@ -2176,7 +2277,7 @@ function resolveCollectionConfig(opts) {
|
|
|
2176
2277
|
}
|
|
2177
2278
|
|
|
2178
2279
|
// src/with-formula/computed/lazy.ts
|
|
2179
|
-
var loadComputed = lazy(() => import("./computed-
|
|
2280
|
+
var loadComputed = lazy(() => import("./computed-YOQCGUCS.js"));
|
|
2180
2281
|
async function loadEvalComputedFields() {
|
|
2181
2282
|
return (await loadComputed()).evalComputedFields;
|
|
2182
2283
|
}
|
|
@@ -2237,7 +2338,7 @@ var Collection = class {
|
|
|
2237
2338
|
* re-create version-continuity gate in `_putInternal` read the store ONLY
|
|
2238
2339
|
* for a known marker prior, instead of unconditionally on every insert.
|
|
2239
2340
|
* Populated on hydration (`ensureHydrated`/`hydrateFromSnapshot`), local
|
|
2240
|
-
* delete (`
|
|
2341
|
+
* delete (`_commitDelete`), and the sync/tab/cutover choke point
|
|
2241
2342
|
* (`_invalidateCacheEntry`). Accepted drift: `vault._purgeDeleteMarkers`/
|
|
2242
2343
|
* `_purgeMarkersOn` remove markers directly on the raw store, bypassing
|
|
2243
2344
|
* Collection, so this set can hold stale ids after a purge on an
|
|
@@ -2954,7 +3055,7 @@ var Collection = class {
|
|
|
2954
3055
|
}
|
|
2955
3056
|
await this.onAccess?.("find", "*");
|
|
2956
3057
|
if (hits.length === 0) return [];
|
|
2957
|
-
const { verifyDigestField } = await import("./verify-
|
|
3058
|
+
const { verifyDigestField } = await import("./verify-JEIXSK5U.js");
|
|
2958
3059
|
const policy = {
|
|
2959
3060
|
normalize: spec.verifyNormalize ?? "password",
|
|
2960
3061
|
notLastN: spec.notLastN ?? 0,
|
|
@@ -3160,7 +3261,7 @@ var Collection = class {
|
|
|
3160
3261
|
}
|
|
3161
3262
|
}
|
|
3162
3263
|
if (this.materializedViewSource !== void 0) {
|
|
3163
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
3264
|
+
const { resolveStaleMVOnRead } = await import("./stale-U3WO5MYN.js");
|
|
3164
3265
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name, this.#dispatchCtx({ collection: this.name, id: "resolve-on-read" }));
|
|
3165
3266
|
}
|
|
3166
3267
|
let record;
|
|
@@ -3513,7 +3614,13 @@ var Collection = class {
|
|
|
3513
3614
|
}
|
|
3514
3615
|
await this._onRecordMutated(id, "put", "local-write", { record: event, version });
|
|
3515
3616
|
}
|
|
3516
|
-
|
|
3617
|
+
/**
|
|
3618
|
+
* The pre-envelope stages both write paths share (#904): permission + tier
|
|
3619
|
+
* refusal, Via ingest, the beforePut gate bus, Via enforceWrite, computed
|
|
3620
|
+
* fields, schema validation, Via encodeWrite and ref enforcement. Reads and
|
|
3621
|
+
* throws; commits nothing. Returns the record in the shape that gets stored.
|
|
3622
|
+
*/
|
|
3623
|
+
async #prepareWriteRecord(id, record) {
|
|
3517
3624
|
if (!hasWritePermission(this.keyring, this.name)) {
|
|
3518
3625
|
throw new ReadOnlyError();
|
|
3519
3626
|
}
|
|
@@ -3555,7 +3662,11 @@ var Collection = class {
|
|
|
3555
3662
|
if (this.refEnforcer !== void 0) {
|
|
3556
3663
|
await this.refEnforcer.enforceRefsOnPut(this.name, record);
|
|
3557
3664
|
}
|
|
3665
|
+
return record;
|
|
3666
|
+
}
|
|
3667
|
+
async _putInternal(id, record, options) {
|
|
3558
3668
|
if (this.crdtMode) {
|
|
3669
|
+
record = await this.#prepareWriteRecord(id, record);
|
|
3559
3670
|
const existingEnvelope = await this.adapter.get(this.vault, this.name, id);
|
|
3560
3671
|
const existingVersion = existingEnvelope?._v ?? 0;
|
|
3561
3672
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -3569,20 +3680,20 @@ var Collection = class {
|
|
|
3569
3680
|
} else {
|
|
3570
3681
|
crdtState = { _crdt: "yjs", update: record };
|
|
3571
3682
|
}
|
|
3572
|
-
const
|
|
3573
|
-
const
|
|
3574
|
-
const
|
|
3575
|
-
await this.adapter.put(this.vault, this.name, id,
|
|
3683
|
+
const version = existingVersion + 1;
|
|
3684
|
+
const cek = this.perRecordCek ? await this.resolveRecordCek(id) : void 0;
|
|
3685
|
+
const envelope = await this.codec.encryptJsonString(JSON.stringify(crdtState), version, cek, options?.source, options?.sourceTs);
|
|
3686
|
+
await this.adapter.put(this.vault, this.name, id, envelope);
|
|
3576
3687
|
const resolvedRecord = this.strategies.crdt.resolveCrdtSnapshot(crdtState);
|
|
3577
3688
|
const existingResolvedRecord = existingEnvelope ? await this.codec.decryptRecord(existingEnvelope, { skipValidation: true }) : null;
|
|
3578
3689
|
const existingResolved = existingResolvedRecord !== null ? { record: existingResolvedRecord, version: existingVersion } : void 0;
|
|
3579
3690
|
if (existingResolved) {
|
|
3580
|
-
await this.#savePriorHistory(id, existingResolved,
|
|
3691
|
+
await this.#savePriorHistory(id, existingResolved, cek, this.vdigFields !== null ? { id, prev: existingEnvelope } : void 0);
|
|
3581
3692
|
}
|
|
3582
3693
|
await this.#commitWriteTail({
|
|
3583
3694
|
id,
|
|
3584
|
-
envelope
|
|
3585
|
-
version
|
|
3695
|
+
envelope,
|
|
3696
|
+
version,
|
|
3586
3697
|
indexed: resolvedRecord,
|
|
3587
3698
|
event: record,
|
|
3588
3699
|
prior: existingResolved,
|
|
@@ -3590,6 +3701,23 @@ var Collection = class {
|
|
|
3590
3701
|
});
|
|
3591
3702
|
return;
|
|
3592
3703
|
}
|
|
3704
|
+
await this._commitPut(await this._preparePut(id, record, options));
|
|
3705
|
+
}
|
|
3706
|
+
/**
|
|
3707
|
+
* Prepare half of the ordinary (non-CRDT) write (#893/#904): run every
|
|
3708
|
+
* pre-envelope stage, resolve the prior version, and produce the encrypted
|
|
3709
|
+
* envelope — with ZERO observable side effects. No store write, no cache or
|
|
3710
|
+
* index mutation, no history entry, no ledger append, no event. It may READ
|
|
3711
|
+
* the store (gate prior, lazy prior, vdig prior) and it may THROW; refusing
|
|
3712
|
+
* a write before anything commits is precisely its job.
|
|
3713
|
+
*
|
|
3714
|
+
* Pairs with {@link _commitPut}. Split out so a batch can prepare every op,
|
|
3715
|
+
* submit ONE `store.tx()`, then finalize each op.
|
|
3716
|
+
*
|
|
3717
|
+
* @internal
|
|
3718
|
+
*/
|
|
3719
|
+
async _preparePut(id, record, options) {
|
|
3720
|
+
record = await this.#prepareWriteRecord(id, record);
|
|
3593
3721
|
let existing;
|
|
3594
3722
|
let priorRaw = null;
|
|
3595
3723
|
if (this.lazy && this.lru) {
|
|
@@ -3617,19 +3745,36 @@ var Collection = class {
|
|
|
3617
3745
|
this.uniqueConstraints?.check(id, record);
|
|
3618
3746
|
const cek = this.perRecordCek ? await this.resolveRecordCek(id) : void 0;
|
|
3619
3747
|
const vdigCtx = this.vdigFields !== null ? { id, prev: await this.adapter.get(this.vault, this.name, id) } : void 0;
|
|
3620
|
-
if (existing) await this.#savePriorHistory(id, existing, cek, vdigCtx);
|
|
3621
3748
|
const envelope = await this.codec.encryptRecord(record, version, cek, options?.source, options?.sourceTs, vdigCtx, id);
|
|
3622
|
-
|
|
3749
|
+
return { id, envelope, version, indexed: record, event: record, prior: existing, cek, vdigCtx, reason: options?.reason };
|
|
3750
|
+
}
|
|
3751
|
+
/**
|
|
3752
|
+
* Commit half (#893/#904): the only place an ordinary put becomes
|
|
3753
|
+
* observable — history snapshot of the prior version, store write, marker
|
|
3754
|
+
* clear, then the shared write tail.
|
|
3755
|
+
*
|
|
3756
|
+
* History still runs BEFORE the store write, so a history failure leaves no
|
|
3757
|
+
* write behind. It now runs AFTER `encryptRecord` rather than before it —
|
|
3758
|
+
* the split's one sanctioned reorder, which also stops an encrypt failure
|
|
3759
|
+
* from leaving an orphan snapshot behind.
|
|
3760
|
+
*
|
|
3761
|
+
* @internal `persist: false` skips the `adapter.put` — see {@link _finalizePut}.
|
|
3762
|
+
*/
|
|
3763
|
+
async _commitPut(prepared, persist = true) {
|
|
3764
|
+
const { id, envelope, version, indexed, event, prior, cek, vdigCtx, reason } = prepared;
|
|
3765
|
+
if (prior) await this.#savePriorHistory(id, prior, cek, vdigCtx);
|
|
3766
|
+
if (persist) await this.adapter.put(this.vault, this.name, id, envelope);
|
|
3623
3767
|
this.markerIds.delete(id);
|
|
3624
|
-
await this.#commitWriteTail({
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3768
|
+
await this.#commitWriteTail({ id, envelope, version, indexed, event, prior, reason });
|
|
3769
|
+
}
|
|
3770
|
+
/**
|
|
3771
|
+
* {@link _commitPut} minus the `adapter.put`: the store already holds this
|
|
3772
|
+
* envelope because it was written as one leg of a `store.tx()` batch.
|
|
3773
|
+
*
|
|
3774
|
+
* @internal
|
|
3775
|
+
*/
|
|
3776
|
+
_finalizePut(prepared) {
|
|
3777
|
+
return this._commitPut(prepared, false);
|
|
3633
3778
|
}
|
|
3634
3779
|
/**
|
|
3635
3780
|
* Fire registered MV strategies whose dependency set includes this
|
|
@@ -3646,7 +3791,7 @@ var Collection = class {
|
|
|
3646
3791
|
*/
|
|
3647
3792
|
async dispatchMaterializedViews(id, record, wave) {
|
|
3648
3793
|
if (this.materializedViewSource === void 0) return;
|
|
3649
|
-
const { dispatchMaterializedViews } = await import("./dispatch-
|
|
3794
|
+
const { dispatchMaterializedViews } = await import("./dispatch-VNR3TLBX.js");
|
|
3650
3795
|
return dispatchMaterializedViews(this.#mvDispatchCtx(this.materializedViewSource), id, record, wave);
|
|
3651
3796
|
}
|
|
3652
3797
|
/**
|
|
@@ -3819,7 +3964,7 @@ var Collection = class {
|
|
|
3819
3964
|
* dispatch wave's per-target dedup; `undefined` on the local-write path (byte-identical). */
|
|
3820
3965
|
async dispatchDerivations(id, record, version, wave) {
|
|
3821
3966
|
if (this.derivationSource === void 0) return;
|
|
3822
|
-
const { dispatchDerivations } = await import("./dispatch-
|
|
3967
|
+
const { dispatchDerivations } = await import("./dispatch-TKV4UCKB.js");
|
|
3823
3968
|
return dispatchDerivations({
|
|
3824
3969
|
...this.#derivationDeleteCtx(this.derivationSource),
|
|
3825
3970
|
via: this.via,
|
|
@@ -3953,11 +4098,40 @@ var Collection = class {
|
|
|
3953
4098
|
return await this._doDelete(id, true);
|
|
3954
4099
|
}
|
|
3955
4100
|
async _doDelete(id, internal) {
|
|
4101
|
+
const prepared = await this._prepareDelete(id, internal);
|
|
4102
|
+
return prepared === null ? false : await this._commitDelete(prepared);
|
|
4103
|
+
}
|
|
4104
|
+
/**
|
|
4105
|
+
* Prepare half of the delete (#893/#905): every refusal (write permission,
|
|
4106
|
+
* tier, the beforeDelete gate bus, foreign-key refs), the prior-version
|
|
4107
|
+
* resolution, the pre-delete payload hash, and the #589 marker DECISION —
|
|
4108
|
+
* the marker is minted here but NOT written.
|
|
4109
|
+
*
|
|
4110
|
+
* Commits nothing of its own: no store write, no history entry, no ledger
|
|
4111
|
+
* append, no cache/index mutation, no event, no `markerIds` entry. It READS
|
|
4112
|
+
* the store and it may THROW — refusing a delete before anything commits is
|
|
4113
|
+
* precisely its job. `null` is the "nothing to delete" answer that the early
|
|
4114
|
+
* `return false` paths gave: no live record, an already-shredded tombstone,
|
|
4115
|
+
* an existing marker, or the #718 elevated-internal skip.
|
|
4116
|
+
*
|
|
4117
|
+
* ONE exception to that guarantee: on a collection with `cascade` inbound
|
|
4118
|
+
* refs, prepare itself deletes the referencing children (via
|
|
4119
|
+
* `enforceRefsOnDelete`, as it always has) — prepare is NOT abortable there.
|
|
4120
|
+
* The transaction atomic path must never call this on such a collection; its
|
|
4121
|
+
* eligibility gate excludes refs-bearing collections.
|
|
4122
|
+
*
|
|
4123
|
+
* Pairs with {@link _commitDelete}. A deliberately separate split from the
|
|
4124
|
+
* put pair (#842c) — delete differs in hydration, in the history-read gate
|
|
4125
|
+
* and in the marker rules.
|
|
4126
|
+
*
|
|
4127
|
+
* @internal
|
|
4128
|
+
*/
|
|
4129
|
+
async _prepareDelete(id, internal) {
|
|
3956
4130
|
if (!hasWritePermission(this.keyring, this.name)) {
|
|
3957
4131
|
throw new ReadOnlyError();
|
|
3958
4132
|
}
|
|
3959
4133
|
await assertTierWritable(this.adapter, this.vault, this.name, id, !internal && this.tiers !== null);
|
|
3960
|
-
if (internal && this.tiers !== null && await liveRecordIsElevated(this.adapter, this.vault, this.name, id)) return
|
|
4134
|
+
if (internal && this.tiers !== null && await liveRecordIsElevated(this.adapter, this.vault, this.name, id)) return null;
|
|
3961
4135
|
if (this.subsystemBus?.hasGateHandlers("beforeDelete")) {
|
|
3962
4136
|
const { env: existingEnv, record: existingRecord, elided } = await this.resolveGatePrior("beforeDelete", id);
|
|
3963
4137
|
if (existingEnv || elided) {
|
|
@@ -3992,32 +4166,42 @@ var Collection = class {
|
|
|
3992
4166
|
} else {
|
|
3993
4167
|
existing = await this.resolvePriorValues(id);
|
|
3994
4168
|
}
|
|
3995
|
-
if (existing && this.historyConfig.enabled !== false) {
|
|
3996
|
-
const cek = this.perRecordCek ? await this.resolveRecordCek(id) : void 0;
|
|
3997
|
-
const prevForVdig = this.vdigFields !== null ? await this.adapter.get(this.vault, this.name, id) : null;
|
|
3998
|
-
await this.strategies.history.saveHistory(this.adapter, this.vault, this.name, id, await this.codec.encryptRecord(existing.record, existing.version, cek, void 0, void 0, this.vdigFields !== null ? { id, prev: prevForVdig } : void 0, id));
|
|
3999
|
-
}
|
|
4000
4169
|
const previousEnvelope = await this.adapter.get(this.vault, this.name, id);
|
|
4001
4170
|
const previousPayloadHash = await this.strategies.history.envelopePayloadHash(previousEnvelope);
|
|
4002
|
-
let
|
|
4171
|
+
let marker;
|
|
4003
4172
|
if (this.onDirty) {
|
|
4004
4173
|
const live = previousEnvelope;
|
|
4005
|
-
if (!live || isTombstone(live, this.storeCiphertext) || isDeleteMarker(live)) return
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4174
|
+
if (!live || isTombstone(live, this.storeCiphertext) || isDeleteMarker(live)) return null;
|
|
4175
|
+
marker = buildDeleteMarker(live._v + 1, this.keyring.userId);
|
|
4176
|
+
}
|
|
4177
|
+
const snapshots = existing !== void 0 && this.historyConfig.enabled !== false;
|
|
4178
|
+
const cek = snapshots && this.perRecordCek ? await this.resolveRecordCek(id) : void 0;
|
|
4179
|
+
const vdigCtx = snapshots && this.vdigFields !== null ? { id, prev: previousEnvelope } : void 0;
|
|
4180
|
+
return { id, internal, existing, previousPayloadHash, marker, cek, vdigCtx };
|
|
4181
|
+
}
|
|
4182
|
+
/**
|
|
4183
|
+
* Commit half (#893/#905): the only place a delete becomes observable —
|
|
4184
|
+
* history snapshot of the deleted version, the store write (the #589 marker
|
|
4185
|
+
* put, or the physical removal when sync is off), then the ledger entry,
|
|
4186
|
+
* cache/index teardown, the mutation event, and the user-initiated
|
|
4187
|
+
* derivation dispatch.
|
|
4188
|
+
*
|
|
4189
|
+
* History still runs BEFORE the store write, exactly as today, so a history
|
|
4190
|
+
* failure leaves no delete behind.
|
|
4191
|
+
*
|
|
4192
|
+
* @internal `persist: false` skips the store write — see {@link _finalizeDelete}.
|
|
4193
|
+
*/
|
|
4194
|
+
async _commitDelete(prepared, persist = true) {
|
|
4195
|
+
const { id, internal, existing, previousPayloadHash, marker, cek, vdigCtx } = prepared;
|
|
4196
|
+
if (existing && this.historyConfig.enabled !== false) {
|
|
4197
|
+
await this.strategies.history.saveHistory(this.adapter, this.vault, this.name, id, await this.codec.encryptRecord(existing.record, existing.version, cek, void 0, void 0, vdigCtx, id));
|
|
4011
4198
|
}
|
|
4199
|
+
if (marker) {
|
|
4200
|
+
if (persist) await this.adapter.put(this.vault, this.name, id, marker);
|
|
4201
|
+
this.markerIds.add(id);
|
|
4202
|
+
} else if (persist) await this.adapter.delete(this.vault, this.name, id);
|
|
4012
4203
|
if (this.ledger) {
|
|
4013
|
-
await this.ledger.append({
|
|
4014
|
-
op: "delete",
|
|
4015
|
-
collection: this.name,
|
|
4016
|
-
id,
|
|
4017
|
-
version: existing?.version ?? 0,
|
|
4018
|
-
actor: this.keyring.userId,
|
|
4019
|
-
payloadHash: previousPayloadHash
|
|
4020
|
-
});
|
|
4204
|
+
await this.ledger.append({ op: "delete", collection: this.name, id, version: existing?.version ?? 0, actor: this.keyring.userId, payloadHash: previousPayloadHash });
|
|
4021
4205
|
}
|
|
4022
4206
|
if (this.lazy && this.lru) {
|
|
4023
4207
|
this.lru.remove(id);
|
|
@@ -4031,7 +4215,7 @@ var Collection = class {
|
|
|
4031
4215
|
this.uniqueConstraints?.remove(id, existing.record);
|
|
4032
4216
|
}
|
|
4033
4217
|
}
|
|
4034
|
-
await this._onRecordMutated(id, "delete", "local-delete", { version:
|
|
4218
|
+
await this._onRecordMutated(id, "delete", "local-delete", { version: marker?._v ?? (existing?.version ?? 0) + 1 });
|
|
4035
4219
|
if (!internal) {
|
|
4036
4220
|
await this.dispatchMaterializedViewsOnDelete(id);
|
|
4037
4221
|
await this.dispatchArrayDerivationsOnDelete(id);
|
|
@@ -4039,6 +4223,15 @@ var Collection = class {
|
|
|
4039
4223
|
}
|
|
4040
4224
|
return true;
|
|
4041
4225
|
}
|
|
4226
|
+
/**
|
|
4227
|
+
* {@link _commitDelete} minus the store write: the marker (or the removal)
|
|
4228
|
+
* already landed as one leg of a `store.tx()` batch.
|
|
4229
|
+
*
|
|
4230
|
+
* @internal
|
|
4231
|
+
*/
|
|
4232
|
+
_finalizeDelete(prepared) {
|
|
4233
|
+
return this._commitDelete(prepared, false);
|
|
4234
|
+
}
|
|
4042
4235
|
/**
|
|
4043
4236
|
* @internal — GDPR crypto-shred a LIVE record to a tombstone.
|
|
4044
4237
|
*
|
|
@@ -4096,7 +4289,7 @@ var Collection = class {
|
|
|
4096
4289
|
*/
|
|
4097
4290
|
async dispatchArrayDerivationsOnDelete(id, eraseRecordShapeToo = false) {
|
|
4098
4291
|
if (this.derivationSource === void 0) return 0;
|
|
4099
|
-
const { dispatchArrayDerivationsOnDelete } = await import("./dispatch-
|
|
4292
|
+
const { dispatchArrayDerivationsOnDelete } = await import("./dispatch-TKV4UCKB.js");
|
|
4100
4293
|
return dispatchArrayDerivationsOnDelete(this.#derivationDeleteCtx(this.derivationSource), id, eraseRecordShapeToo);
|
|
4101
4294
|
}
|
|
4102
4295
|
/**
|
|
@@ -4110,7 +4303,7 @@ var Collection = class {
|
|
|
4110
4303
|
*/
|
|
4111
4304
|
async dispatchMaterializedViewsOnDelete(id) {
|
|
4112
4305
|
if (this.materializedViewSource === void 0) return { deleted: 0, residueUndecodable: [], residueDeclined: [] };
|
|
4113
|
-
const { dispatchMaterializedViewsOnDelete } = await import("./dispatch-
|
|
4306
|
+
const { dispatchMaterializedViewsOnDelete } = await import("./dispatch-VNR3TLBX.js");
|
|
4114
4307
|
return dispatchMaterializedViewsOnDelete(this.#mvDispatchCtx(this.materializedViewSource), id);
|
|
4115
4308
|
}
|
|
4116
4309
|
/**
|
|
@@ -4130,7 +4323,7 @@ var Collection = class {
|
|
|
4130
4323
|
);
|
|
4131
4324
|
}
|
|
4132
4325
|
if (this.materializedViewSource !== void 0) {
|
|
4133
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
4326
|
+
const { resolveStaleMVOnRead } = await import("./stale-U3WO5MYN.js");
|
|
4134
4327
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name, this.#dispatchCtx({ collection: this.name, id: "resolve-on-read" }));
|
|
4135
4328
|
}
|
|
4136
4329
|
await this.ensureHydrated();
|
|
@@ -4218,8 +4411,11 @@ var Collection = class {
|
|
|
4218
4411
|
* **True tx-atomic putMany** — pass `{ atomic: true }` to switch
|
|
4219
4412
|
* to the transaction executor: pre-flight CAS against every
|
|
4220
4413
|
* item's `expectedVersion`, then commit all ops with best-effort
|
|
4221
|
-
* revert on mid-batch failure.
|
|
4222
|
-
*
|
|
4414
|
+
* revert on mid-batch failure. On a store that declares `txAtomic`
|
|
4415
|
+
* the whole batch is instead submitted as ONE `store.tx()` call with
|
|
4416
|
+
* per-leg CAS (#921) — genuinely all-or-nothing, with history/ledger/
|
|
4417
|
+
* change events firing after the batch is durable. Atomic mode throws
|
|
4418
|
+
* on failure rather than returning a mixed-results object.
|
|
4223
4419
|
*
|
|
4224
4420
|
* ## Change events
|
|
4225
4421
|
*
|
|
@@ -4244,66 +4440,20 @@ var Collection = class {
|
|
|
4244
4440
|
return { ok: failures.length === 0, success, failures };
|
|
4245
4441
|
}
|
|
4246
4442
|
/**
|
|
4247
|
-
* Atomic-mode implementation of {@link putMany}
|
|
4248
|
-
* `
|
|
4249
|
-
*
|
|
4250
|
-
*
|
|
4443
|
+
* Atomic-mode implementation of {@link putMany} — both branches live in
|
|
4444
|
+
* `kernel/put-many-atomic.ts`: #921 delegates the batch through ONE
|
|
4445
|
+
* `store.tx()` on a `txAtomic` store when the single-collection
|
|
4446
|
+
* reduction of the #906 gate admits it (store bits + no duplicate ids +
|
|
4447
|
+
* `_txAtomicSafe('put')`); anything else keeps the sequential pre-flight
|
|
4448
|
+
* → execute → best-effort-revert loop.
|
|
4251
4449
|
*
|
|
4252
4450
|
* @internal
|
|
4253
4451
|
*/
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
}
|
|
4260
|
-
if (opts?.expectedVersion !== void 0) {
|
|
4261
|
-
const env = priors.get(id) ?? null;
|
|
4262
|
-
const actual = env?._v ?? 0;
|
|
4263
|
-
if (actual !== opts.expectedVersion) {
|
|
4264
|
-
throw new ConflictError(
|
|
4265
|
-
actual,
|
|
4266
|
-
`putMany atomic: ${this.vault}/${this.name}/${id} expected v${opts.expectedVersion}, found v${actual}`
|
|
4267
|
-
);
|
|
4268
|
-
}
|
|
4269
|
-
}
|
|
4270
|
-
}
|
|
4271
|
-
const txCtx = this.derivationSource?.createTxContext() ?? null;
|
|
4272
|
-
if (txCtx !== null && this.derivationSource) {
|
|
4273
|
-
this.derivationSource.setActiveTxContext(txCtx);
|
|
4274
|
-
}
|
|
4275
|
-
const localExecuted = [];
|
|
4276
|
-
try {
|
|
4277
|
-
for (const [id, record] of entries) {
|
|
4278
|
-
const entry = {
|
|
4279
|
-
op: { type: "put", vaultName: this.vault, collectionName: this.name, id },
|
|
4280
|
-
priorEnvelope: priors.get(id) ?? null
|
|
4281
|
-
};
|
|
4282
|
-
if (txCtx !== null) txCtx._executed.push(entry);
|
|
4283
|
-
else localExecuted.push(entry);
|
|
4284
|
-
await this.put(id, record);
|
|
4285
|
-
}
|
|
4286
|
-
return { ok: true, success: entries.map(([id]) => id), failures: [] };
|
|
4287
|
-
} catch (err) {
|
|
4288
|
-
const executedForRevert = txCtx !== null ? txCtx._executed : localExecuted;
|
|
4289
|
-
await revertExecuted(executedForRevert, this.adapter);
|
|
4290
|
-
for (const { op } of [...executedForRevert].reverse()) {
|
|
4291
|
-
if (op.vaultName !== this.vault) continue;
|
|
4292
|
-
try {
|
|
4293
|
-
if (op.collectionName === this.name) {
|
|
4294
|
-
await this._invalidateCacheEntry(op.id);
|
|
4295
|
-
} else if (this.derivationSource) {
|
|
4296
|
-
await this.derivationSource.getCollection(op.collectionName)._invalidateCacheEntry(op.id);
|
|
4297
|
-
}
|
|
4298
|
-
} catch {
|
|
4299
|
-
}
|
|
4300
|
-
}
|
|
4301
|
-
throw err;
|
|
4302
|
-
} finally {
|
|
4303
|
-
if (txCtx !== null && this.derivationSource) {
|
|
4304
|
-
this.derivationSource.clearActiveTxContext(txCtx);
|
|
4305
|
-
}
|
|
4306
|
-
}
|
|
4452
|
+
putManyAtomic(entries) {
|
|
4453
|
+
return runPutManyAtomic(
|
|
4454
|
+
{ host: this, store: this.adapter, vault: this.vault, name: this.name, derivationSource: this.derivationSource },
|
|
4455
|
+
entries
|
|
4456
|
+
);
|
|
4307
4457
|
}
|
|
4308
4458
|
/**
|
|
4309
4459
|
* Get many records in one call. Returns a `Map<id, T | null>` —
|
|
@@ -5283,14 +5433,14 @@ var Collection = class {
|
|
|
5283
5433
|
/** C-A/R10: persist the classified marker once per classified handle (store I/O in config-drift.ts). */
|
|
5284
5434
|
async _ensureClassifiedMarker() {
|
|
5285
5435
|
if (this._markerPersisted || this.vdigFields === null) return;
|
|
5286
|
-
const { persistClassifiedMarkerForFields } = await import("./classified-marker-
|
|
5436
|
+
const { persistClassifiedMarkerForFields } = await import("./classified-marker-ZALWKOBC.js");
|
|
5287
5437
|
await persistClassifiedMarkerForFields(this.adapter, this.vault, this.name, this.vdigFields, await this.getDEK(this.name));
|
|
5288
5438
|
this._markerPersisted = true;
|
|
5289
5439
|
}
|
|
5290
5440
|
/** C-A/R10 drift signal — the marker's declared digest-only set, memoized to one store read per handle (see config-drift.ts). */
|
|
5291
5441
|
async _classifiedMarkerDigestOnly() {
|
|
5292
5442
|
if (this._markerDigestOnlyCache !== void 0) return this._markerDigestOnlyCache;
|
|
5293
|
-
const { readClassifiedMarkerDigestOnly } = await import("./classified-marker-
|
|
5443
|
+
const { readClassifiedMarkerDigestOnly } = await import("./classified-marker-ZALWKOBC.js");
|
|
5294
5444
|
this._markerDigestOnlyCache = await readClassifiedMarkerDigestOnly(this.adapter, this.vault, this.name, await this.getDEK(this.name));
|
|
5295
5445
|
return this._markerDigestOnlyCache;
|
|
5296
5446
|
}
|
|
@@ -5384,6 +5534,38 @@ var Collection = class {
|
|
|
5384
5534
|
return { i18nFields: this.i18nFields, lookupFields: this.lookupFields };
|
|
5385
5535
|
}
|
|
5386
5536
|
// @internal reconcile.ts's presentForJoin-rebuild union reader (#671 item 3)
|
|
5537
|
+
async _assertWriteGates() {
|
|
5538
|
+
await this.schemaUpdateGate?.assertWritable();
|
|
5539
|
+
await this.schemaFence?.assertWritable(this.name);
|
|
5540
|
+
}
|
|
5541
|
+
// @internal #906 — the two refusals `put()`/`delete()` assert BEFORE anything else: the schema-update gate (an opt-in but persistent `reject` decision) and the schema fence (stale generation → MigrationRequiredError; draining/migrating vault or pending per-collection cutover → SchemaFenceError). Neither lives in the prepare halves, and the atomic commit path calls those directly — so it asserts here, per op, mirroring put()/delete() exactly (the fence does a fresh store read per call, so per-op matches today's cost model). Deliberately NOT moved into the prepare halves: that would double-assert on the OCC path.
|
|
5542
|
+
/**
|
|
5543
|
+
* @internal #931 — the after-write OBSERVERS `put()`/`delete()` fire in
|
|
5544
|
+
* their wrappers (user `onAfterWrite` hooks, then the `afterPut`/
|
|
5545
|
+
* `afterDelete` observe bus), replayed for one atomic-path leg after its
|
|
5546
|
+
* finalize. Neither can refuse a completed write, so since #931 they no
|
|
5547
|
+
* longer gate `_txAtomicSafe`; skipping them silently would still be a
|
|
5548
|
+
* policy hole (forget's subject index and the cross-tab write relay are
|
|
5549
|
+
* both wired this way), so the atomic path calls this per leg. The
|
|
5550
|
+
* WriteEvent is built from the prepared carrier — same prior basis the
|
|
5551
|
+
* wrappers use — and the same re-entrancy guards apply (`runAfter`
|
|
5552
|
+
* suppresses nested hook firing; the bus gate checks `dispatching`).
|
|
5553
|
+
*/
|
|
5554
|
+
async _fireAtomicAfterWrite(opType, prepared) {
|
|
5555
|
+
const hooksActive = this.#hooksActive();
|
|
5556
|
+
const busPoint = opType === "put" ? "afterPut" : "afterDelete";
|
|
5557
|
+
const busActive = (this.subsystemBus?.hasHandlers(busPoint) ?? false) && !(this.subsystemBus?.dispatching ?? false);
|
|
5558
|
+
if (!hooksActive && !busActive) return;
|
|
5559
|
+
const base = { vault: this.vault, collection: this.name, userId: this.keyring.userId, timestamp: Date.now(), txId: this.#txIdForHook() };
|
|
5560
|
+
const event = opType === "put" ? { ...base, op: prepared.prior ? "update" : "create", docId: prepared.id, before: prepared.prior?.record ?? null, after: prepared.event, baseVersion: prepared.prior?.version ?? 0, version: prepared.version } : { ...base, op: "delete", docId: prepared.id, before: prepared.existing?.record ?? null, after: null, baseVersion: prepared.existing?.version ?? 0, version: (prepared.existing?.version ?? 0) + 1 };
|
|
5561
|
+
if (hooksActive) await this.writeHooks.runAfter(event);
|
|
5562
|
+
if (busActive) await this.subsystemBus.dispatch(busPoint, event);
|
|
5563
|
+
}
|
|
5564
|
+
_txAtomicSafe(opType) {
|
|
5565
|
+
if (this.materializedViewSource !== void 0 && this.materializedViewSource.registry().mvsForSource(this.name).length > 0 || this.derivationSource !== void 0 && this.derivationSource.registry().strategiesForSource(this.name).length > 0 || this.crdtMode !== void 0 || this.uniqueConstraints !== null || this.writeHooks !== void 0 && this.writeHooks.hasBeforeHandlers && !this.writeHooks.suppressed) return false;
|
|
5566
|
+
return opType === "put" ? Object.keys(this._refs).length === 0 : this.refEnforcer === void 0 || !this.refEnforcer._deleteCascadesPossible(this.name);
|
|
5567
|
+
}
|
|
5568
|
+
// @internal #893/#906-prep atomic-commit eligibility gate (Task 4) — false on any derivation/MV source (any lifecycle), CRDT mode, unique constraints, or refs on this write direction. Put uses precise outbound `_refs`; delete (#922) consults the enforcer's `_deleteCascadesPossible(name)` — Vault unions ALL THREE cascade sources `enforceRefsOnDelete` (with-shape/links/vault-facade.ts) fires from (lookup-ref edges, classic inbound refs, managed links); anything narrower (e.g. `getInbound` alone) would admit unsafe atomic deletes, because `_prepareDelete` runs those cascades DURING prepare. #931 narrows #906's hooks blanket: only BEFORE-hooks gate (they can REFUSE a write, which only `put()`/`delete()` honors); after-hooks and the `afterPut`/`afterDelete` observe bus cannot refuse, so the atomic path fires them itself post-finalize via `_fireAtomicAfterWrite` instead of forfeiting the batch (the pre-#931 db-global blanket cost multi-tab write-relay and forget-subject apps the atomic path entirely). See atomic-eligibility.ts.
|
|
5387
5569
|
_reconcileReadState(patch) {
|
|
5388
5570
|
if (patch.dictKeyFields) this.dictKeyFields = { ...patch.dictKeyFields, ...this.dictKeyFields };
|
|
5389
5571
|
if (patch.i18nFields) this.i18nFields = { ...patch.i18nFields, ...this.i18nFields };
|
|
@@ -5789,7 +5971,7 @@ var DeferredNumberingStore = class {
|
|
|
5789
5971
|
try {
|
|
5790
5972
|
await this.writeJson(NUMBERING_HEAD_COLLECTION, series, { series, lastSerial: serial, watermark: now.earliest }, headEnv?._v ?? 0);
|
|
5791
5973
|
} catch (err) {
|
|
5792
|
-
if (err
|
|
5974
|
+
if (isConflictError(err)) return [];
|
|
5793
5975
|
throw err;
|
|
5794
5976
|
}
|
|
5795
5977
|
for (const { id, entry } of settled) {
|
|
@@ -6733,7 +6915,7 @@ var VaultLinks = class {
|
|
|
6733
6915
|
// src/with-shape/links/lazy-handle.ts
|
|
6734
6916
|
function makeLazyLinkSetHandle(d) {
|
|
6735
6917
|
let engine = null;
|
|
6736
|
-
const load = () => engine ??= import("./link-set-
|
|
6918
|
+
const load = () => engine ??= import("./link-set-7F5ZPDEB.js").then(
|
|
6737
6919
|
({ LinkSet }) => new LinkSet(d.adapter, d.vault, d.name, d.spec, d.encrypted, d.getDEK, d.actor, d.emitter, d.endpointExists)
|
|
6738
6920
|
);
|
|
6739
6921
|
return {
|
|
@@ -7271,7 +7453,7 @@ function declareSatellite(ctx, collectionName, options, existingRegistry) {
|
|
|
7271
7453
|
ctx.forEachSyncEngine((e) => e.remirrorPairResolvers([spec.base, spec.satellite]));
|
|
7272
7454
|
const registry = reg;
|
|
7273
7455
|
const baseSchema = ctx.getBaseSchema(spec.base);
|
|
7274
|
-
void import("./post-register-
|
|
7456
|
+
void import("./post-register-PQSY544J.js").then((m) => m.postRegister(ctx.adapter, ctx.vaultName, spec, ctx.getDEK, baseSchema, registry)).catch(() => {
|
|
7275
7457
|
});
|
|
7276
7458
|
return reg;
|
|
7277
7459
|
}
|
|
@@ -8227,7 +8409,7 @@ var Vault = class {
|
|
|
8227
8409
|
const strategies = options.schemaUpdate ?? [];
|
|
8228
8410
|
const work = (async () => {
|
|
8229
8411
|
const dek = await this.getDEK(collectionName);
|
|
8230
|
-
const { persistSchemaIfNeeded } = await import("./register-
|
|
8412
|
+
const { persistSchemaIfNeeded } = await import("./register-S3ECUZPV.js");
|
|
8231
8413
|
const result = await persistSchemaIfNeeded({
|
|
8232
8414
|
store: this.adapter,
|
|
8233
8415
|
vault: this.name,
|
|
@@ -8376,7 +8558,7 @@ var Vault = class {
|
|
|
8376
8558
|
const work = (async () => {
|
|
8377
8559
|
try {
|
|
8378
8560
|
const dek = await this.getDEK(collectionName);
|
|
8379
|
-
await (await import("./register-
|
|
8561
|
+
await (await import("./register-S3ECUZPV.js")).persistSchemaIfNeeded({
|
|
8380
8562
|
store: this.adapter,
|
|
8381
8563
|
vault: this.name,
|
|
8382
8564
|
collectionName,
|
|
@@ -9130,6 +9312,27 @@ var Vault = class {
|
|
|
9130
9312
|
async enforceRefsOnDelete(collectionName, id) {
|
|
9131
9313
|
return this.linksEnforcer.enforceRefsOnDelete(this.graph, collectionName, id);
|
|
9132
9314
|
}
|
|
9315
|
+
/**
|
|
9316
|
+
* #922 — can a delete on `collectionName` trigger ANY cross-record work in
|
|
9317
|
+
* `enforceRefsOnDelete` above? Unions ALL THREE of its cascade sources —
|
|
9318
|
+
* lookup-ref edges (`graph.referencingEdgesOf`), classic inbound refs
|
|
9319
|
+
* (`refRegistry.getInbound`), and managed link sets whose either endpoint
|
|
9320
|
+
* is this collection. `Collection._txAtomicSafe('delete')` consults this
|
|
9321
|
+
* instead of the pre-#922 blanket enforcer-presence check: `_prepareDelete`
|
|
9322
|
+
* runs those cascades DURING prepare (not abortable), so a delete may take
|
|
9323
|
+
* the atomic tx path only when all three sources are provably absent.
|
|
9324
|
+
* Registry state only — no store reads, safe to call at commit time.
|
|
9325
|
+
*
|
|
9326
|
+
* @internal
|
|
9327
|
+
*/
|
|
9328
|
+
_deleteCascadesPossible(collectionName) {
|
|
9329
|
+
if (this.graph.referencingEdgesOf(collectionName).length > 0) return true;
|
|
9330
|
+
if (this.refRegistry.getInbound(collectionName).length > 0) return true;
|
|
9331
|
+
for (const spec of this.linkRegistry.values()) {
|
|
9332
|
+
if (spec.a === collectionName || spec.b === collectionName) return true;
|
|
9333
|
+
}
|
|
9334
|
+
return false;
|
|
9335
|
+
}
|
|
9133
9336
|
// ─── Join resolver) ────────────────────
|
|
9134
9337
|
/**
|
|
9135
9338
|
* Look up the `RefDescriptor` the left collection declared for a
|
|
@@ -9563,7 +9766,7 @@ var Vault = class {
|
|
|
9563
9766
|
async _initDerivations(handles) {
|
|
9564
9767
|
if (handles.length === 0) return;
|
|
9565
9768
|
const [{ DerivationRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
|
|
9566
|
-
import("./registry-
|
|
9769
|
+
import("./registry-FZOHKUME.js"),
|
|
9567
9770
|
import("./read-only-facade-CHCKSEPD.js")
|
|
9568
9771
|
]);
|
|
9569
9772
|
const registry = new DerivationRegistry();
|
|
@@ -9595,7 +9798,7 @@ var Vault = class {
|
|
|
9595
9798
|
*/
|
|
9596
9799
|
async _initMaterializedViews(handles) {
|
|
9597
9800
|
if (handles.length === 0) return;
|
|
9598
|
-
const { MaterializedViewRegistry } = await import("./registry-
|
|
9801
|
+
const { MaterializedViewRegistry } = await import("./registry-RISV7IDZ.js");
|
|
9599
9802
|
const registry = new MaterializedViewRegistry();
|
|
9600
9803
|
this.materializedViewRegistry = registry;
|
|
9601
9804
|
const db = this;
|
|
@@ -9620,7 +9823,7 @@ var Vault = class {
|
|
|
9620
9823
|
*/
|
|
9621
9824
|
async _initOverlayedViews(handles) {
|
|
9622
9825
|
if (handles.length === 0) return;
|
|
9623
|
-
const { OverlayedViewRegistry } = await import("./registry-
|
|
9826
|
+
const { OverlayedViewRegistry } = await import("./registry-ZE35A7WC.js");
|
|
9624
9827
|
const registry = new OverlayedViewRegistry();
|
|
9625
9828
|
const mvRegistry = this.materializedViewRegistry;
|
|
9626
9829
|
const overlayNames = /* @__PURE__ */ new Set();
|
|
@@ -9667,14 +9870,14 @@ var Vault = class {
|
|
|
9667
9870
|
if (!reg) {
|
|
9668
9871
|
throw new Error(`refreshView: no MV registered with name "${name}"`);
|
|
9669
9872
|
}
|
|
9670
|
-
const { MaterializedViewExecutor } = await import("./executor-
|
|
9873
|
+
const { MaterializedViewExecutor } = await import("./executor-M4ZZNX6S.js");
|
|
9671
9874
|
const result = await MaterializedViewExecutor.refresh(reg, {
|
|
9672
9875
|
getCollection: (n) => this.collection(n),
|
|
9673
9876
|
getActiveTxContext: () => this.noydb._activeTxContextOrNull,
|
|
9674
9877
|
getQueryContext: () => this,
|
|
9675
9878
|
dispatchCtx: this._dispatchCtx({ collection: name, id: "refreshView" })
|
|
9676
9879
|
});
|
|
9677
|
-
const { clearMVStaleFully } = await import("./stale-
|
|
9880
|
+
const { clearMVStaleFully } = await import("./stale-U3WO5MYN.js");
|
|
9678
9881
|
await clearMVStaleFully(this.adapter, this.name, registry, name);
|
|
9679
9882
|
return result;
|
|
9680
9883
|
}
|
|
@@ -9687,7 +9890,7 @@ var Vault = class {
|
|
|
9687
9890
|
if (registry === null) return { derived: 0, failed: 0, skippedFrozen: 0 };
|
|
9688
9891
|
const strategies = registry.strategiesForSource(sourceCollection);
|
|
9689
9892
|
if (strategies.length === 0) return { derived: 0, failed: 0, skippedFrozen: 0 };
|
|
9690
|
-
const { DerivationExecutor } = await import("./executor-
|
|
9893
|
+
const { DerivationExecutor } = await import("./executor-TI64S4LE.js");
|
|
9691
9894
|
const sourceColl = this.collection(sourceCollection);
|
|
9692
9895
|
const records = await sourceColl.list();
|
|
9693
9896
|
const ctx = { vault: this.derivationFacade ?? new (await import("./read-only-facade-CHCKSEPD.js")).ReadOnlyVaultFacade(this, "derivation") };
|
|
@@ -9714,7 +9917,7 @@ var Vault = class {
|
|
|
9714
9917
|
if (!outSpec) continue;
|
|
9715
9918
|
const outputColl = this.collection(outSpec.collection);
|
|
9716
9919
|
if (out.kind === "array") {
|
|
9717
|
-
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-
|
|
9920
|
+
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-WYXO6QQT.js");
|
|
9718
9921
|
const prior = await loadFanoutSidecar(this.adapter, this.name, spec.source, id, key, this.getDEK, this.encrypted);
|
|
9719
9922
|
const prevKeys = new Set(prior?.keys ?? []);
|
|
9720
9923
|
const newKeysList = out.entries.map((e) => e.key);
|
|
@@ -9941,7 +10144,7 @@ var Vault = class {
|
|
|
9941
10144
|
* collection.
|
|
9942
10145
|
*/
|
|
9943
10146
|
async delegate(opts) {
|
|
9944
|
-
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
10147
|
+
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-WMO3Q3O5.js");
|
|
9945
10148
|
if (!this.keyring.kek) {
|
|
9946
10149
|
throw new ValidationError(
|
|
9947
10150
|
"issueDelegation: keyring.kek is null \u2014 issuing a delegation requires a tier-1 unlock. Re-authenticate at tier 1 (secret) first."
|
|
@@ -9963,7 +10166,7 @@ var Vault = class {
|
|
|
9963
10166
|
* if the id does not exist.
|
|
9964
10167
|
*/
|
|
9965
10168
|
async revokeDelegation(id) {
|
|
9966
|
-
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
10169
|
+
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-WMO3Q3O5.js");
|
|
9967
10170
|
await revokeDelegation(this.adapter, this.name, id);
|
|
9968
10171
|
void DELEGATIONS_COLLECTION;
|
|
9969
10172
|
}
|
|
@@ -10211,7 +10414,7 @@ var Vault = class {
|
|
|
10211
10414
|
* @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
|
|
10212
10415
|
*/
|
|
10213
10416
|
async dumpSchema(opts = {}) {
|
|
10214
|
-
const { dumpVaultSchema } = await import("./walk-
|
|
10417
|
+
const { dumpVaultSchema } = await import("./walk-BF36V4SR.js");
|
|
10215
10418
|
return dumpVaultSchema(this, opts);
|
|
10216
10419
|
}
|
|
10217
10420
|
/**
|
|
@@ -10361,7 +10564,7 @@ var Vault = class {
|
|
|
10361
10564
|
* both modes round-trip cleanly.
|
|
10362
10565
|
*/
|
|
10363
10566
|
async dump() {
|
|
10364
|
-
const { dumpVault } = await import("./backup-
|
|
10567
|
+
const { dumpVault } = await import("./backup-ENTZYW37.js");
|
|
10365
10568
|
return dumpVault(this.backupContext());
|
|
10366
10569
|
}
|
|
10367
10570
|
/**
|
|
@@ -10413,7 +10616,7 @@ var Vault = class {
|
|
|
10413
10616
|
* — there's no chain to verify against.
|
|
10414
10617
|
*/
|
|
10415
10618
|
async load(backupJson) {
|
|
10416
|
-
const { loadVault } = await import("./backup-
|
|
10619
|
+
const { loadVault } = await import("./backup-ENTZYW37.js");
|
|
10417
10620
|
return loadVault(this.backupContext(), backupJson);
|
|
10418
10621
|
}
|
|
10419
10622
|
/**
|
|
@@ -10445,7 +10648,7 @@ var Vault = class {
|
|
|
10445
10648
|
* way to detect tampering of an in-place vault.
|
|
10446
10649
|
*/
|
|
10447
10650
|
async verifyBackupIntegrity() {
|
|
10448
|
-
const { verifyBackupIntegrity } = await import("./backup-
|
|
10651
|
+
const { verifyBackupIntegrity } = await import("./backup-ENTZYW37.js");
|
|
10449
10652
|
return verifyBackupIntegrity(this.backupContext());
|
|
10450
10653
|
}
|
|
10451
10654
|
/**
|
|
@@ -10663,7 +10866,7 @@ var Vault = class {
|
|
|
10663
10866
|
* is the live validator object, not a serialization of it).
|
|
10664
10867
|
*/
|
|
10665
10868
|
async exportJSON(opts = {}) {
|
|
10666
|
-
const { exportVaultJSON } = await import("./backup-
|
|
10869
|
+
const { exportVaultJSON } = await import("./backup-ENTZYW37.js");
|
|
10667
10870
|
return exportVaultJSON(this.backupContext(), opts);
|
|
10668
10871
|
}
|
|
10669
10872
|
};
|
|
@@ -10779,6 +10982,14 @@ var WriteHookRegistry = class {
|
|
|
10779
10982
|
get hasHandlers() {
|
|
10780
10983
|
return this.#before.length > 0 || this.#after.length > 0;
|
|
10781
10984
|
}
|
|
10985
|
+
/**
|
|
10986
|
+
* True when any BEFORE hook is registered — the refusal-capable kind. #931:
|
|
10987
|
+
* the atomic-commit eligibility gate keys on this alone; after-hooks are
|
|
10988
|
+
* observers and fire post-finalize on the atomic path instead of gating it.
|
|
10989
|
+
*/
|
|
10990
|
+
get hasBeforeHandlers() {
|
|
10991
|
+
return this.#before.length > 0;
|
|
10992
|
+
}
|
|
10782
10993
|
onBeforeWrite(handler) {
|
|
10783
10994
|
this.#before.push(handler);
|
|
10784
10995
|
return () => {
|
|
@@ -10943,7 +11154,7 @@ var ServiceBus = class {
|
|
|
10943
11154
|
}
|
|
10944
11155
|
};
|
|
10945
11156
|
|
|
10946
|
-
// src/with-
|
|
11157
|
+
// src/with-sync/tab-coordination.ts
|
|
10947
11158
|
var TabCoordinator = class {
|
|
10948
11159
|
tabId;
|
|
10949
11160
|
role = "unknown";
|
|
@@ -11124,7 +11335,7 @@ function defaultChannel(name = "noydb:tabs") {
|
|
|
11124
11335
|
};
|
|
11125
11336
|
}
|
|
11126
11337
|
|
|
11127
|
-
// src/with-
|
|
11338
|
+
// src/with-sync/tab-write-relay.ts
|
|
11128
11339
|
var CrossTabWriteRelay = class {
|
|
11129
11340
|
#channel;
|
|
11130
11341
|
#writerId;
|
|
@@ -12552,7 +12763,7 @@ var Noydb = class {
|
|
|
12552
12763
|
if (!facade) return;
|
|
12553
12764
|
const ctx = { existing, vault: facade, userId: e.userId, role: e.role };
|
|
12554
12765
|
await registry.runChecks(e.collection, incoming, ctx);
|
|
12555
|
-
const { GuardExecutor } = await import("./executor-
|
|
12766
|
+
const { GuardExecutor } = await import("./executor-YBK3I2OT.js");
|
|
12556
12767
|
for (const g of guards) {
|
|
12557
12768
|
await GuardExecutor.checkFrozenFields(g, e.docId, existing, incoming, e.computedFieldNames);
|
|
12558
12769
|
}
|
|
@@ -12676,7 +12887,8 @@ var Noydb = class {
|
|
|
12676
12887
|
const targets = normalizeSyncTargets(this.options.sync);
|
|
12677
12888
|
if (targets.length > 0) {
|
|
12678
12889
|
const primary = targets.find((t) => t.role === "sync-peer") ?? targets[0];
|
|
12679
|
-
const
|
|
12890
|
+
const declaredPolicy = this.options.syncPolicy ?? primary.policy;
|
|
12891
|
+
const effectivePolicy = declaredPolicy ?? INDEXED_STORE_POLICY;
|
|
12680
12892
|
syncEngine = this.strategies.sync.buildSyncEngine({
|
|
12681
12893
|
local: this.options.store,
|
|
12682
12894
|
remote: primary.store,
|
|
@@ -12688,6 +12900,7 @@ var Noydb = class {
|
|
|
12688
12900
|
...primary.label !== void 0 ? { label: primary.label } : {}
|
|
12689
12901
|
});
|
|
12690
12902
|
this.syncEngines.set(name, syncEngine);
|
|
12903
|
+
if (declaredPolicy) syncEngine.startScheduler();
|
|
12691
12904
|
for (const target of targets) {
|
|
12692
12905
|
if (target === primary) continue;
|
|
12693
12906
|
const targetPolicy = target.policy ?? this.options.syncPolicy ?? INDEXED_STORE_POLICY;
|
|
@@ -12703,6 +12916,7 @@ var Noydb = class {
|
|
|
12703
12916
|
});
|
|
12704
12917
|
const key = `${name}::${target.label ?? target.role}`;
|
|
12705
12918
|
this.syncEngines.set(key, engine);
|
|
12919
|
+
if (target.policy ?? this.options.syncPolicy) engine.startScheduler();
|
|
12706
12920
|
}
|
|
12707
12921
|
}
|
|
12708
12922
|
const comp = new Vault({
|
|
@@ -13516,6 +13730,7 @@ var Noydb = class {
|
|
|
13516
13730
|
close() {
|
|
13517
13731
|
this.closed = true;
|
|
13518
13732
|
this.snapshots.stop();
|
|
13733
|
+
for (const engine of this.syncEngines.values()) engine.stopScheduler();
|
|
13519
13734
|
if (this.sessionTimer) {
|
|
13520
13735
|
clearTimeout(this.sessionTimer);
|
|
13521
13736
|
this.sessionTimer = null;
|
|
@@ -13886,7 +14101,7 @@ async function createNoydb(options) {
|
|
|
13886
14101
|
throw new ValidationError("A secret (secret) or getKeyring callback is required when encryption is enabled");
|
|
13887
14102
|
}
|
|
13888
14103
|
if (!options.coordinationStrategy) options = { ...options, coordinationStrategy: await createDefaultCoordinationProvider(options.store) };
|
|
13889
|
-
if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-
|
|
14104
|
+
if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-M7REIE7H.js")).createUserApi };
|
|
13890
14105
|
if (!options.policyFactory) {
|
|
13891
14106
|
const policyModule = await import("./policy/index.js");
|
|
13892
14107
|
options = { ...options, policyFactory: policyModule.createNoydbPolicy, policyCheckGateFn: policyModule.checkGate };
|
|
@@ -13921,4 +14136,4 @@ export {
|
|
|
13921
14136
|
Noydb,
|
|
13922
14137
|
createNoydb
|
|
13923
14138
|
};
|
|
13924
|
-
//# sourceMappingURL=chunk-
|
|
14139
|
+
//# sourceMappingURL=chunk-5UKUOMO6.js.map
|