@noy-db/hub 0.4.0-pre.5 → 0.4.0-pre.7
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-3NKVNZPM.js +20 -0
- package/dist/attestation/index.js +20 -20
- package/dist/{backup-YCHAC575.js → backup-PTSVXDDW.js} +13 -13
- package/dist/blobs/index.js +15 -12
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/cargo/index.js +36 -36
- package/dist/{chunk-5WLDZZ6S.js → chunk-35NMVJ7I.js} +3 -3
- package/dist/{chunk-TNATF3HB.js → chunk-3HUYRN24.js} +4 -4
- package/dist/chunk-3HUYRN24.js.map +1 -0
- package/dist/{chunk-TNJVDG2B.js → chunk-3XKESW5E.js} +3 -3
- package/dist/{chunk-MUPZ6IZX.js → chunk-4JQK3L4V.js} +2 -2
- package/dist/{chunk-Z4D3YGAB.js → chunk-4ZKNC6A6.js} +2 -2
- package/dist/{chunk-ONB627HU.js → chunk-55LX6FSX.js} +2 -2
- package/dist/{chunk-QMZ5A6FQ.js → chunk-56IIVAEO.js} +2 -2
- package/dist/chunk-5D2ALSM5.js +19 -0
- package/dist/chunk-5D2ALSM5.js.map +1 -0
- package/dist/{chunk-FHHYCBBP.js → chunk-5DRROK5W.js} +2 -2
- package/dist/{chunk-GTNRMJYH.js → chunk-5GQEU4DN.js} +2 -2
- package/dist/{chunk-YQQPNXNO.js → chunk-6L3DKWRY.js} +6 -6
- package/dist/chunk-6LJY7X5A.js +18 -0
- package/dist/chunk-6LJY7X5A.js.map +1 -0
- package/dist/{chunk-M6QA2KK2.js → chunk-6M2I3DKF.js} +2 -2
- package/dist/{chunk-FTCGEUOY.js → chunk-6R6Q3MRN.js} +7 -7
- package/dist/{chunk-ZUDAK436.js → chunk-6UBZ6I5Z.js} +2 -2
- package/dist/{chunk-SEU6QHH4.js → chunk-6ZNSB3H6.js} +5 -17
- package/dist/chunk-6ZNSB3H6.js.map +1 -0
- package/dist/chunk-AFHQATY4.js +47 -0
- package/dist/chunk-AFHQATY4.js.map +1 -0
- package/dist/{chunk-7U6AB7DZ.js → chunk-AKKRXT23.js} +2 -2
- package/dist/{chunk-2PDBYF2O.js → chunk-AT2JJEKJ.js} +4 -4
- package/dist/chunk-AT2JJEKJ.js.map +1 -0
- package/dist/{chunk-OWLZONGX.js → chunk-BLBAQRBM.js} +2 -2
- package/dist/{chunk-QBOQI6PG.js → chunk-BN4HRYAZ.js} +2 -2
- package/dist/{chunk-QVGEVZ5F.js → chunk-BQ6DHN4I.js} +3 -3
- package/dist/{chunk-GP54LU5N.js → chunk-BYFXLDVV.js} +9 -9
- package/dist/{chunk-FIP7KI2P.js → chunk-C25JXSOR.js} +337 -21
- package/dist/chunk-C25JXSOR.js.map +1 -0
- package/dist/chunk-CADUYBQD.js +151 -0
- package/dist/chunk-CADUYBQD.js.map +1 -0
- package/dist/{chunk-HAPY7WFP.js → chunk-CCDP6EPB.js} +13 -355
- package/dist/chunk-CCDP6EPB.js.map +1 -0
- package/dist/{chunk-QRHEAZ2Q.js → chunk-CUZLNGD5.js} +1 -1
- package/dist/{chunk-YXIVUWDU.js → chunk-DGBIHDVK.js} +5 -5
- package/dist/chunk-DSDXAKIP.js +50 -0
- package/dist/chunk-DSDXAKIP.js.map +1 -0
- package/dist/{chunk-QZJEYZ4I.js → chunk-DZAF24PG.js} +5 -5
- package/dist/chunk-DZFQVICS.js +23 -0
- package/dist/chunk-DZFQVICS.js.map +1 -0
- package/dist/chunk-E23UGFVC.js +63 -0
- package/dist/chunk-E23UGFVC.js.map +1 -0
- package/dist/{chunk-X3MWEFPT.js → chunk-EBKCYQ2D.js} +14 -14
- package/dist/chunk-EBKCYQ2D.js.map +1 -0
- package/dist/chunk-EP5L47XV.js +22 -0
- package/dist/chunk-EP5L47XV.js.map +1 -0
- package/dist/{chunk-TMR64XPL.js → chunk-EZNTORXE.js} +2 -2
- package/dist/{chunk-JAMDDLIM.js → chunk-FMNU7IUG.js} +3 -3
- package/dist/{chunk-YXZNGHID.js → chunk-FO6RNKKW.js} +8 -46
- package/dist/chunk-FO6RNKKW.js.map +1 -0
- package/dist/{chunk-YMUGBZN2.js → chunk-FQ5CHJR7.js} +1 -1
- package/dist/chunk-FQ5CHJR7.js.map +1 -0
- package/dist/{chunk-YZN6NRTR.js → chunk-FRMW23UK.js} +13 -11
- package/dist/chunk-FRMW23UK.js.map +1 -0
- package/dist/chunk-GJW4HX2O.js +1 -0
- package/dist/{chunk-7BIJS6II.js → chunk-GP3UWP22.js} +4 -4
- package/dist/{chunk-YTW6ZIPD.js → chunk-GZACYEOB.js} +1 -1
- package/dist/chunk-GZACYEOB.js.map +1 -0
- package/dist/{chunk-JIHH26WQ.js → chunk-HFUAFR6B.js} +6 -6
- package/dist/{chunk-J5TEU77Q.js → chunk-IF6WNGAK.js} +59 -4
- package/dist/chunk-IF6WNGAK.js.map +1 -0
- package/dist/{chunk-ZX5FNWH7.js → chunk-IG6KUWBX.js} +2 -2
- package/dist/chunk-IG6KUWBX.js.map +1 -0
- package/dist/{chunk-CKUYQO2P.js → chunk-IMRB2C4O.js} +7 -5
- package/dist/chunk-IMRB2C4O.js.map +1 -0
- package/dist/{chunk-RWW3I3PO.js → chunk-ISRKW4YN.js} +3 -3
- package/dist/{chunk-P4NUJVWL.js → chunk-IXNCZTWA.js} +2 -2
- package/dist/{chunk-YFFEF6HR.js → chunk-JIDLU57U.js} +3 -3
- package/dist/{chunk-PTT2NB46.js → chunk-JYJFGD2H.js} +2 -2
- package/dist/{chunk-3OWYOECI.js → chunk-JYV4JJV2.js} +5 -5
- package/dist/{chunk-OGVE4IJW.js → chunk-KBPU5M2E.js} +7 -7
- package/dist/{chunk-I2XEBEEF.js → chunk-KFRPNHWR.js} +4 -4
- package/dist/chunk-KFRPNHWR.js.map +1 -0
- package/dist/{chunk-3LJYHE7S.js → chunk-KPXM4WO6.js} +64 -57
- package/dist/chunk-KPXM4WO6.js.map +1 -0
- package/dist/{chunk-QMMOMBH6.js → chunk-KRCBZYTZ.js} +26 -177
- package/dist/chunk-KRCBZYTZ.js.map +1 -0
- package/dist/{chunk-UTEATWHO.js → chunk-KW42W6SV.js} +6 -6
- package/dist/{chunk-BY5YBSXA.js → chunk-L3YYLT4E.js} +15 -2
- package/dist/chunk-L3YYLT4E.js.map +1 -0
- package/dist/{chunk-UVBHM7AK.js → chunk-MANUDU7I.js} +6 -6
- package/dist/{chunk-YJ3TREAC.js → chunk-MHMLXJ3I.js} +2 -2
- package/dist/chunk-MHMLXJ3I.js.map +1 -0
- package/dist/{chunk-D4LAJ737.js → chunk-MSMJJB4J.js} +2 -2
- package/dist/chunk-MSMJJB4J.js.map +1 -0
- package/dist/{chunk-DYZ5CCVM.js → chunk-MXUT7FTE.js} +2 -2
- package/dist/chunk-MXUT7FTE.js.map +1 -0
- package/dist/{chunk-7ICV4ASA.js → chunk-N5PLUFH2.js} +27 -5
- package/dist/chunk-N5PLUFH2.js.map +1 -0
- package/dist/{chunk-K7BADAOS.js → chunk-NEX7JCMO.js} +4 -4
- package/dist/{chunk-5HSSTOOG.js → chunk-NFZGZ4AK.js} +2 -2
- package/dist/{chunk-XUFAFHQM.js → chunk-NJ4DYYO5.js} +7 -4
- package/dist/chunk-NJ4DYYO5.js.map +1 -0
- package/dist/{chunk-VEGQYPCP.js → chunk-NQSO4UAH.js} +8 -8
- package/dist/chunk-NQSO4UAH.js.map +1 -0
- package/dist/{chunk-GHEMAVTN.js → chunk-NYEFP7DY.js} +4 -4
- package/dist/chunk-NYEFP7DY.js.map +1 -0
- package/dist/{chunk-S4YERMGJ.js → chunk-OBPVWOSQ.js} +4 -4
- package/dist/{chunk-OHV6T5JB.js → chunk-OLIWCCFM.js} +2 -5
- package/dist/{chunk-2CRZOVDI.js → chunk-OLSARBZU.js} +2 -2
- package/dist/chunk-PEOZ34EM.js +13 -0
- package/dist/chunk-PEOZ34EM.js.map +1 -0
- package/dist/{chunk-KJTIAECI.js → chunk-PT4XLP6I.js} +171 -12
- package/dist/chunk-PT4XLP6I.js.map +1 -0
- package/dist/{chunk-LC7DSMHR.js → chunk-PTHKZWEH.js} +2 -14
- package/dist/{chunk-LC7DSMHR.js.map → chunk-PTHKZWEH.js.map} +1 -1
- package/dist/chunk-PVEWA2DU.js +23 -0
- package/dist/chunk-PVEWA2DU.js.map +1 -0
- package/dist/chunk-QADFHRQM.js +367 -0
- package/dist/chunk-QADFHRQM.js.map +1 -0
- package/dist/{chunk-7LP7FFJ2.js → chunk-QD46HPZG.js} +2 -2
- package/dist/{chunk-G4MFQXYX.js → chunk-QJNCB5SK.js} +2 -2
- package/dist/{chunk-6SYOHUHM.js → chunk-QZWTRENR.js} +2 -2
- package/dist/chunk-QZWTRENR.js.map +1 -0
- package/dist/{chunk-TSNRZSRC.js → chunk-RO5NM6UI.js} +2 -2
- package/dist/chunk-RO5NM6UI.js.map +1 -0
- package/dist/{chunk-GEEJPID6.js → chunk-RZPOZPZU.js} +8 -8
- package/dist/chunk-SGDPRCC4.js +1075 -0
- package/dist/chunk-SGDPRCC4.js.map +1 -0
- package/dist/{chunk-YCAJDK4O.js → chunk-SGQ4N5FS.js} +5 -5
- package/dist/{chunk-522MBPE5.js → chunk-SHEEBRZ4.js} +2 -2
- package/dist/{chunk-YWZEDG7F.js → chunk-SHYIA73K.js} +6 -6
- package/dist/{chunk-L2CAWCQL.js → chunk-SKM35Y4Q.js} +17 -26
- package/dist/chunk-SKM35Y4Q.js.map +1 -0
- package/dist/chunk-SMY5X46Z.js +14 -0
- package/dist/chunk-SMY5X46Z.js.map +1 -0
- package/dist/{chunk-K4BWPNJO.js → chunk-TE6LH6J2.js} +5 -5
- package/dist/{chunk-AFAPBZAA.js → chunk-TG634KCO.js} +11 -2
- package/dist/chunk-TG634KCO.js.map +1 -0
- package/dist/{chunk-V5JUAW4M.js → chunk-TIVK6PRK.js} +9 -10
- package/dist/chunk-TIVK6PRK.js.map +1 -0
- package/dist/{chunk-JN3SGXJE.js → chunk-UADPR6F4.js} +3 -3
- package/dist/{chunk-JN3SGXJE.js.map → chunk-UADPR6F4.js.map} +1 -1
- package/dist/{chunk-SBOHNJUD.js → chunk-V6UQZA2H.js} +2 -2
- package/dist/chunk-VG2ZSFYD.js +32 -0
- package/dist/chunk-VG2ZSFYD.js.map +1 -0
- package/dist/{chunk-SC4JLMZI.js → chunk-VH6SOCXH.js} +2 -2
- package/dist/chunk-VKQCVU2Z.js +21 -0
- package/dist/chunk-VKQCVU2Z.js.map +1 -0
- package/dist/chunk-VSRSQ2CR.js +654 -0
- package/dist/chunk-VSRSQ2CR.js.map +1 -0
- package/dist/{chunk-WQN5SM7P.js → chunk-W3G5REIU.js} +2 -2
- package/dist/{chunk-EGU4PWQW.js → chunk-W66AM5IB.js} +2 -2
- package/dist/chunk-W66AM5IB.js.map +1 -0
- package/dist/{chunk-HQKRZIX6.js → chunk-WBKZUO5V.js} +26 -43
- package/dist/chunk-WBKZUO5V.js.map +1 -0
- package/dist/{chunk-OMSKGLYA.js → chunk-WO4T4OD5.js} +2 -2
- package/dist/{chunk-6RPWILRH.js → chunk-WZ3NCMK6.js} +6 -5
- package/dist/{chunk-BAAUFCJK.js → chunk-X4MVWPHV.js} +3 -3
- package/dist/{chunk-R2N37AA6.js → chunk-XIDQKFZF.js} +3 -3
- package/dist/{chunk-EEZCB74X.js → chunk-XOBHRD2M.js} +575 -651
- package/dist/chunk-XOBHRD2M.js.map +1 -0
- package/dist/chunk-XZHEOSQ2.js +16 -0
- package/dist/chunk-XZHEOSQ2.js.map +1 -0
- package/dist/chunk-Y2NBBT6K.js +18 -0
- package/dist/chunk-Y2NBBT6K.js.map +1 -0
- package/dist/{chunk-OWOT7CFC.js → chunk-Y6B6HVKC.js} +2 -2
- package/dist/{chunk-5ATANZSW.js → chunk-Y6VZQGGH.js} +6 -6
- package/dist/chunk-YMUFFJCO.js +23 -0
- package/dist/chunk-YMUFFJCO.js.map +1 -0
- package/dist/{chunk-YZNKFYDC.js → chunk-ZFUFAHZ3.js} +4 -4
- package/dist/{chunk-PWWWMRT7.js → chunk-ZTLOXFPB.js} +2 -2
- package/dist/chunk-ZTLOXFPB.js.map +1 -0
- package/dist/{walk-E3OVLBFR.js → chunk-ZWBKDKXC.js} +4 -13
- package/dist/{walk-E3OVLBFR.js.map → chunk-ZWBKDKXC.js.map} +1 -1
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-52P3D72W.js → classified-marker-EOOSMWFC.js} +3 -3
- package/dist/collection-facade-TTRF5NFJ.js +45 -0
- package/dist/{computed-33DRJDOC.js → computed-AB45PS4V.js} +3 -3
- package/dist/consent/index.js +13 -9
- package/dist/consent/index.js.map +1 -1
- package/dist/{cover-5BSNJREH.js → cover/index.js} +7 -6
- package/dist/crdt/index.js +4 -0
- package/dist/crdt/index.js.map +1 -1
- package/dist/custody/index.js +26 -0
- package/dist/{dead-filter-JXVCKS6W.js → dead-filter-6DYY7S64.js} +2 -2
- package/dist/{chunk-ILM6X6CP.js → delegation-ONOZVPIP.js} +12 -6
- package/dist/{chunk-ILM6X6CP.js.map → delegation-ONOZVPIP.js.map} +1 -1
- package/dist/derivations/index.js +12 -12
- package/dist/derive-IGGVSUPH.js +22 -0
- package/dist/directory/index.js +46 -0
- package/dist/{dispatch-PKQQFDBT.js → dispatch-7T45NN7C.js} +19 -18
- package/dist/{dispatch-PKQQFDBT.js.map → dispatch-7T45NN7C.js.map} +1 -1
- package/dist/{dispatch-SMXUO7W5.js → dispatch-RPTLK7LJ.js} +5 -5
- package/dist/{enclave-I5H3GINP.js → enclave-CLJVSDFG.js} +9 -9
- package/dist/executor-IEBLTBCW.js +9 -0
- package/dist/executor-RM7XWQDU.js +9 -0
- package/dist/executor-XZYM4KHT.js +28 -0
- package/dist/export-accessible-24XCCD3A.js +23 -0
- package/dist/extract-partition-H2TPEEOF.js +38 -0
- package/dist/{fanout-sidecar-WWXVHHUH.js → fanout-sidecar-TV7CXAJ6.js} +9 -9
- package/dist/find-OZMTRIK3.js +11 -0
- package/dist/forget/index.js +11 -11
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +16 -12
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +16 -14
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +18 -24
- package/dist/index.js +212 -2045
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +4 -2
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +28 -0
- package/dist/issue-55HJE7JF.js +19 -0
- package/dist/kernel/collection-config.d.ts +1 -1
- package/dist/kernel/collection.d.ts +2 -2
- package/dist/kernel/errors.d.ts +2 -2
- package/dist/kernel/lazy.d.ts +30 -0
- package/dist/kernel/noydb.d.ts +22 -11
- 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 +25 -25
- package/dist/kernel/vault.d.ts +10 -10
- package/dist/{ledger-M2BKCNVS.js → ledger-XY6NP3J2.js} +11 -11
- package/dist/liberate-LXOJ2EMB.js +24 -0
- package/dist/{link-set-ZU4E5J5S.js → link-set-POQB7BU5.js} +11 -11
- package/dist/materialized-views/index.js +22 -19
- package/dist/money/index.js +31 -0
- package/dist/noydb-KXS35UJS.js +82 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +15 -13
- package/dist/pod/index.js +11 -12
- package/dist/{policy-IY2YEA3A.js → policy/index.js} +6 -6
- package/dist/port/with/blob-strategy.d.ts +15 -5
- package/dist/port/with/collection-registries.d.ts +62 -0
- package/dist/port/with/strategies.d.ts +11 -11
- package/dist/port/with/team-strategy.d.ts +2 -1
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-XIAHB6KF.js → post-register-URQANI3B.js} +6 -6
- package/dist/query/index.js +6 -46
- package/dist/{aggregate → reduce}/index.js +24 -17
- package/dist/reduce/index.js.map +1 -0
- package/dist/register-5W6CG4RM.js +25 -0
- package/dist/registry-7Y5WF7GS.js +9 -0
- package/dist/{registry-VW6P6A3J.js → registry-BWD2ED52.js} +2 -2
- package/dist/registry-MCSGBZXI.js +18 -0
- package/dist/registry-UJFP3NWF.js +19 -0
- package/dist/request-withdrawal-IWYDM4SO.js +31 -0
- package/dist/{reveal-VWXRV2XU.js → reveal-BXZGWIOP.js} +6 -6
- package/dist/revoke-TINYPHYY.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +26 -0
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +36 -0
- package/dist/{seed-CDBFOTIK.js → seed-F7YYQTRC.js} +11 -11
- package/dist/sequence/index.js +30 -0
- package/dist/session/index.js +13 -9
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +6 -2
- package/dist/shadow/index.js.map +1 -1
- package/dist/signer-WMZKCNKC.js +25 -0
- package/dist/snapshots/index.js +14 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-NBROTA66.js → stale-JOE7GBAE.js} +11 -10
- package/dist/storage-B3WBKXKT.js +23 -0
- package/dist/store/index.js +22 -0
- package/dist/{store-coordination-provider-P3IU5JHD.js → store-coordination-provider-5LX2UFU2.js} +3 -3
- package/dist/sync/index.js +14 -10
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +36 -29
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -1
- package/dist/{tx → transactions}/index.js +7 -3
- package/dist/transactions/index.js.map +1 -0
- package/dist/util/index.js +1 -1
- package/dist/{verify-5X37OXRY.js → verify-7XWHJWUN.js} +5 -5
- package/dist/via/blob/active.d.ts +7 -18
- package/dist/via/blob/binding.d.ts +1 -1
- package/dist/via/blob/index.d.ts +4 -2
- 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-6OHAWGBS.js +21 -0
- package/dist/with-audit/consent/index.d.ts +2 -0
- package/dist/with-audit/forget/active.d.ts +3 -3
- package/dist/with-audit/forget/index.d.ts +4 -4
- package/dist/with-audit/forget/strategy.d.ts +3 -3
- package/dist/with-audit/guards/executor.d.ts +4 -4
- package/dist/with-audit/guards/immutable-guard.d.ts +3 -3
- package/dist/with-audit/guards/index.d.ts +1 -1
- package/dist/with-audit/guards/registry.d.ts +3 -3
- package/dist/with-audit/guards/transition-guard.d.ts +3 -3
- package/dist/with-audit/guards/types.d.ts +10 -10
- package/dist/with-audit/guards/with-guard.d.ts +2 -2
- 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-commit/numbering/descriptor.d.ts +16 -6
- package/dist/with-commit/tx/active.d.ts +5 -5
- package/dist/with-commit/tx/index.d.ts +2 -2
- package/dist/with-commit/tx/invariants.d.ts +1 -1
- package/dist/with-commit/tx/strategy.d.ts +3 -3
- package/dist/with-fork/shadow/index.d.ts +2 -0
- package/dist/with-fork/snapshots/active.d.ts +2 -2
- package/dist/with-fork/snapshots/index.d.ts +3 -1
- package/dist/with-fork/snapshots/noydb-facade.d.ts +3 -3
- package/dist/with-fork/snapshots/strategy.d.ts +2 -2
- package/dist/with-formula/derivations/executor.d.ts +2 -2
- package/dist/with-formula/derivations/index.d.ts +2 -1
- package/dist/with-formula/derivations/registry.d.ts +3 -3
- package/dist/with-formula/derivations/stale.d.ts +2 -2
- package/dist/with-formula/derivations/types.d.ts +3 -3
- package/dist/with-formula/derivations/with-derivation.d.ts +2 -2
- package/dist/with-formula/derivations/with-rollup.d.ts +15 -8
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +3 -3
- package/dist/with-formula/materialized-views/index.d.ts +1 -1
- package/dist/with-formula/materialized-views/registry.d.ts +4 -4
- package/dist/with-formula/materialized-views/types.d.ts +11 -11
- package/dist/with-formula/materialized-views/with-materialized-view.d.ts +2 -2
- package/dist/with-formula/overlay-views/index.d.ts +1 -1
- package/dist/with-formula/overlay-views/registry.d.ts +4 -4
- package/dist/with-formula/overlay-views/types.d.ts +3 -3
- package/dist/with-formula/overlay-views/virtual-collection.d.ts +2 -2
- package/dist/with-formula/overlay-views/with-overlayed-view.d.ts +2 -2
- package/dist/with-lookup/indexing/active.d.ts +5 -5
- package/dist/with-lookup/indexing/index.d.ts +3 -1
- package/dist/with-lookup/indexing/strategy.d.ts +3 -3
- 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-lookup/search/build-docs.d.ts +7 -2
- package/dist/with-lookup/search/index.d.ts +1 -1
- package/dist/with-party/directory/cover/index.d.ts +1 -0
- package/dist/with-party/directory/index.d.ts +2 -0
- 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/index.d.ts +2 -0
- package/dist/with-party/team/keyring.d.ts +68 -20
- package/dist/with-party/team/noydb-facade.d.ts +2 -1
- package/dist/with-shape/blobs/blob-set.d.ts +1 -1
- package/dist/with-shape/introspection/index.d.ts +6 -0
- package/dist/with-shape/schema-update/index.d.ts +1 -0
- package/dist/with-store/index.d.ts +3 -2
- package/dist/withdraw-accessible-DEUCOO4F.js +28 -0
- package/dist/withdraw-accessible-DEUCOO4F.js.map +1 -0
- package/package.json +42 -30
- package/dist/aggregate/index.js.map +0 -1
- package/dist/api-22ES33N3.js +0 -20
- package/dist/as/index.js +0 -30
- package/dist/at/index.js +0 -1
- package/dist/by/index.js +0 -11
- package/dist/chunk-2PDBYF2O.js.map +0 -1
- package/dist/chunk-2YELV6TV.js +0 -1
- package/dist/chunk-3LJYHE7S.js.map +0 -1
- package/dist/chunk-6SYOHUHM.js.map +0 -1
- package/dist/chunk-7ICV4ASA.js.map +0 -1
- 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-D4LAJ737.js.map +0 -1
- package/dist/chunk-DYZ5CCVM.js.map +0 -1
- package/dist/chunk-EEZCB74X.js.map +0 -1
- package/dist/chunk-EGU4PWQW.js.map +0 -1
- package/dist/chunk-FIP7KI2P.js.map +0 -1
- package/dist/chunk-GHEMAVTN.js.map +0 -1
- package/dist/chunk-HAPY7WFP.js.map +0 -1
- package/dist/chunk-HQKRZIX6.js.map +0 -1
- package/dist/chunk-I2XEBEEF.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-PWWWMRT7.js.map +0 -1
- package/dist/chunk-QMMOMBH6.js.map +0 -1
- package/dist/chunk-SEU6QHH4.js.map +0 -1
- package/dist/chunk-TNATF3HB.js.map +0 -1
- package/dist/chunk-TSNRZSRC.js.map +0 -1
- package/dist/chunk-V5JUAW4M.js.map +0 -1
- package/dist/chunk-VEGQYPCP.js.map +0 -1
- package/dist/chunk-X3MWEFPT.js.map +0 -1
- package/dist/chunk-XUFAFHQM.js.map +0 -1
- package/dist/chunk-YJ3TREAC.js.map +0 -1
- package/dist/chunk-YMUGBZN2.js.map +0 -1
- package/dist/chunk-YTW6ZIPD.js.map +0 -1
- package/dist/chunk-YXZNGHID.js.map +0 -1
- package/dist/chunk-YZN6NRTR.js.map +0 -1
- package/dist/chunk-ZX5FNWH7.js.map +0 -1
- package/dist/collection-facade-XKCFHSLR.js +0 -44
- package/dist/delegation-WWZPEDK2.js +0 -25
- package/dist/derive-CWWFEQ4N.js +0 -21
- package/dist/executor-FCJEH3FU.js +0 -9
- package/dist/executor-OHET7TF7.js +0 -9
- package/dist/executor-SHYLIBOM.js +0 -26
- package/dist/export-accessible-FBL6TDSK.js +0 -23
- package/dist/extract-partition-ZYIRYMTI.js +0 -38
- package/dist/find-LEBUXVL7.js +0 -11
- package/dist/in/index.js +0 -1
- package/dist/issue-F76PAGIR.js +0 -19
- 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/register-HB4TQZSV.js +0 -23
- package/dist/registry-6BMBFEXT.js +0 -19
- package/dist/registry-7CZWF3EQ.js +0 -9
- package/dist/registry-JOFO7RAH.js +0 -18
- package/dist/request-withdrawal-UN3TRHWI.js +0 -31
- package/dist/revoke-OLO2OVR7.js +0 -24
- package/dist/signer-MGGKPYAN.js +0 -25
- package/dist/storage-3R37QZLA.js +0 -23
- package/dist/tx/index.js.map +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/with/index.js +0 -31
- package/dist/with-lookup/aggregate/index.d.ts +0 -23
- package/dist/withdraw-accessible-Q2EMATCU.js +0 -28
- /package/dist/{api-22ES33N3.js.map → api-3NKVNZPM.js.map} +0 -0
- /package/dist/{backup-YCHAC575.js.map → backup-PTSVXDDW.js.map} +0 -0
- /package/dist/{chunk-5WLDZZ6S.js.map → chunk-35NMVJ7I.js.map} +0 -0
- /package/dist/{chunk-TNJVDG2B.js.map → chunk-3XKESW5E.js.map} +0 -0
- /package/dist/{chunk-MUPZ6IZX.js.map → chunk-4JQK3L4V.js.map} +0 -0
- /package/dist/{chunk-Z4D3YGAB.js.map → chunk-4ZKNC6A6.js.map} +0 -0
- /package/dist/{chunk-ONB627HU.js.map → chunk-55LX6FSX.js.map} +0 -0
- /package/dist/{chunk-QMZ5A6FQ.js.map → chunk-56IIVAEO.js.map} +0 -0
- /package/dist/{chunk-FHHYCBBP.js.map → chunk-5DRROK5W.js.map} +0 -0
- /package/dist/{chunk-GTNRMJYH.js.map → chunk-5GQEU4DN.js.map} +0 -0
- /package/dist/{chunk-YQQPNXNO.js.map → chunk-6L3DKWRY.js.map} +0 -0
- /package/dist/{chunk-M6QA2KK2.js.map → chunk-6M2I3DKF.js.map} +0 -0
- /package/dist/{chunk-FTCGEUOY.js.map → chunk-6R6Q3MRN.js.map} +0 -0
- /package/dist/{chunk-ZUDAK436.js.map → chunk-6UBZ6I5Z.js.map} +0 -0
- /package/dist/{chunk-7U6AB7DZ.js.map → chunk-AKKRXT23.js.map} +0 -0
- /package/dist/{chunk-OWLZONGX.js.map → chunk-BLBAQRBM.js.map} +0 -0
- /package/dist/{chunk-QBOQI6PG.js.map → chunk-BN4HRYAZ.js.map} +0 -0
- /package/dist/{chunk-QVGEVZ5F.js.map → chunk-BQ6DHN4I.js.map} +0 -0
- /package/dist/{chunk-GP54LU5N.js.map → chunk-BYFXLDVV.js.map} +0 -0
- /package/dist/{chunk-QRHEAZ2Q.js.map → chunk-CUZLNGD5.js.map} +0 -0
- /package/dist/{chunk-YXIVUWDU.js.map → chunk-DGBIHDVK.js.map} +0 -0
- /package/dist/{chunk-QZJEYZ4I.js.map → chunk-DZAF24PG.js.map} +0 -0
- /package/dist/{chunk-TMR64XPL.js.map → chunk-EZNTORXE.js.map} +0 -0
- /package/dist/{chunk-JAMDDLIM.js.map → chunk-FMNU7IUG.js.map} +0 -0
- /package/dist/{as/index.js.map → chunk-GJW4HX2O.js.map} +0 -0
- /package/dist/{chunk-7BIJS6II.js.map → chunk-GP3UWP22.js.map} +0 -0
- /package/dist/{chunk-JIHH26WQ.js.map → chunk-HFUAFR6B.js.map} +0 -0
- /package/dist/{chunk-RWW3I3PO.js.map → chunk-ISRKW4YN.js.map} +0 -0
- /package/dist/{chunk-P4NUJVWL.js.map → chunk-IXNCZTWA.js.map} +0 -0
- /package/dist/{chunk-YFFEF6HR.js.map → chunk-JIDLU57U.js.map} +0 -0
- /package/dist/{chunk-PTT2NB46.js.map → chunk-JYJFGD2H.js.map} +0 -0
- /package/dist/{chunk-3OWYOECI.js.map → chunk-JYV4JJV2.js.map} +0 -0
- /package/dist/{chunk-OGVE4IJW.js.map → chunk-KBPU5M2E.js.map} +0 -0
- /package/dist/{chunk-UTEATWHO.js.map → chunk-KW42W6SV.js.map} +0 -0
- /package/dist/{chunk-UVBHM7AK.js.map → chunk-MANUDU7I.js.map} +0 -0
- /package/dist/{chunk-K7BADAOS.js.map → chunk-NEX7JCMO.js.map} +0 -0
- /package/dist/{chunk-5HSSTOOG.js.map → chunk-NFZGZ4AK.js.map} +0 -0
- /package/dist/{chunk-S4YERMGJ.js.map → chunk-OBPVWOSQ.js.map} +0 -0
- /package/dist/{chunk-OHV6T5JB.js.map → chunk-OLIWCCFM.js.map} +0 -0
- /package/dist/{chunk-2CRZOVDI.js.map → chunk-OLSARBZU.js.map} +0 -0
- /package/dist/{chunk-7LP7FFJ2.js.map → chunk-QD46HPZG.js.map} +0 -0
- /package/dist/{chunk-G4MFQXYX.js.map → chunk-QJNCB5SK.js.map} +0 -0
- /package/dist/{chunk-GEEJPID6.js.map → chunk-RZPOZPZU.js.map} +0 -0
- /package/dist/{chunk-YCAJDK4O.js.map → chunk-SGQ4N5FS.js.map} +0 -0
- /package/dist/{chunk-522MBPE5.js.map → chunk-SHEEBRZ4.js.map} +0 -0
- /package/dist/{chunk-YWZEDG7F.js.map → chunk-SHYIA73K.js.map} +0 -0
- /package/dist/{chunk-K4BWPNJO.js.map → chunk-TE6LH6J2.js.map} +0 -0
- /package/dist/{chunk-SBOHNJUD.js.map → chunk-V6UQZA2H.js.map} +0 -0
- /package/dist/{chunk-SC4JLMZI.js.map → chunk-VH6SOCXH.js.map} +0 -0
- /package/dist/{chunk-WQN5SM7P.js.map → chunk-W3G5REIU.js.map} +0 -0
- /package/dist/{chunk-OMSKGLYA.js.map → chunk-WO4T4OD5.js.map} +0 -0
- /package/dist/{chunk-6RPWILRH.js.map → chunk-WZ3NCMK6.js.map} +0 -0
- /package/dist/{chunk-BAAUFCJK.js.map → chunk-X4MVWPHV.js.map} +0 -0
- /package/dist/{chunk-R2N37AA6.js.map → chunk-XIDQKFZF.js.map} +0 -0
- /package/dist/{chunk-OWOT7CFC.js.map → chunk-Y6B6HVKC.js.map} +0 -0
- /package/dist/{chunk-5ATANZSW.js.map → chunk-Y6VZQGGH.js.map} +0 -0
- /package/dist/{chunk-YZNKFYDC.js.map → chunk-ZFUFAHZ3.js.map} +0 -0
- /package/dist/{classified-marker-52P3D72W.js.map → classified-marker-EOOSMWFC.js.map} +0 -0
- /package/dist/{at/index.js.map → collection-facade-TTRF5NFJ.js.map} +0 -0
- /package/dist/{by/index.js.map → computed-AB45PS4V.js.map} +0 -0
- /package/dist/{in → cover}/index.js.map +0 -0
- /package/dist/{on → custody}/index.js.map +0 -0
- /package/dist/{dead-filter-JXVCKS6W.js.map → dead-filter-6DYY7S64.js.map} +0 -0
- /package/dist/{chunk-2YELV6TV.js.map → derive-IGGVSUPH.js.map} +0 -0
- /package/dist/{ui → directory}/index.js.map +0 -0
- /package/dist/{dispatch-SMXUO7W5.js.map → dispatch-RPTLK7LJ.js.map} +0 -0
- /package/dist/{collection-facade-XKCFHSLR.js.map → enclave-CLJVSDFG.js.map} +0 -0
- /package/dist/{computed-33DRJDOC.js.map → executor-IEBLTBCW.js.map} +0 -0
- /package/dist/{cover-5BSNJREH.js.map → executor-RM7XWQDU.js.map} +0 -0
- /package/dist/{delegation-WWZPEDK2.js.map → executor-XZYM4KHT.js.map} +0 -0
- /package/dist/{derive-CWWFEQ4N.js.map → export-accessible-24XCCD3A.js.map} +0 -0
- /package/dist/{enclave-I5H3GINP.js.map → extract-partition-H2TPEEOF.js.map} +0 -0
- /package/dist/{fanout-sidecar-WWXVHHUH.js.map → fanout-sidecar-TV7CXAJ6.js.map} +0 -0
- /package/dist/{executor-FCJEH3FU.js.map → find-OZMTRIK3.js.map} +0 -0
- /package/dist/{with → introspection}/index.js.map +0 -0
- /package/dist/{executor-OHET7TF7.js.map → issue-55HJE7JF.js.map} +0 -0
- /package/dist/{executor-SHYLIBOM.js.map → ledger-XY6NP3J2.js.map} +0 -0
- /package/dist/{export-accessible-FBL6TDSK.js.map → liberate-LXOJ2EMB.js.map} +0 -0
- /package/dist/{extract-partition-ZYIRYMTI.js.map → link-set-POQB7BU5.js.map} +0 -0
- /package/dist/{find-LEBUXVL7.js.map → money/index.js.map} +0 -0
- /package/dist/{issue-F76PAGIR.js.map → noydb-KXS35UJS.js.map} +0 -0
- /package/dist/{ledger-M2BKCNVS.js.map → policy/index.js.map} +0 -0
- /package/dist/{post-register-XIAHB6KF.js.map → post-register-URQANI3B.js.map} +0 -0
- /package/dist/{liberate-ZP7UB57K.js.map → register-5W6CG4RM.js.map} +0 -0
- /package/dist/{link-set-ZU4E5J5S.js.map → registry-7Y5WF7GS.js.map} +0 -0
- /package/dist/{noydb-BNDGEK5X.js.map → registry-BWD2ED52.js.map} +0 -0
- /package/dist/{policy-IY2YEA3A.js.map → registry-MCSGBZXI.js.map} +0 -0
- /package/dist/{register-HB4TQZSV.js.map → registry-UJFP3NWF.js.map} +0 -0
- /package/dist/{registry-6BMBFEXT.js.map → request-withdrawal-IWYDM4SO.js.map} +0 -0
- /package/dist/{reveal-VWXRV2XU.js.map → reveal-BXZGWIOP.js.map} +0 -0
- /package/dist/{registry-7CZWF3EQ.js.map → revoke-TINYPHYY.js.map} +0 -0
- /package/dist/{registry-JOFO7RAH.js.map → schema-update/index.js.map} +0 -0
- /package/dist/{registry-VW6P6A3J.js.map → search/index.js.map} +0 -0
- /package/dist/{seed-CDBFOTIK.js.map → seed-F7YYQTRC.js.map} +0 -0
- /package/dist/{request-withdrawal-UN3TRHWI.js.map → sequence/index.js.map} +0 -0
- /package/dist/{revoke-OLO2OVR7.js.map → signer-WMZKCNKC.js.map} +0 -0
- /package/dist/{signer-MGGKPYAN.js.map → stale-JOE7GBAE.js.map} +0 -0
- /package/dist/{stale-NBROTA66.js.map → storage-B3WBKXKT.js.map} +0 -0
- /package/dist/{storage-3R37QZLA.js.map → store/index.js.map} +0 -0
- /package/dist/{store-coordination-provider-P3IU5JHD.js.map → store-coordination-provider-5LX2UFU2.js.map} +0 -0
- /package/dist/{verify-5X37OXRY.js.map → verify-7XWHJWUN.js.map} +0 -0
- /package/dist/{withdraw-accessible-Q2EMATCU.js.map → walk-6OHAWGBS.js.map} +0 -0
- /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
package/dist/shadow/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CollectionFrame,
|
|
3
3
|
VaultFrame
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import
|
|
4
|
+
} from "../chunk-55LX6FSX.js";
|
|
5
|
+
import {
|
|
6
|
+
NO_SHADOW
|
|
7
|
+
} from "../chunk-SMY5X46Z.js";
|
|
8
|
+
import "../chunk-QZWTRENR.js";
|
|
6
9
|
import "../chunk-PZ5AY32C.js";
|
|
7
10
|
|
|
8
11
|
// src/with-fork/shadow/active.ts
|
|
@@ -15,6 +18,7 @@ function withShadow() {
|
|
|
15
18
|
}
|
|
16
19
|
export {
|
|
17
20
|
CollectionFrame,
|
|
21
|
+
NO_SHADOW,
|
|
18
22
|
VaultFrame,
|
|
19
23
|
withShadow
|
|
20
24
|
};
|
package/dist/shadow/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/with-fork/shadow/active.ts"],"sourcesContent":["/**\n * Active shadow strategy — the only place `VaultFrame` is constructed.\n * Only reachable through `@noy-db/hub/shadow`.\n */\n\nimport { VaultFrame } from './vault-frame.js'\nimport type { ShadowStrategy } from './strategy.js'\nimport type { Vault } from '../../kernel/vault.js'\n\nexport function withShadow(): ShadowStrategy {\n return {\n buildFrame(vault) { return new VaultFrame(vault as Vault) },\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/with-fork/shadow/active.ts"],"sourcesContent":["/**\n * Active shadow strategy — the only place `VaultFrame` is constructed.\n * Only reachable through `@noy-db/hub/shadow`.\n */\n\nimport { VaultFrame } from './vault-frame.js'\nimport type { ShadowStrategy } from './strategy.js'\nimport type { Vault } from '../../kernel/vault.js'\n\nexport function withShadow(): ShadowStrategy {\n return {\n buildFrame(vault) { return new VaultFrame(vault as Vault) },\n }\n}\n"],"mappings":";;;;;;;;;;;AASO,SAAS,aAA6B;AAC3C,SAAO;AAAA,IACL,WAAW,OAAO;AAAE,aAAO,IAAI,WAAW,KAAc;AAAA,IAAE;AAAA,EAC5D;AACF;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ATTESTATIONS_COLLECTION,
|
|
3
|
+
REVOKED_RECORD_ID,
|
|
4
|
+
SIGNER_RECORD_ID,
|
|
5
|
+
loadOrCreateSigner,
|
|
6
|
+
loadSigner
|
|
7
|
+
} from "./chunk-DZAF24PG.js";
|
|
8
|
+
import "./chunk-RZPOZPZU.js";
|
|
9
|
+
import "./chunk-VH6SOCXH.js";
|
|
10
|
+
import "./chunk-35NMVJ7I.js";
|
|
11
|
+
import "./chunk-NFZGZ4AK.js";
|
|
12
|
+
import "./chunk-QJNCB5SK.js";
|
|
13
|
+
import "./chunk-LP7BEXCT.js";
|
|
14
|
+
import "./chunk-AKKRXT23.js";
|
|
15
|
+
import "./chunk-GZACYEOB.js";
|
|
16
|
+
import "./chunk-QZWTRENR.js";
|
|
17
|
+
import "./chunk-PZ5AY32C.js";
|
|
18
|
+
export {
|
|
19
|
+
ATTESTATIONS_COLLECTION,
|
|
20
|
+
REVOKED_RECORD_ID,
|
|
21
|
+
SIGNER_RECORD_ID,
|
|
22
|
+
loadOrCreateSigner,
|
|
23
|
+
loadSigner
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=signer-WMZKCNKC.js.map
|
package/dist/snapshots/index.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NO_SNAPSHOTS
|
|
3
|
+
} from "../chunk-DZFQVICS.js";
|
|
1
4
|
import {
|
|
2
5
|
readPod,
|
|
3
6
|
writePod
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-SGQ4N5FS.js";
|
|
8
|
+
import "../chunk-JIDLU57U.js";
|
|
9
|
+
import "../chunk-RZPOZPZU.js";
|
|
10
|
+
import "../chunk-VH6SOCXH.js";
|
|
11
|
+
import "../chunk-35NMVJ7I.js";
|
|
12
|
+
import "../chunk-NFZGZ4AK.js";
|
|
13
|
+
import "../chunk-QJNCB5SK.js";
|
|
11
14
|
import "../chunk-LP7BEXCT.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-AKKRXT23.js";
|
|
16
|
+
import "../chunk-GZACYEOB.js";
|
|
14
17
|
import {
|
|
15
18
|
SnapshotNotFoundError
|
|
16
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-QZWTRENR.js";
|
|
17
20
|
import "../chunk-PZ5AY32C.js";
|
|
18
21
|
|
|
19
22
|
// src/with-fork/snapshots/engine.ts
|
|
@@ -154,6 +157,7 @@ function withSnapshots(opts) {
|
|
|
154
157
|
};
|
|
155
158
|
}
|
|
156
159
|
export {
|
|
160
|
+
NO_SNAPSHOTS,
|
|
157
161
|
SnapshotNotFoundError,
|
|
158
162
|
withSnapshots
|
|
159
163
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/with-fork/snapshots/engine.ts","../../src/with-fork/snapshots/active.ts"],"sourcesContent":["import { writePod, readPod } from '../../with-pod/bundle.js'\nimport { SnapshotNotFoundError } from '../../kernel/errors.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport type { SnapshotMeta, RetentionPolicy, SnapshotIndex } from './strategy.js'\n\nexport class SnapshotEngine {\n constructor(\n private readonly store: NoydbPodStore,\n private readonly retention: RetentionPolicy,\n ) {}\n\n private indexKey(vaultName: string): string {\n return `${vaultName}__index`\n }\n\n private snapKey(vaultName: string, n: number): string {\n return `${vaultName}__snap_${n.toString().padStart(6, '0')}`\n }\n\n private autoKey(vaultName: string): string {\n return `${vaultName}__auto`\n }\n\n private async readIndex(\n vaultName: string,\n ): Promise<{ index: SnapshotIndex; indexVersion: string | null }> {\n const result = await this.store.readBundle(this.indexKey(vaultName))\n if (!result) return { index: { snapshots: [], nextCounter: 1 }, indexVersion: null }\n const text = new TextDecoder().decode(result.bytes)\n return { index: JSON.parse(text) as SnapshotIndex, indexVersion: result.version }\n }\n\n private async writeIndex(\n vaultName: string,\n index: SnapshotIndex,\n expectedVersion: string | null,\n ): Promise<void> {\n const bytes = new TextEncoder().encode(JSON.stringify(index))\n await this.store.writeBundle(this.indexKey(vaultName), bytes, expectedVersion)\n }\n\n async snapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.snapKey(vault.name, index.nextCounter)\n\n // Write blob first. If the subsequent index write fails, the next snapshot()\n // call will re-derive the same key (counter not persisted) and overwrite this blob.\n // This is an accepted v1 trade-off: failure window is narrow and requires a store\n // error between the two writes. A retry produces a fresh snapshot at the same key.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n ...(opts?.label !== undefined ? { label: opts.label } : {}),\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n }\n\n const newIndex: SnapshotIndex = {\n snapshots: [...index.snapshots, meta],\n nextCounter: index.nextCounter + 1,\n // Preserve the rolling auto slot — on-demand snapshots never touch it.\n ...(index.auto ? { auto: index.auto } : {}),\n }\n const toDelete = this.applyRetention(newIndex)\n await this.writeIndex(vault.name, newIndex, indexVersion)\n\n for (const k of toDelete) {\n await this.store.deleteBundle(k)\n }\n\n return meta\n }\n\n /**\n * Rolling auto-snapshot. Overwrites the single fixed `<vault>__auto` key and\n * stores its meta in `index.auto`, separate from the immutable `snapshots`\n * pool — retention never prunes it. Used by the cadence scheduler.\n */\n async autoSnapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.autoKey(vault.name)\n\n // Unconditional overwrite of the rolling slot.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n label: opts?.label ?? 'auto',\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n auto: true,\n }\n\n index.auto = meta\n await this.writeIndex(vault.name, index, indexVersion)\n return meta\n }\n\n async listSnapshots(vaultId: string): Promise<SnapshotMeta[]> {\n const { index } = await this.readIndex(vaultId)\n const immutable = [...index.snapshots].reverse()\n return index.auto ? [index.auto, ...immutable] : immutable\n }\n\n async restoreSnapshot(vault: Vault, version: string): Promise<void> {\n if (!version.startsWith(`${vault.name}__`)) throw new SnapshotNotFoundError(version)\n const result = await this.store.readBundle(version)\n if (!result) throw new SnapshotNotFoundError(version)\n const { dumpJson } = await readPod(result.bytes)\n await vault.load(dumpJson)\n }\n\n /**\n * Applies the configured retention policy to `index`, mutating `index.snapshots`\n * in place and returning the blob keys that should be deleted from the store.\n * Called by `snapshot()` before the index is written.\n *\n * @internal — public for direct testing only\n */\n applyRetention(index: SnapshotIndex): string[] {\n const prune = this.retention.prune ?? true\n if (!prune) return []\n\n const toDelete: string[] = []\n let remaining = index.snapshots.slice()\n\n if (this.retention.keepLast !== undefined && remaining.length > this.retention.keepLast) {\n const excess = remaining.splice(0, remaining.length - this.retention.keepLast)\n toDelete.push(...excess.map(m => m.version))\n }\n\n if (this.retention.maxAgeDays !== undefined) {\n const cutoffMs = this.retention.maxAgeDays * 86_400_000\n const now = Date.now()\n const fresh = remaining.filter(m => now - new Date(m.exportedAt).getTime() <= cutoffMs)\n toDelete.push(...remaining.filter(m => !fresh.includes(m)).map(m => m.version))\n remaining = fresh\n }\n\n index.snapshots = remaining\n return toDelete\n }\n}\n","import { SnapshotEngine } from './engine.js'\nimport type { SnapshotStrategy, RetentionPolicy } from './strategy.js'\nimport type { SnapshotPolicy } from './policy.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\n\nexport interface WithSnapshotsOptions {\n /** Bundle store where snapshot blobs and the sidecar index are written. */\n store: NoydbPodStore\n /**\n * Declarative retention policy. Enforced eagerly after each on-demand `snapshot()`.\n * Defaults to no retention (all on-demand snapshots kept forever). Never affects\n * the rolling auto-snapshot.\n */\n retention?: RetentionPolicy\n /**\n * Automatic-snapshot cadence. Default `mode:'manual'` ⇒ no timers; snapshots\n * stay on-demand. Set `mode:'debounce'`/`'interval'` to enable auto-snapshots\n * to the rolling `<vault>__auto` key.\n */\n snapshotPolicy?: SnapshotPolicy\n}\n\nexport function withSnapshots(opts: WithSnapshotsOptions): SnapshotStrategy {\n const engine = new SnapshotEngine(opts.store, opts.retention ?? {})\n return {\n snapshot(vault, by, snapOpts) {\n return engine.snapshot(vault as Vault, by, snapOpts)\n },\n listSnapshots(vaultId) {\n return engine.listSnapshots(vaultId)\n },\n restoreSnapshot(vault, version) {\n return engine.restoreSnapshot(vault as Vault, version)\n },\n autoSnapshot(vault, by, snapOpts) {\n return engine.autoSnapshot(vault as Vault, by, snapOpts)\n },\n ...(opts.snapshotPolicy ? { policy: opts.snapshotPolicy } : {}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAMO,IAAM,iBAAN,MAAqB;AAAA,EAC1B,YACmB,OACA,WACjB;AAFiB;AACA;AAAA,EAChB;AAAA,EAFgB;AAAA,EACA;AAAA,EAGX,SAAS,WAA2B;AAC1C,WAAO,GAAG,SAAS;AAAA,EACrB;AAAA,EAEQ,QAAQ,WAAmB,GAAmB;AACpD,WAAO,GAAG,SAAS,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC;AAAA,EAC5D;AAAA,EAEQ,QAAQ,WAA2B;AACzC,WAAO,GAAG,SAAS;AAAA,EACrB;AAAA,EAEA,MAAc,UACZ,WACgE;AAChE,UAAM,SAAS,MAAM,KAAK,MAAM,WAAW,KAAK,SAAS,SAAS,CAAC;AACnE,QAAI,CAAC,OAAQ,QAAO,EAAE,OAAO,EAAE,WAAW,CAAC,GAAG,aAAa,EAAE,GAAG,cAAc,KAAK;AACnF,UAAM,OAAO,IAAI,YAAY,EAAE,OAAO,OAAO,KAAK;AAClD,WAAO,EAAE,OAAO,KAAK,MAAM,IAAI,GAAoB,cAAc,OAAO,QAAQ;AAAA,EAClF;AAAA,EAEA,MAAc,WACZ,WACA,OACA,iBACe;AACf,UAAM,QAAQ,IAAI,YAAY,EAAE,OAAO,KAAK,UAAU,KAAK,CAAC;AAC5D,UAAM,KAAK,MAAM,YAAY,KAAK,SAAS,SAAS,GAAG,OAAO,eAAe;AAAA,EAC/E;AAAA,EAEA,MAAM,SACJ,OACA,IACA,MACuB;AACvB,UAAM,QAAQ,MAAM,SAAS,OAAO,CAAC,CAAC;AACtC,UAAM,EAAE,OAAO,aAAa,IAAI,MAAM,KA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C,YAAM,MAAM,KAAK,IAAI;AACrB,YAAM,QAAQ,UAAU,OAAO,OAAK,MAAM,IAAI,KAAK,EAAE,UAAU,EAAE,QAAQ,KAAK,QAAQ;AACtF,eAAS,KAAK,GAAG,UAAU,OAAO,OAAK,CAAC,MAAM,SAAS,CAAC,CAAC,EAAE,IAAI,OAAK,EAAE,OAAO,CAAC;AAC9E,kBAAY;AAAA,IACd;AAEA,UAAM,YAAY;AAClB,WAAO;AAAA,EACT;AACF;;;ACzIO,SAAS,cAAc,MAA8C;AAC1E,QAAM,SAAS,IAAI,eAAe,KAAK,OAAO,KAAK,aAAa,CAAC,CAAC;AAClE,SAAO;AAAA,IACL,SAAS,OAAO,IAAI,UAAU;AAC5B,aAAO,OAAO,SAAS,OAAgB,IAAI,QAAQ;AAAA,IACrD;AAAA,IACA,cAAc,SAAS;AACrB,aAAO,OAAO,cAAc,OAAO;AAAA,IACrC;AAAA,IACA,gBAAgB,OAAO,SAAS;AAC9B,aAAO,OAAO,gBAAgB,OAAgB,OAAO;AAAA,IACvD;AAAA,IACA,aAAa,OAAO,IAAI,UAAU;AAChC,aAAO,OAAO,aAAa,OAAgB,IAAI,QAAQ;AAAA,IACzD;AAAA,IACA,GAAI,KAAK,iBAAiB,EAAE,QAAQ,KAAK,eAAe,IAAI,CAAC;AAAA,EAC/D;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/with-fork/snapshots/engine.ts","../../src/with-fork/snapshots/active.ts"],"sourcesContent":["import { writePod, readPod } from '../../with-pod/bundle.js'\nimport { SnapshotNotFoundError } from '../../kernel/errors.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport type { SnapshotMeta, RetentionPolicy, SnapshotIndex } from './strategy.js'\n\nexport class SnapshotEngine {\n constructor(\n private readonly store: NoydbPodStore,\n private readonly retention: RetentionPolicy,\n ) {}\n\n private indexKey(vaultName: string): string {\n return `${vaultName}__index`\n }\n\n private snapKey(vaultName: string, n: number): string {\n return `${vaultName}__snap_${n.toString().padStart(6, '0')}`\n }\n\n private autoKey(vaultName: string): string {\n return `${vaultName}__auto`\n }\n\n private async readIndex(\n vaultName: string,\n ): Promise<{ index: SnapshotIndex; indexVersion: string | null }> {\n const result = await this.store.readBundle(this.indexKey(vaultName))\n if (!result) return { index: { snapshots: [], nextCounter: 1 }, indexVersion: null }\n const text = new TextDecoder().decode(result.bytes)\n return { index: JSON.parse(text) as SnapshotIndex, indexVersion: result.version }\n }\n\n private async writeIndex(\n vaultName: string,\n index: SnapshotIndex,\n expectedVersion: string | null,\n ): Promise<void> {\n const bytes = new TextEncoder().encode(JSON.stringify(index))\n await this.store.writeBundle(this.indexKey(vaultName), bytes, expectedVersion)\n }\n\n async snapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.snapKey(vault.name, index.nextCounter)\n\n // Write blob first. If the subsequent index write fails, the next snapshot()\n // call will re-derive the same key (counter not persisted) and overwrite this blob.\n // This is an accepted v1 trade-off: failure window is narrow and requires a store\n // error between the two writes. A retry produces a fresh snapshot at the same key.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n ...(opts?.label !== undefined ? { label: opts.label } : {}),\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n }\n\n const newIndex: SnapshotIndex = {\n snapshots: [...index.snapshots, meta],\n nextCounter: index.nextCounter + 1,\n // Preserve the rolling auto slot — on-demand snapshots never touch it.\n ...(index.auto ? { auto: index.auto } : {}),\n }\n const toDelete = this.applyRetention(newIndex)\n await this.writeIndex(vault.name, newIndex, indexVersion)\n\n for (const k of toDelete) {\n await this.store.deleteBundle(k)\n }\n\n return meta\n }\n\n /**\n * Rolling auto-snapshot. Overwrites the single fixed `<vault>__auto` key and\n * stores its meta in `index.auto`, separate from the immutable `snapshots`\n * pool — retention never prunes it. Used by the cadence scheduler.\n */\n async autoSnapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.autoKey(vault.name)\n\n // Unconditional overwrite of the rolling slot.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n label: opts?.label ?? 'auto',\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n auto: true,\n }\n\n index.auto = meta\n await this.writeIndex(vault.name, index, indexVersion)\n return meta\n }\n\n async listSnapshots(vaultId: string): Promise<SnapshotMeta[]> {\n const { index } = await this.readIndex(vaultId)\n const immutable = [...index.snapshots].reverse()\n return index.auto ? [index.auto, ...immutable] : immutable\n }\n\n async restoreSnapshot(vault: Vault, version: string): Promise<void> {\n if (!version.startsWith(`${vault.name}__`)) throw new SnapshotNotFoundError(version)\n const result = await this.store.readBundle(version)\n if (!result) throw new SnapshotNotFoundError(version)\n const { dumpJson } = await readPod(result.bytes)\n await vault.load(dumpJson)\n }\n\n /**\n * Applies the configured retention policy to `index`, mutating `index.snapshots`\n * in place and returning the blob keys that should be deleted from the store.\n * Called by `snapshot()` before the index is written.\n *\n * @internal — public for direct testing only\n */\n applyRetention(index: SnapshotIndex): string[] {\n const prune = this.retention.prune ?? true\n if (!prune) return []\n\n const toDelete: string[] = []\n let remaining = index.snapshots.slice()\n\n if (this.retention.keepLast !== undefined && remaining.length > this.retention.keepLast) {\n const excess = remaining.splice(0, remaining.length - this.retention.keepLast)\n toDelete.push(...excess.map(m => m.version))\n }\n\n if (this.retention.maxAgeDays !== undefined) {\n const cutoffMs = this.retention.maxAgeDays * 86_400_000\n const now = Date.now()\n const fresh = remaining.filter(m => now - new Date(m.exportedAt).getTime() <= cutoffMs)\n toDelete.push(...remaining.filter(m => !fresh.includes(m)).map(m => m.version))\n remaining = fresh\n }\n\n index.snapshots = remaining\n return toDelete\n }\n}\n","import { SnapshotEngine } from './engine.js'\nimport type { SnapshotsStrategy, RetentionPolicy } from './strategy.js'\nimport type { SnapshotPolicy } from './policy.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\n\nexport interface WithSnapshotsOptions {\n /** Bundle store where snapshot blobs and the sidecar index are written. */\n store: NoydbPodStore\n /**\n * Declarative retention policy. Enforced eagerly after each on-demand `snapshot()`.\n * Defaults to no retention (all on-demand snapshots kept forever). Never affects\n * the rolling auto-snapshot.\n */\n retention?: RetentionPolicy\n /**\n * Automatic-snapshot cadence. Default `mode:'manual'` ⇒ no timers; snapshots\n * stay on-demand. Set `mode:'debounce'`/`'interval'` to enable auto-snapshots\n * to the rolling `<vault>__auto` key.\n */\n snapshotPolicy?: SnapshotPolicy\n}\n\nexport function withSnapshots(opts: WithSnapshotsOptions): SnapshotsStrategy {\n const engine = new SnapshotEngine(opts.store, opts.retention ?? {})\n return {\n snapshot(vault, by, snapOpts) {\n return engine.snapshot(vault as Vault, by, snapOpts)\n },\n listSnapshots(vaultId) {\n return engine.listSnapshots(vaultId)\n },\n restoreSnapshot(vault, version) {\n return engine.restoreSnapshot(vault as Vault, version)\n },\n autoSnapshot(vault, by, snapOpts) {\n return engine.autoSnapshot(vault as Vault, by, snapOpts)\n },\n ...(opts.snapshotPolicy ? { policy: opts.snapshotPolicy } : {}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMO,IAAM,iBAAN,MAAqB;AAAA,EAC1B,YACmB,OACA,WACjB;AAFiB;AACA;AAAA,EAChB;AAAA,EAFgB;AAAA,EACA;AAAA,EAGX,SAAS,WAA2B;AAC1C,WAAO,GAAG,SAAS;AAAA,EACrB;AAAA,EAEQ,QAAQ,WAAmB,GAAmB;AACpD,WAAO,GAAG,SAAS,UAA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SAAS,OAAgB,IAAI,QAAQ;AAAA,IACrD;AAAA,IACA,cAAc,SAAS;AACrB,aAAO,OAAO,cAAc,OAAO;AAAA,IACrC;AAAA,IACA,gBAAgB,OAAO,SAAS;AAC9B,aAAO,OAAO,gBAAgB,OAAgB,OAAO;AAAA,IACvD;AAAA,IACA,aAAa,OAAO,IAAI,UAAU;AAChC,aAAO,OAAO,aAAa,OAAgB,IAAI,QAAQ;AAAA,IACzD;AAAA,IACA,GAAI,KAAK,iBAAiB,EAAE,QAAQ,KAAK,eAAe,IAAI,CAAC;AAAA,EAC/D;AACF;","names":[]}
|
|
@@ -6,16 +6,17 @@ import {
|
|
|
6
6
|
isMVStale,
|
|
7
7
|
markMVStale,
|
|
8
8
|
resolveStaleMVOnRead
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-IMRB2C4O.js";
|
|
10
|
+
import "./chunk-5D2ALSM5.js";
|
|
11
|
+
import "./chunk-RZPOZPZU.js";
|
|
12
|
+
import "./chunk-VH6SOCXH.js";
|
|
13
|
+
import "./chunk-35NMVJ7I.js";
|
|
14
|
+
import "./chunk-NFZGZ4AK.js";
|
|
15
|
+
import "./chunk-QJNCB5SK.js";
|
|
15
16
|
import "./chunk-LP7BEXCT.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-AKKRXT23.js";
|
|
18
|
+
import "./chunk-GZACYEOB.js";
|
|
19
|
+
import "./chunk-QZWTRENR.js";
|
|
19
20
|
import "./chunk-PZ5AY32C.js";
|
|
20
21
|
export {
|
|
21
22
|
MV_STALE_COLLECTION,
|
|
@@ -26,4 +27,4 @@ export {
|
|
|
26
27
|
markMVStale,
|
|
27
28
|
resolveStaleMVOnRead
|
|
28
29
|
};
|
|
29
|
-
//# sourceMappingURL=stale-
|
|
30
|
+
//# sourceMappingURL=stale-JOE7GBAE.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SCHEMAS_COLLECTION,
|
|
3
|
+
loadPersistedSchema,
|
|
4
|
+
loadPersistedSchemaEntry,
|
|
5
|
+
savePersistedSchema
|
|
6
|
+
} from "./chunk-OBPVWOSQ.js";
|
|
7
|
+
import "./chunk-RZPOZPZU.js";
|
|
8
|
+
import "./chunk-VH6SOCXH.js";
|
|
9
|
+
import "./chunk-35NMVJ7I.js";
|
|
10
|
+
import "./chunk-NFZGZ4AK.js";
|
|
11
|
+
import "./chunk-QJNCB5SK.js";
|
|
12
|
+
import "./chunk-LP7BEXCT.js";
|
|
13
|
+
import "./chunk-AKKRXT23.js";
|
|
14
|
+
import "./chunk-GZACYEOB.js";
|
|
15
|
+
import "./chunk-QZWTRENR.js";
|
|
16
|
+
import "./chunk-PZ5AY32C.js";
|
|
17
|
+
export {
|
|
18
|
+
SCHEMAS_COLLECTION,
|
|
19
|
+
loadPersistedSchema,
|
|
20
|
+
loadPersistedSchemaEntry,
|
|
21
|
+
savePersistedSchema
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=storage-B3WBKXKT.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
routeStore,
|
|
3
|
+
withCache,
|
|
4
|
+
withCircuitBreaker,
|
|
5
|
+
withHealthCheck,
|
|
6
|
+
withLogging,
|
|
7
|
+
withMetrics,
|
|
8
|
+
withRetry,
|
|
9
|
+
wrapStore
|
|
10
|
+
} from "../chunk-VSRSQ2CR.js";
|
|
11
|
+
import "../chunk-PZ5AY32C.js";
|
|
12
|
+
export {
|
|
13
|
+
routeStore,
|
|
14
|
+
withCache,
|
|
15
|
+
withCircuitBreaker,
|
|
16
|
+
withHealthCheck,
|
|
17
|
+
withLogging,
|
|
18
|
+
withMetrics,
|
|
19
|
+
withRetry,
|
|
20
|
+
wrapStore
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
package/dist/{store-coordination-provider-P3IU5JHD.js → store-coordination-provider-5LX2UFU2.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadFence,
|
|
3
3
|
saveFence
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6M2I3DKF.js";
|
|
5
5
|
import {
|
|
6
6
|
NOYDB_FORMAT_VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GZACYEOB.js";
|
|
8
8
|
import "./chunk-PZ5AY32C.js";
|
|
9
9
|
|
|
10
10
|
// src/with-shape/schema-update/client-registry.ts
|
|
@@ -139,4 +139,4 @@ function unref(timer) {
|
|
|
139
139
|
export {
|
|
140
140
|
StoreCoordinationProvider
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=store-coordination-provider-
|
|
142
|
+
//# sourceMappingURL=store-coordination-provider-5LX2UFU2.js.map
|
package/dist/sync/index.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NO_SYNC
|
|
3
|
+
} from "../chunk-EP5L47XV.js";
|
|
1
4
|
import {
|
|
2
5
|
PresenceHandle,
|
|
3
6
|
SyncEngine,
|
|
4
7
|
SyncTransaction
|
|
5
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-KBPU5M2E.js";
|
|
6
9
|
import "../chunk-VQNJ7UZL.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-EZNTORXE.js";
|
|
11
|
+
import "../chunk-RZPOZPZU.js";
|
|
12
|
+
import "../chunk-VH6SOCXH.js";
|
|
13
|
+
import "../chunk-35NMVJ7I.js";
|
|
14
|
+
import "../chunk-NFZGZ4AK.js";
|
|
15
|
+
import "../chunk-QJNCB5SK.js";
|
|
13
16
|
import "../chunk-LP7BEXCT.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-AKKRXT23.js";
|
|
18
|
+
import "../chunk-GZACYEOB.js";
|
|
19
|
+
import "../chunk-QZWTRENR.js";
|
|
17
20
|
import "../chunk-PZ5AY32C.js";
|
|
18
21
|
|
|
19
22
|
// src/with-party/team/sync-active.ts
|
|
@@ -31,6 +34,7 @@ function withSync() {
|
|
|
31
34
|
};
|
|
32
35
|
}
|
|
33
36
|
export {
|
|
37
|
+
NO_SYNC,
|
|
34
38
|
withSync
|
|
35
39
|
};
|
|
36
40
|
//# sourceMappingURL=index.js.map
|
package/dist/sync/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/with-party/team/sync-active.ts"],"sourcesContent":["/**\n * Active sync strategy — `withSync()` returns the real implementation\n * that wires the `SyncEngine`, `SyncTransaction`, and `PresenceHandle`\n * constructors into the Noydb / Vault / Collection hot paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withSync } from '@noy-db/hub/sync'\n *\n * const db = await createNoydb({\n * store: localStore,\n * sync: remoteStore,\n * user: ...,\n * syncStrategy: withSync(),\n * })\n * ```\n *\n * The factory delegates to the existing `sync.ts`,\n * `sync-transaction.ts`, and `presence.ts` modules. Splitting the\n * import chain through this file is what lets tsup tree-shake the\n * ~856 LOC of replication + presence machinery out of the default\n * bundle when no `withSync()` import is present.\n *\n * Keyring + grant/revoke/magic-link/delegation stay in the always-on\n * core (or tree-shake via direct named imports) — those are required\n * for any multi-user vault, even purely local ones.\n *\n * @public\n */\n\nimport type { SyncStrategy, BuildSyncEngineOptions } from './sync-strategy.js'\nimport type { PresenceHandleOpts } from './presence.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport { SyncEngine } from './sync.js'\nimport { SyncTransaction } from './sync-transaction.js'\nimport { PresenceHandle } from './presence.js'\n\nexport function withSync(): SyncStrategy {\n return {\n buildSyncEngine(opts: BuildSyncEngineOptions): SyncEngine {\n return new SyncEngine(opts)\n },\n buildSyncTransaction(vault: Vault, engine: SyncEngine): SyncTransaction {\n return new SyncTransaction(vault, engine)\n },\n buildPresence<P>(opts: PresenceHandleOpts): PresenceHandle<P> {\n return new PresenceHandle<P>(opts)\n },\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/with-party/team/sync-active.ts"],"sourcesContent":["/**\n * Active sync strategy — `withSync()` returns the real implementation\n * that wires the `SyncEngine`, `SyncTransaction`, and `PresenceHandle`\n * constructors into the Noydb / Vault / Collection hot paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withSync } from '@noy-db/hub/sync'\n *\n * const db = await createNoydb({\n * store: localStore,\n * sync: remoteStore,\n * user: ...,\n * syncStrategy: withSync(),\n * })\n * ```\n *\n * The factory delegates to the existing `sync.ts`,\n * `sync-transaction.ts`, and `presence.ts` modules. Splitting the\n * import chain through this file is what lets tsup tree-shake the\n * ~856 LOC of replication + presence machinery out of the default\n * bundle when no `withSync()` import is present.\n *\n * Keyring + grant/revoke/magic-link/delegation stay in the always-on\n * core (or tree-shake via direct named imports) — those are required\n * for any multi-user vault, even purely local ones.\n *\n * @public\n */\n\nimport type { SyncStrategy, BuildSyncEngineOptions } from './sync-strategy.js'\nimport type { PresenceHandleOpts } from './presence.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport { SyncEngine } from './sync.js'\nimport { SyncTransaction } from './sync-transaction.js'\nimport { PresenceHandle } from './presence.js'\n\nexport function withSync(): SyncStrategy {\n return {\n buildSyncEngine(opts: BuildSyncEngineOptions): SyncEngine {\n return new SyncEngine(opts)\n },\n buildSyncTransaction(vault: Vault, engine: SyncEngine): SyncTransaction {\n return new SyncTransaction(vault, engine)\n },\n buildPresence<P>(opts: PresenceHandleOpts): PresenceHandle<P> {\n return new PresenceHandle<P>(opts)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuCO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL,gBAAgB,MAA0C;AACxD,aAAO,IAAI,WAAW,IAAI;AAAA,IAC5B;AAAA,IACA,qBAAqB,OAAc,QAAqC;AACtE,aAAO,IAAI,gBAAgB,OAAO,MAAM;AAAA,IAC1C;AAAA,IACA,cAAiB,MAA6C;AAC5D,aAAO,IAAI,eAAkB,IAAI;AAAA,IACnC;AAAA,EACF;AACF;","names":[]}
|
package/dist/team/index.js
CHANGED
|
@@ -5,25 +5,44 @@ import {
|
|
|
5
5
|
listCredentials,
|
|
6
6
|
putCredential,
|
|
7
7
|
withTeam
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-SHYIA73K.js";
|
|
9
9
|
import {
|
|
10
10
|
NO_TEAM,
|
|
11
|
+
burnPaperRecoveryEntry,
|
|
11
12
|
deriveMagicLinkContentKey,
|
|
13
|
+
describeAllUsersAuth,
|
|
14
|
+
describeAuthConfig,
|
|
15
|
+
describeUserAuth,
|
|
16
|
+
diagramAuthConfig,
|
|
12
17
|
enrollAuthenticator,
|
|
13
18
|
findAuthenticator,
|
|
14
19
|
isMagicLinkGrantExpired,
|
|
15
20
|
listMagicLinkGrants,
|
|
21
|
+
loadPaperRecoveryEntries,
|
|
16
22
|
magicLinkGrantRecordId,
|
|
23
|
+
mintPaperRecoveryEntry,
|
|
24
|
+
mintWrappedDeksBlob,
|
|
17
25
|
readMagicLinkGrantRecord,
|
|
18
26
|
recoverSecret,
|
|
19
27
|
recoverUser,
|
|
20
28
|
removeAuthenticator,
|
|
21
29
|
revokeMagicLinkGrant,
|
|
22
30
|
rotateSecret,
|
|
31
|
+
savePaperRecoveryEntries,
|
|
32
|
+
unwrapDeksFromBlob,
|
|
33
|
+
unwrapDeksFromPaperEntry,
|
|
23
34
|
unwrapMagicLinkGrant,
|
|
24
35
|
updateAuthenticator,
|
|
25
36
|
writeMagicLinkGrant
|
|
26
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-C25JXSOR.js";
|
|
38
|
+
import "../chunk-56IIVAEO.js";
|
|
39
|
+
import {
|
|
40
|
+
PresenceHandle,
|
|
41
|
+
SyncEngine,
|
|
42
|
+
SyncTransaction
|
|
43
|
+
} from "../chunk-KBPU5M2E.js";
|
|
44
|
+
import "../chunk-VQNJ7UZL.js";
|
|
45
|
+
import "../chunk-EZNTORXE.js";
|
|
27
46
|
import {
|
|
28
47
|
SYNC_CREDENTIALS_COLLECTION,
|
|
29
48
|
buildRecipientKeyringFile,
|
|
@@ -41,36 +60,20 @@ import {
|
|
|
41
60
|
persistKeyring,
|
|
42
61
|
revoke,
|
|
43
62
|
updateKeyringIdentity
|
|
44
|
-
} from "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
unwrapDeksFromBlob,
|
|
53
|
-
unwrapDeksFromPaperEntry
|
|
54
|
-
} from "../chunk-CJVEAVYH.js";
|
|
55
|
-
import {
|
|
56
|
-
PresenceHandle,
|
|
57
|
-
SyncEngine,
|
|
58
|
-
SyncTransaction
|
|
59
|
-
} from "../chunk-OGVE4IJW.js";
|
|
60
|
-
import "../chunk-VQNJ7UZL.js";
|
|
61
|
-
import "../chunk-TMR64XPL.js";
|
|
62
|
-
import "../chunk-LC7DSMHR.js";
|
|
63
|
-
import "../chunk-GEEJPID6.js";
|
|
64
|
-
import "../chunk-SC4JLMZI.js";
|
|
65
|
-
import "../chunk-5WLDZZ6S.js";
|
|
66
|
-
import "../chunk-5HSSTOOG.js";
|
|
67
|
-
import "../chunk-G4MFQXYX.js";
|
|
63
|
+
} from "../chunk-KPXM4WO6.js";
|
|
64
|
+
import "../chunk-WZ3NCMK6.js";
|
|
65
|
+
import "../chunk-PTHKZWEH.js";
|
|
66
|
+
import "../chunk-RZPOZPZU.js";
|
|
67
|
+
import "../chunk-VH6SOCXH.js";
|
|
68
|
+
import "../chunk-35NMVJ7I.js";
|
|
69
|
+
import "../chunk-NFZGZ4AK.js";
|
|
70
|
+
import "../chunk-QJNCB5SK.js";
|
|
68
71
|
import "../chunk-LP7BEXCT.js";
|
|
69
|
-
import "../chunk-
|
|
70
|
-
import "../chunk-
|
|
72
|
+
import "../chunk-AKKRXT23.js";
|
|
73
|
+
import "../chunk-GZACYEOB.js";
|
|
71
74
|
import {
|
|
72
75
|
TeamNotEnabledError
|
|
73
|
-
} from "../chunk-
|
|
76
|
+
} from "../chunk-QZWTRENR.js";
|
|
74
77
|
import "../chunk-PZ5AY32C.js";
|
|
75
78
|
export {
|
|
76
79
|
NO_TEAM,
|
|
@@ -86,6 +89,10 @@ export {
|
|
|
86
89
|
credentialStatus,
|
|
87
90
|
deleteCredential,
|
|
88
91
|
deriveMagicLinkContentKey,
|
|
92
|
+
describeAllUsersAuth,
|
|
93
|
+
describeAuthConfig,
|
|
94
|
+
describeUserAuth,
|
|
95
|
+
diagramAuthConfig,
|
|
89
96
|
enrollAuthenticator,
|
|
90
97
|
ensureCollectionDEK,
|
|
91
98
|
evaluateExportCapability,
|
package/dist/tiers/index.js
CHANGED
|
@@ -11,19 +11,19 @@ import {
|
|
|
11
11
|
putAtTier,
|
|
12
12
|
syncDerivedOutputs,
|
|
13
13
|
withTiers
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-6R6Q3MRN.js";
|
|
15
|
+
import "../chunk-PTHKZWEH.js";
|
|
16
|
+
import "../chunk-RZPOZPZU.js";
|
|
17
|
+
import "../chunk-VH6SOCXH.js";
|
|
18
|
+
import "../chunk-35NMVJ7I.js";
|
|
19
|
+
import "../chunk-NFZGZ4AK.js";
|
|
20
|
+
import "../chunk-QJNCB5SK.js";
|
|
21
21
|
import "../chunk-LP7BEXCT.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-AKKRXT23.js";
|
|
23
|
+
import "../chunk-GZACYEOB.js";
|
|
24
24
|
import {
|
|
25
25
|
TiersNotEnabledError
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-QZWTRENR.js";
|
|
27
27
|
import "../chunk-PZ5AY32C.js";
|
|
28
28
|
export {
|
|
29
29
|
NO_TIERS,
|
package/dist/to/index.js
CHANGED
|
@@ -3,12 +3,16 @@ import {
|
|
|
3
3
|
TxContext,
|
|
4
4
|
TxVault,
|
|
5
5
|
runTransaction
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-BQ6DHN4I.js";
|
|
7
|
+
import {
|
|
8
|
+
lazy
|
|
9
|
+
} from "../chunk-5D2ALSM5.js";
|
|
7
10
|
import "../chunk-ZJADGNYF.js";
|
|
8
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-QZWTRENR.js";
|
|
9
12
|
import "../chunk-PZ5AY32C.js";
|
|
10
13
|
|
|
11
14
|
// src/with-commit/tx/dry-run.ts
|
|
15
|
+
var loadGuardExecutor = lazy(() => import("../executor-RM7XWQDU.js"));
|
|
12
16
|
var SEP = " ";
|
|
13
17
|
var keyOf = (op) => `${op.vaultName}${SEP}${op.collectionName}${SEP}${op.id}`;
|
|
14
18
|
async function runDryRun(db, fn) {
|
|
@@ -44,7 +48,7 @@ async function runDryRun(db, fn) {
|
|
|
44
48
|
const gctx = { existing: before, vault: facade, userId: v.userId, role: v.role };
|
|
45
49
|
try {
|
|
46
50
|
await registry.runChecks(op.collectionName, after, gctx);
|
|
47
|
-
const { GuardExecutor } = await
|
|
51
|
+
const { GuardExecutor } = await loadGuardExecutor();
|
|
48
52
|
for (const g of guards) {
|
|
49
53
|
await GuardExecutor.checkFrozenFields(g, op.id, before, after);
|
|
50
54
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/with-commit/tx/dry-run.ts","../../src/with-commit/tx/active.ts"],"sourcesContent":["/**\n * Dry-run transactions. Runs the tx body to STAGE ops, then builds\n * the directly-affected diff (before = current committed via collection.get,\n * after = staged record) and collects guard violations — without executing\n * phase 2. No adapter writes, no write-hooks, no commit. MV/derivation\n * cascade is NOT simulated (v2). Mirrors the guard loop in\n * `Collection._putInternal` — keep the two in sync.\n */\nimport type { Noydb } from '../../kernel/noydb.js'\nimport { TxContext, type StagedOp } from './transaction.js'\n\nimport { lazy } from '../../kernel/lazy.js'\n\n/** #846c — one memoized binding instead of a cast at the call site. */\nconst loadGuardExecutor = lazy(() => import('../../with-audit/guards/executor.js'))\n\nexport interface AffectedDocument {\n readonly vault: string\n readonly op: 'create' | 'update' | 'delete'\n readonly collection: string\n readonly docId: string\n readonly before: unknown // current committed record; null when creating\n readonly after: unknown // staged record; null when deleting\n}\n\nexport interface GuardViolation {\n readonly vault: string\n readonly collection: string\n readonly docId: string\n readonly message: string\n}\n\nexport interface DryRunResult {\n readonly affected: ReadonlyArray<AffectedDocument>\n readonly guardViolations: ReadonlyArray<GuardViolation>\n}\n\nconst SEP = ' '\nconst keyOf = (op: StagedOp) => `${op.vaultName}${SEP}${op.collectionName}${SEP}${op.id}`\n\nexport async function runDryRun(\n db: Noydb,\n fn: (tx: TxContext) => unknown,\n): Promise<DryRunResult> {\n const ctx = new TxContext(db)\n await fn(ctx) // stage ops (reads see staged writes via TxCollection); nothing committed\n\n // Dedup by (vault, collection, id) — last staged op wins.\n const lastOp = new Map<string, StagedOp>()\n for (const op of ctx._ops) lastOp.set(keyOf(op), op)\n\n const affected: AffectedDocument[] = []\n const guardViolations: GuardViolation[] = []\n\n for (const op of lastOp.values()) {\n const v = db.vault(op.vaultName)\n const coll = v.collection(op.collectionName)\n const before = await coll.get(op.id)\n\n if (op.type === 'delete') {\n affected.push({ vault: op.vaultName, op: 'delete', collection: op.collectionName, docId: op.id, before, after: null })\n continue\n }\n\n const after = op.record ?? null\n affected.push({\n vault: op.vaultName,\n op: before === null ? 'create' : 'update',\n collection: op.collectionName,\n docId: op.id,\n before,\n after,\n })\n\n // Guard violations — run the SAME checks Collection._putInternal does,\n // with the SAME ctx (existing + read-only facade + userId + role), but\n // collect the first thrown error instead of aborting.\n const registry = v._getGuardRegistry()\n if (!registry) continue\n const guards = registry.guardsFor(op.collectionName)\n if (guards.length === 0) continue\n const facade = v._getReadOnlyFacade()\n if (!facade) continue\n const gctx = { existing: before as Record<string, unknown> | null, vault: facade, userId: v.userId, role: v.role }\n try {\n await registry.runChecks(op.collectionName, after as Record<string, unknown>, gctx)\n const { GuardExecutor } = await loadGuardExecutor()\n for (const g of guards) {\n await GuardExecutor.checkFrozenFields(g, op.id, before as Record<string, unknown> | null, after as Record<string, unknown>)\n }\n } catch (err) {\n guardViolations.push({\n vault: op.vaultName,\n collection: op.collectionName,\n docId: op.id,\n message: err instanceof Error ? err.message : String(err),\n })\n }\n }\n\n return { affected, guardViolations }\n}\n","/**\n * Active transactions strategy. Only reachable via `@noy-db/hub/transactions`.\n */\n\nimport { runTransaction } from './transaction.js'\nimport { runDryRun } from './dry-run.js'\nimport type { TransactionsStrategy } from './strategy.js'\nimport type { TransactionInvariant } from './invariants.js'\n\n/**\n * Options for {@link withTransactions}. Currently only commit-time\n * changeset `invariants` (see {@link TransactionInvariant}).\n */\nexport interface WithTransactionsOptions {\n /**\n * Commit-time set-level invariants run over the changeset on every\n * commit (ordinary AND amendment). See {@link TransactionInvariant}.\n */\n invariants?: ReadonlyArray<TransactionInvariant>\n}\n\n/**\n * Build the default transactions strategy. Pass into\n * `createNoydb({ transactionsStrategy: withTransactions() })` to enable\n * `db.transaction(fn)` (and `db.transaction({ dryRun: true }, fn)`).\n *\n * Supply `{ invariants }` to register commit-time changeset invariants —\n * set-level constraints that fire after the writes commit and revert the\n * transaction on a throw. Unlike `amendment.invariant`, these run for\n * ordinary `db.transaction(fn)` calls (and amendments) with no role gate.\n */\nexport function withTransactions(opts?: WithTransactionsOptions): TransactionsStrategy {\n const invariants = opts?.invariants ?? []\n return {\n runTransaction: (db, fn, options) => runTransaction(db, fn, options, invariants),\n runDryRun,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,IAAM,oBAAoB,KAAK,MAAM,OAAO,yBAAqC,CAAC;AAuBlF,IAAM,MAAM;AACZ,IAAM,QAAQ,CAAC,OAAiB,GAAG,GAAG,SAAS,GAAG,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,GAAG,EAAE;AAEvF,eAAsB,UACpB,IACA,IACuB;AACvB,QAAM,MAAM,IAAI,UAAU,EAAE;AAC5B,QAAM,GAAG,GAAG;AAGZ,QAAM,SAAS,oBAAI,IAAsB;AACzC,aAAW,MAAM,IAAI,KAAM,QAAO,IAAI,MAAM,EAAE,GAAG,EAAE;AAEnD,QAAM,WAA+B,CAAC;AACtC,QAAM,kBAAoC,CAAC;AAE3C,aAAW,MAAM,OAAO,OAAO,GAAG;AAChC,UAAM,IAAI,GAAG,MAAM,GAAG,SAAS;AAC/B,UAAM,OAAO,EAAE,WAAW,GAAG,cAAc;AAC3C,UAAM,SAAS,MAAM,KAAK,IAAI,GAAG,EAAE;AAEnC,QAAI,GAAG,SAAS,UAAU;AACxB,eAAS,KAAK,EAAE,OAAO,GAAG,WAAW,IAAI,UAAU,YAAY,GAAG,gBAAgB,OAAO,GAAG,IAAI,QAAQ,OAAO,KAAK,CAAC;AACrH;AAAA,IACF;AAEA,UAAM,QAAQ,GAAG,UAAU;AAC3B,aAAS,KAAK;AAAA,MACZ,OAAO,GAAG;AAAA,MACV,IAAI,WAAW,OAAO,WAAW;AAAA,MACjC,YAAY,GAAG;AAAA,MACf,OAAO,GAAG;AAAA,MACV;AAAA,MACA;AAAA,IACF,CAAC;AAKD,UAAM,WAAW,EAAE,kBAAkB;AACrC,QAAI,CAAC,SAAU;AACf,UAAM,SAAS,SAAS,UAAU,GAAG,cAAc;AACnD,QAAI,OAAO,WAAW,EAAG;AACzB,UAAM,SAAS,EAAE,mBAAmB;AACpC,QAAI,CAAC,OAAQ;AACb,UAAM,OAAO,EAAE,UAAU,QAA0C,OAAO,QAAQ,QAAQ,EAAE,QAAQ,MAAM,EAAE,KAAK;AACjH,QAAI;AACF,YAAM,SAAS,UAAU,GAAG,gBAAgB,OAAkC,IAAI;AAClF,YAAM,EAAE,cAAc,IAAI,MAAM,kBAAkB;AAClD,iBAAW,KAAK,QAAQ;AACtB,cAAM,cAAc,kBAAkB,GAAG,GAAG,IAAI,QAA0C,KAAgC;AAAA,MAC5H;AAAA,IACF,SAAS,KAAK;AACZ,sBAAgB,KAAK;AAAA,QACnB,OAAO,GAAG;AAAA,QACV,YAAY,GAAG;AAAA,QACf,OAAO,GAAG;AAAA,QACV,SAAS,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,MAC1D,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO,EAAE,UAAU,gBAAgB;AACrC;;;ACtEO,SAAS,iBAAiB,MAAsD;AACrF,QAAM,aAAa,MAAM,cAAc,CAAC;AACxC,SAAO;AAAA,IACL,gBAAgB,CAAC,IAAI,IAAI,YAAY,eAAe,IAAI,IAAI,SAAS,UAAU;AAAA,IAC/E;AAAA,EACF;AACF;","names":[]}
|
package/dist/util/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
blindedEqual,
|
|
3
3
|
evaluateKofN,
|
|
4
4
|
openVdigPayload
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-35NMVJ7I.js";
|
|
6
6
|
import {
|
|
7
7
|
dualReadSealedSlot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NFZGZ4AK.js";
|
|
9
9
|
import {
|
|
10
10
|
VDIG_ITERATIONS,
|
|
11
11
|
normalizeForVerify,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
base64ToBuffer,
|
|
16
16
|
generateSalt
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-AKKRXT23.js";
|
|
18
18
|
import {
|
|
19
19
|
ClassifiedConfigError,
|
|
20
20
|
ClassifiedVerifyError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QZWTRENR.js";
|
|
22
22
|
import "./chunk-PZ5AY32C.js";
|
|
23
23
|
|
|
24
24
|
// src/kernel/enclave/classify/verify.ts
|
|
@@ -137,4 +137,4 @@ export {
|
|
|
137
137
|
verifyDigestField,
|
|
138
138
|
verifyTextField
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=verify-
|
|
140
|
+
//# sourceMappingURL=verify-7XWHJWUN.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Active blob strategy factory. Calling `blobs()` returns a
|
|
3
|
-
* `
|
|
3
|
+
* `BlobsStrategy` whose `openSlot` constructs a real `BlobSet` bound
|
|
4
4
|
* to the caller's record. The returned strategy is passed into
|
|
5
|
-
* `createNoydb({
|
|
5
|
+
* `createNoydb({ blobsStrategy: blobs() })` to light up the
|
|
6
6
|
* `collection.blob(id)` path.
|
|
7
7
|
*
|
|
8
8
|
* This module is only reachable through the `@noy-db/hub/blobs`
|
|
9
9
|
* subpath — a consumer that never imports the subpath ships none of
|
|
10
10
|
* this (ESM tree-shaking + hub's `"sideEffects": false`).
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
13
|
-
import type { BlobPinStore
|
|
12
|
+
import type { BlobsStrategy } from '../../port/with/blob-strategy.js';
|
|
13
|
+
import type { BlobPinStore } from '../../with-shape/blobs/blob-pinning.js';
|
|
14
14
|
/** Options for {@link withBlobs} (#808). */
|
|
15
15
|
export interface WithBlobsOptions {
|
|
16
16
|
/**
|
|
@@ -23,18 +23,7 @@ export interface WithBlobsOptions {
|
|
|
23
23
|
readonly pinStore?: BlobPinStore;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
* blob-cache KPI surface (#808).
|
|
28
|
-
*/
|
|
29
|
-
export interface BlobsService extends BlobStrategy {
|
|
30
|
-
/**
|
|
31
|
-
* Snapshot of this device's blob-cache KPI counters: local-read hits,
|
|
32
|
-
* network misses, and total bytes downloaded from the object store.
|
|
33
|
-
*/
|
|
34
|
-
cacheStats(): BlobCacheStats;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Build a default `BlobStrategy` ready to pass into `createNoydb`.
|
|
26
|
+
* Build a default `BlobsStrategy` ready to pass into `createNoydb`.
|
|
38
27
|
*
|
|
39
28
|
* Named `withBlobs` (plugin-pattern canonical) rather than `blobs` to
|
|
40
29
|
* avoid shadowing the very common local idiom
|
|
@@ -50,7 +39,7 @@ export interface BlobsService extends BlobStrategy {
|
|
|
50
39
|
*
|
|
51
40
|
* const db = await createNoydb({
|
|
52
41
|
* store, user, secret,
|
|
53
|
-
*
|
|
42
|
+
* blobsStrategy: withBlobs(),
|
|
54
43
|
* })
|
|
55
44
|
*
|
|
56
45
|
* // Now live — delegates to BlobSet.
|
|
@@ -58,4 +47,4 @@ export interface BlobsService extends BlobStrategy {
|
|
|
58
47
|
* await vault.collection('invoices').blob('inv-1').put('receipt.pdf', bytes)
|
|
59
48
|
* ```
|
|
60
49
|
*/
|
|
61
|
-
export declare function withBlobs(options?: WithBlobsOptions):
|
|
50
|
+
export declare function withBlobs(options?: WithBlobsOptions): BlobsStrategy;
|
|
@@ -45,7 +45,7 @@ import type { BlobFieldsConfig } from '../../with-shape/blobs/blob-compaction.js
|
|
|
45
45
|
* DELIBERATELY left unwired by `compileViaBindings` (#629 Task 10, resolved
|
|
46
46
|
* within parity-first — see task-10-report.md "blob purge" section):
|
|
47
47
|
* `per-blob-cek.test.ts`/`forget.test.ts` prove blob-shred-on-forget is
|
|
48
|
-
* gated SOLELY on the vault's `
|
|
48
|
+
* gated SOLELY on the vault's `blobsStrategy` being configured, never on a
|
|
49
49
|
* given collection's OWN `blobFields` declaration (`.blob(id)` is callable,
|
|
50
50
|
* and IS exercised by those tests, on collections with no `blobFields` at
|
|
51
51
|
* all). Routing it exclusively through this binding would silently stop
|
package/dist/via/blob/index.d.ts
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* code should prefer this subpath so the import boundary is explicit.
|
|
20
20
|
*/
|
|
21
21
|
export { withBlobs } from './active.js';
|
|
22
|
-
export type { WithBlobsOptions
|
|
23
|
-
export type {
|
|
22
|
+
export type { WithBlobsOptions } from './active.js';
|
|
23
|
+
export type { BlobsStrategy, BlobsStrategyOpenArgs } from '../../port/with/blob-strategy.js';
|
|
24
24
|
export { memoryBlobPinStore, blobPinKey } from '../../with-shape/blobs/blob-pinning.js';
|
|
25
25
|
export type { BlobPinStore, BlobPinEntry, BlobCacheStats } from '../../with-shape/blobs/blob-pinning.js';
|
|
26
26
|
export { BlobOfflineError } from '../../kernel/errors.js';
|
|
@@ -36,3 +36,5 @@ export { runCompaction, BLOB_EVICTION_AUDIT_COLLECTION } from '../../with-shape/
|
|
|
36
36
|
export type { BlobFieldsConfig, BlobFieldPolicy, BlobEvictionEntry, CompactRunOptions, CompactionResult, CompactionContext, } from '../../with-shape/blobs/blob-compaction.js';
|
|
37
37
|
export { createExportBlobsHandle, ExportBlobsAbortedError, EXPORT_AUDIT_COLLECTION, } from '../../with-shape/blobs/export-blobs.js';
|
|
38
38
|
export type { ExportBlobsOptions, ExportedBlob, ExportBlobsHandle, ExportBlobsAuditEntry, } from '../../with-shape/blobs/export-blobs.js';
|
|
39
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
40
|
+
export { NO_BLOBS } from '../../port/with/blob-strategy.js';
|
package/dist/via/i18n/core.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ export interface I18nTextOptions {
|
|
|
110
110
|
* the lenient `'substitute'`). The `mv` layer fires for materialized views
|
|
111
111
|
* that declare `{ i18nLocale, i18nFields }` — UNION (group-key i18n fields
|
|
112
112
|
* resolve before the unified-row bucketing) and query-form (resolved in
|
|
113
|
-
* `
|
|
113
|
+
* `GroupedReduction.run` before `groupAndReduce`); grouping a raw i18n field
|
|
114
114
|
* without a locale throws. The `join` layer resolves a joined right-side i18n
|
|
115
115
|
* field to the query locale (`toArray({ locale })` or the vault default; raw
|
|
116
116
|
* when locale-less). The `export` layer fires for
|
package/dist/via/i18n/index.d.ts
CHANGED
|
@@ -19,3 +19,5 @@ export type { ScriptWarning } from './script.js';
|
|
|
19
19
|
export { withI18n } from './active.js';
|
|
20
20
|
export type { I18nStrategy } from './strategy.js';
|
|
21
21
|
export { ReservedCollectionNameError, DictKeyMissingError, DictKeyInUseError, MissingTranslationError, LocaleNotSpecifiedError, TranslatorNotConfiguredError, ScriptViolationError, StaticDictReadonlyError, UnknownDictCodeError, } from '../../kernel/errors.js';
|
|
22
|
+
/** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
|
|
23
|
+
export { NO_I18N } from '../../port/with/i18n-strategy.js';
|