@noy-db/hub 0.4.0-pre.5 → 0.4.0-pre.6
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-22ES33N3.js → api-5QVQX4HG.js} +6 -6
- package/dist/attestation/index.js +14 -14
- package/dist/{backup-YCHAC575.js → backup-USYSNCYM.js} +6 -6
- package/dist/blobs/index.js +8 -5
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +6 -6
- package/dist/cargo/index.js +26 -28
- package/dist/{chunk-RWW3I3PO.js → chunk-2BVW754E.js} +2 -2
- package/dist/{chunk-VEGQYPCP.js → chunk-2ZSC454H.js} +3 -3
- package/dist/{chunk-S4YERMGJ.js → chunk-32467U5J.js} +3 -3
- package/dist/{chunk-UVBHM7AK.js → chunk-3GXDB3NQ.js} +4 -4
- package/dist/{chunk-L2CAWCQL.js → chunk-3S2YNMUS.js} +53 -5
- package/dist/chunk-3S2YNMUS.js.map +1 -0
- package/dist/{chunk-HAPY7WFP.js → chunk-3TZUC4WS.js} +9 -9
- package/dist/{chunk-M6QA2KK2.js → chunk-44Y3P5U6.js} +2 -2
- package/dist/{chunk-WQN5SM7P.js → chunk-4B3DL75F.js} +2 -2
- package/dist/{chunk-XUFAFHQM.js → chunk-5ABOFAHN.js} +7 -4
- package/dist/chunk-5ABOFAHN.js.map +1 -0
- package/dist/chunk-5D2ALSM5.js +19 -0
- package/dist/chunk-5D2ALSM5.js.map +1 -0
- package/dist/{chunk-OHV6T5JB.js → chunk-6SSWOUUS.js} +2 -2
- package/dist/{chunk-6RPWILRH.js → chunk-7IQWHYL2.js} +3 -3
- package/dist/chunk-AFHQATY4.js +47 -0
- package/dist/chunk-AFHQATY4.js.map +1 -0
- package/dist/{chunk-I2XEBEEF.js → chunk-AZXEOEQK.js} +3 -3
- package/dist/{chunk-K7BADAOS.js → chunk-C2V7AJO2.js} +3 -3
- package/dist/chunk-CADUYBQD.js +151 -0
- package/dist/chunk-CADUYBQD.js.map +1 -0
- package/dist/{chunk-YTW6ZIPD.js → chunk-DOZFU7OZ.js} +1 -1
- package/dist/chunk-DOZFU7OZ.js.map +1 -0
- package/dist/{chunk-YCAJDK4O.js → chunk-E7FSBI6I.js} +3 -3
- package/dist/chunk-EP5L47XV.js +22 -0
- package/dist/chunk-EP5L47XV.js.map +1 -0
- package/dist/{chunk-YWZEDG7F.js → chunk-EPME33Y4.js} +4 -4
- package/dist/{chunk-EEZCB74X.js → chunk-EWPS35AR.js} +465 -393
- package/dist/chunk-EWPS35AR.js.map +1 -0
- package/dist/{chunk-BY5YBSXA.js → chunk-GQT6J4FJ.js} +14 -1
- package/dist/chunk-GQT6J4FJ.js.map +1 -0
- package/dist/{chunk-YXZNGHID.js → chunk-H5GMROCB.js} +2 -2
- package/dist/{chunk-QMMOMBH6.js → chunk-HA7P3BTB.js} +24 -175
- package/dist/chunk-HA7P3BTB.js.map +1 -0
- package/dist/{chunk-FTCGEUOY.js → chunk-HDF5R2K6.js} +4 -4
- package/dist/{chunk-R2N37AA6.js → chunk-HVPW6PCX.js} +2 -2
- package/dist/{chunk-YXIVUWDU.js → chunk-HXVRRJBD.js} +3 -3
- package/dist/{chunk-5ATANZSW.js → chunk-ICYC5YNI.js} +4 -4
- package/dist/{chunk-7ICV4ASA.js → chunk-IUATR5UE.js} +25 -3
- package/dist/chunk-IUATR5UE.js.map +1 -0
- package/dist/{chunk-QZJEYZ4I.js → chunk-JGOKAZNB.js} +3 -3
- package/dist/{chunk-JN3SGXJE.js → chunk-JOCMXSR2.js} +1 -1
- package/dist/{chunk-JN3SGXJE.js.map → chunk-JOCMXSR2.js.map} +1 -1
- package/dist/{chunk-7BIJS6II.js → chunk-JTIPVW4J.js} +3 -3
- package/dist/{chunk-SC4JLMZI.js → chunk-KCZAFDP5.js} +2 -2
- package/dist/{chunk-GP54LU5N.js → chunk-LG2GUYRX.js} +7 -7
- package/dist/{chunk-J5TEU77Q.js → chunk-LN3MQFUE.js} +54 -2
- package/dist/chunk-LN3MQFUE.js.map +1 -0
- package/dist/{chunk-FIP7KI2P.js → chunk-M4GO4ZJK.js} +205 -15
- package/dist/chunk-M4GO4ZJK.js.map +1 -0
- package/dist/{chunk-QMZ5A6FQ.js → chunk-M7W2KYTL.js} +2 -2
- package/dist/{chunk-K4BWPNJO.js → chunk-MLCTPWSO.js} +3 -3
- package/dist/{chunk-GEEJPID6.js → chunk-MMVQ3SUO.js} +3 -3
- package/dist/{chunk-HQKRZIX6.js → chunk-MPPWL64H.js} +24 -41
- package/dist/chunk-MPPWL64H.js.map +1 -0
- package/dist/{chunk-YZN6NRTR.js → chunk-MQBFT2OT.js} +11 -9
- package/dist/chunk-MQBFT2OT.js.map +1 -0
- package/dist/{chunk-TNJVDG2B.js → chunk-NA374QG7.js} +2 -2
- package/dist/chunk-NIKO2BBZ.js +23 -0
- package/dist/chunk-NIKO2BBZ.js.map +1 -0
- package/dist/chunk-PEOZ34EM.js +13 -0
- package/dist/chunk-PEOZ34EM.js.map +1 -0
- package/dist/chunk-PVEWA2DU.js +23 -0
- package/dist/chunk-PVEWA2DU.js.map +1 -0
- package/dist/{chunk-V5JUAW4M.js → chunk-QVIZDLAR.js} +5 -5
- package/dist/{chunk-DYZ5CCVM.js → chunk-RM5EXCFF.js} +1 -1
- package/dist/{chunk-DYZ5CCVM.js.map → chunk-RM5EXCFF.js.map} +1 -1
- package/dist/chunk-SMY5X46Z.js +14 -0
- package/dist/chunk-SMY5X46Z.js.map +1 -0
- package/dist/{chunk-2CRZOVDI.js → chunk-UNREYBZO.js} +2 -2
- package/dist/{chunk-KJTIAECI.js → chunk-V2R2VWER.js} +168 -9
- package/dist/chunk-V2R2VWER.js.map +1 -0
- package/dist/{chunk-CKUYQO2P.js → chunk-VDTWFN2P.js} +7 -5
- package/dist/chunk-VDTWFN2P.js.map +1 -0
- package/dist/chunk-VKQCVU2Z.js +21 -0
- package/dist/chunk-VKQCVU2Z.js.map +1 -0
- package/dist/{chunk-UTEATWHO.js → chunk-VNJMLOQS.js} +4 -4
- package/dist/{chunk-JAMDDLIM.js → chunk-WCJJQV2D.js} +2 -2
- package/dist/{chunk-OMSKGLYA.js → chunk-WWBC4KLB.js} +2 -2
- package/dist/{chunk-JIHH26WQ.js → chunk-XG7OZDOS.js} +3 -3
- package/dist/{chunk-QBOQI6PG.js → chunk-XONZGK6J.js} +2 -2
- package/dist/{chunk-YQQPNXNO.js → chunk-XSOGLHGY.js} +2 -2
- package/dist/{chunk-3OWYOECI.js → chunk-XY6MNSAF.js} +4 -4
- package/dist/chunk-XZHEOSQ2.js +16 -0
- package/dist/chunk-XZHEOSQ2.js.map +1 -0
- package/dist/{chunk-X3MWEFPT.js → chunk-YGMREQAK.js} +3 -3
- package/dist/chunk-YMUFFJCO.js +23 -0
- package/dist/chunk-YMUFFJCO.js.map +1 -0
- package/dist/{chunk-3LJYHE7S.js → chunk-ZDFU34XY.js} +9 -6
- package/dist/{chunk-3LJYHE7S.js.map → chunk-ZDFU34XY.js.map} +1 -1
- package/dist/{chunk-ILM6X6CP.js → chunk-ZF572E2M.js} +2 -2
- package/dist/{chunk-TNATF3HB.js → chunk-ZGEFBDPR.js} +2 -2
- package/dist/chunk-ZGEFBDPR.js.map +1 -0
- package/dist/{chunk-OGVE4IJW.js → chunk-ZHMUFYZF.js} +4 -4
- package/dist/{chunk-YFFEF6HR.js → chunk-ZHZ4PET5.js} +2 -2
- package/dist/{chunk-YZNKFYDC.js → chunk-ZM72UO3Y.js} +2 -2
- package/dist/classified/index.js +3 -3
- package/dist/{classified-marker-52P3D72W.js → classified-marker-SVDRXLD3.js} +3 -3
- package/dist/{collection-facade-XKCFHSLR.js → collection-facade-S5PPKZD5.js} +9 -9
- package/dist/consent/index.js +8 -4
- package/dist/consent/index.js.map +1 -1
- package/dist/{cover-5BSNJREH.js → cover-ADBCTIKN.js} +3 -3
- package/dist/crdt/index.js +4 -0
- package/dist/crdt/index.js.map +1 -1
- package/dist/{dead-filter-JXVCKS6W.js → dead-filter-HKDMTMVY.js} +2 -2
- package/dist/{delegation-WWZPEDK2.js → delegation-EV7LKJPH.js} +5 -5
- package/dist/derivations/index.js +3 -3
- package/dist/{derive-CWWFEQ4N.js → derive-5LDJW76F.js} +4 -4
- package/dist/{dispatch-PKQQFDBT.js → dispatch-SPMYNXNW.js} +12 -11
- package/dist/{dispatch-PKQQFDBT.js.map → dispatch-SPMYNXNW.js.map} +1 -1
- package/dist/{dispatch-SMXUO7W5.js → dispatch-V5MSMQYX.js} +5 -5
- package/dist/{enclave-I5H3GINP.js → enclave-ZA7C3H2L.js} +4 -4
- package/dist/executor-SVHAJZ4A.js +28 -0
- package/dist/{export-accessible-FBL6TDSK.js → export-accessible-S35YKIBL.js} +7 -7
- package/dist/{extract-partition-ZYIRYMTI.js → extract-partition-UVHAM5WZ.js} +10 -10
- package/dist/{fanout-sidecar-WWXVHHUH.js → fanout-sidecar-HRMHC34B.js} +4 -4
- package/dist/forget/index.js +4 -4
- package/dist/history/index.js +10 -6
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +10 -8
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +4 -7
- package/dist/index.js +94 -151
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +3 -1
- package/dist/indexing/index.js.map +1 -1
- package/dist/{issue-F76PAGIR.js → issue-5X3SMCF4.js} +6 -6
- package/dist/kernel/lazy.d.ts +30 -0
- package/dist/kernel/noydb.d.ts +21 -10
- package/dist/kernel/query/builder.d.ts +10 -10
- package/dist/kernel/query/index.d.ts +0 -6
- package/dist/kernel/query/scan-builder.d.ts +4 -4
- package/dist/kernel/types.d.ts +5 -5
- package/dist/{ledger-M2BKCNVS.js → ledger-K6JBFL3Z.js} +6 -6
- package/dist/liberate-NHTCKBU4.js +24 -0
- package/dist/{link-set-ZU4E5J5S.js → link-set-XVZY2ODC.js} +5 -5
- package/dist/materialized-views/index.js +15 -12
- package/dist/noydb-TI3RFU6M.js +78 -0
- package/dist/periods/index.js +9 -7
- package/dist/pod/index.js +5 -6
- package/dist/{policy-IY2YEA3A.js → policy-QWGJB7P7.js} +4 -4
- package/dist/port/with/collection-registries.d.ts +62 -0
- package/dist/port/with/strategies.d.ts +2 -2
- package/dist/port/with/team-strategy.d.ts +2 -1
- package/dist/portability/index.js +6 -6
- package/dist/{post-register-XIAHB6KF.js → post-register-5VHHVFJY.js} +4 -4
- package/dist/query/index.js +4 -44
- package/dist/{aggregate → reduce}/index.js +22 -15
- package/dist/reduce/index.js.map +1 -0
- package/dist/{register-HB4TQZSV.js → register-CEX7R7NE.js} +6 -6
- package/dist/{registry-6BMBFEXT.js → registry-DIKMRXUC.js} +5 -5
- package/dist/{registry-JOFO7RAH.js → registry-EWIB5NTI.js} +4 -4
- package/dist/{request-withdrawal-UN3TRHWI.js → request-withdrawal-AAG57QO4.js} +9 -9
- package/dist/{reveal-VWXRV2XU.js → reveal-7OOT5XPD.js} +3 -3
- package/dist/{revoke-OLO2OVR7.js → revoke-U5LCIJMF.js} +6 -6
- package/dist/sealed-record/index.js +6 -6
- package/dist/{seed-CDBFOTIK.js → seed-GVOI6QP6.js} +6 -6
- package/dist/session/index.js +7 -3
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +4 -0
- package/dist/shadow/index.js.map +1 -1
- package/dist/{signer-MGGKPYAN.js → signer-NAA2OX7H.js} +5 -5
- package/dist/snapshots/index.js +9 -5
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-NBROTA66.js → stale-BJO2WIN7.js} +6 -5
- package/dist/{storage-3R37QZLA.js → storage-FL7XXZTN.js} +5 -5
- package/dist/{store-coordination-provider-P3IU5JHD.js → store-coordination-provider-DX5HECK3.js} +3 -3
- package/dist/sync/index.js +8 -4
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +15 -17
- package/dist/tiers/index.js +4 -4
- package/dist/tx/index.js +5 -1
- package/dist/tx/index.js.map +1 -1
- package/dist/via/blob/index.d.ts +2 -0
- package/dist/via/i18n/core.d.ts +1 -1
- package/dist/via/i18n/index.d.ts +2 -0
- package/dist/via/money/money-reducer.d.ts +2 -2
- package/dist/{walk-E3OVLBFR.js → walk-JXMWKKQW.js} +5 -5
- package/dist/with-audit/consent/index.d.ts +2 -0
- package/dist/with-audit/periods/index.d.ts +2 -0
- package/dist/with-cargo/floor.d.ts +3 -3
- package/dist/with-commit/crdt/index.d.ts +2 -0
- package/dist/with-commit/history/index.d.ts +2 -0
- package/dist/with-fork/shadow/index.d.ts +2 -0
- package/dist/with-fork/snapshots/index.d.ts +2 -0
- package/dist/with-formula/materialized-views/types.d.ts +7 -7
- package/dist/with-lookup/indexing/index.d.ts +2 -0
- package/dist/with-lookup/{aggregate → reduce}/active.d.ts +8 -8
- package/dist/with-lookup/{aggregate → reduce}/groupby.d.ts +21 -21
- package/dist/with-lookup/reduce/index.d.ts +34 -0
- package/dist/with-lookup/{aggregate → reduce}/reducers.d.ts +10 -10
- package/dist/with-lookup/{aggregate/aggregation.d.ts → reduce/reduction.d.ts} +21 -21
- package/dist/with-lookup/{aggregate → reduce}/strategy.d.ts +15 -15
- package/dist/with-party/session/index.d.ts +2 -0
- package/dist/with-party/sync/index.d.ts +2 -0
- package/dist/with-party/team/keyring.d.ts +20 -1
- package/dist/with-party/team/noydb-facade.d.ts +2 -1
- package/dist/{withdraw-accessible-Q2EMATCU.js → withdraw-accessible-GO6KQJVM.js} +8 -8
- package/package.json +6 -34
- package/dist/aggregate/index.js.map +0 -1
- package/dist/as/index.js +0 -30
- package/dist/at/index.js +0 -1
- package/dist/by/index.js +0 -11
- package/dist/chunk-2YELV6TV.js +0 -1
- package/dist/chunk-7ICV4ASA.js.map +0 -1
- package/dist/chunk-AFAPBZAA.js +0 -54
- package/dist/chunk-AFAPBZAA.js.map +0 -1
- package/dist/chunk-BY5YBSXA.js.map +0 -1
- package/dist/chunk-CJVEAVYH.js +0 -205
- package/dist/chunk-CJVEAVYH.js.map +0 -1
- package/dist/chunk-CKUYQO2P.js.map +0 -1
- package/dist/chunk-EEZCB74X.js.map +0 -1
- package/dist/chunk-FIP7KI2P.js.map +0 -1
- package/dist/chunk-HQKRZIX6.js.map +0 -1
- package/dist/chunk-IGLU4ME7.js +0 -255
- package/dist/chunk-IGLU4ME7.js.map +0 -1
- package/dist/chunk-J5TEU77Q.js.map +0 -1
- package/dist/chunk-KJTIAECI.js.map +0 -1
- package/dist/chunk-L2CAWCQL.js.map +0 -1
- package/dist/chunk-LB7FD65R.js +0 -163
- package/dist/chunk-LB7FD65R.js.map +0 -1
- package/dist/chunk-QMMOMBH6.js.map +0 -1
- package/dist/chunk-TNATF3HB.js.map +0 -1
- package/dist/chunk-XUFAFHQM.js.map +0 -1
- package/dist/chunk-YTW6ZIPD.js.map +0 -1
- package/dist/chunk-YZN6NRTR.js.map +0 -1
- package/dist/executor-SHYLIBOM.js +0 -26
- package/dist/in/index.js +0 -1
- package/dist/liberate-ZP7UB57K.js +0 -24
- package/dist/noydb-BNDGEK5X.js +0 -71
- package/dist/on/index.js +0 -17
- package/dist/port/as/index.d.ts +0 -26
- package/dist/port/at/index.d.ts +0 -18
- package/dist/port/in/index.d.ts +0 -21
- package/dist/port/on/index.d.ts +0 -27
- package/dist/port/ui/index.d.ts +0 -21
- package/dist/port/with/index.d.ts +0 -18
- package/dist/request-withdrawal-UN3TRHWI.js.map +0 -1
- package/dist/revoke-OLO2OVR7.js.map +0 -1
- package/dist/signer-MGGKPYAN.js.map +0 -1
- package/dist/stale-NBROTA66.js.map +0 -1
- package/dist/storage-3R37QZLA.js.map +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/ui/index.js.map +0 -1
- package/dist/with/index.js +0 -31
- package/dist/with/index.js.map +0 -1
- package/dist/with-lookup/aggregate/index.d.ts +0 -23
- package/dist/withdraw-accessible-Q2EMATCU.js.map +0 -1
- /package/dist/{api-22ES33N3.js.map → api-5QVQX4HG.js.map} +0 -0
- /package/dist/{backup-YCHAC575.js.map → backup-USYSNCYM.js.map} +0 -0
- /package/dist/{chunk-RWW3I3PO.js.map → chunk-2BVW754E.js.map} +0 -0
- /package/dist/{chunk-VEGQYPCP.js.map → chunk-2ZSC454H.js.map} +0 -0
- /package/dist/{chunk-S4YERMGJ.js.map → chunk-32467U5J.js.map} +0 -0
- /package/dist/{chunk-UVBHM7AK.js.map → chunk-3GXDB3NQ.js.map} +0 -0
- /package/dist/{chunk-HAPY7WFP.js.map → chunk-3TZUC4WS.js.map} +0 -0
- /package/dist/{chunk-M6QA2KK2.js.map → chunk-44Y3P5U6.js.map} +0 -0
- /package/dist/{chunk-WQN5SM7P.js.map → chunk-4B3DL75F.js.map} +0 -0
- /package/dist/{chunk-OHV6T5JB.js.map → chunk-6SSWOUUS.js.map} +0 -0
- /package/dist/{chunk-6RPWILRH.js.map → chunk-7IQWHYL2.js.map} +0 -0
- /package/dist/{chunk-I2XEBEEF.js.map → chunk-AZXEOEQK.js.map} +0 -0
- /package/dist/{chunk-K7BADAOS.js.map → chunk-C2V7AJO2.js.map} +0 -0
- /package/dist/{chunk-YCAJDK4O.js.map → chunk-E7FSBI6I.js.map} +0 -0
- /package/dist/{chunk-YWZEDG7F.js.map → chunk-EPME33Y4.js.map} +0 -0
- /package/dist/{chunk-YXZNGHID.js.map → chunk-H5GMROCB.js.map} +0 -0
- /package/dist/{chunk-FTCGEUOY.js.map → chunk-HDF5R2K6.js.map} +0 -0
- /package/dist/{chunk-R2N37AA6.js.map → chunk-HVPW6PCX.js.map} +0 -0
- /package/dist/{chunk-YXIVUWDU.js.map → chunk-HXVRRJBD.js.map} +0 -0
- /package/dist/{chunk-5ATANZSW.js.map → chunk-ICYC5YNI.js.map} +0 -0
- /package/dist/{chunk-QZJEYZ4I.js.map → chunk-JGOKAZNB.js.map} +0 -0
- /package/dist/{chunk-7BIJS6II.js.map → chunk-JTIPVW4J.js.map} +0 -0
- /package/dist/{chunk-SC4JLMZI.js.map → chunk-KCZAFDP5.js.map} +0 -0
- /package/dist/{chunk-GP54LU5N.js.map → chunk-LG2GUYRX.js.map} +0 -0
- /package/dist/{chunk-QMZ5A6FQ.js.map → chunk-M7W2KYTL.js.map} +0 -0
- /package/dist/{chunk-K4BWPNJO.js.map → chunk-MLCTPWSO.js.map} +0 -0
- /package/dist/{chunk-GEEJPID6.js.map → chunk-MMVQ3SUO.js.map} +0 -0
- /package/dist/{chunk-TNJVDG2B.js.map → chunk-NA374QG7.js.map} +0 -0
- /package/dist/{chunk-V5JUAW4M.js.map → chunk-QVIZDLAR.js.map} +0 -0
- /package/dist/{chunk-2CRZOVDI.js.map → chunk-UNREYBZO.js.map} +0 -0
- /package/dist/{chunk-UTEATWHO.js.map → chunk-VNJMLOQS.js.map} +0 -0
- /package/dist/{chunk-JAMDDLIM.js.map → chunk-WCJJQV2D.js.map} +0 -0
- /package/dist/{chunk-OMSKGLYA.js.map → chunk-WWBC4KLB.js.map} +0 -0
- /package/dist/{chunk-JIHH26WQ.js.map → chunk-XG7OZDOS.js.map} +0 -0
- /package/dist/{chunk-QBOQI6PG.js.map → chunk-XONZGK6J.js.map} +0 -0
- /package/dist/{chunk-YQQPNXNO.js.map → chunk-XSOGLHGY.js.map} +0 -0
- /package/dist/{chunk-3OWYOECI.js.map → chunk-XY6MNSAF.js.map} +0 -0
- /package/dist/{chunk-X3MWEFPT.js.map → chunk-YGMREQAK.js.map} +0 -0
- /package/dist/{chunk-ILM6X6CP.js.map → chunk-ZF572E2M.js.map} +0 -0
- /package/dist/{chunk-OGVE4IJW.js.map → chunk-ZHMUFYZF.js.map} +0 -0
- /package/dist/{chunk-YFFEF6HR.js.map → chunk-ZHZ4PET5.js.map} +0 -0
- /package/dist/{chunk-YZNKFYDC.js.map → chunk-ZM72UO3Y.js.map} +0 -0
- /package/dist/{classified-marker-52P3D72W.js.map → classified-marker-SVDRXLD3.js.map} +0 -0
- /package/dist/{as/index.js.map → collection-facade-S5PPKZD5.js.map} +0 -0
- /package/dist/{at/index.js.map → cover-ADBCTIKN.js.map} +0 -0
- /package/dist/{dead-filter-JXVCKS6W.js.map → dead-filter-HKDMTMVY.js.map} +0 -0
- /package/dist/{by/index.js.map → delegation-EV7LKJPH.js.map} +0 -0
- /package/dist/{chunk-2YELV6TV.js.map → derive-5LDJW76F.js.map} +0 -0
- /package/dist/{dispatch-SMXUO7W5.js.map → dispatch-V5MSMQYX.js.map} +0 -0
- /package/dist/{collection-facade-XKCFHSLR.js.map → enclave-ZA7C3H2L.js.map} +0 -0
- /package/dist/{cover-5BSNJREH.js.map → executor-SVHAJZ4A.js.map} +0 -0
- /package/dist/{delegation-WWZPEDK2.js.map → export-accessible-S35YKIBL.js.map} +0 -0
- /package/dist/{derive-CWWFEQ4N.js.map → extract-partition-UVHAM5WZ.js.map} +0 -0
- /package/dist/{fanout-sidecar-WWXVHHUH.js.map → fanout-sidecar-HRMHC34B.js.map} +0 -0
- /package/dist/{enclave-I5H3GINP.js.map → issue-5X3SMCF4.js.map} +0 -0
- /package/dist/{executor-SHYLIBOM.js.map → ledger-K6JBFL3Z.js.map} +0 -0
- /package/dist/{export-accessible-FBL6TDSK.js.map → liberate-NHTCKBU4.js.map} +0 -0
- /package/dist/{extract-partition-ZYIRYMTI.js.map → link-set-XVZY2ODC.js.map} +0 -0
- /package/dist/{in/index.js.map → noydb-TI3RFU6M.js.map} +0 -0
- /package/dist/{issue-F76PAGIR.js.map → policy-QWGJB7P7.js.map} +0 -0
- /package/dist/{post-register-XIAHB6KF.js.map → post-register-5VHHVFJY.js.map} +0 -0
- /package/dist/{ledger-M2BKCNVS.js.map → register-CEX7R7NE.js.map} +0 -0
- /package/dist/{liberate-ZP7UB57K.js.map → registry-DIKMRXUC.js.map} +0 -0
- /package/dist/{link-set-ZU4E5J5S.js.map → registry-EWIB5NTI.js.map} +0 -0
- /package/dist/{noydb-BNDGEK5X.js.map → request-withdrawal-AAG57QO4.js.map} +0 -0
- /package/dist/{reveal-VWXRV2XU.js.map → reveal-7OOT5XPD.js.map} +0 -0
- /package/dist/{on/index.js.map → revoke-U5LCIJMF.js.map} +0 -0
- /package/dist/{seed-CDBFOTIK.js.map → seed-GVOI6QP6.js.map} +0 -0
- /package/dist/{policy-IY2YEA3A.js.map → signer-NAA2OX7H.js.map} +0 -0
- /package/dist/{register-HB4TQZSV.js.map → stale-BJO2WIN7.js.map} +0 -0
- /package/dist/{registry-6BMBFEXT.js.map → storage-FL7XXZTN.js.map} +0 -0
- /package/dist/{store-coordination-provider-P3IU5JHD.js.map → store-coordination-provider-DX5HECK3.js.map} +0 -0
- /package/dist/{walk-E3OVLBFR.js.map → walk-JXMWKKQW.js.map} +0 -0
- /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
- /package/dist/{registry-JOFO7RAH.js.map → withdraw-accessible-GO6KQJVM.js.map} +0 -0
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NO_SEQUENCE,
|
|
3
|
+
SEQUENCE_COLLECTION,
|
|
4
|
+
compileSequenceFormat,
|
|
5
|
+
resolveSequenceKey
|
|
6
|
+
} from "./chunk-YGMREQAK.js";
|
|
1
7
|
import {
|
|
2
8
|
loadVaultPolicy
|
|
3
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M7W2KYTL.js";
|
|
4
10
|
import {
|
|
5
11
|
jsonSchemaToFields
|
|
6
12
|
} from "./chunk-VYYM3MEN.js";
|
|
7
13
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
compileSequenceFormat,
|
|
11
|
-
resolveSequenceKey
|
|
12
|
-
} from "./chunk-X3MWEFPT.js";
|
|
14
|
+
resolveStaleOnRead
|
|
15
|
+
} from "./chunk-5ABOFAHN.js";
|
|
13
16
|
import {
|
|
14
17
|
LinkIntegrityError,
|
|
15
18
|
isLinkCollectionName,
|
|
@@ -20,12 +23,9 @@ import {
|
|
|
20
23
|
hashFields,
|
|
21
24
|
validateSatelliteDeclaration
|
|
22
25
|
} from "./chunk-522MBPE5.js";
|
|
23
|
-
import {
|
|
24
|
-
resolveStaleOnRead
|
|
25
|
-
} from "./chunk-XUFAFHQM.js";
|
|
26
26
|
import {
|
|
27
27
|
loadFence
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-44Y3P5U6.js";
|
|
29
29
|
import {
|
|
30
30
|
InvertedIndex,
|
|
31
31
|
MemoryIndexStore,
|
|
@@ -34,35 +34,28 @@ import {
|
|
|
34
34
|
buildPersistedIndexCallbacks,
|
|
35
35
|
encodeVecId,
|
|
36
36
|
syncTierSearch
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3TZUC4WS.js";
|
|
38
38
|
import {
|
|
39
39
|
derivePersistedSchema,
|
|
40
40
|
isZod4Schema
|
|
41
41
|
} from "./chunk-SEU6QHH4.js";
|
|
42
|
-
import {
|
|
43
|
-
isBaseLive,
|
|
44
|
-
liveBaseIdSet
|
|
45
|
-
} from "./chunk-GYGLAVCX.js";
|
|
46
42
|
import {
|
|
47
43
|
CustodyApi,
|
|
48
44
|
NO_CARGO,
|
|
49
|
-
NO_CUSTODY
|
|
50
|
-
|
|
45
|
+
NO_CUSTODY,
|
|
46
|
+
runDrainBarrier
|
|
47
|
+
} from "./chunk-3S2YNMUS.js";
|
|
51
48
|
import {
|
|
52
49
|
resolveManagedSecret,
|
|
53
50
|
saveSealedSecret
|
|
54
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-6SSWOUUS.js";
|
|
55
52
|
import {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
assertCanImport,
|
|
60
|
-
canExport,
|
|
61
|
-
canImport
|
|
62
|
-
} from "./chunk-IGLU4ME7.js";
|
|
53
|
+
isBaseLive,
|
|
54
|
+
liveBaseIdSet
|
|
55
|
+
} from "./chunk-GYGLAVCX.js";
|
|
63
56
|
import {
|
|
64
|
-
|
|
65
|
-
} from "./chunk-
|
|
57
|
+
NO_SYNC
|
|
58
|
+
} from "./chunk-EP5L47XV.js";
|
|
66
59
|
import {
|
|
67
60
|
NO_ATTESTATION
|
|
68
61
|
} from "./chunk-GTNRMJYH.js";
|
|
@@ -70,15 +63,24 @@ import {
|
|
|
70
63
|
NO_CLASSIFIED,
|
|
71
64
|
guardClassifiedCompat,
|
|
72
65
|
resolveClassifiedFields
|
|
73
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-ZM72UO3Y.js";
|
|
74
67
|
import {
|
|
75
68
|
NO_TIERS,
|
|
76
69
|
classifySealedShred,
|
|
77
70
|
syncDerivedOutputs
|
|
78
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-HDF5R2K6.js";
|
|
79
72
|
import {
|
|
80
73
|
NO_PORTABILITY
|
|
81
74
|
} from "./chunk-OWLZONGX.js";
|
|
75
|
+
import {
|
|
76
|
+
NO_PERIODS
|
|
77
|
+
} from "./chunk-IUATR5UE.js";
|
|
78
|
+
import {
|
|
79
|
+
NO_SHADOW
|
|
80
|
+
} from "./chunk-SMY5X46Z.js";
|
|
81
|
+
import {
|
|
82
|
+
NO_SNAPSHOTS
|
|
83
|
+
} from "./chunk-NIKO2BBZ.js";
|
|
82
84
|
import {
|
|
83
85
|
TxContext,
|
|
84
86
|
bestEffortRevert,
|
|
@@ -111,25 +113,29 @@ import {
|
|
|
111
113
|
selfWriteFieldEqual,
|
|
112
114
|
touchFor,
|
|
113
115
|
updateReferencingRecords
|
|
114
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-JTIPVW4J.js";
|
|
117
|
+
import {
|
|
118
|
+
lazy
|
|
119
|
+
} from "./chunk-5D2ALSM5.js";
|
|
115
120
|
import {
|
|
116
121
|
OverlayedCollection
|
|
117
122
|
} from "./chunk-PWWWMRT7.js";
|
|
118
123
|
import {
|
|
119
|
-
NO_AGGREGATE,
|
|
120
124
|
Query,
|
|
121
125
|
ScanBuilder
|
|
122
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-MPPWL64H.js";
|
|
123
127
|
import {
|
|
124
128
|
EXPORT_AUDIT_COLLECTION,
|
|
129
|
+
NO_BLOBS,
|
|
125
130
|
createExportBlobsHandle,
|
|
126
131
|
runCompaction
|
|
127
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-LN3MQFUE.js";
|
|
128
133
|
import {
|
|
129
134
|
LazyQuery,
|
|
135
|
+
NO_INDEXING,
|
|
130
136
|
decodeIdxId,
|
|
131
137
|
encodeIdxId
|
|
132
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-GQT6J4FJ.js";
|
|
133
139
|
import {
|
|
134
140
|
IMPLICIT_LAZY,
|
|
135
141
|
Lru,
|
|
@@ -137,13 +143,22 @@ import {
|
|
|
137
143
|
} from "./chunk-NO272T7Q.js";
|
|
138
144
|
import {
|
|
139
145
|
canonicalGroupKey
|
|
140
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-XZHEOSQ2.js";
|
|
147
|
+
import {
|
|
148
|
+
NO_REDUCE
|
|
149
|
+
} from "./chunk-YMUFFJCO.js";
|
|
141
150
|
import {
|
|
142
151
|
readPath
|
|
143
152
|
} from "./chunk-IGJCYUT5.js";
|
|
153
|
+
import {
|
|
154
|
+
NO_CRDT
|
|
155
|
+
} from "./chunk-PVEWA2DU.js";
|
|
156
|
+
import {
|
|
157
|
+
NO_CONSENT
|
|
158
|
+
} from "./chunk-PEOZ34EM.js";
|
|
144
159
|
import {
|
|
145
160
|
dictCollectionName
|
|
146
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-C2V7AJO2.js";
|
|
147
162
|
import {
|
|
148
163
|
NO_I18N,
|
|
149
164
|
getAtPath,
|
|
@@ -151,9 +166,8 @@ import {
|
|
|
151
166
|
isDictKeyDescriptor,
|
|
152
167
|
isI18nTextDescriptor,
|
|
153
168
|
isStaticDictDescriptor
|
|
154
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-JOCMXSR2.js";
|
|
155
170
|
import {
|
|
156
|
-
installViaBinder,
|
|
157
171
|
isViaInstalled,
|
|
158
172
|
viaBinder
|
|
159
173
|
} from "./chunk-ZUDAK436.js";
|
|
@@ -161,13 +175,21 @@ import {
|
|
|
161
175
|
NO_TEAM,
|
|
162
176
|
enrollAuthenticator,
|
|
163
177
|
findAuthenticator,
|
|
178
|
+
hasRecoveryEnrolled,
|
|
179
|
+
hasStrongRecoveryEnrolled,
|
|
180
|
+
loadPaperRecoveryEntries,
|
|
181
|
+
loadShamirRecoveryEntries,
|
|
182
|
+
mintPaperRecoveryEntry,
|
|
183
|
+
mintShamirRecoveryEntry,
|
|
164
184
|
recoverSecret,
|
|
165
185
|
recoverUser,
|
|
166
186
|
removeAuthenticator,
|
|
167
187
|
rotateSecret,
|
|
188
|
+
savePaperRecoveryEntries,
|
|
189
|
+
saveShamirRecoveryEntries,
|
|
168
190
|
updateAuthenticator,
|
|
169
191
|
writeMagicLinkGrant
|
|
170
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-M4GO4ZJK.js";
|
|
171
193
|
import {
|
|
172
194
|
assertKeyringOpenAllowed,
|
|
173
195
|
buildRecipientKeyringFile,
|
|
@@ -175,26 +197,18 @@ import {
|
|
|
175
197
|
createOwnerKeyring,
|
|
176
198
|
ensureCollectionDEK,
|
|
177
199
|
hasAccess,
|
|
200
|
+
hasExportCapability,
|
|
201
|
+
hasImportCapability,
|
|
178
202
|
hasWritePermission,
|
|
179
203
|
isSecretBearingReservedCollection,
|
|
180
204
|
listUsers,
|
|
181
205
|
loadKeyring,
|
|
182
206
|
updateKeyringIdentity
|
|
183
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-ZDFU34XY.js";
|
|
184
208
|
import {
|
|
185
209
|
persistDirectoryConfig,
|
|
186
210
|
readDirectoryConfig
|
|
187
|
-
} from "./chunk-
|
|
188
|
-
import {
|
|
189
|
-
hasRecoveryEnrolled,
|
|
190
|
-
hasStrongRecoveryEnrolled,
|
|
191
|
-
loadPaperRecoveryEntries,
|
|
192
|
-
loadShamirRecoveryEntries,
|
|
193
|
-
mintPaperRecoveryEntry,
|
|
194
|
-
mintShamirRecoveryEntry,
|
|
195
|
-
savePaperRecoveryEntries,
|
|
196
|
-
saveShamirRecoveryEntries
|
|
197
|
-
} from "./chunk-CJVEAVYH.js";
|
|
211
|
+
} from "./chunk-7IQWHYL2.js";
|
|
198
212
|
import {
|
|
199
213
|
INDEXED_STORE_POLICY
|
|
200
214
|
} from "./chunk-VQNJ7UZL.js";
|
|
@@ -209,9 +223,15 @@ import {
|
|
|
209
223
|
NO_BROKER,
|
|
210
224
|
buildCredentialBrokerHandle
|
|
211
225
|
} from "./chunk-P4NUJVWL.js";
|
|
226
|
+
import {
|
|
227
|
+
NO_SESSION
|
|
228
|
+
} from "./chunk-VKQCVU2Z.js";
|
|
212
229
|
import {
|
|
213
230
|
generateULID
|
|
214
231
|
} from "./chunk-ZJADGNYF.js";
|
|
232
|
+
import {
|
|
233
|
+
NO_HISTORY
|
|
234
|
+
} from "./chunk-AFHQATY4.js";
|
|
215
235
|
import {
|
|
216
236
|
assertCutoverTierSafe,
|
|
217
237
|
assertTierWritable,
|
|
@@ -219,7 +239,7 @@ import {
|
|
|
219
239
|
} from "./chunk-PTT2NB46.js";
|
|
220
240
|
import {
|
|
221
241
|
sha256Hex
|
|
222
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-2BVW754E.js";
|
|
223
243
|
import {
|
|
224
244
|
NO_FORGET,
|
|
225
245
|
addSubjectRef,
|
|
@@ -228,7 +248,7 @@ import {
|
|
|
228
248
|
readDottedPath,
|
|
229
249
|
rebuildSubjectIndex,
|
|
230
250
|
removeSubjectRef
|
|
231
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-AZXEOEQK.js";
|
|
232
252
|
import {
|
|
233
253
|
NO_SEALED_RECORD
|
|
234
254
|
} from "./chunk-7LP7FFJ2.js";
|
|
@@ -242,20 +262,20 @@ import {
|
|
|
242
262
|
queryByDet,
|
|
243
263
|
resolveStableCek,
|
|
244
264
|
validateSchemaInput
|
|
245
|
-
} from "./chunk-
|
|
265
|
+
} from "./chunk-MMVQ3SUO.js";
|
|
246
266
|
import {
|
|
247
267
|
buildDeleteMarker,
|
|
248
268
|
buildTombstone,
|
|
249
269
|
isDeleteMarker,
|
|
250
270
|
isTombstone
|
|
251
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-KCZAFDP5.js";
|
|
252
272
|
import {
|
|
253
273
|
encrypt
|
|
254
274
|
} from "./chunk-7U6AB7DZ.js";
|
|
255
275
|
import {
|
|
256
276
|
NOYDB_FORMAT_VERSION,
|
|
257
277
|
SealedHandle
|
|
258
|
-
} from "./chunk-
|
|
278
|
+
} from "./chunk-DOZFU7OZ.js";
|
|
259
279
|
import {
|
|
260
280
|
AlreadyElevatedError,
|
|
261
281
|
AttestationError,
|
|
@@ -266,8 +286,10 @@ import {
|
|
|
266
286
|
DebugPlaintextError,
|
|
267
287
|
DictKeyInUseError,
|
|
268
288
|
ElevationExpiredError,
|
|
289
|
+
ExportCapabilityError,
|
|
269
290
|
FieldNotQueryableError,
|
|
270
291
|
ForgetStrategyNotConfiguredError,
|
|
292
|
+
ImportCapabilityError,
|
|
271
293
|
IndexWriteFailureError,
|
|
272
294
|
InvalidKeyError,
|
|
273
295
|
KeyringCorruptError,
|
|
@@ -296,232 +318,16 @@ import {
|
|
|
296
318
|
ValidationError
|
|
297
319
|
} from "./chunk-6SYOHUHM.js";
|
|
298
320
|
|
|
299
|
-
// src/via/blob/binding.ts
|
|
300
|
-
async function eraseBlobs(ctx, cfg) {
|
|
301
|
-
if (cfg.purgeBlobsForRecord) return cfg.purgeBlobsForRecord(ctx.id);
|
|
302
|
-
return { shredded: 0, residue: [] };
|
|
303
|
-
}
|
|
304
|
-
function buildBlobDescribeFragment(fields) {
|
|
305
|
-
return {
|
|
306
|
-
blobFields: Object.fromEntries(
|
|
307
|
-
Object.entries(fields).map(([field, p]) => [field, {
|
|
308
|
-
...p.retainDays !== void 0 ? { retainDays: p.retainDays } : {},
|
|
309
|
-
...p.evictWhen !== void 0 ? { evictWhen: true } : {},
|
|
310
|
-
...p.legalHold !== void 0 ? { legalHold: true } : {},
|
|
311
|
-
...p.retainUntil !== void 0 ? { retainUntil: true } : {},
|
|
312
|
-
...p.external === true ? { external: true } : {},
|
|
313
|
-
...p.public === true ? { public: true } : {},
|
|
314
|
-
...p.backlink !== void 0 ? { backlink: p.backlink } : {}
|
|
315
|
-
}])
|
|
316
|
-
)
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
function blobBinding(cfg) {
|
|
320
|
-
return {
|
|
321
|
-
brand: "blob",
|
|
322
|
-
// encryptedAtRest: 'envelope' — blob chunks are AEAD-encrypted envelopes
|
|
323
|
-
// in `_blob_chunks` (service-side), not sealed record fields; queryable:
|
|
324
|
-
// 'none' — nothing indexes blob content; exportable — vault.exportBlobs()
|
|
325
|
-
// is a first-class door; forgettable — shredAllForRecord participates in
|
|
326
|
-
// vault.forget().
|
|
327
|
-
posture: { encryptedAtRest: "envelope", queryable: "none", exportable: true, forgettable: true },
|
|
328
|
-
covers: (field) => field in cfg.fields,
|
|
329
|
-
erase: (ctx) => eraseBlobs(ctx, cfg),
|
|
330
|
-
describeFragment: () => buildBlobDescribeFragment(cfg.fields)
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
function linkBlobVia() {
|
|
334
|
-
installViaBinder("blob", (c) => blobBinding(c));
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// src/port/with/blob-strategy.ts
|
|
338
|
-
linkBlobVia();
|
|
339
|
-
var NO_BLOBS = {
|
|
340
|
-
openSlot() {
|
|
341
|
-
throw new Error(
|
|
342
|
-
'Blob storage is not enabled on this Noydb instance. Import `{ withBlobs }` from "@noy-db/hub/blobs" and pass `withBlobs()` to `createNoydb({ blobStrategy: withBlobs() })`.'
|
|
343
|
-
);
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
// src/with-audit/consent/strategy.ts
|
|
348
|
-
var NO_CONSENT = {
|
|
349
|
-
async write() {
|
|
350
|
-
},
|
|
351
|
-
async read() {
|
|
352
|
-
return [];
|
|
353
|
-
}
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
// src/with-commit/crdt/strategy.ts
|
|
357
|
-
var NOT_ENABLED = new Error(
|
|
358
|
-
'CRDT mode requires the CRDT strategy. Import `{ withCrdt }` from "@noy-db/hub/crdt" and pass it to `createNoydb({ crdtStrategy: withCrdt() })`.'
|
|
359
|
-
);
|
|
360
|
-
var NO_CRDT = {
|
|
361
|
-
buildLwwMapState() {
|
|
362
|
-
throw NOT_ENABLED;
|
|
363
|
-
},
|
|
364
|
-
buildRgaState() {
|
|
365
|
-
throw NOT_ENABLED;
|
|
366
|
-
},
|
|
367
|
-
mergeCrdtStates() {
|
|
368
|
-
throw NOT_ENABLED;
|
|
369
|
-
},
|
|
370
|
-
resolveCrdtSnapshot() {
|
|
371
|
-
throw NOT_ENABLED;
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
|
|
375
|
-
// src/with-commit/history/strategy.ts
|
|
376
|
-
function notEnabled(op) {
|
|
377
|
-
return new Error(
|
|
378
|
-
`${op} requires the history strategy. Import \`{ withHistory }\` from "@noy-db/hub/history" and pass it to \`createNoydb({ historyStrategy: withHistory() })\`.`
|
|
379
|
-
);
|
|
380
|
-
}
|
|
381
|
-
var NO_HISTORY = {
|
|
382
|
-
async saveHistory() {
|
|
383
|
-
},
|
|
384
|
-
async getHistoryEntries() {
|
|
385
|
-
throw notEnabled("collection.history()");
|
|
386
|
-
},
|
|
387
|
-
async getVersionEnvelope() {
|
|
388
|
-
throw notEnabled("collection.getVersion()");
|
|
389
|
-
},
|
|
390
|
-
async pruneHistory() {
|
|
391
|
-
return 0;
|
|
392
|
-
},
|
|
393
|
-
async clearHistory() {
|
|
394
|
-
return 0;
|
|
395
|
-
},
|
|
396
|
-
async tombstoneHistory() {
|
|
397
|
-
return 0;
|
|
398
|
-
},
|
|
399
|
-
async rewrapHistory() {
|
|
400
|
-
},
|
|
401
|
-
async envelopePayloadHash() {
|
|
402
|
-
return "";
|
|
403
|
-
},
|
|
404
|
-
computePatch() {
|
|
405
|
-
return [];
|
|
406
|
-
},
|
|
407
|
-
diff() {
|
|
408
|
-
throw notEnabled("collection.diff()");
|
|
409
|
-
},
|
|
410
|
-
buildLedger() {
|
|
411
|
-
return null;
|
|
412
|
-
},
|
|
413
|
-
buildVaultInstant() {
|
|
414
|
-
throw notEnabled("vault.at() / vault.timeMachine()");
|
|
415
|
-
}
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
// src/with-lookup/indexing/strategy.ts
|
|
419
|
-
var NO_INDEXING = {
|
|
420
|
-
createState() {
|
|
421
|
-
return DISABLED_STATE;
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
var DISABLED_STATE = {
|
|
425
|
-
isEnabled: false,
|
|
426
|
-
getEagerIndexes: () => null,
|
|
427
|
-
getPersistedIndexes: () => null
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
// src/with-audit/periods/strategy.ts
|
|
431
|
-
var NOT_ENABLED2 = new Error(
|
|
432
|
-
'Accounting periods require the periods strategy. Import `{ withPeriods }` from "@noy-db/hub/periods" and pass it to `createNoydb({ periodsStrategy: withPeriods() })`.'
|
|
433
|
-
);
|
|
434
|
-
var NO_PERIODS = {
|
|
435
|
-
async loadPeriods() {
|
|
436
|
-
return [];
|
|
437
|
-
},
|
|
438
|
-
async chainAnchor() {
|
|
439
|
-
return { priorPeriodHash: "" };
|
|
440
|
-
},
|
|
441
|
-
assertTsWritable() {
|
|
442
|
-
},
|
|
443
|
-
validatePeriodName() {
|
|
444
|
-
throw NOT_ENABLED2;
|
|
445
|
-
},
|
|
446
|
-
async appendPeriodLedgerEntry() {
|
|
447
|
-
throw NOT_ENABLED2;
|
|
448
|
-
}
|
|
449
|
-
};
|
|
450
|
-
|
|
451
|
-
// src/with-party/session/strategy.ts
|
|
452
|
-
function notEnabled2(op) {
|
|
453
|
-
return new Error(
|
|
454
|
-
`${op} requires the session strategy. Import \`{ withSession }\` from "@noy-db/hub/session" and pass it to \`createNoydb({ sessionStrategy: withSession() })\`.`
|
|
455
|
-
);
|
|
456
|
-
}
|
|
457
|
-
var NO_SESSION = {
|
|
458
|
-
validateSessionPolicy() {
|
|
459
|
-
throw notEnabled2("sessionPolicy");
|
|
460
|
-
},
|
|
461
|
-
createEnforcer() {
|
|
462
|
-
throw notEnabled2("session policy enforcement");
|
|
463
|
-
},
|
|
464
|
-
revokeAllSessions() {
|
|
465
|
-
}
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
// src/with-fork/shadow/strategy.ts
|
|
469
|
-
var NOT_ENABLED3 = new Error(
|
|
470
|
-
'VaultFrame requires the shadow strategy. Import `{ withShadow }` from "@noy-db/hub/shadow" and pass it to `createNoydb({ shadowStrategy: withShadow() })`.'
|
|
471
|
-
);
|
|
472
|
-
var NO_SHADOW = {
|
|
473
|
-
buildFrame() {
|
|
474
|
-
throw NOT_ENABLED3;
|
|
475
|
-
}
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
// src/with-fork/snapshots/strategy.ts
|
|
479
|
-
var NOT_ENABLED4 = new Error(
|
|
480
|
-
'Snapshots require the snapshot strategy. Import `{ withSnapshots }` from "@noy-db/hub/snapshots" and pass it to `createNoydb({ snapshotStrategy: withSnapshots({ store }) })`.'
|
|
481
|
-
);
|
|
482
|
-
var NO_SNAPSHOTS = {
|
|
483
|
-
async snapshot() {
|
|
484
|
-
throw NOT_ENABLED4;
|
|
485
|
-
},
|
|
486
|
-
async listSnapshots() {
|
|
487
|
-
throw NOT_ENABLED4;
|
|
488
|
-
},
|
|
489
|
-
async restoreSnapshot() {
|
|
490
|
-
throw NOT_ENABLED4;
|
|
491
|
-
},
|
|
492
|
-
async autoSnapshot() {
|
|
493
|
-
throw NOT_ENABLED4;
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
|
-
|
|
497
|
-
// src/with-party/team/sync-strategy.ts
|
|
498
|
-
function notEnabled3(op) {
|
|
499
|
-
return new Error(
|
|
500
|
-
`${op} requires the sync strategy. Import \`{ withSync }\` from "@noy-db/hub/sync" and pass it to \`createNoydb({ syncStrategy: withSync() })\`.`
|
|
501
|
-
);
|
|
502
|
-
}
|
|
503
|
-
var NO_SYNC = {
|
|
504
|
-
buildSyncEngine() {
|
|
505
|
-
throw notEnabled3("SyncEngine");
|
|
506
|
-
},
|
|
507
|
-
buildSyncTransaction() {
|
|
508
|
-
throw notEnabled3("SyncTransaction");
|
|
509
|
-
},
|
|
510
|
-
buildPresence() {
|
|
511
|
-
throw notEnabled3("collection.presence()");
|
|
512
|
-
}
|
|
513
|
-
};
|
|
514
|
-
|
|
515
321
|
// src/with-commit/tx/strategy.ts
|
|
516
|
-
var
|
|
322
|
+
var NOT_ENABLED = new Error(
|
|
517
323
|
'Multi-record transactions require the tx strategy. Import `{ withTransactions }` from "@noy-db/hub/tx" and pass it to `createNoydb({ txStrategy: withTransactions() })`.'
|
|
518
324
|
);
|
|
519
325
|
var NO_TX = {
|
|
520
326
|
async runTransaction(_db, _fn, _options, _txInvariants) {
|
|
521
|
-
throw
|
|
327
|
+
throw NOT_ENABLED;
|
|
522
328
|
},
|
|
523
329
|
async runDryRun() {
|
|
524
|
-
throw
|
|
330
|
+
throw NOT_ENABLED;
|
|
525
331
|
}
|
|
526
332
|
};
|
|
527
333
|
|
|
@@ -535,7 +341,7 @@ var NO_ARCHIVE = {
|
|
|
535
341
|
|
|
536
342
|
// src/port/with/strategies.ts
|
|
537
343
|
var STRATEGY_DEFAULTS = {
|
|
538
|
-
|
|
344
|
+
reduce: NO_REDUCE,
|
|
539
345
|
archive: NO_ARCHIVE,
|
|
540
346
|
attestation: NO_ATTESTATION,
|
|
541
347
|
blob: NO_BLOBS,
|
|
@@ -576,10 +382,61 @@ function resolveStrategies(options) {
|
|
|
576
382
|
|
|
577
383
|
// src/port/by/default-provider.ts
|
|
578
384
|
async function createDefaultCoordinationProvider(store) {
|
|
579
|
-
const { StoreCoordinationProvider } = await import("./store-coordination-provider-
|
|
385
|
+
const { StoreCoordinationProvider } = await import("./store-coordination-provider-DX5HECK3.js");
|
|
580
386
|
return new StoreCoordinationProvider(store);
|
|
581
387
|
}
|
|
582
388
|
|
|
389
|
+
// src/port/with/collection-registries.ts
|
|
390
|
+
function populateCollectionRegistries(r, collectionName, options, effectiveViaFields) {
|
|
391
|
+
if (options?.refs) {
|
|
392
|
+
r.refRegistry.register(collectionName, options.refs);
|
|
393
|
+
}
|
|
394
|
+
if (effectiveViaFields.i18nFields) {
|
|
395
|
+
r.i18nFieldRegistry.set(collectionName, effectiveViaFields.i18nFields);
|
|
396
|
+
}
|
|
397
|
+
if (options?.blobFields) {
|
|
398
|
+
r.blobFieldsRegistry.set(collectionName, options.blobFields);
|
|
399
|
+
}
|
|
400
|
+
if (options?.archive) {
|
|
401
|
+
r.archiveRegistry.set(collectionName, options.archive);
|
|
402
|
+
}
|
|
403
|
+
if (options?.attestation !== void 0) {
|
|
404
|
+
r.attestation.register(collectionName, options.attestation);
|
|
405
|
+
}
|
|
406
|
+
if (effectiveViaFields.dictKeyFields || effectiveViaFields.lookupFields) {
|
|
407
|
+
const dictFieldMap = {};
|
|
408
|
+
const staticFieldMap = {};
|
|
409
|
+
for (const [field, desc] of Object.entries(effectiveViaFields.dictKeyFields ?? {})) {
|
|
410
|
+
if (isStaticDictDescriptor(desc)) {
|
|
411
|
+
staticFieldMap[field] = desc;
|
|
412
|
+
r.staticDictNames.add(desc.name);
|
|
413
|
+
r.staticByName.set(desc.name, desc);
|
|
414
|
+
} else {
|
|
415
|
+
dictFieldMap[field] = desc.name;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
const lookupCompat = collectLookupDictCompat(effectiveViaFields.lookupFields);
|
|
419
|
+
Object.assign(dictFieldMap, lookupCompat.dictFieldMap);
|
|
420
|
+
for (const [field, desc] of lookupCompat.staticEntries) {
|
|
421
|
+
staticFieldMap[field] = desc;
|
|
422
|
+
r.staticDictNames.add(desc.name);
|
|
423
|
+
r.staticByName.set(desc.name, desc);
|
|
424
|
+
}
|
|
425
|
+
if (Object.keys(dictFieldMap).length > 0) {
|
|
426
|
+
r.dictKeyFieldRegistry.set(collectionName, dictFieldMap);
|
|
427
|
+
for (const dictName of new Set(Object.values(dictFieldMap))) {
|
|
428
|
+
r.reservedLookupCollections.set(dictCollectionName(dictName), dictName);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if (Object.keys(staticFieldMap).length > 0) {
|
|
432
|
+
r.staticDescriptorByField.set(collectionName, staticFieldMap);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
if ((options?.schemaUpdate?.length ?? 0) > 0) {
|
|
436
|
+
r.schemaUpdateNames.set(collectionName, (options.schemaUpdate ?? []).map((s) => s.name));
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
583
440
|
// src/kernel/via/pipeline.ts
|
|
584
441
|
var ViaPipeline = class _ViaPipeline {
|
|
585
442
|
constructor(bindings, taint) {
|
|
@@ -2311,10 +2168,9 @@ function resolveCollectionConfig(opts) {
|
|
|
2311
2168
|
}
|
|
2312
2169
|
|
|
2313
2170
|
// src/with-formula/computed/lazy.ts
|
|
2314
|
-
var
|
|
2171
|
+
var loadComputed = lazy(() => import("./computed-33DRJDOC.js"));
|
|
2315
2172
|
async function loadEvalComputedFields() {
|
|
2316
|
-
|
|
2317
|
-
return fn;
|
|
2173
|
+
return (await loadComputed()).evalComputedFields;
|
|
2318
2174
|
}
|
|
2319
2175
|
|
|
2320
2176
|
// src/kernel/collection.ts
|
|
@@ -3296,7 +3152,7 @@ var Collection = class {
|
|
|
3296
3152
|
}
|
|
3297
3153
|
}
|
|
3298
3154
|
if (this.materializedViewSource !== void 0) {
|
|
3299
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
3155
|
+
const { resolveStaleMVOnRead } = await import("./stale-BJO2WIN7.js");
|
|
3300
3156
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name, this.#dispatchCtx({ collection: this.name, id: "resolve-on-read" }));
|
|
3301
3157
|
}
|
|
3302
3158
|
let record;
|
|
@@ -3782,7 +3638,7 @@ var Collection = class {
|
|
|
3782
3638
|
*/
|
|
3783
3639
|
async dispatchMaterializedViews(id, record, wave) {
|
|
3784
3640
|
if (this.materializedViewSource === void 0) return;
|
|
3785
|
-
const { dispatchMaterializedViews } = await import("./dispatch-
|
|
3641
|
+
const { dispatchMaterializedViews } = await import("./dispatch-V5MSMQYX.js");
|
|
3786
3642
|
return dispatchMaterializedViews(this.#mvDispatchCtx(this.materializedViewSource), id, record, wave);
|
|
3787
3643
|
}
|
|
3788
3644
|
/**
|
|
@@ -3955,7 +3811,7 @@ var Collection = class {
|
|
|
3955
3811
|
* dispatch wave's per-target dedup; `undefined` on the local-write path (byte-identical). */
|
|
3956
3812
|
async dispatchDerivations(id, record, version, wave) {
|
|
3957
3813
|
if (this.derivationSource === void 0) return;
|
|
3958
|
-
const { dispatchDerivations } = await import("./dispatch-
|
|
3814
|
+
const { dispatchDerivations } = await import("./dispatch-SPMYNXNW.js");
|
|
3959
3815
|
return dispatchDerivations({
|
|
3960
3816
|
...this.#derivationDeleteCtx(this.derivationSource),
|
|
3961
3817
|
via: this.via,
|
|
@@ -4232,7 +4088,7 @@ var Collection = class {
|
|
|
4232
4088
|
*/
|
|
4233
4089
|
async dispatchArrayDerivationsOnDelete(id, eraseRecordShapeToo = false) {
|
|
4234
4090
|
if (this.derivationSource === void 0) return 0;
|
|
4235
|
-
const { dispatchArrayDerivationsOnDelete } = await import("./dispatch-
|
|
4091
|
+
const { dispatchArrayDerivationsOnDelete } = await import("./dispatch-SPMYNXNW.js");
|
|
4236
4092
|
return dispatchArrayDerivationsOnDelete(this.#derivationDeleteCtx(this.derivationSource), id, eraseRecordShapeToo);
|
|
4237
4093
|
}
|
|
4238
4094
|
/**
|
|
@@ -4246,7 +4102,7 @@ var Collection = class {
|
|
|
4246
4102
|
*/
|
|
4247
4103
|
async dispatchMaterializedViewsOnDelete(id) {
|
|
4248
4104
|
if (this.materializedViewSource === void 0) return { deleted: 0, residueUndecodable: [], residueDeclined: [] };
|
|
4249
|
-
const { dispatchMaterializedViewsOnDelete } = await import("./dispatch-
|
|
4105
|
+
const { dispatchMaterializedViewsOnDelete } = await import("./dispatch-V5MSMQYX.js");
|
|
4250
4106
|
return dispatchMaterializedViewsOnDelete(this.#mvDispatchCtx(this.materializedViewSource), id);
|
|
4251
4107
|
}
|
|
4252
4108
|
/**
|
|
@@ -4266,7 +4122,7 @@ var Collection = class {
|
|
|
4266
4122
|
);
|
|
4267
4123
|
}
|
|
4268
4124
|
if (this.materializedViewSource !== void 0) {
|
|
4269
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
4125
|
+
const { resolveStaleMVOnRead } = await import("./stale-BJO2WIN7.js");
|
|
4270
4126
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name, this.#dispatchCtx({ collection: this.name, id: "resolve-on-read" }));
|
|
4271
4127
|
}
|
|
4272
4128
|
await this.ensureHydrated();
|
|
@@ -4518,7 +4374,7 @@ var Collection = class {
|
|
|
4518
4374
|
...this.defaultLocale !== void 0 ? { defaultLocale: this.defaultLocale } : {},
|
|
4519
4375
|
...resolver.resolveDictSource ? { resolveDictSource: (field) => resolver.resolveDictSource(leftCollection, field) } : {}
|
|
4520
4376
|
} : void 0;
|
|
4521
|
-
return new Query(source, void 0, joinContext, this.strategies.
|
|
4377
|
+
return new Query(source, void 0, joinContext, this.strategies.reduce);
|
|
4522
4378
|
}
|
|
4523
4379
|
/**
|
|
4524
4380
|
* Subscribe to every put/delete on this collection. Returns an
|
|
@@ -5419,14 +5275,14 @@ var Collection = class {
|
|
|
5419
5275
|
/** C-A/R10: persist the classified marker once per classified handle (store I/O in config-drift.ts). */
|
|
5420
5276
|
async _ensureClassifiedMarker() {
|
|
5421
5277
|
if (this._markerPersisted || this.vdigFields === null) return;
|
|
5422
|
-
const { persistClassifiedMarkerForFields } = await import("./classified-marker-
|
|
5278
|
+
const { persistClassifiedMarkerForFields } = await import("./classified-marker-SVDRXLD3.js");
|
|
5423
5279
|
await persistClassifiedMarkerForFields(this.adapter, this.vault, this.name, this.vdigFields, await this.getDEK(this.name));
|
|
5424
5280
|
this._markerPersisted = true;
|
|
5425
5281
|
}
|
|
5426
5282
|
/** C-A/R10 drift signal — the marker's declared digest-only set, memoized to one store read per handle (see config-drift.ts). */
|
|
5427
5283
|
async _classifiedMarkerDigestOnly() {
|
|
5428
5284
|
if (this._markerDigestOnlyCache !== void 0) return this._markerDigestOnlyCache;
|
|
5429
|
-
const { readClassifiedMarkerDigestOnly } = await import("./classified-marker-
|
|
5285
|
+
const { readClassifiedMarkerDigestOnly } = await import("./classified-marker-SVDRXLD3.js");
|
|
5430
5286
|
this._markerDigestOnlyCache = await readClassifiedMarkerDigestOnly(this.adapter, this.vault, this.name, await this.getDEK(this.name));
|
|
5431
5287
|
return this._markerDigestOnlyCache;
|
|
5432
5288
|
}
|
|
@@ -5597,6 +5453,64 @@ var Collection = class {
|
|
|
5597
5453
|
}
|
|
5598
5454
|
};
|
|
5599
5455
|
|
|
5456
|
+
// src/port/with/capabilities.ts
|
|
5457
|
+
function assertCanExport(keyring, tier, format) {
|
|
5458
|
+
if (tier === "plaintext") {
|
|
5459
|
+
if (format === void 0) {
|
|
5460
|
+
throw new Error("vault.assertCanExport: plaintext tier requires a format");
|
|
5461
|
+
}
|
|
5462
|
+
if (!hasExportCapability(keyring, "plaintext", format)) {
|
|
5463
|
+
throw new ExportCapabilityError({
|
|
5464
|
+
tier: "plaintext",
|
|
5465
|
+
userId: keyring.userId,
|
|
5466
|
+
format
|
|
5467
|
+
});
|
|
5468
|
+
}
|
|
5469
|
+
return;
|
|
5470
|
+
}
|
|
5471
|
+
if (!hasExportCapability(keyring, "bundle")) {
|
|
5472
|
+
throw new ExportCapabilityError({
|
|
5473
|
+
tier: "bundle",
|
|
5474
|
+
userId: keyring.userId
|
|
5475
|
+
});
|
|
5476
|
+
}
|
|
5477
|
+
}
|
|
5478
|
+
function assertCanImport(keyring, tier, format) {
|
|
5479
|
+
if (tier === "plaintext") {
|
|
5480
|
+
if (format === void 0) {
|
|
5481
|
+
throw new Error("vault.assertCanImport: plaintext tier requires a format");
|
|
5482
|
+
}
|
|
5483
|
+
if (!hasImportCapability(keyring, "plaintext", format)) {
|
|
5484
|
+
throw new ImportCapabilityError({
|
|
5485
|
+
tier: "plaintext",
|
|
5486
|
+
userId: keyring.userId,
|
|
5487
|
+
format
|
|
5488
|
+
});
|
|
5489
|
+
}
|
|
5490
|
+
return;
|
|
5491
|
+
}
|
|
5492
|
+
if (!hasImportCapability(keyring, "bundle")) {
|
|
5493
|
+
throw new ImportCapabilityError({
|
|
5494
|
+
tier: "bundle",
|
|
5495
|
+
userId: keyring.userId
|
|
5496
|
+
});
|
|
5497
|
+
}
|
|
5498
|
+
}
|
|
5499
|
+
function canExport(keyring, tier, format) {
|
|
5500
|
+
if (tier === "plaintext") {
|
|
5501
|
+
if (format === void 0) return false;
|
|
5502
|
+
return hasExportCapability(keyring, "plaintext", format);
|
|
5503
|
+
}
|
|
5504
|
+
return hasExportCapability(keyring, "bundle");
|
|
5505
|
+
}
|
|
5506
|
+
function canImport(keyring, tier, format) {
|
|
5507
|
+
if (tier === "plaintext") {
|
|
5508
|
+
if (format === void 0) return false;
|
|
5509
|
+
return hasImportCapability(keyring, "plaintext", format);
|
|
5510
|
+
}
|
|
5511
|
+
return hasImportCapability(keyring, "bundle");
|
|
5512
|
+
}
|
|
5513
|
+
|
|
5600
5514
|
// src/with-commit/tx/elevated-handle.ts
|
|
5601
5515
|
var ELEVATION_AUDIT_COLLECTION = "_elevation_audit";
|
|
5602
5516
|
var ElevatedHandle = class {
|
|
@@ -6811,7 +6725,7 @@ var VaultLinks = class {
|
|
|
6811
6725
|
// src/with-shape/links/lazy-handle.ts
|
|
6812
6726
|
function makeLazyLinkSetHandle(d) {
|
|
6813
6727
|
let engine = null;
|
|
6814
|
-
const load = () => engine ??= import("./link-set-
|
|
6728
|
+
const load = () => engine ??= import("./link-set-XVZY2ODC.js").then(
|
|
6815
6729
|
({ LinkSet }) => new LinkSet(d.adapter, d.vault, d.name, d.spec, d.encrypted, d.getDEK, d.actor, d.emitter, d.endpointExists)
|
|
6816
6730
|
);
|
|
6817
6731
|
return {
|
|
@@ -7294,7 +7208,7 @@ var SatelliteRegistry = class {
|
|
|
7294
7208
|
if (reason !== void 0) throw new SatelliteConfigError(reason);
|
|
7295
7209
|
}
|
|
7296
7210
|
/** Per-base async mutex: chains sections on a stored promise tail. */
|
|
7297
|
-
async withPairLock(base,
|
|
7211
|
+
async withPairLock(base, fn) {
|
|
7298
7212
|
const tail = this.locks.get(base) ?? Promise.resolve();
|
|
7299
7213
|
let release;
|
|
7300
7214
|
const gate = new Promise((res) => {
|
|
@@ -7303,7 +7217,7 @@ var SatelliteRegistry = class {
|
|
|
7303
7217
|
this.locks.set(base, tail.then(() => gate));
|
|
7304
7218
|
await tail;
|
|
7305
7219
|
try {
|
|
7306
|
-
return await
|
|
7220
|
+
return await fn();
|
|
7307
7221
|
} finally {
|
|
7308
7222
|
release();
|
|
7309
7223
|
}
|
|
@@ -7349,7 +7263,7 @@ function declareSatellite(ctx, collectionName, options, existingRegistry) {
|
|
|
7349
7263
|
ctx.forEachSyncEngine((e) => e.remirrorPairResolvers([spec.base, spec.satellite]));
|
|
7350
7264
|
const registry = reg;
|
|
7351
7265
|
const baseSchema = ctx.getBaseSchema(spec.base);
|
|
7352
|
-
void import("./post-register-
|
|
7266
|
+
void import("./post-register-5VHHVFJY.js").then((m) => m.postRegister(ctx.adapter, ctx.vaultName, spec, ctx.getDEK, baseSchema, registry)).catch(() => {
|
|
7353
7267
|
});
|
|
7354
7268
|
return reg;
|
|
7355
7269
|
}
|
|
@@ -8245,6 +8159,22 @@ var Vault = class {
|
|
|
8245
8159
|
enforceStaticDictOnPut: (collectionName, record) => this.enforceStaticDictOnPut(collectionName, record)
|
|
8246
8160
|
};
|
|
8247
8161
|
}
|
|
8162
|
+
/** The registries `populateCollectionRegistries` writes into (#841). */
|
|
8163
|
+
#registries() {
|
|
8164
|
+
return {
|
|
8165
|
+
refRegistry: this.refRegistry,
|
|
8166
|
+
i18nFieldRegistry: this.i18nFieldRegistry,
|
|
8167
|
+
blobFieldsRegistry: this.blobFieldsRegistry,
|
|
8168
|
+
archiveRegistry: this.archiveRegistry,
|
|
8169
|
+
attestation: this.attestation,
|
|
8170
|
+
dictKeyFieldRegistry: this.dictKeyFieldRegistry,
|
|
8171
|
+
staticDictNames: this.staticDictNames,
|
|
8172
|
+
staticByName: this.staticByName,
|
|
8173
|
+
staticDescriptorByField: this.staticDescriptorByField,
|
|
8174
|
+
reservedLookupCollections: this.reservedLookupCollections,
|
|
8175
|
+
schemaUpdateNames: this.#schemaUpdateNames
|
|
8176
|
+
};
|
|
8177
|
+
}
|
|
8248
8178
|
collection(collectionName, options) {
|
|
8249
8179
|
const overlayRegistry = this.overlayedViewRegistry;
|
|
8250
8180
|
if (overlayRegistry !== null && overlayRegistry.isOverlay(collectionName)) {
|
|
@@ -8278,8 +8208,8 @@ var Vault = class {
|
|
|
8278
8208
|
registerPoisonHook: (hook) => {
|
|
8279
8209
|
this.noydb._writeHooks.onBeforeWrite(hook);
|
|
8280
8210
|
},
|
|
8281
|
-
forEachSyncEngine: (
|
|
8282
|
-
this.noydb._forEachSyncEngine(this.name,
|
|
8211
|
+
forEachSyncEngine: (fn) => {
|
|
8212
|
+
this.noydb._forEachSyncEngine(this.name, fn);
|
|
8283
8213
|
}
|
|
8284
8214
|
}, collectionName, { ...options, satelliteOf: options.satelliteOf }, this.satelliteRegistry);
|
|
8285
8215
|
}
|
|
@@ -8296,60 +8226,14 @@ var Vault = class {
|
|
|
8296
8226
|
});
|
|
8297
8227
|
}
|
|
8298
8228
|
if (!coll) {
|
|
8299
|
-
|
|
8300
|
-
this.refRegistry.register(collectionName, options.refs);
|
|
8301
|
-
}
|
|
8302
|
-
if (effectiveViaFields.i18nFields) {
|
|
8303
|
-
this.i18nFieldRegistry.set(collectionName, effectiveViaFields.i18nFields);
|
|
8304
|
-
}
|
|
8305
|
-
if (options?.blobFields) {
|
|
8306
|
-
this.blobFieldsRegistry.set(collectionName, options.blobFields);
|
|
8307
|
-
}
|
|
8308
|
-
if (options?.archive) {
|
|
8309
|
-
this.archiveRegistry.set(collectionName, options.archive);
|
|
8310
|
-
}
|
|
8311
|
-
if (options?.attestation !== void 0) {
|
|
8312
|
-
this.attestation.register(collectionName, options.attestation);
|
|
8313
|
-
}
|
|
8314
|
-
if (effectiveViaFields.dictKeyFields || effectiveViaFields.lookupFields) {
|
|
8315
|
-
const dictFieldMap = {};
|
|
8316
|
-
const staticFieldMap = {};
|
|
8317
|
-
for (const [field, desc] of Object.entries(effectiveViaFields.dictKeyFields ?? {})) {
|
|
8318
|
-
if (isStaticDictDescriptor(desc)) {
|
|
8319
|
-
staticFieldMap[field] = desc;
|
|
8320
|
-
this.staticDictNames.add(desc.name);
|
|
8321
|
-
this.staticByName.set(desc.name, desc);
|
|
8322
|
-
} else {
|
|
8323
|
-
dictFieldMap[field] = desc.name;
|
|
8324
|
-
}
|
|
8325
|
-
}
|
|
8326
|
-
const lookupCompat = collectLookupDictCompat(effectiveViaFields.lookupFields);
|
|
8327
|
-
Object.assign(dictFieldMap, lookupCompat.dictFieldMap);
|
|
8328
|
-
for (const [field, desc] of lookupCompat.staticEntries) {
|
|
8329
|
-
staticFieldMap[field] = desc;
|
|
8330
|
-
this.staticDictNames.add(desc.name);
|
|
8331
|
-
this.staticByName.set(desc.name, desc);
|
|
8332
|
-
}
|
|
8333
|
-
if (Object.keys(dictFieldMap).length > 0) {
|
|
8334
|
-
this.dictKeyFieldRegistry.set(collectionName, dictFieldMap);
|
|
8335
|
-
for (const dictName of new Set(Object.values(dictFieldMap))) {
|
|
8336
|
-
this.reservedLookupCollections.set(dictCollectionName(dictName), dictName);
|
|
8337
|
-
}
|
|
8338
|
-
}
|
|
8339
|
-
if (Object.keys(staticFieldMap).length > 0) {
|
|
8340
|
-
this.staticDescriptorByField.set(collectionName, staticFieldMap);
|
|
8341
|
-
}
|
|
8342
|
-
}
|
|
8343
|
-
if ((options?.schemaUpdate?.length ?? 0) > 0) {
|
|
8344
|
-
this.#schemaUpdateNames.set(collectionName, (options.schemaUpdate ?? []).map((s) => s.name));
|
|
8345
|
-
}
|
|
8229
|
+
populateCollectionRegistries(this.#registries(), collectionName, options, effectiveViaFields);
|
|
8346
8230
|
let schemaUpdateGate;
|
|
8347
8231
|
if (options?.persistJsonSchema === true && options.schema !== void 0 && (options.schemaUpdate?.length ?? 0) > 0) {
|
|
8348
8232
|
const validator = options.schema;
|
|
8349
8233
|
const strategies = options.schemaUpdate ?? [];
|
|
8350
8234
|
const work = (async () => {
|
|
8351
8235
|
const dek = await this.getDEK(collectionName);
|
|
8352
|
-
const { persistSchemaIfNeeded } = await import("./register-
|
|
8236
|
+
const { persistSchemaIfNeeded } = await import("./register-CEX7R7NE.js");
|
|
8353
8237
|
const result = await persistSchemaIfNeeded({
|
|
8354
8238
|
store: this.adapter,
|
|
8355
8239
|
vault: this.name,
|
|
@@ -8498,7 +8382,7 @@ var Vault = class {
|
|
|
8498
8382
|
const work = (async () => {
|
|
8499
8383
|
try {
|
|
8500
8384
|
const dek = await this.getDEK(collectionName);
|
|
8501
|
-
await (await import("./register-
|
|
8385
|
+
await (await import("./register-CEX7R7NE.js")).persistSchemaIfNeeded({
|
|
8502
8386
|
store: this.adapter,
|
|
8503
8387
|
vault: this.name,
|
|
8504
8388
|
collectionName,
|
|
@@ -9685,7 +9569,7 @@ var Vault = class {
|
|
|
9685
9569
|
async _initDerivations(handles) {
|
|
9686
9570
|
if (handles.length === 0) return;
|
|
9687
9571
|
const [{ DerivationRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
|
|
9688
|
-
import("./registry-
|
|
9572
|
+
import("./registry-EWIB5NTI.js"),
|
|
9689
9573
|
import("./read-only-facade-CHCKSEPD.js")
|
|
9690
9574
|
]);
|
|
9691
9575
|
const registry = new DerivationRegistry();
|
|
@@ -9717,7 +9601,7 @@ var Vault = class {
|
|
|
9717
9601
|
*/
|
|
9718
9602
|
async _initMaterializedViews(handles) {
|
|
9719
9603
|
if (handles.length === 0) return;
|
|
9720
|
-
const { MaterializedViewRegistry } = await import("./registry-
|
|
9604
|
+
const { MaterializedViewRegistry } = await import("./registry-DIKMRXUC.js");
|
|
9721
9605
|
const registry = new MaterializedViewRegistry();
|
|
9722
9606
|
this.materializedViewRegistry = registry;
|
|
9723
9607
|
const db = this;
|
|
@@ -9789,14 +9673,14 @@ var Vault = class {
|
|
|
9789
9673
|
if (!reg) {
|
|
9790
9674
|
throw new Error(`refreshView: no MV registered with name "${name}"`);
|
|
9791
9675
|
}
|
|
9792
|
-
const { MaterializedViewExecutor } = await import("./executor-
|
|
9676
|
+
const { MaterializedViewExecutor } = await import("./executor-SVHAJZ4A.js");
|
|
9793
9677
|
const result = await MaterializedViewExecutor.refresh(reg, {
|
|
9794
9678
|
getCollection: (n) => this.collection(n),
|
|
9795
9679
|
getActiveTxContext: () => this.noydb._activeTxContextOrNull,
|
|
9796
9680
|
getQueryContext: () => this,
|
|
9797
9681
|
dispatchCtx: this._dispatchCtx({ collection: name, id: "refreshView" })
|
|
9798
9682
|
});
|
|
9799
|
-
const { clearMVStaleFully } = await import("./stale-
|
|
9683
|
+
const { clearMVStaleFully } = await import("./stale-BJO2WIN7.js");
|
|
9800
9684
|
await clearMVStaleFully(this.adapter, this.name, registry, name);
|
|
9801
9685
|
return result;
|
|
9802
9686
|
}
|
|
@@ -9836,7 +9720,7 @@ var Vault = class {
|
|
|
9836
9720
|
if (!outSpec) continue;
|
|
9837
9721
|
const outputColl = this.collection(outSpec.collection);
|
|
9838
9722
|
if (out.kind === "array") {
|
|
9839
|
-
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-
|
|
9723
|
+
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-HRMHC34B.js");
|
|
9840
9724
|
const prior = await loadFanoutSidecar(this.adapter, this.name, spec.source, id, key, this.getDEK, this.encrypted);
|
|
9841
9725
|
const prevKeys = new Set(prior?.keys ?? []);
|
|
9842
9726
|
const newKeysList = out.entries.map((e) => e.key);
|
|
@@ -9991,11 +9875,11 @@ var Vault = class {
|
|
|
9991
9875
|
*
|
|
9992
9876
|
*.
|
|
9993
9877
|
*/
|
|
9994
|
-
async withConsent(ctx,
|
|
9878
|
+
async withConsent(ctx, fn) {
|
|
9995
9879
|
const prior = this.consentContext;
|
|
9996
9880
|
this.consentContext = ctx;
|
|
9997
9881
|
try {
|
|
9998
|
-
return await
|
|
9882
|
+
return await fn();
|
|
9999
9883
|
} finally {
|
|
10000
9884
|
this.consentContext = prior;
|
|
10001
9885
|
}
|
|
@@ -10063,7 +9947,7 @@ var Vault = class {
|
|
|
10063
9947
|
* collection.
|
|
10064
9948
|
*/
|
|
10065
9949
|
async delegate(opts) {
|
|
10066
|
-
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
9950
|
+
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-EV7LKJPH.js");
|
|
10067
9951
|
if (!this.keyring.kek) {
|
|
10068
9952
|
throw new ValidationError(
|
|
10069
9953
|
"issueDelegation: keyring.kek is null \u2014 issuing a delegation requires a tier-1 unlock. Re-authenticate at tier 1 (secret) first."
|
|
@@ -10085,7 +9969,7 @@ var Vault = class {
|
|
|
10085
9969
|
* if the id does not exist.
|
|
10086
9970
|
*/
|
|
10087
9971
|
async revokeDelegation(id) {
|
|
10088
|
-
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
9972
|
+
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-EV7LKJPH.js");
|
|
10089
9973
|
await revokeDelegation(this.adapter, this.name, id);
|
|
10090
9974
|
void DELEGATIONS_COLLECTION;
|
|
10091
9975
|
}
|
|
@@ -10333,7 +10217,7 @@ var Vault = class {
|
|
|
10333
10217
|
* @see docs/superpowers/specs/2026-05-22-schema-dump-design.md
|
|
10334
10218
|
*/
|
|
10335
10219
|
async dumpSchema(opts = {}) {
|
|
10336
|
-
const { dumpVaultSchema } = await import("./walk-
|
|
10220
|
+
const { dumpVaultSchema } = await import("./walk-JXMWKKQW.js");
|
|
10337
10221
|
return dumpVaultSchema(this, opts);
|
|
10338
10222
|
}
|
|
10339
10223
|
/**
|
|
@@ -10468,7 +10352,7 @@ var Vault = class {
|
|
|
10468
10352
|
* @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md
|
|
10469
10353
|
*/
|
|
10470
10354
|
async getCover(opts = {}) {
|
|
10471
|
-
const { readCover } = await import("./cover-
|
|
10355
|
+
const { readCover } = await import("./cover-ADBCTIKN.js");
|
|
10472
10356
|
return readCover(this.adapter, this.name, opts);
|
|
10473
10357
|
}
|
|
10474
10358
|
/**
|
|
@@ -10483,7 +10367,7 @@ var Vault = class {
|
|
|
10483
10367
|
* both modes round-trip cleanly.
|
|
10484
10368
|
*/
|
|
10485
10369
|
async dump() {
|
|
10486
|
-
const { dumpVault } = await import("./backup-
|
|
10370
|
+
const { dumpVault } = await import("./backup-USYSNCYM.js");
|
|
10487
10371
|
return dumpVault(this.backupContext());
|
|
10488
10372
|
}
|
|
10489
10373
|
/**
|
|
@@ -10535,7 +10419,7 @@ var Vault = class {
|
|
|
10535
10419
|
* — there's no chain to verify against.
|
|
10536
10420
|
*/
|
|
10537
10421
|
async load(backupJson) {
|
|
10538
|
-
const { loadVault } = await import("./backup-
|
|
10422
|
+
const { loadVault } = await import("./backup-USYSNCYM.js");
|
|
10539
10423
|
return loadVault(this.backupContext(), backupJson);
|
|
10540
10424
|
}
|
|
10541
10425
|
/**
|
|
@@ -10567,7 +10451,7 @@ var Vault = class {
|
|
|
10567
10451
|
* way to detect tampering of an in-place vault.
|
|
10568
10452
|
*/
|
|
10569
10453
|
async verifyBackupIntegrity() {
|
|
10570
|
-
const { verifyBackupIntegrity } = await import("./backup-
|
|
10454
|
+
const { verifyBackupIntegrity } = await import("./backup-USYSNCYM.js");
|
|
10571
10455
|
return verifyBackupIntegrity(this.backupContext());
|
|
10572
10456
|
}
|
|
10573
10457
|
/**
|
|
@@ -10785,7 +10669,7 @@ var Vault = class {
|
|
|
10785
10669
|
* is the live validator object, not a serialization of it).
|
|
10786
10670
|
*/
|
|
10787
10671
|
async exportJSON(opts = {}) {
|
|
10788
|
-
const { exportVaultJSON } = await import("./backup-
|
|
10672
|
+
const { exportVaultJSON } = await import("./backup-USYSNCYM.js");
|
|
10789
10673
|
return exportVaultJSON(this.backupContext(), opts);
|
|
10790
10674
|
}
|
|
10791
10675
|
};
|
|
@@ -10862,10 +10746,10 @@ var WriteQueueTracker = class {
|
|
|
10862
10746
|
* (success or failure). The fn's resolved value is returned; a thrown
|
|
10863
10747
|
* error is re-thrown after the queue is decremented.
|
|
10864
10748
|
*/
|
|
10865
|
-
async track(
|
|
10749
|
+
async track(fn) {
|
|
10866
10750
|
this.begin();
|
|
10867
10751
|
try {
|
|
10868
|
-
const value = await
|
|
10752
|
+
const value = await fn();
|
|
10869
10753
|
this.settle();
|
|
10870
10754
|
return value;
|
|
10871
10755
|
} catch (error) {
|
|
@@ -10888,6 +10772,183 @@ var WriteQueueTracker = class {
|
|
|
10888
10772
|
}
|
|
10889
10773
|
};
|
|
10890
10774
|
|
|
10775
|
+
// src/port/with/write-hooks.ts
|
|
10776
|
+
var WriteHookRegistry = class {
|
|
10777
|
+
#before = [];
|
|
10778
|
+
#after = [];
|
|
10779
|
+
#suppressed = false;
|
|
10780
|
+
/** True while handlers are running — used by the write path to skip nested firing. */
|
|
10781
|
+
get suppressed() {
|
|
10782
|
+
return this.#suppressed;
|
|
10783
|
+
}
|
|
10784
|
+
/** True when any hook is registered (cheap gate for the write path). */
|
|
10785
|
+
get hasHandlers() {
|
|
10786
|
+
return this.#before.length > 0 || this.#after.length > 0;
|
|
10787
|
+
}
|
|
10788
|
+
onBeforeWrite(handler) {
|
|
10789
|
+
this.#before.push(handler);
|
|
10790
|
+
return () => {
|
|
10791
|
+
const i = this.#before.indexOf(handler);
|
|
10792
|
+
if (i >= 0) this.#before.splice(i, 1);
|
|
10793
|
+
};
|
|
10794
|
+
}
|
|
10795
|
+
onAfterWrite(handler) {
|
|
10796
|
+
this.#after.push(handler);
|
|
10797
|
+
return () => {
|
|
10798
|
+
const i = this.#after.indexOf(handler);
|
|
10799
|
+
if (i >= 0) this.#after.splice(i, 1);
|
|
10800
|
+
};
|
|
10801
|
+
}
|
|
10802
|
+
/** Run before-hooks (awaited, in order). A throw propagates and aborts the write. */
|
|
10803
|
+
async runBefore(event) {
|
|
10804
|
+
if (this.#before.length === 0) return;
|
|
10805
|
+
this.#suppressed = true;
|
|
10806
|
+
try {
|
|
10807
|
+
for (const h of this.#before.slice()) await h(event);
|
|
10808
|
+
} finally {
|
|
10809
|
+
this.#suppressed = false;
|
|
10810
|
+
}
|
|
10811
|
+
}
|
|
10812
|
+
/** Run after-hooks (awaited, in order). Per-handler errors are warned, not thrown. */
|
|
10813
|
+
async runAfter(event) {
|
|
10814
|
+
if (this.#after.length === 0) return;
|
|
10815
|
+
this.#suppressed = true;
|
|
10816
|
+
try {
|
|
10817
|
+
for (const h of this.#after.slice()) {
|
|
10818
|
+
try {
|
|
10819
|
+
await h(event);
|
|
10820
|
+
} catch (err) {
|
|
10821
|
+
console.warn(
|
|
10822
|
+
`[noy-db] onAfterWrite handler failed for ${event.collection}/${event.docId}: ` + (err instanceof Error ? err.message : String(err))
|
|
10823
|
+
);
|
|
10824
|
+
}
|
|
10825
|
+
}
|
|
10826
|
+
} finally {
|
|
10827
|
+
this.#suppressed = false;
|
|
10828
|
+
}
|
|
10829
|
+
}
|
|
10830
|
+
};
|
|
10831
|
+
|
|
10832
|
+
// src/port/with/service-bus.ts
|
|
10833
|
+
var ServiceBus = class {
|
|
10834
|
+
#handlers = /* @__PURE__ */ new Map();
|
|
10835
|
+
#gateHandlers = /* @__PURE__ */ new Map();
|
|
10836
|
+
#depth = 0;
|
|
10837
|
+
/** Register a handler for an observe point. Returns an unsubscribe fn. */
|
|
10838
|
+
register(point, handler) {
|
|
10839
|
+
let arr = this.#handlers.get(point);
|
|
10840
|
+
if (!arr) {
|
|
10841
|
+
arr = [];
|
|
10842
|
+
this.#handlers.set(point, arr);
|
|
10843
|
+
}
|
|
10844
|
+
arr.push(handler);
|
|
10845
|
+
return () => {
|
|
10846
|
+
const a = this.#handlers.get(point);
|
|
10847
|
+
if (!a) return;
|
|
10848
|
+
const i = a.indexOf(handler);
|
|
10849
|
+
if (i >= 0) a.splice(i, 1);
|
|
10850
|
+
};
|
|
10851
|
+
}
|
|
10852
|
+
/** Cheap gate for the write path — true when any handler is registered for the point. */
|
|
10853
|
+
hasHandlers(point) {
|
|
10854
|
+
const a = this.#handlers.get(point);
|
|
10855
|
+
return a !== void 0 && a.length > 0;
|
|
10856
|
+
}
|
|
10857
|
+
/**
|
|
10858
|
+
* True while one or more dispatches are in flight. Backed by a depth counter
|
|
10859
|
+
* so that two concurrent async dispatches (`Promise.all([put('a'), put('b')])`
|
|
10860
|
+
* each captured `busAfterPut=true` at their respective put() tops while depth
|
|
10861
|
+
* was 0) both proceed independently — the counter stays > 0 until BOTH finish,
|
|
10862
|
+
* so any nested write attempted by a handler still sees `dispatching === true`
|
|
10863
|
+
* and is suppressed by the write-path gate in `collection.ts`
|
|
10864
|
+
* (`busAfterPut = hasHandlers('afterPut') && !dispatching`). Re-entrancy
|
|
10865
|
+
* suppression lives exclusively on that write-path gate; concurrent independent
|
|
10866
|
+
* dispatches must not drop each other's events.
|
|
10867
|
+
*/
|
|
10868
|
+
get dispatching() {
|
|
10869
|
+
return this.#depth > 0;
|
|
10870
|
+
}
|
|
10871
|
+
/**
|
|
10872
|
+
* Dispatch in registration order, awaited. Per-handler errors are warned, not
|
|
10873
|
+
* thrown — an observe handler must never abort a completed write. A
|
|
10874
|
+
* re-entrancy guard suppresses nested firing so a handler that itself writes
|
|
10875
|
+
* cannot loop (same rationale as WriteHookRegistry.#suppressed).
|
|
10876
|
+
*/
|
|
10877
|
+
async dispatch(point, event) {
|
|
10878
|
+
const a = this.#handlers.get(point);
|
|
10879
|
+
if (!a || a.length === 0) return;
|
|
10880
|
+
this.#depth++;
|
|
10881
|
+
try {
|
|
10882
|
+
for (const h of a.slice()) {
|
|
10883
|
+
try {
|
|
10884
|
+
await h(event);
|
|
10885
|
+
} catch (err) {
|
|
10886
|
+
console.warn(
|
|
10887
|
+
`[noy-db] service observe handler failed at ${point}: ` + (err instanceof Error ? err.message : String(err))
|
|
10888
|
+
);
|
|
10889
|
+
}
|
|
10890
|
+
}
|
|
10891
|
+
} finally {
|
|
10892
|
+
this.#depth--;
|
|
10893
|
+
}
|
|
10894
|
+
}
|
|
10895
|
+
/**
|
|
10896
|
+
* Register a write-gating handler. A throw from the handler ABORTS the
|
|
10897
|
+
* write. Returns an unsubscribe fn. See {@link GateRegisterOptions} for
|
|
10898
|
+
* the `needsPrior` prior-read declaration (#267).
|
|
10899
|
+
*/
|
|
10900
|
+
registerGate(point, handler, opts) {
|
|
10901
|
+
let arr = this.#gateHandlers.get(point);
|
|
10902
|
+
if (!arr) {
|
|
10903
|
+
arr = [];
|
|
10904
|
+
this.#gateHandlers.set(point, arr);
|
|
10905
|
+
}
|
|
10906
|
+
const entry = { fn: handler, needsPrior: opts?.needsPrior !== false };
|
|
10907
|
+
arr.push(entry);
|
|
10908
|
+
return () => {
|
|
10909
|
+
const a = this.#gateHandlers.get(point);
|
|
10910
|
+
if (!a) return;
|
|
10911
|
+
const i = a.indexOf(entry);
|
|
10912
|
+
if (i >= 0) a.splice(i, 1);
|
|
10913
|
+
};
|
|
10914
|
+
}
|
|
10915
|
+
/** Cheap gate for the write path — true when any gate handler is registered for the point. */
|
|
10916
|
+
hasGateHandlers(point) {
|
|
10917
|
+
const a = this.#gateHandlers.get(point);
|
|
10918
|
+
return a !== void 0 && a.length > 0;
|
|
10919
|
+
}
|
|
10920
|
+
/**
|
|
10921
|
+
* True when at least one gate handler at `point` needs the prior record
|
|
10922
|
+
* (the default). False when the point has no handlers or every handler
|
|
10923
|
+
* registered with `needsPrior: false` — the write path then skips the
|
|
10924
|
+
* prior-read before dispatching (#267 prior-read elision).
|
|
10925
|
+
*/
|
|
10926
|
+
gateNeedsPrior(point) {
|
|
10927
|
+
const a = this.#gateHandlers.get(point);
|
|
10928
|
+
if (!a) return false;
|
|
10929
|
+
return a.some((e) => e.needsPrior);
|
|
10930
|
+
}
|
|
10931
|
+
/**
|
|
10932
|
+
* Run gate handlers in registration order, awaited. Unlike `dispatch`
|
|
10933
|
+
* (observe), a handler throw is NOT swallowed — it PROPAGATES, aborting the
|
|
10934
|
+
* write before it reaches the store. The first throw stops the remaining
|
|
10935
|
+
* handlers (fail-fast). This is the seam guards/periods migrate onto.
|
|
10936
|
+
*
|
|
10937
|
+
* Note: gate handlers are validators that read, not write. A gate handler
|
|
10938
|
+
* that writes back into the same collection would re-enter the write path
|
|
10939
|
+
* and re-dispatch this point; loop-suppression for that case is deferred to
|
|
10940
|
+
* the migration slice (contract: gate handlers must not perform writes that
|
|
10941
|
+
* re-trigger their own point).
|
|
10942
|
+
*/
|
|
10943
|
+
async dispatchGate(point, event) {
|
|
10944
|
+
const a = this.#gateHandlers.get(point);
|
|
10945
|
+
if (!a || a.length === 0) return;
|
|
10946
|
+
for (const e of a.slice()) {
|
|
10947
|
+
await e.fn(event);
|
|
10948
|
+
}
|
|
10949
|
+
}
|
|
10950
|
+
};
|
|
10951
|
+
|
|
10891
10952
|
// src/with-party/tab-coordination.ts
|
|
10892
10953
|
var TabCoordinator = class {
|
|
10893
10954
|
tabId;
|
|
@@ -10950,13 +11011,13 @@ var TabCoordinator = class {
|
|
|
10950
11011
|
const out = [self, ...[...this.#peers.values()].filter((p) => p.lastSeen >= cutoff)];
|
|
10951
11012
|
return out.sort((a, b) => a.tabId.localeCompare(b.tabId));
|
|
10952
11013
|
}
|
|
10953
|
-
onTabRoleChange(
|
|
10954
|
-
this.#roleHandlers.add(
|
|
10955
|
-
return () => this.#roleHandlers.delete(
|
|
11014
|
+
onTabRoleChange(fn) {
|
|
11015
|
+
this.#roleHandlers.add(fn);
|
|
11016
|
+
return () => this.#roleHandlers.delete(fn);
|
|
10956
11017
|
}
|
|
10957
|
-
onActiveTabsChange(
|
|
10958
|
-
this.#tabsHandlers.add(
|
|
10959
|
-
return () => this.#tabsHandlers.delete(
|
|
11018
|
+
onActiveTabsChange(fn) {
|
|
11019
|
+
this.#tabsHandlers.add(fn);
|
|
11020
|
+
return () => this.#tabsHandlers.delete(fn);
|
|
10960
11021
|
}
|
|
10961
11022
|
dispose() {
|
|
10962
11023
|
if (this.#disposed) return;
|
|
@@ -11630,8 +11691,9 @@ var TeamFacade = class {
|
|
|
11630
11691
|
async runRotate(engine, vault, collections) {
|
|
11631
11692
|
this.deps.checkPolicyOperation(vault, "rotate");
|
|
11632
11693
|
const keyring = await this.deps.getKeyringInternal(vault);
|
|
11633
|
-
await engine(this.deps.options.store, vault, keyring, collections);
|
|
11694
|
+
const result = await engine(this.deps.options.store, vault, keyring, collections);
|
|
11634
11695
|
this.deps.keyringCache.set(vault, keyring);
|
|
11696
|
+
return result;
|
|
11635
11697
|
}
|
|
11636
11698
|
// ─── Tier-2 enroll / remove ─────────────────────────────────────
|
|
11637
11699
|
/**
|
|
@@ -12974,16 +13036,26 @@ var Noydb = class {
|
|
|
12974
13036
|
/**
|
|
12975
13037
|
* Rotate the DEKs for the given collections in a vault.
|
|
12976
13038
|
*
|
|
12977
|
-
* Generates fresh DEKs
|
|
12978
|
-
*
|
|
12979
|
-
*
|
|
12980
|
-
*
|
|
12981
|
-
*
|
|
13039
|
+
* Generates fresh DEKs and re-encrypts every record in each collection.
|
|
13040
|
+
* The old DEKs become unreachable — useful as a defense-in-depth measure
|
|
13041
|
+
* after a suspected key leak, or as the scheduled half of a key-rotation
|
|
13042
|
+
* policy.
|
|
13043
|
+
*
|
|
13044
|
+
* ## Other members LOSE access to the rotated collections (#854)
|
|
13045
|
+
*
|
|
13046
|
+
* A member's DEKs are wrapped under that member's KEK, and a KEK derives
|
|
13047
|
+
* only from that member's secret. The caller cannot derive anyone else's
|
|
13048
|
+
* KEK, so re-wrapping a fresh DEK for them is impossible — that is the
|
|
13049
|
+
* zero-knowledge property working as designed. Rotation therefore DROPS
|
|
13050
|
+
* the rotated collections from every other member's keyring.
|
|
13051
|
+
*
|
|
13052
|
+
* The returned {@link RotateResult.needsRegrant} names each (member,
|
|
13053
|
+
* collection) pair that was dropped. Re-run `grant()` for those pairs, or
|
|
13054
|
+
* they stay locked out.
|
|
12982
13055
|
*
|
|
12983
|
-
* Unlike `revoke({ rotateKeys: true })`, this call does
|
|
12984
|
-
*
|
|
12985
|
-
*
|
|
12986
|
-
* path still lives in `revoke()`.
|
|
13056
|
+
* Unlike `revoke({ rotateKeys: true })`, this call does not REMOVE any
|
|
13057
|
+
* user from the vault — they keep membership and their other collections.
|
|
13058
|
+
* This is the "just rotate" path; "revoke and rotate" lives in `revoke()`.
|
|
12987
13059
|
*
|
|
12988
13060
|
* Exposed on Noydb (rather than only on the lower-level keyring
|
|
12989
13061
|
* module) so CLI and admin tooling can trigger rotation without
|
|
@@ -13151,7 +13223,7 @@ var Noydb = class {
|
|
|
13151
13223
|
* })
|
|
13152
13224
|
* ```
|
|
13153
13225
|
*/
|
|
13154
|
-
async queryAcross(vaultIds,
|
|
13226
|
+
async queryAcross(vaultIds, fn, options = {}) {
|
|
13155
13227
|
if (this.closed) throw new ValidationError("Instance is closed");
|
|
13156
13228
|
this.resetSessionTimer();
|
|
13157
13229
|
const concurrency = Math.max(1, options.concurrency ?? 1);
|
|
@@ -13165,7 +13237,7 @@ var Noydb = class {
|
|
|
13165
13237
|
const task = (async () => {
|
|
13166
13238
|
try {
|
|
13167
13239
|
const comp = await this.openVault(vaultId, { create: options.create !== false });
|
|
13168
|
-
const result = await
|
|
13240
|
+
const result = await fn(comp);
|
|
13169
13241
|
results[idx] = { vault: vaultId, result };
|
|
13170
13242
|
} catch (err) {
|
|
13171
13243
|
results[idx] = {
|
|
@@ -13387,8 +13459,8 @@ var Noydb = class {
|
|
|
13387
13459
|
}
|
|
13388
13460
|
return engine;
|
|
13389
13461
|
}
|
|
13390
|
-
_forEachSyncEngine(vault,
|
|
13391
|
-
for (const [key, engine] of this.syncEngines) if (key === vault || key.startsWith(`${vault}::`))
|
|
13462
|
+
_forEachSyncEngine(vault, fn) {
|
|
13463
|
+
for (const [key, engine] of this.syncEngines) if (key === vault || key.startsWith(`${vault}::`)) fn(engine);
|
|
13392
13464
|
}
|
|
13393
13465
|
// ─── Events ────────────────────────────────────────────────────
|
|
13394
13466
|
on(event, handler) {
|
|
@@ -13432,9 +13504,9 @@ var Noydb = class {
|
|
|
13432
13504
|
return this.writeHooks.onAfterWrite(handler);
|
|
13433
13505
|
}
|
|
13434
13506
|
/** Subscribe to cross-tab write conflicts. Returns an unsubscribe. */
|
|
13435
|
-
onWriteConflict(
|
|
13436
|
-
this.on("write:conflict",
|
|
13437
|
-
return () => this.off("write:conflict",
|
|
13507
|
+
onWriteConflict(fn) {
|
|
13508
|
+
this.on("write:conflict", fn);
|
|
13509
|
+
return () => this.off("write:conflict", fn);
|
|
13438
13510
|
}
|
|
13439
13511
|
/**
|
|
13440
13512
|
* Enable same-device multi-tab coordination: primary/secondary
|
|
@@ -13508,12 +13580,12 @@ var Noydb = class {
|
|
|
13508
13580
|
activeTabs() {
|
|
13509
13581
|
return this.tabCoordinator?.activeTabs() ?? [];
|
|
13510
13582
|
}
|
|
13511
|
-
onTabRoleChange(
|
|
13512
|
-
return this.tabCoordinator?.onTabRoleChange(
|
|
13583
|
+
onTabRoleChange(fn) {
|
|
13584
|
+
return this.tabCoordinator?.onTabRoleChange(fn) ?? (() => {
|
|
13513
13585
|
});
|
|
13514
13586
|
}
|
|
13515
|
-
onActiveTabsChange(
|
|
13516
|
-
return this.tabCoordinator?.onActiveTabsChange(
|
|
13587
|
+
onActiveTabsChange(fn) {
|
|
13588
|
+
return this.tabCoordinator?.onActiveTabsChange(fn) ?? (() => {
|
|
13517
13589
|
});
|
|
13518
13590
|
}
|
|
13519
13591
|
/** @internal The write-hook registry, threaded into each Collection. */
|
|
@@ -13799,7 +13871,7 @@ var Noydb = class {
|
|
|
13799
13871
|
"setCover: the cover feature is not enabled. Pass `cover: true` (or a schema object) to `createNoydb`."
|
|
13800
13872
|
);
|
|
13801
13873
|
}
|
|
13802
|
-
const { loadCover, saveCover, resolveSchema, validateCoverInput, mergeCustom, validateCoverSize } = await import("./cover-
|
|
13874
|
+
const { loadCover, saveCover, resolveSchema, validateCoverInput, mergeCustom, validateCoverSize } = await import("./cover-ADBCTIKN.js");
|
|
13803
13875
|
const schema = resolveSchema(coverOption);
|
|
13804
13876
|
validateCoverInput(input, schema);
|
|
13805
13877
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -13831,7 +13903,7 @@ var Noydb = class {
|
|
|
13831
13903
|
* regardless).
|
|
13832
13904
|
*/
|
|
13833
13905
|
async getCover(vault, opts = {}) {
|
|
13834
|
-
const { readCover } = await import("./cover-
|
|
13906
|
+
const { readCover } = await import("./cover-ADBCTIKN.js");
|
|
13835
13907
|
return readCover(this.options.store, vault, opts);
|
|
13836
13908
|
}
|
|
13837
13909
|
// ─── Auth introspection ─────────────────────────────────────────
|
|
@@ -13958,9 +14030,9 @@ async function createNoydb(options) {
|
|
|
13958
14030
|
throw new ValidationError("A secret (secret) or getKeyring callback is required when encryption is enabled");
|
|
13959
14031
|
}
|
|
13960
14032
|
if (!options.coordinationStrategy) options = { ...options, coordinationStrategy: await createDefaultCoordinationProvider(options.store) };
|
|
13961
|
-
if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-
|
|
14033
|
+
if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-5QVQX4HG.js")).createUserApi };
|
|
13962
14034
|
if (!options.policyFactory) {
|
|
13963
|
-
const policyModule = await import("./policy-
|
|
14035
|
+
const policyModule = await import("./policy-QWGJB7P7.js");
|
|
13964
14036
|
options = { ...options, policyFactory: policyModule.createNoydbPolicy, policyCheckGateFn: policyModule.checkGate };
|
|
13965
14037
|
}
|
|
13966
14038
|
return new Noydb(options);
|
|
@@ -13997,4 +14069,4 @@ export {
|
|
|
13997
14069
|
Noydb,
|
|
13998
14070
|
createNoydb
|
|
13999
14071
|
};
|
|
14000
|
-
//# sourceMappingURL=chunk-
|
|
14072
|
+
//# sourceMappingURL=chunk-EWPS35AR.js.map
|