@noy-db/hub 0.2.0-pre.9 → 0.3.0-pre.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -3
- package/dist/aggregate/index.d.ts +5 -2
- package/dist/aggregate/index.js +25 -16
- package/dist/aggregate/index.js.map +1 -1
- package/dist/api-TX2EX2FX.js +20 -0
- package/dist/as/index.d.ts +6 -0
- package/dist/as/index.js +30 -0
- package/dist/at/index.d.ts +4 -0
- package/dist/at/index.js +1 -0
- package/dist/attestation/index.d.ts +14 -47
- package/dist/attestation/index.js +60 -10
- package/dist/attestation/index.js.map +1 -1
- package/dist/backup-R7NTDFKY.js +225 -0
- package/dist/backup-R7NTDFKY.js.map +1 -0
- package/dist/blobs/index.d.ts +5 -8
- package/dist/blobs/index.js +25 -12
- package/dist/blobs/index.js.map +1 -1
- package/dist/bundle/index.d.ts +15 -70
- package/dist/bundle/index.js +45 -476
- package/dist/bundle/index.js.map +1 -1
- package/dist/{ulid-CJ8RzRrm.d.ts → bundle-D6GxiUfq.d.ts} +31 -86
- package/dist/by/index.d.ts +1 -0
- package/dist/by/index.js +11 -0
- package/dist/cargo/index.d.ts +7 -0
- package/dist/cargo/index.js +95 -0
- package/dist/chunk-2OV5NVE7.js +95 -0
- package/dist/chunk-2OV5NVE7.js.map +1 -0
- package/dist/chunk-2OZXVKVP.js +367 -0
- package/dist/chunk-2OZXVKVP.js.map +1 -0
- package/dist/{chunk-HNRHLRDC.js → chunk-2REPHKET.js} +6 -5
- package/dist/chunk-2REPHKET.js.map +1 -0
- package/dist/{chunk-PE2FR4J3.js → chunk-3JXPAHOZ.js} +17 -17
- package/dist/chunk-3JXPAHOZ.js.map +1 -0
- package/dist/{chunk-H2X3ISXG.js → chunk-3MATJ6O4.js} +7 -7
- package/dist/chunk-3MATJ6O4.js.map +1 -0
- package/dist/{chunk-PP6W64Y3.js → chunk-3OPY6MK2.js} +132 -3
- package/dist/chunk-3OPY6MK2.js.map +1 -0
- package/dist/{chunk-T7JEBOGN.js → chunk-3QSIU3UT.js} +49 -71
- package/dist/chunk-3QSIU3UT.js.map +1 -0
- package/dist/{chunk-ZYWZWG6G.js → chunk-4OMCIY6F.js} +32 -12
- package/dist/chunk-4OMCIY6F.js.map +1 -0
- package/dist/chunk-4Q6HSHHL.js +90 -0
- package/dist/chunk-4Q6HSHHL.js.map +1 -0
- package/dist/chunk-5I35DOHK.js +94 -0
- package/dist/chunk-5I35DOHK.js.map +1 -0
- package/dist/chunk-5VG4IJR7.js +235 -0
- package/dist/chunk-5VG4IJR7.js.map +1 -0
- package/dist/chunk-5YESYH2C.js +155 -0
- package/dist/chunk-5YESYH2C.js.map +1 -0
- package/dist/chunk-6G5ORS5D.js +202 -0
- package/dist/chunk-6G5ORS5D.js.map +1 -0
- package/dist/{chunk-VTKGMEPP.js → chunk-6P5XCKSD.js} +13 -3
- package/dist/chunk-6P5XCKSD.js.map +1 -0
- package/dist/{chunk-J66GRPNH.js → chunk-6S7T6WC4.js} +2 -2
- package/dist/chunk-6S7T6WC4.js.map +1 -0
- package/dist/{chunk-U26HQ6KJ.js → chunk-7BWJHO2A.js} +4 -4
- package/dist/chunk-7BWJHO2A.js.map +1 -0
- package/dist/chunk-7P2SDJG3.js +279 -0
- package/dist/chunk-7P2SDJG3.js.map +1 -0
- package/dist/chunk-ANB77BVV.js +150 -0
- package/dist/chunk-ANB77BVV.js.map +1 -0
- package/dist/chunk-AURFOK3D.js +35 -0
- package/dist/chunk-AURFOK3D.js.map +1 -0
- package/dist/chunk-BKARNZJN.js +382 -0
- package/dist/chunk-BKARNZJN.js.map +1 -0
- package/dist/{chunk-3BFJOWSU.js → chunk-BQISD5ZV.js} +35 -7
- package/dist/chunk-BQISD5ZV.js.map +1 -0
- package/dist/{chunk-2GLDA55J.js → chunk-BUAQ7YI3.js} +260 -135
- package/dist/chunk-BUAQ7YI3.js.map +1 -0
- package/dist/{chunk-2WUSG3IT.js → chunk-CB7CWSKW.js} +5 -5
- package/dist/chunk-CB7CWSKW.js.map +1 -0
- package/dist/chunk-CHFZDSE4.js +1 -0
- package/dist/{aggregate/index.cjs → chunk-DFVUTGT2.js} +206 -222
- package/dist/chunk-DFVUTGT2.js.map +1 -0
- package/dist/chunk-DJ7KIPLV.js +23 -0
- package/dist/chunk-DJ7KIPLV.js.map +1 -0
- package/dist/chunk-DSKDQP3G.js +14066 -0
- package/dist/chunk-DSKDQP3G.js.map +1 -0
- package/dist/{chunk-5T22KDPN.js → chunk-DV4HUP5G.js} +10 -8
- package/dist/chunk-DV4HUP5G.js.map +1 -0
- package/dist/chunk-EOXAAJTY.js +621 -0
- package/dist/chunk-EOXAAJTY.js.map +1 -0
- package/dist/chunk-ET67AY6B.js +74 -0
- package/dist/chunk-ET67AY6B.js.map +1 -0
- package/dist/chunk-F4CEK5YM.js +123 -0
- package/dist/chunk-F4CEK5YM.js.map +1 -0
- package/dist/chunk-FORYWFN6.js +130 -0
- package/dist/chunk-FORYWFN6.js.map +1 -0
- package/dist/{chunk-JWRVQKRZ.js → chunk-FRP6D2DM.js} +21 -20
- package/dist/chunk-FRP6D2DM.js.map +1 -0
- package/dist/chunk-FUOE7UUV.js +341 -0
- package/dist/chunk-FUOE7UUV.js.map +1 -0
- package/dist/chunk-G4JYND6L.js +42 -0
- package/dist/chunk-G4JYND6L.js.map +1 -0
- package/dist/{chunk-53XBRIRT.js → chunk-G6XV4H65.js} +9 -9
- package/dist/chunk-G6XV4H65.js.map +1 -0
- package/dist/chunk-GHVIKOHT.js +1 -0
- package/dist/{chunk-PX35GA7L.js → chunk-GNMXXTMN.js} +11 -9
- package/dist/chunk-GNMXXTMN.js.map +1 -0
- package/dist/chunk-GYGLAVCX.js +19 -0
- package/dist/chunk-GYGLAVCX.js.map +1 -0
- package/dist/chunk-HPWKV3YB.js +21 -0
- package/dist/chunk-HPWKV3YB.js.map +1 -0
- package/dist/chunk-HY3AUMFI.js +41 -0
- package/dist/chunk-HY3AUMFI.js.map +1 -0
- package/dist/chunk-HYR4WZZ3.js +69 -0
- package/dist/chunk-HYR4WZZ3.js.map +1 -0
- package/dist/chunk-I7FD46FF.js +9 -0
- package/dist/chunk-I7FD46FF.js.map +1 -0
- package/dist/{chunk-TFBP23BX.js → chunk-ICXIFFYZ.js} +66 -7
- package/dist/chunk-ICXIFFYZ.js.map +1 -0
- package/dist/{chunk-TV3YZ35S.js → chunk-IGJCYUT5.js} +17 -8
- package/dist/chunk-IGJCYUT5.js.map +1 -0
- package/dist/{chunk-F3GDRNUT.js → chunk-IVLTXX4W.js} +36 -68
- package/dist/chunk-IVLTXX4W.js.map +1 -0
- package/dist/{chunk-DONMZAD2.js → chunk-J4LPNIGK.js} +62 -169
- package/dist/chunk-J4LPNIGK.js.map +1 -0
- package/dist/chunk-JJZ2LW6T.js +36 -0
- package/dist/chunk-JJZ2LW6T.js.map +1 -0
- package/dist/chunk-JK733I5V.js +23 -0
- package/dist/chunk-JK733I5V.js.map +1 -0
- package/dist/{chunk-3YPCK6JX.js → chunk-KJ2BCBTL.js} +181 -422
- package/dist/chunk-KJ2BCBTL.js.map +1 -0
- package/dist/chunk-KNZB6JMR.js +129 -0
- package/dist/chunk-KNZB6JMR.js.map +1 -0
- package/dist/{chunk-OIF6LZUR.js → chunk-KPZS5QAQ.js} +30 -11
- package/dist/chunk-KPZS5QAQ.js.map +1 -0
- package/dist/chunk-LB7FD65R.js +163 -0
- package/dist/chunk-LB7FD65R.js.map +1 -0
- package/dist/{chunk-DO7C2TOG.js → chunk-LEJIKBBB.js} +3 -3
- package/dist/{chunk-DO7C2TOG.js.map → chunk-LEJIKBBB.js.map} +1 -1
- package/dist/{chunk-O3VZPBZG.js → chunk-LL2NIVUR.js} +56 -13
- package/dist/chunk-LL2NIVUR.js.map +1 -0
- package/dist/chunk-LP7BEXCT.js +32 -0
- package/dist/chunk-LP7BEXCT.js.map +1 -0
- package/dist/chunk-MCHVVJIA.js +968 -0
- package/dist/chunk-MCHVVJIA.js.map +1 -0
- package/dist/chunk-NO272T7Q.js +194 -0
- package/dist/chunk-NO272T7Q.js.map +1 -0
- package/dist/{chunk-22DWZL57.js → chunk-NUEQU36L.js} +70 -267
- package/dist/chunk-NUEQU36L.js.map +1 -0
- package/dist/chunk-O45M6LDB.js +38 -0
- package/dist/chunk-O45M6LDB.js.map +1 -0
- package/dist/chunk-OBKWYKYC.js +117 -0
- package/dist/chunk-OBKWYKYC.js.map +1 -0
- package/dist/{chunk-DJHHA6XH.js → chunk-OHHKHSJP.js} +50 -20
- package/dist/chunk-OHHKHSJP.js.map +1 -0
- package/dist/chunk-OT76OZL6.js +45 -0
- package/dist/chunk-OT76OZL6.js.map +1 -0
- package/dist/chunk-OVYRLHPE.js +150 -0
- package/dist/chunk-OVYRLHPE.js.map +1 -0
- package/dist/{chunk-ML236QKC.js → chunk-OXCSVM3B.js} +5 -5
- package/dist/chunk-OXCSVM3B.js.map +1 -0
- package/dist/chunk-P33LUIML.js +205 -0
- package/dist/chunk-P33LUIML.js.map +1 -0
- package/dist/{chunk-DL3HWOQ5.js → chunk-PLS64NCS.js} +10 -8
- package/dist/chunk-PLS64NCS.js.map +1 -0
- package/dist/{chunk-SYMWGEET.js → chunk-PS2NEWEX.js} +3 -3
- package/dist/chunk-PS2NEWEX.js.map +1 -0
- package/dist/chunk-PY4KJPYU.js +9 -0
- package/dist/chunk-PY4KJPYU.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-QA2KUPCP.js +45 -0
- package/dist/chunk-QA2KUPCP.js.map +1 -0
- package/dist/chunk-QOC3VYL2.js +30 -0
- package/dist/chunk-QOC3VYL2.js.map +1 -0
- package/dist/{chunk-BVRYKATC.js → chunk-QSFOZUYL.js} +62 -34
- package/dist/chunk-QSFOZUYL.js.map +1 -0
- package/dist/chunk-RHK32N73.js +30 -0
- package/dist/chunk-RHK32N73.js.map +1 -0
- package/dist/{chunk-K3DK3NU5.js → chunk-RW3Y22MW.js} +20 -5
- package/dist/chunk-RW3Y22MW.js.map +1 -0
- package/dist/{chunk-B6PB7JLN.js → chunk-S7VFUQM2.js} +541 -6
- package/dist/chunk-S7VFUQM2.js.map +1 -0
- package/dist/chunk-SVLR4POP.js +64 -0
- package/dist/chunk-SVLR4POP.js.map +1 -0
- package/dist/chunk-T7WSLRAU.js +49 -0
- package/dist/chunk-T7WSLRAU.js.map +1 -0
- package/dist/{chunk-WPLVTJ5D.js → chunk-TAKWLZZX.js} +285 -63
- package/dist/chunk-TAKWLZZX.js.map +1 -0
- package/dist/chunk-THNJ3IKU.js +17 -0
- package/dist/chunk-THNJ3IKU.js.map +1 -0
- package/dist/{chunk-XJFLDA7A.js → chunk-TMBXVJKT.js} +9 -6
- package/dist/chunk-TMBXVJKT.js.map +1 -0
- package/dist/chunk-TWKKOM55.js +54 -0
- package/dist/chunk-TWKKOM55.js.map +1 -0
- package/dist/chunk-U3WZCU7E.js +14 -0
- package/dist/chunk-U3WZCU7E.js.map +1 -0
- package/dist/{chunk-Z6FNBOTC.js → chunk-UF362QVH.js} +15 -17
- package/dist/chunk-UF362QVH.js.map +1 -0
- package/dist/chunk-UN4FVIBH.js +135 -0
- package/dist/chunk-UN4FVIBH.js.map +1 -0
- package/dist/chunk-VEAVKDDB.js +29 -0
- package/dist/chunk-VEAVKDDB.js.map +1 -0
- package/dist/chunk-VEPTFUJY.js +29 -0
- package/dist/chunk-VEPTFUJY.js.map +1 -0
- package/dist/chunk-VJV7GKQK.js +662 -0
- package/dist/chunk-VJV7GKQK.js.map +1 -0
- package/dist/{chunk-2QR2PQTT.js → chunk-VQNJ7UZL.js} +5 -3
- package/dist/chunk-VQNJ7UZL.js.map +1 -0
- package/dist/chunk-VQRAIPYF.js +50 -0
- package/dist/chunk-VQRAIPYF.js.map +1 -0
- package/dist/{chunk-DFMLEQZB.js → chunk-VRIYFLBA.js} +5 -10
- package/dist/chunk-VRIYFLBA.js.map +1 -0
- package/dist/chunk-VWM3DAVB.js +265 -0
- package/dist/chunk-VWM3DAVB.js.map +1 -0
- package/dist/{chunk-NONAAENK.js → chunk-VWRRVE6D.js} +11 -4
- package/dist/chunk-VWRRVE6D.js.map +1 -0
- package/dist/chunk-VYYM3MEN.js +98 -0
- package/dist/chunk-VYYM3MEN.js.map +1 -0
- package/dist/chunk-WBJIQSLL.js +167 -0
- package/dist/chunk-WBJIQSLL.js.map +1 -0
- package/dist/chunk-WIGQB62E.js +164 -0
- package/dist/chunk-WIGQB62E.js.map +1 -0
- package/dist/{chunk-EMIGCR7X.js → chunk-WXSYDNBT.js} +2 -2
- package/dist/chunk-WXSYDNBT.js.map +1 -0
- package/dist/chunk-WZSCE6RM.js +466 -0
- package/dist/chunk-WZSCE6RM.js.map +1 -0
- package/dist/chunk-XGDAPN6M.js +255 -0
- package/dist/chunk-XGDAPN6M.js.map +1 -0
- package/dist/{chunk-QODLLGQ7.js → chunk-XH7XP3OL.js} +372 -37
- package/dist/chunk-XH7XP3OL.js.map +1 -0
- package/dist/chunk-XREOISSI.js +40 -0
- package/dist/chunk-XREOISSI.js.map +1 -0
- package/dist/chunk-XUBPSPKD.js +164 -0
- package/dist/chunk-XUBPSPKD.js.map +1 -0
- package/dist/chunk-Y3A5CB5G.js +247 -0
- package/dist/chunk-Y3A5CB5G.js.map +1 -0
- package/dist/{chunk-I5FOWO4J.js → chunk-YCXCR7VG.js} +52 -73
- package/dist/chunk-YCXCR7VG.js.map +1 -0
- package/dist/{chunk-A3JMGXPG.js → chunk-YMUGBZN2.js} +2 -2
- package/dist/chunk-YMUGBZN2.js.map +1 -0
- package/dist/chunk-YMVQD5Q5.js +453 -0
- package/dist/chunk-YMVQD5Q5.js.map +1 -0
- package/dist/chunk-YN5IAHN6.js +32 -0
- package/dist/chunk-YN5IAHN6.js.map +1 -0
- package/dist/{chunk-FZU343FL.js → chunk-ZJADGNYF.js} +2 -2
- package/dist/chunk-ZJADGNYF.js.map +1 -0
- package/dist/chunk-ZYJ55N7N.js +86 -0
- package/dist/chunk-ZYJ55N7N.js.map +1 -0
- package/dist/classified/index.d.ts +16 -0
- package/dist/classified/index.js +40 -0
- package/dist/classified-marker-H6YSHYNK.js +24 -0
- package/dist/classified-marker-H6YSHYNK.js.map +1 -0
- package/dist/collection-facade-LVD22JLM.js +39 -0
- package/dist/computed-EXDMQODG.js +11 -0
- package/dist/consent/index.d.ts +4 -7
- package/dist/consent/index.js +13 -5
- package/dist/consent/index.js.map +1 -1
- package/dist/crdt/index.d.ts +5 -2
- package/dist/crdt/index.js +3 -2
- package/dist/crdt/index.js.map +1 -1
- package/dist/dead-filter-HQIE2YG7.js +28 -0
- package/dist/dead-filter-HQIE2YG7.js.map +1 -0
- package/dist/decrypt-partition-IHtxEnTi.d.ts +21 -0
- package/dist/delegation-BJP73GAP.js +25 -0
- package/dist/derivations/index.d.ts +6 -9
- package/dist/derivations/index.js +18 -6
- package/dist/derive-BME7HDWO.js +21 -0
- package/dist/{dev-unlock-B4kDxep_.d.ts → dev-unlock-Bmm2pgJ0.d.ts} +1 -1
- package/dist/discriminant-BN9REW3o.d.ts +60 -0
- package/dist/enclave-NHORSWSF.js +125 -0
- package/dist/executor-FE6X4LFX.js +9 -0
- package/dist/executor-KSHKRJXP.js +25 -0
- package/dist/executor-ZHTJJICG.js +9 -0
- package/dist/export-accessible-DACHM5VT.js +23 -0
- package/dist/extract-partition-RNENZZ4T.js +36 -0
- package/dist/fanout-sidecar-OFWN3NM7.js +74 -0
- package/dist/fanout-sidecar-OFWN3NM7.js.map +1 -0
- package/dist/fence-watcher-DHQ775JB.js +69 -0
- package/dist/fence-watcher-DHQ775JB.js.map +1 -0
- package/dist/find-BNGBJNKP.js +11 -0
- package/dist/forget/index.d.ts +36 -0
- package/dist/forget/index.js +25 -0
- package/dist/forget/index.js.map +1 -0
- package/dist/guards/index.d.ts +12 -9
- package/dist/guards/index.js +12 -5
- package/dist/{hash-DdpVypUp.d.cts → hash-DAJjMsCE.d.ts} +10 -1
- package/dist/history/index.d.ts +5 -8
- package/dist/history/index.js +25 -12
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.d.ts +25 -8
- package/dist/i18n/index.js +137 -29
- package/dist/i18n/index.js.map +1 -1
- package/dist/in/index.d.ts +4 -0
- package/dist/in/index.js +1 -0
- package/dist/in/index.js.map +1 -0
- package/dist/index-B9QdHytu.d.ts +123 -0
- package/dist/index-DjWbxsjb.d.ts +23579 -0
- package/dist/index-qwuNvO2B.d.ts +144 -0
- package/dist/index.d.ts +1179 -449
- package/dist/index.js +2524 -312
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.d.ts +5 -3
- package/dist/indexing/index.js +6 -5
- package/dist/indexing/index.js.map +1 -1
- package/dist/issue-NDI4CVZU.js +19 -0
- package/dist/issue-NDI4CVZU.js.map +1 -0
- package/dist/json-schema-I22JCYCG.js +44 -0
- package/dist/json-schema-I22JCYCG.js.map +1 -0
- package/dist/lazy/index.d.ts +20 -0
- package/dist/lazy/index.js +12 -0
- package/dist/lazy/index.js.map +1 -0
- package/dist/ledger-6NDS2EO4.js +42 -0
- package/dist/ledger-6NDS2EO4.js.map +1 -0
- package/dist/liberate-HN3RIGIP.js +24 -0
- package/dist/liberate-HN3RIGIP.js.map +1 -0
- package/dist/link-set-SJB2MVJV.js +31 -0
- package/dist/link-set-SJB2MVJV.js.map +1 -0
- package/dist/materialized-views/index.d.ts +23 -20
- package/dist/materialized-views/index.js +26 -12
- package/dist/mime-magic-bBj5OgUC.d.ts +103 -0
- package/dist/noydb-BWF6EPIR.js +66 -0
- package/dist/noydb-BWF6EPIR.js.map +1 -0
- package/dist/on/index.d.ts +4 -0
- package/dist/on/index.js +17 -0
- package/dist/on/index.js.map +1 -0
- package/dist/overlay-views/index.d.ts +26 -11
- package/dist/overlay-views/index.js +7 -6
- package/dist/periods/index.d.ts +4 -7
- package/dist/periods/index.js +27 -9
- package/dist/pod/index.d.ts +62 -0
- package/dist/pod/index.js +67 -0
- package/dist/pod/index.js.map +1 -0
- package/dist/policy-WGNAG5H6.js +41 -0
- package/dist/policy-WGNAG5H6.js.map +1 -0
- package/dist/portability/index.d.ts +19 -0
- package/dist/portability/index.js +43 -0
- package/dist/portability/index.js.map +1 -0
- package/dist/post-register-CWKBQRC7.js +55 -0
- package/dist/post-register-CWKBQRC7.js.map +1 -0
- package/dist/{public-envelope-BW6OXORV.js → public-envelope-EJLVIFX7.js} +6 -5
- package/dist/public-envelope-EJLVIFX7.js.map +1 -0
- package/dist/query/index.d.ts +4 -3
- package/dist/query/index.js +24 -13
- package/dist/read-only-facade-CHCKSEPD.js +8 -0
- package/dist/read-only-facade-CHCKSEPD.js.map +1 -0
- package/dist/register-SBIX7TVV.js +23 -0
- package/dist/register-SBIX7TVV.js.map +1 -0
- package/dist/registry-3EQG6OOE.js +18 -0
- package/dist/registry-3EQG6OOE.js.map +1 -0
- package/dist/registry-CA327ACV.js +9 -0
- package/dist/registry-CA327ACV.js.map +1 -0
- package/dist/registry-E7OXOTSV.js +19 -0
- package/dist/registry-E7OXOTSV.js.map +1 -0
- package/dist/registry-VW6P6A3J.js +8 -0
- package/dist/registry-VW6P6A3J.js.map +1 -0
- package/dist/request-withdrawal-KAH2AAXC.js +31 -0
- package/dist/request-withdrawal-KAH2AAXC.js.map +1 -0
- package/dist/reveal-R3JLHMUF.js +38 -0
- package/dist/reveal-R3JLHMUF.js.map +1 -0
- package/dist/revoke-IXLOJ3IH.js +24 -0
- package/dist/revoke-IXLOJ3IH.js.map +1 -0
- package/dist/satellites/index.d.ts +4 -0
- package/dist/satellites/index.js +8 -0
- package/dist/satellites/index.js.map +1 -0
- package/dist/sealed-record/index.d.ts +68 -0
- package/dist/sealed-record/index.js +71 -0
- package/dist/sealed-record/index.js.map +1 -0
- package/dist/session/index.d.ts +5 -8
- package/dist/session/index.js +13 -5
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.d.ts +4 -7
- package/dist/shadow/index.js +4 -3
- package/dist/shadow/index.js.map +1 -1
- package/dist/signer-Y46N2GJ3.js +25 -0
- package/dist/signer-Y46N2GJ3.js.map +1 -0
- package/dist/snapshots/index.d.ts +5 -8
- package/dist/snapshots/index.js +19 -11
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-6ZDBTQT7.js → stale-Z7IW6RIL.js} +3 -2
- package/dist/stale-Z7IW6RIL.js.map +1 -0
- package/dist/storage-ADNP2UWI.js +23 -0
- package/dist/storage-ADNP2UWI.js.map +1 -0
- package/dist/store-coordination-provider-DTDMI6VL.js +142 -0
- package/dist/store-coordination-provider-DTDMI6VL.js.map +1 -0
- package/dist/subject-index-CyOgGMJL.d.ts +380 -0
- package/dist/sync/index.d.ts +3 -6
- package/dist/sync/index.js +13 -6
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.d.ts +46 -10
- package/dist/team/index.js +35 -18
- package/dist/tiers/index.d.ts +4 -0
- package/dist/tiers/index.js +39 -0
- package/dist/tiers/index.js.map +1 -0
- package/dist/to/index.d.ts +4 -0
- package/dist/to/index.js +16 -0
- package/dist/to/index.js.map +1 -0
- package/dist/transition-guard-DI-krBsZ.d.ts +165 -0
- package/dist/tx/index.d.ts +22 -9
- package/dist/tx/index.js +13 -8
- package/dist/tx/index.js.map +1 -1
- package/dist/ui/index.d.ts +4 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ulid-DRH25k3y.d.ts +66 -0
- package/dist/ulid-PTAIMDG4.js +10 -0
- package/dist/ulid-PTAIMDG4.js.map +1 -0
- package/dist/util/index.d.ts +2 -0
- package/dist/util/index.js +7 -2
- package/dist/util/index.js.map +1 -1
- package/dist/validators-BUcli5Nh.d.ts +101 -0
- package/dist/vault-diff-Z2DUayMe.d.ts +147 -0
- package/dist/verify-JPF2YR5E.js +139 -0
- package/dist/verify-JPF2YR5E.js.map +1 -0
- package/dist/walk-XYA2O3LW.js +241 -0
- package/dist/walk-XYA2O3LW.js.map +1 -0
- package/dist/with/index.d.ts +37 -0
- package/dist/with/index.js +31 -0
- package/dist/with/index.js.map +1 -0
- package/dist/{with-materialized-view-BLkQxoQN.d.ts → with-materialized-view-BUmzlXue.d.ts} +1 -1
- package/dist/{with-overlayed-view-CRsSEwHR.d.ts → with-overlayed-view-m4FaXXTO.d.ts} +2 -3
- package/dist/with-rollup-DEKGI9vb.d.ts +47 -0
- package/dist/withdraw-accessible-WLV4MTEN.js +28 -0
- package/dist/withdraw-accessible-WLV4MTEN.js.map +1 -0
- package/dist/zod-HAJM7LMS.js +14763 -0
- package/dist/zod-HAJM7LMS.js.map +1 -0
- package/package.json +122 -202
- package/dist/aggregate/index.cjs.map +0 -1
- package/dist/aggregate/index.d.cts +0 -38
- package/dist/attestation/index.cjs +0 -305
- package/dist/attestation/index.cjs.map +0 -1
- package/dist/attestation/index.d.cts +0 -52
- package/dist/blobs/index.cjs +0 -1480
- package/dist/blobs/index.cjs.map +0 -1
- package/dist/blobs/index.d.cts +0 -46
- package/dist/bundle/index.cjs +0 -19264
- package/dist/bundle/index.cjs.map +0 -1
- package/dist/bundle/index.d.cts +0 -176
- package/dist/chunk-22DWZL57.js.map +0 -1
- package/dist/chunk-2GLDA55J.js.map +0 -1
- package/dist/chunk-2QR2PQTT.js.map +0 -1
- package/dist/chunk-2WUSG3IT.js.map +0 -1
- package/dist/chunk-3BFJOWSU.js.map +0 -1
- package/dist/chunk-3YPCK6JX.js.map +0 -1
- package/dist/chunk-53XBRIRT.js.map +0 -1
- package/dist/chunk-5T22KDPN.js.map +0 -1
- package/dist/chunk-5XHKQ56N.js +0 -340
- package/dist/chunk-5XHKQ56N.js.map +0 -1
- package/dist/chunk-6CME4UEK.js +0 -10329
- package/dist/chunk-6CME4UEK.js.map +0 -1
- package/dist/chunk-6STK5TQP.js +0 -139
- package/dist/chunk-6STK5TQP.js.map +0 -1
- package/dist/chunk-A3JMGXPG.js.map +0 -1
- package/dist/chunk-B6PB7JLN.js.map +0 -1
- package/dist/chunk-BVRYKATC.js.map +0 -1
- package/dist/chunk-DE6GKS6G.js +0 -79
- package/dist/chunk-DE6GKS6G.js.map +0 -1
- package/dist/chunk-DFMLEQZB.js.map +0 -1
- package/dist/chunk-DJHHA6XH.js.map +0 -1
- package/dist/chunk-DL3HWOQ5.js.map +0 -1
- package/dist/chunk-DONMZAD2.js.map +0 -1
- package/dist/chunk-EMIGCR7X.js.map +0 -1
- package/dist/chunk-F3GDRNUT.js.map +0 -1
- package/dist/chunk-FZU343FL.js.map +0 -1
- package/dist/chunk-H2X3ISXG.js.map +0 -1
- package/dist/chunk-HNRHLRDC.js.map +0 -1
- package/dist/chunk-I5FOWO4J.js.map +0 -1
- package/dist/chunk-J66GRPNH.js.map +0 -1
- package/dist/chunk-JWRVQKRZ.js.map +0 -1
- package/dist/chunk-K3DK3NU5.js.map +0 -1
- package/dist/chunk-ML236QKC.js.map +0 -1
- package/dist/chunk-NONAAENK.js.map +0 -1
- package/dist/chunk-O3VZPBZG.js.map +0 -1
- package/dist/chunk-OIF6LZUR.js.map +0 -1
- package/dist/chunk-OQ6PIGHA.js +0 -19
- package/dist/chunk-OQ6PIGHA.js.map +0 -1
- package/dist/chunk-PE2FR4J3.js.map +0 -1
- package/dist/chunk-PP6W64Y3.js.map +0 -1
- package/dist/chunk-PX35GA7L.js.map +0 -1
- package/dist/chunk-QEILDE6R.js +0 -793
- package/dist/chunk-QEILDE6R.js.map +0 -1
- package/dist/chunk-QODLLGQ7.js.map +0 -1
- package/dist/chunk-RAZ4OVLL.js +0 -51
- package/dist/chunk-RAZ4OVLL.js.map +0 -1
- package/dist/chunk-SYMWGEET.js.map +0 -1
- package/dist/chunk-T7JEBOGN.js.map +0 -1
- package/dist/chunk-TFBP23BX.js.map +0 -1
- package/dist/chunk-TV3YZ35S.js.map +0 -1
- package/dist/chunk-U26HQ6KJ.js.map +0 -1
- package/dist/chunk-UF3BUNQZ.js +0 -1
- package/dist/chunk-UMLVJTYV.js +0 -20
- package/dist/chunk-UMLVJTYV.js.map +0 -1
- package/dist/chunk-VTKGMEPP.js.map +0 -1
- package/dist/chunk-W6EQLGMB.js +0 -100
- package/dist/chunk-W6EQLGMB.js.map +0 -1
- package/dist/chunk-WIRRPTFH.js +0 -17
- package/dist/chunk-WIRRPTFH.js.map +0 -1
- package/dist/chunk-WPLVTJ5D.js.map +0 -1
- package/dist/chunk-XJFLDA7A.js.map +0 -1
- package/dist/chunk-Z6FNBOTC.js.map +0 -1
- package/dist/chunk-ZYWZWG6G.js.map +0 -1
- package/dist/consent/index.cjs +0 -204
- package/dist/consent/index.cjs.map +0 -1
- package/dist/consent/index.d.cts +0 -25
- package/dist/crdt/index.cjs +0 -152
- package/dist/crdt/index.cjs.map +0 -1
- package/dist/crdt/index.d.cts +0 -30
- package/dist/crypto-HTZ4FJOP.js +0 -44
- package/dist/delegation-RI54P6I5.js +0 -17
- package/dist/derivations/index.cjs +0 -351
- package/dist/derivations/index.cjs.map +0 -1
- package/dist/derivations/index.d.cts +0 -72
- package/dist/dev-unlock-BIoEFbwm.d.cts +0 -263
- package/dist/executor-5PNY7LGW.js +0 -8
- package/dist/executor-B4QIYGZX.js +0 -8
- package/dist/executor-BWXXDQ7K.js +0 -11
- package/dist/fanout-sidecar-OKPMMPLG.js +0 -51
- package/dist/fanout-sidecar-OKPMMPLG.js.map +0 -1
- package/dist/guards/index.cjs +0 -322
- package/dist/guards/index.cjs.map +0 -1
- package/dist/guards/index.d.cts +0 -31
- package/dist/hash-HJqD14vS.d.ts +0 -63
- package/dist/history/index.cjs +0 -1222
- package/dist/history/index.cjs.map +0 -1
- package/dist/history/index.d.cts +0 -63
- package/dist/i18n/index.cjs +0 -1100
- package/dist/i18n/index.cjs.map +0 -1
- package/dist/i18n/index.d.cts +0 -39
- package/dist/index-4fBVt8j9.d.cts +0 -2387
- package/dist/index-D8I_pyJD.d.ts +0 -2387
- package/dist/index.cjs +0 -24487
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -776
- package/dist/indexing/index.cjs +0 -742
- package/dist/indexing/index.cjs.map +0 -1
- package/dist/indexing/index.d.cts +0 -36
- package/dist/issue-VGDPP4B5.js +0 -12
- package/dist/lazy-builder-7tIpFyWN.d.ts +0 -304
- package/dist/lazy-builder-wY4pMCEe.d.cts +0 -304
- package/dist/ledger-TMRZYNVJ.js +0 -33
- package/dist/materialized-views/index.cjs +0 -854
- package/dist/materialized-views/index.cjs.map +0 -1
- package/dist/materialized-views/index.d.cts +0 -186
- package/dist/mime-magic-CBBSOkjm.d.cts +0 -50
- package/dist/mime-magic-CBBSOkjm.d.ts +0 -50
- package/dist/noydb-G725ZSZG.js +0 -34
- package/dist/overlay-views/index.cjs +0 -359
- package/dist/overlay-views/index.cjs.map +0 -1
- package/dist/overlay-views/index.d.cts +0 -82
- package/dist/periods/index.cjs +0 -1041
- package/dist/periods/index.cjs.map +0 -1
- package/dist/periods/index.d.cts +0 -22
- package/dist/predicate-BSAGEyu5.d.cts +0 -209
- package/dist/predicate-BSAGEyu5.d.ts +0 -209
- package/dist/query/index.cjs +0 -2375
- package/dist/query/index.cjs.map +0 -1
- package/dist/query/index.d.cts +0 -3
- package/dist/read-only-facade-ITU6L7BL.js +0 -7
- package/dist/registry-3QP3YKQS.js +0 -8
- package/dist/registry-DKEXOJVO.js +0 -7
- package/dist/registry-OJIOSBV6.js +0 -10
- package/dist/registry-USRVT6YF.js +0 -8
- package/dist/revoke-JCC7N56X.js +0 -17
- package/dist/session/index.cjs +0 -495
- package/dist/session/index.cjs.map +0 -1
- package/dist/session/index.d.cts +0 -46
- package/dist/shadow/index.cjs +0 -133
- package/dist/shadow/index.cjs.map +0 -1
- package/dist/shadow/index.d.cts +0 -17
- package/dist/signer-72QAUSVW.js +0 -18
- package/dist/snapshots/index.cjs +0 -937
- package/dist/snapshots/index.cjs.map +0 -1
- package/dist/snapshots/index.d.cts +0 -28
- package/dist/store/index.cjs +0 -1083
- package/dist/store/index.cjs.map +0 -1
- package/dist/store/index.d.cts +0 -492
- package/dist/store/index.d.ts +0 -492
- package/dist/store/index.js +0 -37
- package/dist/strategy-BSxFXGzb.d.cts +0 -110
- package/dist/strategy-BSxFXGzb.d.ts +0 -110
- package/dist/strategy-DSTrsZ8t.d.cts +0 -601
- package/dist/strategy-DSTrsZ8t.d.ts +0 -601
- package/dist/sync/index.cjs +0 -1062
- package/dist/sync/index.cjs.map +0 -1
- package/dist/sync/index.d.cts +0 -43
- package/dist/team/index.cjs +0 -2798
- package/dist/team/index.cjs.map +0 -1
- package/dist/team/index.d.cts +0 -118
- package/dist/tx/index.cjs +0 -544
- package/dist/tx/index.cjs.map +0 -1
- package/dist/tx/index.d.cts +0 -21
- package/dist/types-Df28QFKb.d.ts +0 -12818
- package/dist/types-DyXYr8rE.d.cts +0 -12818
- package/dist/ulid-COREQ2RQ.js +0 -9
- package/dist/ulid-Drr7ykr6.d.cts +0 -603
- package/dist/util/index.cjs +0 -230
- package/dist/util/index.cjs.map +0 -1
- package/dist/util/index.d.cts +0 -77
- package/dist/with-derivation-DFnFByiQ.d.ts +0 -13
- package/dist/with-derivation-DU3Sjazm.d.cts +0 -13
- package/dist/with-guard-ByyxmEe7.d.cts +0 -18
- package/dist/with-guard-qube6BMI.d.ts +0 -18
- package/dist/with-materialized-view-BmEToIR1.d.cts +0 -27
- package/dist/with-overlayed-view-BMsQQbWm.d.cts +0 -13
- /package/dist/{chunk-UF3BUNQZ.js.map → api-TX2EX2FX.js.map} +0 -0
- /package/dist/{store → as}/index.js.map +0 -0
- /package/dist/{crypto-HTZ4FJOP.js.map → at/index.js.map} +0 -0
- /package/dist/{delegation-RI54P6I5.js.map → by/index.js.map} +0 -0
- /package/dist/{executor-5PNY7LGW.js.map → cargo/index.js.map} +0 -0
- /package/dist/{executor-B4QIYGZX.js.map → chunk-CHFZDSE4.js.map} +0 -0
- /package/dist/{executor-BWXXDQ7K.js.map → chunk-GHVIKOHT.js.map} +0 -0
- /package/dist/{issue-VGDPP4B5.js.map → chunk-PZ5AY32C.js.map} +0 -0
- /package/dist/{ledger-TMRZYNVJ.js.map → classified/index.js.map} +0 -0
- /package/dist/{noydb-G725ZSZG.js.map → collection-facade-LVD22JLM.js.map} +0 -0
- /package/dist/{public-envelope-BW6OXORV.js.map → computed-EXDMQODG.js.map} +0 -0
- /package/dist/{read-only-facade-ITU6L7BL.js.map → delegation-BJP73GAP.js.map} +0 -0
- /package/dist/{registry-3QP3YKQS.js.map → derive-BME7HDWO.js.map} +0 -0
- /package/dist/{registry-DKEXOJVO.js.map → enclave-NHORSWSF.js.map} +0 -0
- /package/dist/{registry-OJIOSBV6.js.map → executor-FE6X4LFX.js.map} +0 -0
- /package/dist/{registry-USRVT6YF.js.map → executor-KSHKRJXP.js.map} +0 -0
- /package/dist/{revoke-JCC7N56X.js.map → executor-ZHTJJICG.js.map} +0 -0
- /package/dist/{signer-72QAUSVW.js.map → export-accessible-DACHM5VT.js.map} +0 -0
- /package/dist/{stale-6ZDBTQT7.js.map → extract-partition-RNENZZ4T.js.map} +0 -0
- /package/dist/{ulid-COREQ2RQ.js.map → find-BNGBJNKP.js.map} +0 -0
package/dist/sync/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../
|
|
3
|
-
import '../
|
|
4
|
-
import '../strategy-DSTrsZ8t.js';
|
|
5
|
-
import '../strategy-BSxFXGzb.js';
|
|
6
|
-
import '../index-D8I_pyJD.js';
|
|
1
|
+
import { bW as SyncStrategy } from '../index-DjWbxsjb.js';
|
|
2
|
+
import '../subject-index-CyOgGMJL.js';
|
|
3
|
+
import '../index-B9QdHytu.js';
|
|
7
4
|
import '@noy-db/attestation';
|
|
8
5
|
|
|
9
6
|
/**
|
package/dist/sync/index.js
CHANGED
|
@@ -2,13 +2,20 @@ import {
|
|
|
2
2
|
PresenceHandle,
|
|
3
3
|
SyncEngine,
|
|
4
4
|
SyncTransaction
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-TAKWLZZX.js";
|
|
6
|
+
import "../chunk-VQNJ7UZL.js";
|
|
7
|
+
import "../chunk-MCHVVJIA.js";
|
|
8
|
+
import "../chunk-QA2KUPCP.js";
|
|
9
|
+
import "../chunk-2OV5NVE7.js";
|
|
10
|
+
import "../chunk-VEPTFUJY.js";
|
|
11
|
+
import "../chunk-HYR4WZZ3.js";
|
|
12
|
+
import "../chunk-LP7BEXCT.js";
|
|
13
|
+
import "../chunk-3OPY6MK2.js";
|
|
14
|
+
import "../chunk-YN5IAHN6.js";
|
|
15
|
+
import "../chunk-S7VFUQM2.js";
|
|
16
|
+
import "../chunk-PZ5AY32C.js";
|
|
10
17
|
|
|
11
|
-
// src/team/sync-active.ts
|
|
18
|
+
// src/with-party/team/sync-active.ts
|
|
12
19
|
function withSync() {
|
|
13
20
|
return {
|
|
14
21
|
buildSyncEngine(opts) {
|
package/dist/sync/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/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 '
|
|
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.d.ts
CHANGED
|
@@ -1,12 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import '../
|
|
4
|
-
import '../
|
|
5
|
-
import '../strategy-DSTrsZ8t.js';
|
|
6
|
-
import '../strategy-BSxFXGzb.js';
|
|
7
|
-
import '../index-D8I_pyJD.js';
|
|
1
|
+
import { jA as TeamStrategy, c_ as NoydbStore, c8 as UnlockedKeyring } from '../index-DjWbxsjb.js';
|
|
2
|
+
export { e8 as BundleRecipient, fO as EnrollAuthenticatorOptions, fP as EnrollAuthenticatorWrappingDEKsOptions, fQ as EnrollAuthenticatorWrappingKEKOptions, gQ as ListUsersOptions, hm as NO_TEAM, hF as PaperRecoveryEntry, hR as PresenceHandle, ik as RecoverPassphraseInput, il as RecoverPassphraseResult, im as RecoverUserOptions, iq as RecoveryProof, iD as RotatePassphraseInput, j9 as SlotRewrapCeremony, ja as SlotRewrapContext, jj as SyncEngine, jr as SyncTransaction, jz as TeamNotEnabledError, jO as UpdateAuthenticatorOptions, k7 as WrappedDeksBlob, ki as buildRecipientKeyringFile, kj as burnPaperRecoveryEntry, lD as changeSecret, lE as createOwnerKeyring, kp as deriveMagicLinkContentKey, ku as enrollAuthenticator, lF as ensureCollectionDEK, kz as evaluateExportCapability, kB as evaluateImportCapability, kE as findAuthenticator, lG as grant, kF as hasExportCapability, kG as hasImportCapability, kJ as isMagicLinkGrantExpired, kT as listMagicLinkGrants, kU as listUsers, kV as listUsersWithEnvelopes, lH as loadKeyring, kY as loadPaperRecoveryEntries, l0 as magicLinkGrantRecordId, l1 as mintPaperRecoveryEntry, l3 as mintWrappedDeksBlob, lI as persistKeyring, l8 as readMagicLinkGrantRecord, kQ as recoverPassphrase, la as recoverUser, le as removeAuthenticator, lJ as revoke, lk as revokeMagicLinkGrant, kR as rotatePassphrase, lm as savePaperRecoveryEntries, lq as unwrapDeksFromBlob, lr as unwrapDeksFromPaperEntry, lt as unwrapMagicLinkGrant, lK as updateAuthenticator, lL as updateKeyringIdentity, lC as writeMagicLinkGrant } from '../index-DjWbxsjb.js';
|
|
3
|
+
import '../subject-index-CyOgGMJL.js';
|
|
4
|
+
import '../index-B9QdHytu.js';
|
|
8
5
|
import '@noy-db/attestation';
|
|
9
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Enable the multi-user team capability (#267 Track A tail).
|
|
9
|
+
*
|
|
10
|
+
* Pass to `createNoydb({ teamStrategy: withTeam() })` to make `db.grant` /
|
|
11
|
+
* `db.revoke` / `db.rotate` live. The keyring grant/revoke/rotate engines
|
|
12
|
+
* are statically imported HERE — this module is reachable only through the
|
|
13
|
+
* `@noy-db/hub/team` subpath (and the root barrel's tree-shakeable
|
|
14
|
+
* re-export), so a single-user floor bundle never carries them. The facade
|
|
15
|
+
* (`TeamFacade.runGrant` / `runRevoke` / `runRotate`) owns the policy-gate +
|
|
16
|
+
* keyring plumbing and receives the engine as an argument.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
declare function withTeam(): TeamStrategy;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Secret-bearing reserved collections — the `_`-prefixed reserved collections
|
|
23
|
+
* whose record CONTENTS are directly-usable secrets (transport OAuth tokens,
|
|
24
|
+
* connection strings, API keys), as opposed to the *operational* reserved
|
|
25
|
+
* collections (`_ledger`, `_history`, `_sync`, …) whose contents are metadata
|
|
26
|
+
* (collection names, record ids, ciphertext hashes).
|
|
27
|
+
*
|
|
28
|
+
* This distinction matters at two trust-boundary seams:
|
|
29
|
+
*
|
|
30
|
+
* 1. `vault.collection()` — a secret-bearing reserved name must never be
|
|
31
|
+
* reachable through the generic public collection handle. It is served
|
|
32
|
+
* ONLY by its dedicated, role-gated API (e.g. `_sync_credentials` →
|
|
33
|
+
* `getCredential`/`putCredential`, which enforce owner/admin access).
|
|
34
|
+
*
|
|
35
|
+
* 2. `grant()` DEK propagation — a sub-admin grantee (operator, viewer,
|
|
36
|
+
* client, custodian) must NOT receive a secret-bearing collection's DEK.
|
|
37
|
+
* Operational reserved DEKs still propagate to every role (grantees must
|
|
38
|
+
* write ledger/history entries on every mutation), but handing a
|
|
39
|
+
* sub-admin the `_sync_credentials` DEK would let them decrypt the firm's
|
|
40
|
+
* transport secrets — a plaintext leak, not a metadata leak.
|
|
41
|
+
*
|
|
42
|
+
* Kept dependency-free so both the kernel (`vault.ts`) and the team layer
|
|
43
|
+
* (`keyring.ts`) can import it without an import cycle.
|
|
44
|
+
*/
|
|
45
|
+
/** Reserved collection holding per-adapter sync transport secrets. */
|
|
46
|
+
declare const SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
|
|
47
|
+
|
|
10
48
|
/**
|
|
11
49
|
* _sync_credentials reserved collection —
|
|
12
50
|
*
|
|
@@ -46,8 +84,6 @@ import '@noy-db/attestation';
|
|
|
46
84
|
* against the caller's keyring role at call time.
|
|
47
85
|
*/
|
|
48
86
|
|
|
49
|
-
/** The reserved collection name. Never collides with user collections. */
|
|
50
|
-
declare const SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
|
|
51
87
|
/**
|
|
52
88
|
* An OAuth/auth token stored in `_sync_credentials`.
|
|
53
89
|
*
|
|
@@ -115,4 +151,4 @@ declare function credentialStatus(adapter: NoydbStore, vault: string, keyring: U
|
|
|
115
151
|
expired: boolean;
|
|
116
152
|
}>;
|
|
117
153
|
|
|
118
|
-
export { SYNC_CREDENTIALS_COLLECTION, type SyncCredential, UnlockedKeyring, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential };
|
|
154
|
+
export { SYNC_CREDENTIALS_COLLECTION, type SyncCredential, TeamStrategy, UnlockedKeyring, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential, withTeam };
|
package/dist/team/index.js
CHANGED
|
@@ -1,42 +1,47 @@
|
|
|
1
1
|
import {
|
|
2
|
-
SYNC_CREDENTIALS_COLLECTION,
|
|
3
2
|
credentialStatus,
|
|
4
3
|
deleteCredential,
|
|
5
4
|
getCredential,
|
|
6
5
|
listCredentials,
|
|
7
|
-
putCredential
|
|
8
|
-
|
|
6
|
+
putCredential,
|
|
7
|
+
withTeam
|
|
8
|
+
} from "../chunk-4OMCIY6F.js";
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
NO_TEAM,
|
|
11
11
|
deriveMagicLinkContentKey,
|
|
12
12
|
enrollAuthenticator,
|
|
13
13
|
findAuthenticator,
|
|
14
14
|
isMagicLinkGrantExpired,
|
|
15
15
|
listMagicLinkGrants,
|
|
16
|
-
loadPaperRecoveryEntries,
|
|
17
16
|
magicLinkGrantRecordId,
|
|
18
|
-
mintPaperRecoveryEntry,
|
|
19
|
-
mintWrappedDeksBlob,
|
|
20
17
|
readMagicLinkGrantRecord,
|
|
21
18
|
recoverPassphrase,
|
|
22
19
|
recoverUser,
|
|
23
20
|
removeAuthenticator,
|
|
24
21
|
revokeMagicLinkGrant,
|
|
25
22
|
rotatePassphrase,
|
|
26
|
-
savePaperRecoveryEntries,
|
|
27
|
-
unwrapDeksFromBlob,
|
|
28
|
-
unwrapDeksFromPaperEntry,
|
|
29
23
|
unwrapMagicLinkGrant,
|
|
30
24
|
updateAuthenticator,
|
|
31
25
|
writeMagicLinkGrant
|
|
32
|
-
} from "../chunk-
|
|
33
|
-
import
|
|
26
|
+
} from "../chunk-KJ2BCBTL.js";
|
|
27
|
+
import {
|
|
28
|
+
burnPaperRecoveryEntry,
|
|
29
|
+
loadPaperRecoveryEntries,
|
|
30
|
+
mintPaperRecoveryEntry,
|
|
31
|
+
mintWrappedDeksBlob,
|
|
32
|
+
savePaperRecoveryEntries,
|
|
33
|
+
unwrapDeksFromBlob,
|
|
34
|
+
unwrapDeksFromPaperEntry
|
|
35
|
+
} from "../chunk-P33LUIML.js";
|
|
34
36
|
import {
|
|
35
37
|
PresenceHandle,
|
|
36
38
|
SyncEngine,
|
|
37
39
|
SyncTransaction
|
|
38
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-TAKWLZZX.js";
|
|
41
|
+
import "../chunk-VQNJ7UZL.js";
|
|
42
|
+
import "../chunk-7BWJHO2A.js";
|
|
39
43
|
import {
|
|
44
|
+
SYNC_CREDENTIALS_COLLECTION,
|
|
40
45
|
buildRecipientKeyringFile,
|
|
41
46
|
changeSecret,
|
|
42
47
|
createOwnerKeyring,
|
|
@@ -52,16 +57,27 @@ import {
|
|
|
52
57
|
persistKeyring,
|
|
53
58
|
revoke,
|
|
54
59
|
updateKeyringIdentity
|
|
55
|
-
} from "../chunk-
|
|
56
|
-
import "../chunk-
|
|
57
|
-
import "../chunk-
|
|
58
|
-
import "../chunk-
|
|
59
|
-
import "../chunk-
|
|
60
|
+
} from "../chunk-J4LPNIGK.js";
|
|
61
|
+
import "../chunk-OVYRLHPE.js";
|
|
62
|
+
import "../chunk-MCHVVJIA.js";
|
|
63
|
+
import "../chunk-QA2KUPCP.js";
|
|
64
|
+
import "../chunk-2OV5NVE7.js";
|
|
65
|
+
import "../chunk-VEPTFUJY.js";
|
|
66
|
+
import "../chunk-HYR4WZZ3.js";
|
|
67
|
+
import "../chunk-LP7BEXCT.js";
|
|
68
|
+
import "../chunk-3OPY6MK2.js";
|
|
69
|
+
import "../chunk-YN5IAHN6.js";
|
|
70
|
+
import {
|
|
71
|
+
TeamNotEnabledError
|
|
72
|
+
} from "../chunk-S7VFUQM2.js";
|
|
73
|
+
import "../chunk-PZ5AY32C.js";
|
|
60
74
|
export {
|
|
75
|
+
NO_TEAM,
|
|
61
76
|
PresenceHandle,
|
|
62
77
|
SYNC_CREDENTIALS_COLLECTION,
|
|
63
78
|
SyncEngine,
|
|
64
79
|
SyncTransaction,
|
|
80
|
+
TeamNotEnabledError,
|
|
65
81
|
buildRecipientKeyringFile,
|
|
66
82
|
burnPaperRecoveryEntry,
|
|
67
83
|
changeSecret,
|
|
@@ -103,6 +119,7 @@ export {
|
|
|
103
119
|
unwrapMagicLinkGrant,
|
|
104
120
|
updateAuthenticator,
|
|
105
121
|
updateKeyringIdentity,
|
|
122
|
+
withTeam,
|
|
106
123
|
writeMagicLinkGrant
|
|
107
124
|
};
|
|
108
125
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { lS as NO_TIERS, lT as TiersContext, jE as TiersNotEnabledError, lU as TiersStrategy, lV as assertDeclaredTier, lW as assertTiersEnabled, lX as classifySealedShred, lY as demote, lZ as elevate, l_ as getAtTier, l$ as listAtTier, m0 as putAtTier, m1 as withTiers } from '../index-DjWbxsjb.js';
|
|
2
|
+
import '../subject-index-CyOgGMJL.js';
|
|
3
|
+
import '../index-B9QdHytu.js';
|
|
4
|
+
import '@noy-db/attestation';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NO_TIERS,
|
|
3
|
+
assertDeclaredTier,
|
|
4
|
+
assertTiersEnabled,
|
|
5
|
+
classifySealedShred,
|
|
6
|
+
demote,
|
|
7
|
+
elevate,
|
|
8
|
+
getAtTier,
|
|
9
|
+
listAtTier,
|
|
10
|
+
putAtTier,
|
|
11
|
+
withTiers
|
|
12
|
+
} from "../chunk-7P2SDJG3.js";
|
|
13
|
+
import "../chunk-7BWJHO2A.js";
|
|
14
|
+
import "../chunk-MCHVVJIA.js";
|
|
15
|
+
import "../chunk-QA2KUPCP.js";
|
|
16
|
+
import "../chunk-2OV5NVE7.js";
|
|
17
|
+
import "../chunk-VEPTFUJY.js";
|
|
18
|
+
import "../chunk-HYR4WZZ3.js";
|
|
19
|
+
import "../chunk-LP7BEXCT.js";
|
|
20
|
+
import "../chunk-3OPY6MK2.js";
|
|
21
|
+
import "../chunk-YN5IAHN6.js";
|
|
22
|
+
import {
|
|
23
|
+
TiersNotEnabledError
|
|
24
|
+
} from "../chunk-S7VFUQM2.js";
|
|
25
|
+
import "../chunk-PZ5AY32C.js";
|
|
26
|
+
export {
|
|
27
|
+
NO_TIERS,
|
|
28
|
+
TiersNotEnabledError,
|
|
29
|
+
assertDeclaredTier,
|
|
30
|
+
assertTiersEnabled,
|
|
31
|
+
classifySealedShred,
|
|
32
|
+
demote,
|
|
33
|
+
elevate,
|
|
34
|
+
getAtTier,
|
|
35
|
+
listAtTier,
|
|
36
|
+
putAtTier,
|
|
37
|
+
withTiers
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { dx as BundleVersionConflictError, fc as ConflictError, d0 as EncryptedEnvelope, gP as ListPageResult, hn as NetworkError, ht as NoydbBundleStore, bq as NoydbPodStore, c_ as NoydbStore, dB as PodVersionConflictError, jg as StoreCapabilities, jh as StoreCapabilityError, ji as StoreTime, jI as TxOp, jZ as VaultSnapshot } from '../index-DjWbxsjb.js';
|
|
2
|
+
import '../subject-index-CyOgGMJL.js';
|
|
3
|
+
import '../index-B9QdHytu.js';
|
|
4
|
+
import '@noy-db/attestation';
|
package/dist/to/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BundleVersionConflictError,
|
|
3
|
+
ConflictError,
|
|
4
|
+
NetworkError,
|
|
5
|
+
PodVersionConflictError,
|
|
6
|
+
StoreCapabilityError
|
|
7
|
+
} from "../chunk-S7VFUQM2.js";
|
|
8
|
+
import "../chunk-PZ5AY32C.js";
|
|
9
|
+
export {
|
|
10
|
+
BundleVersionConflictError,
|
|
11
|
+
ConflictError,
|
|
12
|
+
NetworkError,
|
|
13
|
+
PodVersionConflictError,
|
|
14
|
+
StoreCapabilityError
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { bc as GuardStrategy, bi as GuardStrategyHandle, bd as GuardChange, be as GuardContext } from './index-DjWbxsjb.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Register a guard for a collection. Guards run on every `put()` /
|
|
5
|
+
* `delete()` for the named collection (after permissions, before
|
|
6
|
+
* encryption) and may:
|
|
7
|
+
*
|
|
8
|
+
* - `check` — block writes by throwing (typically `RecordLockedError`)
|
|
9
|
+
* - `frozenFields` — freeze specific fields once a condition is true
|
|
10
|
+
* - `amendment` — declare an authorized-override path with invariant
|
|
11
|
+
*
|
|
12
|
+
* Pass the returned handle to `createNoydb({ strategies: [...] })`.
|
|
13
|
+
*
|
|
14
|
+
* @see docs/superpowers/specs/2026-05-18-guards-design.md
|
|
15
|
+
*/
|
|
16
|
+
declare function withGuard<T extends Record<string, unknown>>(strategy: GuardStrategy<T>): GuardStrategyHandle<T>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* `immutableGuard` — declarative WORM / append-only sugar over the guard
|
|
20
|
+
* service.
|
|
21
|
+
*
|
|
22
|
+
* Issued fiscal documents (invoices, DDTs) must be immutable after issue.
|
|
23
|
+
* That is expressible today with a hand-rolled `withGuard` (block on
|
|
24
|
+
* `check`/`onDelete`, allow an admin `amendment`), but the boilerplate is
|
|
25
|
+
* repetitive and easy to get subtly wrong. `immutableGuard` generates
|
|
26
|
+
* exactly that guard from a declarative config, reusing the guard
|
|
27
|
+
* machinery wholesale — `check`/`onDelete` rejection, the ledgered
|
|
28
|
+
* `amendment` override, and composition with `periods`/`history`.
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* createNoydb({ guardStrategies: [
|
|
32
|
+
* immutableGuard({
|
|
33
|
+
* collection: 'invoices',
|
|
34
|
+
* after: (r) => r.status === 'issued', // immutable once issued
|
|
35
|
+
* }),
|
|
36
|
+
* ] })
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* A record is mutable until `after(record)` holds; from then on, updates
|
|
40
|
+
* and deletes throw `RecordLockedError` unless performed inside an
|
|
41
|
+
* `amendment` transaction by an authorized role (the override is
|
|
42
|
+
* ledgered by the guard amendment mechanism). `appendOnly: true` is
|
|
43
|
+
* shorthand for `after: () => true` — immutable from creation.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
interface ImmutableGuardConfig<T extends Record<string, unknown>> {
|
|
47
|
+
/** The collection to make WORM. */
|
|
48
|
+
collection: string;
|
|
49
|
+
/**
|
|
50
|
+
* A record becomes immutable once this predicate holds. Evaluated on
|
|
51
|
+
* the *existing* (already-persisted) record, so the write that first
|
|
52
|
+
* makes it true is still allowed; subsequent writes are blocked.
|
|
53
|
+
* Mutually exclusive with `appendOnly`.
|
|
54
|
+
*/
|
|
55
|
+
after?: (record: T) => boolean;
|
|
56
|
+
/** Shorthand for `after: () => true` — immutable from creation. */
|
|
57
|
+
appendOnly?: boolean;
|
|
58
|
+
/** Roles permitted to override via an amendment transaction. Default `['admin', 'owner']`. */
|
|
59
|
+
amendmentRoles?: ReadonlyArray<'admin' | 'owner'>;
|
|
60
|
+
/**
|
|
61
|
+
* Optional set-level invariant run over the amendment change-set after
|
|
62
|
+
* the writes execute. Signature matches `GuardStrategy.amendment.invariant`
|
|
63
|
+
* exactly: it receives every {before, after} pair touching this
|
|
64
|
+
* collection in the amendment plus the guard context; throwing reverts
|
|
65
|
+
* the whole amendment and surfaces as `InvariantError`.
|
|
66
|
+
*
|
|
67
|
+
* Use this to keep a constraint inviolable EVEN under amendment — e.g.
|
|
68
|
+
* forbid deleting an issued document by re-throwing on any
|
|
69
|
+
* `before !== null && after === null` change, or assert a cross-record
|
|
70
|
+
* sum is preserved. When omitted the amendment is unconditionally
|
|
71
|
+
* allowed (the amendment itself is the sanctioned, ledgered override) —
|
|
72
|
+
* this is the backward-compatible default.
|
|
73
|
+
*/
|
|
74
|
+
amendmentInvariant?: (changes: ReadonlyArray<GuardChange<T>>, ctx: GuardContext<T>) => Promise<void> | void;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Build an immutability guard. Pass the returned handle to
|
|
78
|
+
* `createNoydb({ guardStrategies: [...] })`.
|
|
79
|
+
*/
|
|
80
|
+
declare function immutableGuard<T extends Record<string, unknown>>(config: ImmutableGuardConfig<T>): GuardStrategyHandle<T>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* `transitionGuard` — declarative state-machine sugar over the guard
|
|
84
|
+
* service.
|
|
85
|
+
*
|
|
86
|
+
* Any record with a lifecycle field (invoice `status`, order state,
|
|
87
|
+
* ticket workflow, subscription phase) needs transition validation: a
|
|
88
|
+
* write may only move the field along a declared arc. That is expressible
|
|
89
|
+
* with a hand-rolled `withGuard({ check })`, but every consumer
|
|
90
|
+
* re-implements the same graph lookup + error. `transitionGuard`
|
|
91
|
+
* generates exactly that guard from a state graph, reusing the guard
|
|
92
|
+
* machinery wholesale — `check` rejection, the ledgered `amendment`
|
|
93
|
+
* override, and composition with `periods`/`history`.
|
|
94
|
+
*
|
|
95
|
+
* It generalizes {@link immutableGuard}: WORM is the special case "every
|
|
96
|
+
* state has no outgoing arcs", i.e. `transitions` mapping each state to `[]`.
|
|
97
|
+
*
|
|
98
|
+
* ```ts
|
|
99
|
+
* createNoydb({ guardStrategies: [
|
|
100
|
+
* transitionGuard<Sale>({
|
|
101
|
+
* collection: 'sales', field: 'status',
|
|
102
|
+
* transitions: { // absence of an arc = forbidden
|
|
103
|
+
* draft: ['to_verify', 'cancelled'],
|
|
104
|
+
* to_verify: ['proforma', 'draft', 'cancelled'],
|
|
105
|
+
* proforma: ['invoiced', 'cancelled'],
|
|
106
|
+
* invoiced: ['paid'], paid: [], cancelled: [],
|
|
107
|
+
* },
|
|
108
|
+
* initial: ['draft', 'to_verify'], // allowed status on insert
|
|
109
|
+
* }),
|
|
110
|
+
* ] })
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* Semantics:
|
|
114
|
+
* - **Insert** (`ctx.existing === null`): `incoming[field]` must be in
|
|
115
|
+
* `initial`. When `initial` is omitted, any value is allowed on insert.
|
|
116
|
+
* - **Update**: the arc `(existing[field] → incoming[field])` must be
|
|
117
|
+
* listed in `transitions[from]`, else `IllegalTransitionError`. A
|
|
118
|
+
* same-value write (`from === to`) is allowed when `allowIdempotent`
|
|
119
|
+
* (default `true`) — so writes that touch other fields without moving
|
|
120
|
+
* state pass.
|
|
121
|
+
* - **Override**: inside an `amendment` transaction by an authorized role
|
|
122
|
+
* the check is skipped and the change is ledgered (mirrors every guard).
|
|
123
|
+
*
|
|
124
|
+
* The status graph is caller-supplied data — no UI, no domain logic.
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
interface TransitionGuardConfig<T extends Record<string, unknown>> {
|
|
128
|
+
/** The collection whose state field is governed. */
|
|
129
|
+
collection: string;
|
|
130
|
+
/** The state field on the record (e.g. `'status'`). */
|
|
131
|
+
field: keyof T & string;
|
|
132
|
+
/**
|
|
133
|
+
* The transition graph: each state maps to the states it may move to.
|
|
134
|
+
* A state absent from the map (or mapped to `[]`) is terminal — no
|
|
135
|
+
* outgoing arc, so any non-idempotent write from it is rejected.
|
|
136
|
+
*/
|
|
137
|
+
transitions: Readonly<Record<string, readonly string[]>>;
|
|
138
|
+
/**
|
|
139
|
+
* States allowed as the initial value on insert (`existing === null`).
|
|
140
|
+
* Omit to allow any value on insert.
|
|
141
|
+
*/
|
|
142
|
+
initial?: readonly string[];
|
|
143
|
+
/**
|
|
144
|
+
* Allow a same-value write (`from === to`) on update. Default `true` —
|
|
145
|
+
* lets a put that changes other fields, but not the state, through.
|
|
146
|
+
*/
|
|
147
|
+
allowIdempotent?: boolean;
|
|
148
|
+
/** Roles permitted to override via an amendment transaction. Default `['admin', 'owner']`. */
|
|
149
|
+
amendmentRoles?: ReadonlyArray<'admin' | 'owner'>;
|
|
150
|
+
/**
|
|
151
|
+
* Optional set-level invariant run over the amendment change-set after
|
|
152
|
+
* the writes execute. Signature matches `GuardStrategy.amendment.invariant`
|
|
153
|
+
* exactly. When omitted the amendment is unconditionally allowed (the
|
|
154
|
+
* amendment itself is the sanctioned, ledgered override) — the
|
|
155
|
+
* backward-compatible default. Mirrors {@link immutableGuard}.
|
|
156
|
+
*/
|
|
157
|
+
amendmentInvariant?: (changes: ReadonlyArray<GuardChange<T>>, ctx: GuardContext<T>) => Promise<void> | void;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Build a state-machine transition guard. Pass the returned handle to
|
|
161
|
+
* `createNoydb({ guardStrategies: [...] })`.
|
|
162
|
+
*/
|
|
163
|
+
declare function transitionGuard<T extends Record<string, unknown>>(config: TransitionGuardConfig<T>): GuardStrategyHandle<T>;
|
|
164
|
+
|
|
165
|
+
export { type ImmutableGuardConfig as I, type TransitionGuardConfig as T, immutableGuard as i, transitionGuard as t, withGuard as w };
|
package/dist/tx/index.d.ts
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import '../
|
|
4
|
-
import '../
|
|
5
|
-
import '../strategy-DSTrsZ8t.js';
|
|
6
|
-
import '../strategy-BSxFXGzb.js';
|
|
7
|
-
import '../index-D8I_pyJD.js';
|
|
1
|
+
import { jF as TransactionInvariant, lN as TxStrategy } from '../index-DjWbxsjb.js';
|
|
2
|
+
export { lO as AmendmentTxOptions, jH as TxCollection, eb as TxContext, jJ as TxVault, ll as runTransaction } from '../index-DjWbxsjb.js';
|
|
3
|
+
import '../subject-index-CyOgGMJL.js';
|
|
4
|
+
import '../index-B9QdHytu.js';
|
|
8
5
|
import '@noy-db/attestation';
|
|
9
6
|
|
|
10
7
|
/**
|
|
11
8
|
* Active transactions strategy. Only reachable via `@noy-db/hub/tx`.
|
|
12
9
|
*/
|
|
13
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Options for {@link withTransactions}. Currently only commit-time
|
|
13
|
+
* changeset `invariants` (see {@link TransactionInvariant}).
|
|
14
|
+
*/
|
|
15
|
+
interface TransactionStrategyOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Commit-time set-level invariants run over the changeset on every
|
|
18
|
+
* commit (ordinary AND amendment). See {@link TransactionInvariant}.
|
|
19
|
+
*/
|
|
20
|
+
invariants?: ReadonlyArray<TransactionInvariant>;
|
|
21
|
+
}
|
|
14
22
|
/**
|
|
15
23
|
* Build the default transactions strategy. Pass into
|
|
16
24
|
* `createNoydb({ txStrategy: withTransactions() })` to enable
|
|
17
25
|
* `db.transaction(fn)` (and `db.transaction({ dryRun: true }, fn)`).
|
|
26
|
+
*
|
|
27
|
+
* Supply `{ invariants }` to register commit-time changeset invariants —
|
|
28
|
+
* set-level constraints that fire after the writes commit and revert the
|
|
29
|
+
* transaction on a throw. Unlike `amendment.invariant`, these run for
|
|
30
|
+
* ordinary `db.transaction(fn)` calls (and amendments) with no role gate.
|
|
18
31
|
*/
|
|
19
|
-
declare function withTransactions(): TxStrategy;
|
|
32
|
+
declare function withTransactions(opts?: TransactionStrategyOptions): TxStrategy;
|
|
20
33
|
|
|
21
|
-
export { TxStrategy, withTransactions };
|
|
34
|
+
export { TransactionInvariant, type TransactionStrategyOptions, TxStrategy, withTransactions };
|
package/dist/tx/index.js
CHANGED
|
@@ -3,11 +3,12 @@ import {
|
|
|
3
3
|
TxContext,
|
|
4
4
|
TxVault,
|
|
5
5
|
runTransaction
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-ICXIFFYZ.js";
|
|
7
|
+
import "../chunk-ZJADGNYF.js";
|
|
8
|
+
import "../chunk-S7VFUQM2.js";
|
|
9
|
+
import "../chunk-PZ5AY32C.js";
|
|
9
10
|
|
|
10
|
-
// src/tx/dry-run.ts
|
|
11
|
+
// src/with-commit/tx/dry-run.ts
|
|
11
12
|
var SEP = " ";
|
|
12
13
|
var keyOf = (op) => `${op.vaultName}${SEP}${op.collectionName}${SEP}${op.id}`;
|
|
13
14
|
async function runDryRun(db, fn) {
|
|
@@ -43,7 +44,7 @@ async function runDryRun(db, fn) {
|
|
|
43
44
|
const gctx = { existing: before, vault: facade, userId: v.userId, role: v.role };
|
|
44
45
|
try {
|
|
45
46
|
await registry.runChecks(op.collectionName, after, gctx);
|
|
46
|
-
const { GuardExecutor } = await import("../executor-
|
|
47
|
+
const { GuardExecutor } = await import("../executor-ZHTJJICG.js");
|
|
47
48
|
for (const g of guards) {
|
|
48
49
|
await GuardExecutor.checkFrozenFields(g, op.id, before, after);
|
|
49
50
|
}
|
|
@@ -59,9 +60,13 @@ async function runDryRun(db, fn) {
|
|
|
59
60
|
return { affected, guardViolations };
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
// src/tx/active.ts
|
|
63
|
-
function withTransactions() {
|
|
64
|
-
|
|
63
|
+
// src/with-commit/tx/active.ts
|
|
64
|
+
function withTransactions(opts) {
|
|
65
|
+
const invariants = opts?.invariants ?? [];
|
|
66
|
+
return {
|
|
67
|
+
runTransaction: (db, fn, options) => runTransaction(db, fn, options, invariants),
|
|
68
|
+
runDryRun
|
|
69
|
+
};
|
|
65
70
|
}
|
|
66
71
|
export {
|
|
67
72
|
TxCollection,
|
package/dist/tx/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/tx/dry-run.ts","../../src/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.
|
|
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'\nimport type { GuardExecutor as GuardExecutorType } from '../../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 import('../../with-audit/guards/executor.js')) as { GuardExecutor: typeof GuardExecutorType }\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/tx`.\n */\n\nimport { runTransaction } from './transaction.js'\nimport { runDryRun } from './dry-run.js'\nimport type { TxStrategy } 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 TransactionStrategyOptions {\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({ txStrategy: 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?: TransactionStrategyOptions): TxStrategy {\n const invariants = opts?.invariants ?? []\n return {\n runTransaction: (db, fn, options) => runTransaction(db, fn, options, invariants),\n runDryRun,\n }\n}\n"],"mappings":";;;;;;;;;;;AAiCA,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,IAAK,MAAM,OAAO,yBAAqC;AAC7E,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;;;AClEO,SAAS,iBAAiB,MAA+C;AAC9E,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":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { et as CollectionDescription, f5 as CollectionMeta, fB as DescribeOptions, fC as DescribedField, g3 as FieldMeta, iY as SemanticType } from '../index-DjWbxsjb.js';
|
|
2
|
+
import '../subject-index-CyOgGMJL.js';
|
|
3
|
+
import '../index-B9QdHytu.js';
|
|
4
|
+
import '@noy-db/attestation';
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|