@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
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SyncScheduler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VQNJ7UZL.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
isDeleteMarker,
|
|
6
|
+
isTombstoneShape
|
|
7
|
+
} from "./chunk-QA2KUPCP.js";
|
|
7
8
|
import {
|
|
8
9
|
bufferToBase64,
|
|
9
10
|
decrypt,
|
|
10
11
|
derivePresenceKey,
|
|
11
12
|
encrypt,
|
|
12
13
|
generateIV
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3OPY6MK2.js";
|
|
15
|
+
import {
|
|
16
|
+
NOYDB_SYNC_VERSION
|
|
17
|
+
} from "./chunk-YN5IAHN6.js";
|
|
14
18
|
import {
|
|
15
19
|
ConflictError
|
|
16
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-S7VFUQM2.js";
|
|
17
21
|
|
|
18
|
-
// src/team/presence.ts
|
|
22
|
+
// src/with-party/team/presence.ts
|
|
19
23
|
var PresenceHandle = class {
|
|
20
24
|
adapter;
|
|
21
25
|
syncAdapter;
|
|
@@ -222,7 +226,7 @@ var PresenceHandle = class {
|
|
|
222
226
|
}
|
|
223
227
|
};
|
|
224
228
|
|
|
225
|
-
// src/team/sync.ts
|
|
229
|
+
// src/with-party/team/sync.ts
|
|
226
230
|
var SyncEngine = class {
|
|
227
231
|
local;
|
|
228
232
|
remote;
|
|
@@ -241,6 +245,38 @@ var SyncEngine = class {
|
|
|
241
245
|
scheduler;
|
|
242
246
|
/** Per-collection conflict resolvers registered by Collection instances. */
|
|
243
247
|
conflictResolvers = /* @__PURE__ */ new Map();
|
|
248
|
+
/**
|
|
249
|
+
* Expands a collection-name filter to include its satellite pair partner(s)
|
|
250
|
+
* (spec #591 convergence rule 5b) — wired from vault satellite declaration
|
|
251
|
+
* via `setPairExpander`. `undefined` when no satellite has ever been
|
|
252
|
+
* declared for this vault: identity behavior, zero change for non-satellite
|
|
253
|
+
* users.
|
|
254
|
+
*/
|
|
255
|
+
pairExpander;
|
|
256
|
+
/** #598: refreshes Collection in-memory views after a sync-applied local write. Wired by the
|
|
257
|
+
* vault at open. `action` (#640): `'delete'` for a pulled tombstone/delete-marker, `'put'`
|
|
258
|
+
* otherwise — classified at `applyRemote`, the one choke point that holds the envelope. */
|
|
259
|
+
cacheInvalidator;
|
|
260
|
+
/** Wire the Collection-cache invalidation hook (#598). Same injection pattern as `setPairExpander`. */
|
|
261
|
+
setCacheInvalidator(fn) {
|
|
262
|
+
this.cacheInvalidator = fn;
|
|
263
|
+
}
|
|
264
|
+
/** #638 Task 4: opens/flushes the vault's graph-dispatch touch batch around a whole `pull()`/
|
|
265
|
+
* `push()` call, so N `applyRemote`d records feeding the same derivation/rollup/MV target
|
|
266
|
+
* recompute once. Wired by the vault at open, mirroring `cacheInvalidator`. */
|
|
267
|
+
graphBatchController;
|
|
268
|
+
/** Wire the graph-dispatch batch controller (#638 Task 4). Same injection pattern as `setCacheInvalidator`. */
|
|
269
|
+
setGraphBatchController(controller) {
|
|
270
|
+
this.graphBatchController = controller;
|
|
271
|
+
}
|
|
272
|
+
/** #650 Task 4 (#647): declared reserved-lookup collections `pull()` enumerates explicitly (the
|
|
273
|
+
* store's `list()` does not skip `_`-prefixed names, unlike `loadAll()`). Wired by the vault at
|
|
274
|
+
* open, same injection pattern as `setCacheInvalidator`/`setGraphBatchController`. */
|
|
275
|
+
reservedLookup;
|
|
276
|
+
/** Wire the reserved-lookup source (#650 Task 4). */
|
|
277
|
+
setReservedLookupSource(source) {
|
|
278
|
+
this.reservedLookup = source;
|
|
279
|
+
}
|
|
244
280
|
constructor(opts) {
|
|
245
281
|
this.local = opts.local;
|
|
246
282
|
this.remote = opts.remote;
|
|
@@ -273,9 +309,39 @@ var SyncEngine = class {
|
|
|
273
309
|
/**
|
|
274
310
|
* Register a per-collection conflict resolver.
|
|
275
311
|
* Called by Collection when `conflictPolicy` is set.
|
|
312
|
+
*
|
|
313
|
+
* Pair-coupled (#591 rule 5b): registering for one satellite-pair member
|
|
314
|
+
* registers the same resolver for both — the pair converges under one
|
|
315
|
+
* resolution policy. Expands with whatever the pair-expander knows *at this
|
|
316
|
+
* call*; resolvers registered before their pair existed are covered by
|
|
317
|
+
* `remirrorPairResolvers` at pair-registration time.
|
|
276
318
|
*/
|
|
277
319
|
registerConflictResolver(collection, resolver) {
|
|
278
|
-
this.conflictResolvers.set(
|
|
320
|
+
for (const n of this.pairExpander?.([collection]) ?? [collection]) this.conflictResolvers.set(n, resolver);
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Wire a satellite pair-expansion function (vault registration, #591 Task 11).
|
|
324
|
+
* The closure re-reads the live `SatelliteRegistry` on every call, so pairs
|
|
325
|
+
* declared after this is set are still picked up by `push`/`pull` filters.
|
|
326
|
+
*/
|
|
327
|
+
setPairExpander(expander) {
|
|
328
|
+
this.pairExpander = expander;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Retroactively mirror per-collection conflict resolvers across a newly
|
|
332
|
+
* registered satellite pair (#591 rule 5b) — covers the NORMAL declaration
|
|
333
|
+
* order, where the base's `conflictPolicy` resolver was registered before
|
|
334
|
+
* the satellite was declared (so the call-time expansion in
|
|
335
|
+
* `registerConflictResolver` saw no pair yet). Tie-break: when BOTH members
|
|
336
|
+
* already carry (different) resolvers, the FIRST name in `names` wins —
|
|
337
|
+
* callers pass `[base, satellite]`, so the base's resolver is canonical.
|
|
338
|
+
* Idempotent; a later explicit registration on either member still
|
|
339
|
+
* overwrites both (last-wins, via the call-time expansion above).
|
|
340
|
+
*/
|
|
341
|
+
remirrorPairResolvers(names) {
|
|
342
|
+
const canonical = names.map((n) => this.conflictResolvers.get(n)).find((r) => r !== void 0);
|
|
343
|
+
if (!canonical) return;
|
|
344
|
+
for (const n of names) this.conflictResolvers.set(n, canonical);
|
|
279
345
|
}
|
|
280
346
|
/** Record a local change for later push. */
|
|
281
347
|
async trackChange(collection, id, action, version) {
|
|
@@ -297,16 +363,25 @@ var SyncEngine = class {
|
|
|
297
363
|
await this.persistMeta();
|
|
298
364
|
this.scheduler?.notifyChange();
|
|
299
365
|
}
|
|
366
|
+
/** Remove a dirty entry (satellite fan-out revert cleanup — spec #591). */
|
|
367
|
+
async removeDirty(collection, id) {
|
|
368
|
+
const before = this.dirty.length;
|
|
369
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collection && d.id === id));
|
|
370
|
+
if (this.dirty.length !== before) await this.persistMeta();
|
|
371
|
+
}
|
|
300
372
|
/** Push dirty records to remote adapter. Accepts optional `PushOptions` for partial sync. */
|
|
301
373
|
async push(options) {
|
|
302
374
|
await this.ensureLoaded();
|
|
375
|
+
this.graphBatchController?.begin();
|
|
303
376
|
let pushed = 0;
|
|
304
377
|
const conflicts = [];
|
|
378
|
+
const erasures = [];
|
|
305
379
|
const errors = [];
|
|
306
380
|
const completed = [];
|
|
381
|
+
const filter = options?.collections ? new Set(this.pairExpander?.(options.collections) ?? options.collections) : null;
|
|
307
382
|
for (let i = 0; i < this.dirty.length; i++) {
|
|
308
383
|
const entry = this.dirty[i];
|
|
309
|
-
if (
|
|
384
|
+
if (filter && !filter.has(entry.collection)) {
|
|
310
385
|
continue;
|
|
311
386
|
}
|
|
312
387
|
try {
|
|
@@ -320,6 +395,12 @@ var SyncEngine = class {
|
|
|
320
395
|
completed.push(i);
|
|
321
396
|
continue;
|
|
322
397
|
}
|
|
398
|
+
if (isTombstoneShape(envelope)) {
|
|
399
|
+
await this.remote.put(this.vault, entry.collection, entry.id, envelope);
|
|
400
|
+
completed.push(i);
|
|
401
|
+
pushed++;
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
323
404
|
try {
|
|
324
405
|
await this.remote.put(
|
|
325
406
|
this.vault,
|
|
@@ -334,27 +415,42 @@ var SyncEngine = class {
|
|
|
334
415
|
if (err instanceof ConflictError) {
|
|
335
416
|
const remoteEnvelope = await this.remote.get(this.vault, entry.collection, entry.id);
|
|
336
417
|
if (remoteEnvelope) {
|
|
337
|
-
|
|
338
|
-
entry.collection,
|
|
339
|
-
entry.id,
|
|
340
|
-
envelope,
|
|
341
|
-
remoteEnvelope,
|
|
342
|
-
"push"
|
|
343
|
-
);
|
|
344
|
-
conflicts.push(conflict);
|
|
345
|
-
if (handled === "local") {
|
|
346
|
-
await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
|
|
347
|
-
completed.push(i);
|
|
348
|
-
pushed++;
|
|
349
|
-
} else if (handled === "remote") {
|
|
350
|
-
await this.local.put(this.vault, entry.collection, entry.id, conflict.remote);
|
|
418
|
+
if (isTombstoneShape(remoteEnvelope)) {
|
|
419
|
+
await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
|
|
420
|
+
erasures.push(this.reportErasure(entry.collection, entry.id, remoteEnvelope, envelope, "push"));
|
|
351
421
|
completed.push(i);
|
|
352
|
-
} else if (
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
422
|
+
} else if (remoteEnvelope._v === envelope._v && isDeleteMarker(remoteEnvelope) !== isDeleteMarker(envelope) && !this.conflictResolvers.get(entry.collection)) {
|
|
423
|
+
if (isDeleteMarker(remoteEnvelope)) {
|
|
424
|
+
await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
|
|
425
|
+
completed.push(i);
|
|
426
|
+
} else {
|
|
427
|
+
await this.remote.put(this.vault, entry.collection, entry.id, envelope);
|
|
428
|
+
completed.push(i);
|
|
429
|
+
pushed++;
|
|
430
|
+
}
|
|
431
|
+
} else {
|
|
432
|
+
const { handled, conflict } = await this.handleConflict(
|
|
433
|
+
entry.collection,
|
|
434
|
+
entry.id,
|
|
435
|
+
envelope,
|
|
436
|
+
remoteEnvelope,
|
|
437
|
+
"push"
|
|
438
|
+
);
|
|
439
|
+
conflicts.push(conflict);
|
|
440
|
+
if (handled === "local") {
|
|
441
|
+
await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
|
|
442
|
+
completed.push(i);
|
|
443
|
+
pushed++;
|
|
444
|
+
} else if (handled === "remote") {
|
|
445
|
+
await this.applyRemote(entry.collection, entry.id, conflict.remote);
|
|
446
|
+
completed.push(i);
|
|
447
|
+
} else if (handled === "merged" && conflict.local !== envelope) {
|
|
448
|
+
const merged = conflict.local;
|
|
449
|
+
await this.remote.put(this.vault, entry.collection, entry.id, merged);
|
|
450
|
+
await this.applyRemote(entry.collection, entry.id, merged);
|
|
451
|
+
completed.push(i);
|
|
452
|
+
pushed++;
|
|
453
|
+
}
|
|
358
454
|
}
|
|
359
455
|
}
|
|
360
456
|
} else {
|
|
@@ -370,32 +466,69 @@ var SyncEngine = class {
|
|
|
370
466
|
this.dirty.splice(i, 1);
|
|
371
467
|
}
|
|
372
468
|
this.lastPush = (/* @__PURE__ */ new Date()).toISOString();
|
|
373
|
-
|
|
374
|
-
|
|
469
|
+
try {
|
|
470
|
+
await this.persistMeta();
|
|
471
|
+
} finally {
|
|
472
|
+
await this.graphBatchController?.flush();
|
|
473
|
+
}
|
|
474
|
+
const result = { pushed, conflicts, errors, erasures };
|
|
375
475
|
this.emitter.emit("sync:push", result);
|
|
376
476
|
return result;
|
|
377
477
|
}
|
|
378
478
|
/** Pull remote records to local adapter. Accepts optional `PullOptions` for partial sync. */
|
|
379
479
|
async pull(options) {
|
|
380
480
|
await this.ensureLoaded();
|
|
481
|
+
this.graphBatchController?.begin();
|
|
381
482
|
let pulled = 0;
|
|
382
483
|
const conflicts = [];
|
|
484
|
+
const erasures = [];
|
|
383
485
|
const errors = [];
|
|
486
|
+
const filter = options?.collections ? new Set(this.pairExpander?.(options.collections) ?? options.collections) : null;
|
|
384
487
|
try {
|
|
385
488
|
const remoteSnapshot = await this.remote.loadAll(this.vault);
|
|
386
489
|
for (const [collName, records] of Object.entries(remoteSnapshot)) {
|
|
387
|
-
if (
|
|
490
|
+
if (filter && !filter.has(collName)) {
|
|
388
491
|
continue;
|
|
389
492
|
}
|
|
390
493
|
for (const [id, remoteEnvelope] of Object.entries(records)) {
|
|
391
|
-
if (options?.modifiedSince && remoteEnvelope._ts <= options.modifiedSince) {
|
|
494
|
+
if (options?.modifiedSince && remoteEnvelope._ts <= options.modifiedSince && !isTombstoneShape(remoteEnvelope) && !isDeleteMarker(remoteEnvelope)) {
|
|
392
495
|
continue;
|
|
393
496
|
}
|
|
394
497
|
try {
|
|
395
498
|
const localEnvelope = await this.local.get(this.vault, collName, id);
|
|
499
|
+
const remoteIsTombstone = isTombstoneShape(remoteEnvelope);
|
|
396
500
|
if (!localEnvelope) {
|
|
397
|
-
await this.
|
|
501
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
502
|
+
pulled++;
|
|
503
|
+
} else if (isTombstoneShape(localEnvelope)) {
|
|
504
|
+
if (remoteIsTombstone) {
|
|
505
|
+
if (remoteEnvelope._v > localEnvelope._v) await this.applyRemote(collName, id, remoteEnvelope);
|
|
506
|
+
} else {
|
|
507
|
+
erasures.push(await this.reassertTombstone(collName, id, localEnvelope, remoteEnvelope));
|
|
508
|
+
}
|
|
509
|
+
} else if (remoteIsTombstone) {
|
|
510
|
+
const wasDirty = this.dirty.some((d) => d.collection === collName && d.id === id);
|
|
511
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
512
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
398
513
|
pulled++;
|
|
514
|
+
if (wasDirty) erasures.push(this.reportErasure(collName, id, remoteEnvelope, localEnvelope, "pull"));
|
|
515
|
+
} else if (remoteEnvelope._v === localEnvelope._v && isDeleteMarker(remoteEnvelope) !== isDeleteMarker(localEnvelope)) {
|
|
516
|
+
const resolver = this.conflictResolvers.get(collName);
|
|
517
|
+
if (resolver) {
|
|
518
|
+
const winner = await resolver(id, localEnvelope, remoteEnvelope);
|
|
519
|
+
if (winner !== localEnvelope && winner !== null) {
|
|
520
|
+
if (winner !== remoteEnvelope) {
|
|
521
|
+
await this.remote.put(this.vault, collName, id, winner);
|
|
522
|
+
}
|
|
523
|
+
await this.applyRemote(collName, id, winner);
|
|
524
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
525
|
+
pulled++;
|
|
526
|
+
}
|
|
527
|
+
} else if (isDeleteMarker(remoteEnvelope)) {
|
|
528
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
529
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
530
|
+
pulled++;
|
|
531
|
+
}
|
|
399
532
|
} else if (remoteEnvelope._v > localEnvelope._v) {
|
|
400
533
|
const isDirty = this.dirty.some((d) => d.collection === collName && d.id === id);
|
|
401
534
|
if (isDirty) {
|
|
@@ -408,19 +541,48 @@ var SyncEngine = class {
|
|
|
408
541
|
);
|
|
409
542
|
conflicts.push(conflict);
|
|
410
543
|
if (handled === "remote") {
|
|
411
|
-
await this.
|
|
544
|
+
await this.applyRemote(collName, id, conflict.remote);
|
|
412
545
|
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
413
546
|
pulled++;
|
|
414
547
|
} else if (handled === "merged" && conflict.local !== localEnvelope) {
|
|
415
548
|
const merged = conflict.local;
|
|
416
|
-
await this.
|
|
549
|
+
await this.applyRemote(collName, id, merged);
|
|
417
550
|
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
418
551
|
pulled++;
|
|
419
552
|
}
|
|
420
553
|
} else {
|
|
421
|
-
await this.
|
|
554
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
555
|
+
pulled++;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
} catch (err) {
|
|
559
|
+
errors.push(err instanceof Error ? err : new Error(String(err)));
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
for (const collName of this.reservedLookup?.collections() ?? []) {
|
|
564
|
+
if (filter && !filter.has(collName)) continue;
|
|
565
|
+
for (const id of await this.remote.list(this.vault, collName)) {
|
|
566
|
+
try {
|
|
567
|
+
const remoteEnvelope = await this.remote.get(this.vault, collName, id);
|
|
568
|
+
if (!remoteEnvelope) continue;
|
|
569
|
+
if (options?.modifiedSince && remoteEnvelope._ts <= options.modifiedSince && !isDeleteMarker(remoteEnvelope)) {
|
|
570
|
+
continue;
|
|
571
|
+
}
|
|
572
|
+
const localEnvelope = await this.local.get(this.vault, collName, id);
|
|
573
|
+
if (!localEnvelope) {
|
|
574
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
575
|
+
pulled++;
|
|
576
|
+
} else if (remoteEnvelope._v === localEnvelope._v && isDeleteMarker(remoteEnvelope) !== isDeleteMarker(localEnvelope)) {
|
|
577
|
+
if (isDeleteMarker(remoteEnvelope)) {
|
|
578
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
579
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
422
580
|
pulled++;
|
|
423
581
|
}
|
|
582
|
+
} else if (remoteEnvelope._v > localEnvelope._v) {
|
|
583
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
584
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
585
|
+
pulled++;
|
|
424
586
|
}
|
|
425
587
|
} catch (err) {
|
|
426
588
|
errors.push(err instanceof Error ? err : new Error(String(err)));
|
|
@@ -431,8 +593,12 @@ var SyncEngine = class {
|
|
|
431
593
|
errors.push(err instanceof Error ? err : new Error(String(err)));
|
|
432
594
|
}
|
|
433
595
|
this.lastPull = (/* @__PURE__ */ new Date()).toISOString();
|
|
434
|
-
|
|
435
|
-
|
|
596
|
+
try {
|
|
597
|
+
await this.persistMeta();
|
|
598
|
+
} finally {
|
|
599
|
+
await this.graphBatchController?.flush();
|
|
600
|
+
}
|
|
601
|
+
const result = { pulled, conflicts, errors, erasures };
|
|
436
602
|
this.emitter.emit("sync:pull", result);
|
|
437
603
|
return result;
|
|
438
604
|
}
|
|
@@ -451,6 +617,7 @@ var SyncEngine = class {
|
|
|
451
617
|
await this.ensureLoaded();
|
|
452
618
|
let pushed = 0;
|
|
453
619
|
const conflicts = [];
|
|
620
|
+
const erasures = [];
|
|
454
621
|
const errors = [];
|
|
455
622
|
const completed = [];
|
|
456
623
|
for (let i = 0; i < this.dirty.length; i++) {
|
|
@@ -467,6 +634,12 @@ var SyncEngine = class {
|
|
|
467
634
|
completed.push(i);
|
|
468
635
|
continue;
|
|
469
636
|
}
|
|
637
|
+
if (isTombstoneShape(envelope)) {
|
|
638
|
+
await this.remote.put(this.vault, entry.collection, entry.id, envelope);
|
|
639
|
+
completed.push(i);
|
|
640
|
+
pushed++;
|
|
641
|
+
continue;
|
|
642
|
+
}
|
|
470
643
|
try {
|
|
471
644
|
await this.remote.put(
|
|
472
645
|
this.vault,
|
|
@@ -481,27 +654,42 @@ var SyncEngine = class {
|
|
|
481
654
|
if (err instanceof ConflictError) {
|
|
482
655
|
const remoteEnvelope = await this.remote.get(this.vault, entry.collection, entry.id);
|
|
483
656
|
if (remoteEnvelope) {
|
|
484
|
-
|
|
485
|
-
entry.collection,
|
|
486
|
-
entry.id,
|
|
487
|
-
envelope,
|
|
488
|
-
remoteEnvelope,
|
|
489
|
-
"push"
|
|
490
|
-
);
|
|
491
|
-
conflicts.push(conflict);
|
|
492
|
-
if (handled === "local") {
|
|
493
|
-
await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
|
|
657
|
+
if (isTombstoneShape(remoteEnvelope)) {
|
|
658
|
+
await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
|
|
659
|
+
erasures.push(this.reportErasure(entry.collection, entry.id, remoteEnvelope, envelope, "push"));
|
|
494
660
|
completed.push(i);
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
661
|
+
} else if (remoteEnvelope._v === envelope._v && isDeleteMarker(remoteEnvelope) !== isDeleteMarker(envelope) && !this.conflictResolvers.get(entry.collection)) {
|
|
662
|
+
if (isDeleteMarker(remoteEnvelope)) {
|
|
663
|
+
await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
|
|
664
|
+
completed.push(i);
|
|
665
|
+
} else {
|
|
666
|
+
await this.remote.put(this.vault, entry.collection, entry.id, envelope);
|
|
667
|
+
completed.push(i);
|
|
668
|
+
pushed++;
|
|
669
|
+
}
|
|
670
|
+
} else {
|
|
671
|
+
const { handled, conflict } = await this.handleConflict(
|
|
672
|
+
entry.collection,
|
|
673
|
+
entry.id,
|
|
674
|
+
envelope,
|
|
675
|
+
remoteEnvelope,
|
|
676
|
+
"push"
|
|
677
|
+
);
|
|
678
|
+
conflicts.push(conflict);
|
|
679
|
+
if (handled === "local") {
|
|
680
|
+
await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
|
|
681
|
+
completed.push(i);
|
|
682
|
+
pushed++;
|
|
683
|
+
} else if (handled === "remote") {
|
|
684
|
+
await this.applyRemote(entry.collection, entry.id, conflict.remote);
|
|
685
|
+
completed.push(i);
|
|
686
|
+
} else if (handled === "merged" && conflict.local !== envelope) {
|
|
687
|
+
const merged = conflict.local;
|
|
688
|
+
await this.remote.put(this.vault, entry.collection, entry.id, merged);
|
|
689
|
+
await this.applyRemote(entry.collection, entry.id, merged);
|
|
690
|
+
completed.push(i);
|
|
691
|
+
pushed++;
|
|
692
|
+
}
|
|
505
693
|
}
|
|
506
694
|
}
|
|
507
695
|
} else {
|
|
@@ -518,7 +706,7 @@ var SyncEngine = class {
|
|
|
518
706
|
}
|
|
519
707
|
this.lastPush = (/* @__PURE__ */ new Date()).toISOString();
|
|
520
708
|
await this.persistMeta();
|
|
521
|
-
const result = { pushed, conflicts, errors };
|
|
709
|
+
const result = { pushed, conflicts, errors, erasures };
|
|
522
710
|
this.emitter.emit("sync:push", result);
|
|
523
711
|
return result;
|
|
524
712
|
}
|
|
@@ -567,6 +755,39 @@ var SyncEngine = class {
|
|
|
567
755
|
this.isOnline = false;
|
|
568
756
|
this.emitter.emit("sync:offline", void 0);
|
|
569
757
|
};
|
|
758
|
+
/** Apply an envelope to the local store and refresh in-memory views (#598). `action` (#640):
|
|
759
|
+
* classified HERE — the one choke point that still holds the envelope — so the
|
|
760
|
+
* cacheInvalidator seam (and, downstream, the dispatch wave) can tell a pulled delete from an
|
|
761
|
+
* ordinary put. `isTombstoneShape` covers a forgotten-elsewhere record arriving as a shred;
|
|
762
|
+
* `isDeleteMarker` covers an ordinary (#589) delete — both route to the SAME 'delete' action
|
|
763
|
+
* (sync delete ≠ forget: freshness only, no shred/residue channel on the receiving side). */
|
|
764
|
+
async applyRemote(collection, id, envelope) {
|
|
765
|
+
await this.local.put(this.vault, collection, id, envelope);
|
|
766
|
+
const action = isTombstoneShape(envelope) || isDeleteMarker(envelope) ? "delete" : "put";
|
|
767
|
+
await this.cacheInvalidator?.(collection, id, action);
|
|
768
|
+
}
|
|
769
|
+
/** Record + emit a tombstone enforcement (#590). */
|
|
770
|
+
reportErasure(collection, id, tombstone, suppressed, direction) {
|
|
771
|
+
const enforcement = { vault: this.vault, collection, id, tombstone, suppressed, direction };
|
|
772
|
+
this.emitter.emit("sync:erasure", enforcement);
|
|
773
|
+
return enforcement;
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* Re-assert a local tombstone over a live remote envelope (#590): the shred
|
|
777
|
+
* wins in both directions, regardless of `_v`. Bumps the tombstone to the
|
|
778
|
+
* suppressed envelope's `_v` when higher so per-key version counters stay
|
|
779
|
+
* monotonic on every store; `_by` (the shredding actor) is preserved.
|
|
780
|
+
*/
|
|
781
|
+
async reassertTombstone(collection, id, tombstone, suppressedRemote) {
|
|
782
|
+
let winner = tombstone;
|
|
783
|
+
if (suppressedRemote._v > tombstone._v) {
|
|
784
|
+
winner = { ...tombstone, _v: suppressedRemote._v, _ts: (/* @__PURE__ */ new Date()).toISOString() };
|
|
785
|
+
await this.applyRemote(collection, id, winner);
|
|
786
|
+
}
|
|
787
|
+
await this.remote.put(this.vault, collection, id, winner);
|
|
788
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collection && d.id === id));
|
|
789
|
+
return this.reportErasure(collection, id, winner, suppressedRemote, "pull");
|
|
790
|
+
}
|
|
570
791
|
/**
|
|
571
792
|
* Resolve a conflict, checking per-collection resolvers first,
|
|
572
793
|
* then falling back to the db-level `ConflictStrategy`.
|
|
@@ -657,7 +878,7 @@ var SyncEngine = class {
|
|
|
657
878
|
}
|
|
658
879
|
};
|
|
659
880
|
|
|
660
|
-
// src/team/sync-transaction.ts
|
|
881
|
+
// src/with-party/team/sync-transaction.ts
|
|
661
882
|
var SyncTransaction = class {
|
|
662
883
|
comp;
|
|
663
884
|
engine;
|
|
@@ -709,7 +930,8 @@ var SyncTransaction = class {
|
|
|
709
930
|
return {
|
|
710
931
|
status: pushResult.conflicts.length > 0 ? "conflict" : "committed",
|
|
711
932
|
pushed: pushResult.pushed,
|
|
712
|
-
conflicts: pushResult.conflicts
|
|
933
|
+
conflicts: pushResult.conflicts,
|
|
934
|
+
...pushResult.erasures?.length ? { erasures: pushResult.erasures } : {}
|
|
713
935
|
};
|
|
714
936
|
}
|
|
715
937
|
};
|
|
@@ -719,4 +941,4 @@ export {
|
|
|
719
941
|
SyncEngine,
|
|
720
942
|
SyncTransaction
|
|
721
943
|
};
|
|
722
|
-
//# sourceMappingURL=chunk-
|
|
944
|
+
//# sourceMappingURL=chunk-TAKWLZZX.js.map
|