@noy-db/hub 0.3.0-pre.6 → 0.3.0-pre.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/index.d.ts +1 -1
- package/dist/aggregate/index.d.ts +2 -2
- package/dist/{api-OQ65LUSK.js → api-Z66JMGOU.js} +6 -6
- package/dist/as/index.d.ts +3 -3
- package/dist/as/index.js +5 -5
- package/dist/at/index.d.ts +1 -1
- package/dist/attestation/index.d.ts +2 -2
- package/dist/attestation/index.js +12 -12
- package/dist/{backup-Y3RMFGVX.js → backup-7PX6NDKT.js} +6 -6
- package/dist/blobs/index.d.ts +3 -3
- package/dist/blobs/index.js +5 -5
- package/dist/bundle/index.d.ts +4 -4
- package/dist/bundle/index.js +14 -14
- package/dist/{bundle-BPOSpGZG.d.ts → bundle-BN_VSq5L.d.ts} +1 -1
- package/dist/cargo/index.d.ts +3 -3
- package/dist/cargo/index.js +13 -13
- package/dist/{chunk-QQQE6QUO.js → chunk-2L7PPF2C.js} +7 -7
- package/dist/{chunk-C6A2DPRE.js → chunk-3CHNKEFI.js} +3 -3
- package/dist/{chunk-D6ADQ4QL.js → chunk-5K7KZMXG.js} +125 -67
- package/dist/chunk-5K7KZMXG.js.map +1 -0
- package/dist/{chunk-MT4YWJRW.js → chunk-62TTFKU4.js} +4 -4
- package/dist/{chunk-S2IDC6MO.js → chunk-7AERMJP6.js} +2 -2
- package/dist/{chunk-BYS45GOJ.js → chunk-7F2P2NHX.js} +3 -3
- package/dist/{chunk-ML5UP7YN.js → chunk-7L6EH6S7.js} +4 -4
- package/dist/{chunk-ZHK3F5RB.js → chunk-AG2PLGQ2.js} +4 -4
- package/dist/{chunk-ZRJBLWKQ.js → chunk-AZPGB4OD.js} +3 -3
- package/dist/{chunk-C57J6AWN.js → chunk-CND5WQLO.js} +3 -3
- package/dist/{chunk-CYWF3JJE.js → chunk-CP3GUIAN.js} +8 -8
- package/dist/{chunk-RIZQZKU6.js → chunk-DJ4TNF4N.js} +3 -3
- package/dist/{chunk-C2ZKWL37.js → chunk-DKGZIX6S.js} +2 -2
- package/dist/{chunk-7A7LTSJR.js → chunk-E3LURVGQ.js} +3 -3
- package/dist/{chunk-TWJVOYU2.js → chunk-G5CFMITA.js} +2 -2
- package/dist/{chunk-WAL4MRBK.js → chunk-GMZFHDSG.js} +3 -3
- package/dist/{chunk-YXGIPYH4.js → chunk-H3MPSYCH.js} +164 -51
- package/dist/chunk-H3MPSYCH.js.map +1 -0
- package/dist/{chunk-VWGCJUTV.js → chunk-H7WQMGXH.js} +2 -2
- package/dist/{chunk-NL4HVTNO.js → chunk-HBVEGUON.js} +2 -2
- package/dist/{chunk-LN22XH4B.js → chunk-HCK2DFEK.js} +1 -1
- package/dist/chunk-HCK2DFEK.js.map +1 -0
- package/dist/chunk-HGQ6UNHE.js +45 -0
- package/dist/chunk-HGQ6UNHE.js.map +1 -0
- package/dist/{chunk-IVIGZTFH.js → chunk-HV3VNAYI.js} +4 -4
- package/dist/{chunk-PLQCXH75.js → chunk-I6Q7YECW.js} +2 -2
- package/dist/{chunk-4I4UNXHM.js → chunk-IEKK2XI4.js} +3 -3
- package/dist/{chunk-73C4RPMX.js → chunk-J54DC5IC.js} +3 -3
- package/dist/{chunk-XDWNF4BS.js → chunk-J5YDMJHG.js} +7 -7
- package/dist/{chunk-7AGLCOYE.js → chunk-JIW3Q5JN.js} +6 -5
- package/dist/chunk-JIW3Q5JN.js.map +1 -0
- package/dist/{chunk-WAW4VFS7.js → chunk-JT4A6OAJ.js} +3 -3
- package/dist/{chunk-RXUFMTD5.js → chunk-K6WHZBCO.js} +2 -2
- package/dist/{chunk-T45LAT2Y.js → chunk-NO53W6O5.js} +2 -2
- package/dist/{chunk-DBBP35OP.js → chunk-OFYY5Q4R.js} +2 -2
- package/dist/{chunk-3IMGBWP7.js → chunk-PE25C4QL.js} +5 -5
- package/dist/{chunk-S55MJQUQ.js → chunk-QAVFI23O.js} +4 -4
- package/dist/{chunk-OLVIGEHQ.js → chunk-QYNBPDGO.js} +2 -2
- package/dist/{chunk-65FW3ALF.js → chunk-RHB7BOEO.js} +3 -3
- package/dist/{chunk-GGFT2XFF.js → chunk-RUWEHFRB.js} +3 -3
- package/dist/{chunk-I7GTYPWF.js → chunk-T4NQMPBN.js} +2 -2
- package/dist/{chunk-RLP65PI3.js → chunk-U5IJHUHZ.js} +2 -2
- package/dist/{chunk-GEK6UGOJ.js → chunk-UJJJPKJO.js} +2 -2
- package/dist/{chunk-E7MAS736.js → chunk-VFG5YXWM.js} +2 -2
- package/dist/{chunk-SXLMLECV.js → chunk-VMRXI3IF.js} +3 -3
- package/dist/{chunk-3UUXDQPM.js → chunk-VUHXLL32.js} +2 -2
- package/dist/{chunk-WQAT24C2.js → chunk-WFBZRXS5.js} +5 -5
- package/dist/{chunk-UZZFV3O3.js → chunk-WGH3YV6Y.js} +5 -5
- package/dist/{chunk-HJZ3CTZ2.js → chunk-WJEMUO32.js} +2 -2
- package/dist/{chunk-YFF2RP3X.js → chunk-WRLPV6SI.js} +2 -2
- package/dist/{chunk-TSAT3E7Y.js → chunk-YSJG4L4A.js} +2 -2
- package/dist/{chunk-OCVO2V63.js → chunk-YSU2E4GZ.js} +3 -3
- package/dist/classified/index.d.ts +3 -3
- package/dist/classified/index.js +1 -1
- package/dist/{collection-facade-5V3JS7SD.js → collection-facade-JP6N7USE.js} +9 -9
- package/dist/{config-drift-SWZNEH5H.js → config-drift-LRKCC3VZ.js} +3 -3
- package/dist/consent/index.d.ts +2 -2
- package/dist/consent/index.js +4 -4
- package/dist/crdt/index.d.ts +2 -2
- package/dist/{dead-filter-MGWMNRO2.js → dead-filter-NZORV45S.js} +2 -2
- package/dist/{delegation-AUY42TGU.js → delegation-FDOXXHNG.js} +5 -5
- package/dist/derivations/index.d.ts +3 -3
- package/dist/derivations/index.js +3 -3
- package/dist/{derive-FWSEWWI7.js → derive-JR2C5JFG.js} +4 -4
- package/dist/{dev-unlock-DxecHstJ.d.ts → dev-unlock-CsOqX7O2.d.ts} +1 -1
- package/dist/{enclave-UYZGSE2C.js → enclave-7X5BUAMS.js} +11 -5
- package/dist/{executor-XWPD5PIM.js → executor-6LHOV7MN.js} +4 -4
- package/dist/{export-accessible-M54OI6FO.js → export-accessible-7XLSZBGJ.js} +7 -7
- package/dist/{extract-partition-MIHAL6PP.js → extract-partition-RM6EROS5.js} +10 -10
- package/dist/{fanout-sidecar-SSEW7BQB.js → fanout-sidecar-BDKLP5GG.js} +4 -4
- package/dist/forget/index.js +4 -4
- package/dist/guards/index.d.ts +3 -3
- package/dist/{hash-umqwdLhO.d.ts → hash-BPzm02Za.d.ts} +1 -1
- package/dist/history/index.d.ts +3 -3
- package/dist/history/index.js +6 -6
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +7 -7
- package/dist/in/index.d.ts +1 -1
- package/dist/{index-B-LKCpm6.d.ts → index-BJ3L-XcV.d.ts} +67 -1
- package/dist/{index-zdEVWlkZ.d.ts → index-CLucFLeN.d.ts} +2 -2
- package/dist/index.d.ts +13 -13
- package/dist/index.js +44 -44
- package/dist/indexing/index.d.ts +2 -2
- package/dist/{issue-PHWTGH2G.js → issue-FJE2IHUI.js} +6 -6
- package/dist/kernel/index.d.ts +2 -2
- package/dist/kernel/index.js +3 -3
- package/dist/lazy/index.d.ts +2 -2
- package/dist/{ledger-IWWY7IIC.js → ledger-EMDHRJJN.js} +6 -6
- package/dist/liberate-HFIPHJGR.js +24 -0
- package/dist/{link-set-HJOC7GB7.js → link-set-62Y36TOG.js} +5 -5
- package/dist/materialized-views/index.d.ts +3 -3
- package/dist/materialized-views/index.js +4 -4
- package/dist/{mime-magic-C_O9KsAk.d.ts → mime-magic-BlE9fzn2.d.ts} +1 -1
- package/dist/{noydb-Y5L74IDJ.js → noydb-4ZASGII5.js} +23 -23
- package/dist/on/index.d.ts +1 -1
- package/dist/on/index.js +4 -4
- package/dist/overlay-views/index.d.ts +3 -3
- package/dist/periods/index.d.ts +2 -2
- package/dist/periods/index.js +7 -7
- package/dist/pod/index.d.ts +2 -2
- package/dist/pod/index.js +5 -5
- package/dist/{policy-3ZKSGSRK.js → policy-SXPLTQS4.js} +4 -4
- package/dist/portability/index.d.ts +2 -2
- package/dist/portability/index.js +6 -6
- package/dist/{post-register-BIXGCZ2M.js → post-register-DCJ2SRVG.js} +4 -4
- package/dist/{public-envelope-6UBQ4IUY.js → public-envelope-CBRIJORQ.js} +3 -3
- package/dist/query/index.d.ts +1 -1
- package/dist/{register-OVONZ2MJ.js → register-5NRE7HBZ.js} +6 -6
- package/dist/{registry-D5J7SVJ2.js → registry-5QLETK3Q.js} +4 -4
- package/dist/{registry-AIEYUOSG.js → registry-DYTNLOJC.js} +4 -4
- package/dist/{request-withdrawal-IHF64VIT.js → request-withdrawal-5APB7RKN.js} +9 -9
- package/dist/{reveal-B77Q2BJW.js → reveal-R5N7JKA5.js} +3 -3
- package/dist/{revoke-BPPOUZPE.js → revoke-VELFCK7S.js} +6 -6
- package/dist/satellites/index.d.ts +1 -1
- package/dist/sealed-record/index.d.ts +2 -2
- package/dist/sealed-record/index.js +6 -6
- package/dist/session/index.d.ts +3 -3
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.d.ts +2 -2
- package/dist/{signer-MNQEL27B.js → signer-IVU3B6DP.js} +5 -5
- package/dist/snapshots/index.d.ts +2 -2
- package/dist/snapshots/index.js +5 -5
- package/dist/{stale-COBBJORL.js → stale-DP66HFT3.js} +2 -2
- package/dist/{storage-DVKYH7UU.js → storage-RH5VBLLL.js} +5 -5
- package/dist/{store-coordination-provider-JJCEMTAE.js → store-coordination-provider-F5N5ASDF.js} +3 -3
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.js +4 -4
- package/dist/team/index.d.ts +2 -2
- package/dist/team/index.js +9 -9
- package/dist/tiers/index.d.ts +1 -1
- package/dist/tiers/index.js +4 -4
- package/dist/to/index.d.ts +1 -1
- package/dist/{transition-guard-CzqWwVGP.d.ts → transition-guard-BzsAQEd-.d.ts} +1 -1
- package/dist/tx/index.d.ts +2 -2
- package/dist/{validators-Bdiv0ucK.d.ts → validators-DGmYFP51.d.ts} +1 -1
- package/dist/{vault-diff-BbZngJUP.d.ts → vault-diff-DmBBatkx.d.ts} +1 -1
- package/dist/{walk-CVNXFUEF.js → walk-3SB25HF2.js} +5 -5
- package/dist/with/index.d.ts +2 -2
- package/dist/with/index.js +6 -6
- package/dist/{with-materialized-view-BmKXygt2.d.ts → with-materialized-view-DPEVoGoB.d.ts} +1 -1
- package/dist/{with-overlayed-view-Bnwe7E75.d.ts → with-overlayed-view-DGpKFSv1.d.ts} +1 -1
- package/dist/{with-rollup-JXTxc9cu.d.ts → with-rollup-B2RwnTq0.d.ts} +1 -1
- package/dist/{withdraw-accessible-5ALN3ZGM.js → withdraw-accessible-LN4AOJDD.js} +8 -8
- package/package.json +3 -3
- package/dist/chunk-7AGLCOYE.js.map +0 -1
- package/dist/chunk-D6ADQ4QL.js.map +0 -1
- package/dist/chunk-LN22XH4B.js.map +0 -1
- package/dist/chunk-QKVILR7N.js +0 -25
- package/dist/chunk-QKVILR7N.js.map +0 -1
- package/dist/chunk-YXGIPYH4.js.map +0 -1
- package/dist/liberate-QDTNV7SM.js +0 -24
- /package/dist/{api-OQ65LUSK.js.map → api-Z66JMGOU.js.map} +0 -0
- /package/dist/{backup-Y3RMFGVX.js.map → backup-7PX6NDKT.js.map} +0 -0
- /package/dist/{chunk-QQQE6QUO.js.map → chunk-2L7PPF2C.js.map} +0 -0
- /package/dist/{chunk-C6A2DPRE.js.map → chunk-3CHNKEFI.js.map} +0 -0
- /package/dist/{chunk-MT4YWJRW.js.map → chunk-62TTFKU4.js.map} +0 -0
- /package/dist/{chunk-S2IDC6MO.js.map → chunk-7AERMJP6.js.map} +0 -0
- /package/dist/{chunk-BYS45GOJ.js.map → chunk-7F2P2NHX.js.map} +0 -0
- /package/dist/{chunk-ML5UP7YN.js.map → chunk-7L6EH6S7.js.map} +0 -0
- /package/dist/{chunk-ZHK3F5RB.js.map → chunk-AG2PLGQ2.js.map} +0 -0
- /package/dist/{chunk-ZRJBLWKQ.js.map → chunk-AZPGB4OD.js.map} +0 -0
- /package/dist/{chunk-C57J6AWN.js.map → chunk-CND5WQLO.js.map} +0 -0
- /package/dist/{chunk-CYWF3JJE.js.map → chunk-CP3GUIAN.js.map} +0 -0
- /package/dist/{chunk-RIZQZKU6.js.map → chunk-DJ4TNF4N.js.map} +0 -0
- /package/dist/{chunk-C2ZKWL37.js.map → chunk-DKGZIX6S.js.map} +0 -0
- /package/dist/{chunk-7A7LTSJR.js.map → chunk-E3LURVGQ.js.map} +0 -0
- /package/dist/{chunk-TWJVOYU2.js.map → chunk-G5CFMITA.js.map} +0 -0
- /package/dist/{chunk-WAL4MRBK.js.map → chunk-GMZFHDSG.js.map} +0 -0
- /package/dist/{chunk-VWGCJUTV.js.map → chunk-H7WQMGXH.js.map} +0 -0
- /package/dist/{chunk-NL4HVTNO.js.map → chunk-HBVEGUON.js.map} +0 -0
- /package/dist/{chunk-IVIGZTFH.js.map → chunk-HV3VNAYI.js.map} +0 -0
- /package/dist/{chunk-PLQCXH75.js.map → chunk-I6Q7YECW.js.map} +0 -0
- /package/dist/{chunk-4I4UNXHM.js.map → chunk-IEKK2XI4.js.map} +0 -0
- /package/dist/{chunk-73C4RPMX.js.map → chunk-J54DC5IC.js.map} +0 -0
- /package/dist/{chunk-XDWNF4BS.js.map → chunk-J5YDMJHG.js.map} +0 -0
- /package/dist/{chunk-WAW4VFS7.js.map → chunk-JT4A6OAJ.js.map} +0 -0
- /package/dist/{chunk-RXUFMTD5.js.map → chunk-K6WHZBCO.js.map} +0 -0
- /package/dist/{chunk-T45LAT2Y.js.map → chunk-NO53W6O5.js.map} +0 -0
- /package/dist/{chunk-DBBP35OP.js.map → chunk-OFYY5Q4R.js.map} +0 -0
- /package/dist/{chunk-3IMGBWP7.js.map → chunk-PE25C4QL.js.map} +0 -0
- /package/dist/{chunk-S55MJQUQ.js.map → chunk-QAVFI23O.js.map} +0 -0
- /package/dist/{chunk-OLVIGEHQ.js.map → chunk-QYNBPDGO.js.map} +0 -0
- /package/dist/{chunk-65FW3ALF.js.map → chunk-RHB7BOEO.js.map} +0 -0
- /package/dist/{chunk-GGFT2XFF.js.map → chunk-RUWEHFRB.js.map} +0 -0
- /package/dist/{chunk-I7GTYPWF.js.map → chunk-T4NQMPBN.js.map} +0 -0
- /package/dist/{chunk-RLP65PI3.js.map → chunk-U5IJHUHZ.js.map} +0 -0
- /package/dist/{chunk-GEK6UGOJ.js.map → chunk-UJJJPKJO.js.map} +0 -0
- /package/dist/{chunk-E7MAS736.js.map → chunk-VFG5YXWM.js.map} +0 -0
- /package/dist/{chunk-SXLMLECV.js.map → chunk-VMRXI3IF.js.map} +0 -0
- /package/dist/{chunk-3UUXDQPM.js.map → chunk-VUHXLL32.js.map} +0 -0
- /package/dist/{chunk-WQAT24C2.js.map → chunk-WFBZRXS5.js.map} +0 -0
- /package/dist/{chunk-UZZFV3O3.js.map → chunk-WGH3YV6Y.js.map} +0 -0
- /package/dist/{chunk-HJZ3CTZ2.js.map → chunk-WJEMUO32.js.map} +0 -0
- /package/dist/{chunk-YFF2RP3X.js.map → chunk-WRLPV6SI.js.map} +0 -0
- /package/dist/{chunk-TSAT3E7Y.js.map → chunk-YSJG4L4A.js.map} +0 -0
- /package/dist/{chunk-OCVO2V63.js.map → chunk-YSU2E4GZ.js.map} +0 -0
- /package/dist/{collection-facade-5V3JS7SD.js.map → collection-facade-JP6N7USE.js.map} +0 -0
- /package/dist/{config-drift-SWZNEH5H.js.map → config-drift-LRKCC3VZ.js.map} +0 -0
- /package/dist/{dead-filter-MGWMNRO2.js.map → dead-filter-NZORV45S.js.map} +0 -0
- /package/dist/{delegation-AUY42TGU.js.map → delegation-FDOXXHNG.js.map} +0 -0
- /package/dist/{derive-FWSEWWI7.js.map → derive-JR2C5JFG.js.map} +0 -0
- /package/dist/{enclave-UYZGSE2C.js.map → enclave-7X5BUAMS.js.map} +0 -0
- /package/dist/{executor-XWPD5PIM.js.map → executor-6LHOV7MN.js.map} +0 -0
- /package/dist/{export-accessible-M54OI6FO.js.map → export-accessible-7XLSZBGJ.js.map} +0 -0
- /package/dist/{extract-partition-MIHAL6PP.js.map → extract-partition-RM6EROS5.js.map} +0 -0
- /package/dist/{fanout-sidecar-SSEW7BQB.js.map → fanout-sidecar-BDKLP5GG.js.map} +0 -0
- /package/dist/{issue-PHWTGH2G.js.map → issue-FJE2IHUI.js.map} +0 -0
- /package/dist/{ledger-IWWY7IIC.js.map → ledger-EMDHRJJN.js.map} +0 -0
- /package/dist/{liberate-QDTNV7SM.js.map → liberate-HFIPHJGR.js.map} +0 -0
- /package/dist/{link-set-HJOC7GB7.js.map → link-set-62Y36TOG.js.map} +0 -0
- /package/dist/{noydb-Y5L74IDJ.js.map → noydb-4ZASGII5.js.map} +0 -0
- /package/dist/{policy-3ZKSGSRK.js.map → policy-SXPLTQS4.js.map} +0 -0
- /package/dist/{post-register-BIXGCZ2M.js.map → post-register-DCJ2SRVG.js.map} +0 -0
- /package/dist/{public-envelope-6UBQ4IUY.js.map → public-envelope-CBRIJORQ.js.map} +0 -0
- /package/dist/{register-OVONZ2MJ.js.map → register-5NRE7HBZ.js.map} +0 -0
- /package/dist/{registry-AIEYUOSG.js.map → registry-5QLETK3Q.js.map} +0 -0
- /package/dist/{registry-D5J7SVJ2.js.map → registry-DYTNLOJC.js.map} +0 -0
- /package/dist/{request-withdrawal-IHF64VIT.js.map → request-withdrawal-5APB7RKN.js.map} +0 -0
- /package/dist/{reveal-B77Q2BJW.js.map → reveal-R5N7JKA5.js.map} +0 -0
- /package/dist/{revoke-BPPOUZPE.js.map → revoke-VELFCK7S.js.map} +0 -0
- /package/dist/{signer-MNQEL27B.js.map → signer-IVU3B6DP.js.map} +0 -0
- /package/dist/{stale-COBBJORL.js.map → stale-DP66HFT3.js.map} +0 -0
- /package/dist/{storage-DVKYH7UU.js.map → storage-RH5VBLLL.js.map} +0 -0
- /package/dist/{store-coordination-provider-JJCEMTAE.js.map → store-coordination-provider-F5N5ASDF.js.map} +0 -0
- /package/dist/{walk-CVNXFUEF.js.map → walk-3SB25HF2.js.map} +0 -0
- /package/dist/{withdraw-accessible-5ALN3ZGM.js.map → withdraw-accessible-LN4AOJDD.js.map} +0 -0
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
hashEntry,
|
|
8
8
|
paddedIndex,
|
|
9
9
|
sha256Hex
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-G5CFMITA.js";
|
|
11
11
|
import {
|
|
12
12
|
openEnvelopeJson
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JIW3Q5JN.js";
|
|
14
14
|
import {
|
|
15
15
|
NOYDB_FORMAT_VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HCK2DFEK.js";
|
|
17
17
|
import {
|
|
18
18
|
encrypt
|
|
19
19
|
} from "./chunk-5HZULLHE.js";
|
|
@@ -683,4 +683,4 @@ export {
|
|
|
683
683
|
applyPatch,
|
|
684
684
|
LedgerStore
|
|
685
685
|
};
|
|
686
|
-
//# sourceMappingURL=chunk-
|
|
686
|
+
//# sourceMappingURL=chunk-62TTFKU4.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
loadPersistedSchemaEntry,
|
|
7
7
|
savePersistedSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7F2P2NHX.js";
|
|
9
9
|
import {
|
|
10
10
|
ConflictError
|
|
11
11
|
} from "./chunk-OJ64XMPJ.js";
|
|
@@ -164,4 +164,4 @@ export {
|
|
|
164
164
|
persistClassifiedMarker,
|
|
165
165
|
persistSatelliteMarker
|
|
166
166
|
};
|
|
167
|
-
//# sourceMappingURL=chunk-
|
|
167
|
+
//# sourceMappingURL=chunk-7AERMJP6.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openEnvelopeJson
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JIW3Q5JN.js";
|
|
4
4
|
import {
|
|
5
5
|
NOYDB_FORMAT_VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HCK2DFEK.js";
|
|
7
7
|
import {
|
|
8
8
|
encrypt
|
|
9
9
|
} from "./chunk-5HZULLHE.js";
|
|
@@ -46,4 +46,4 @@ export {
|
|
|
46
46
|
loadPersistedSchema,
|
|
47
47
|
savePersistedSchema
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-7F2P2NHX.js.map
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
ATTESTATIONS_COLLECTION,
|
|
3
3
|
REVOKED_RECORD_ID,
|
|
4
4
|
loadOrCreateSigner
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JT4A6OAJ.js";
|
|
6
6
|
import {
|
|
7
7
|
openEnvelopeJson
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JIW3Q5JN.js";
|
|
9
9
|
import {
|
|
10
10
|
NOYDB_FORMAT_VERSION
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HCK2DFEK.js";
|
|
12
12
|
import {
|
|
13
13
|
encrypt
|
|
14
14
|
} from "./chunk-5HZULLHE.js";
|
|
@@ -82,4 +82,4 @@ export {
|
|
|
82
82
|
getRevokedDocIdsCore,
|
|
83
83
|
publishRevocationListCore
|
|
84
84
|
};
|
|
85
|
-
//# sourceMappingURL=chunk-
|
|
85
|
+
//# sourceMappingURL=chunk-7L6EH6S7.js.map
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
grant,
|
|
5
5
|
revoke,
|
|
6
6
|
rotateKeys
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GMZFHDSG.js";
|
|
8
8
|
import {
|
|
9
9
|
openEnvelopeJson
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JIW3Q5JN.js";
|
|
11
11
|
import {
|
|
12
12
|
NOYDB_FORMAT_VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HCK2DFEK.js";
|
|
14
14
|
import {
|
|
15
15
|
encrypt
|
|
16
16
|
} from "./chunk-5HZULLHE.js";
|
|
@@ -96,4 +96,4 @@ export {
|
|
|
96
96
|
listCredentials,
|
|
97
97
|
credentialStatus
|
|
98
98
|
};
|
|
99
|
-
//# sourceMappingURL=chunk-
|
|
99
|
+
//# sourceMappingURL=chunk-AG2PLGQ2.js.map
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-V76PHWLE.js";
|
|
5
5
|
import {
|
|
6
6
|
openEnvelopeJson
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JIW3Q5JN.js";
|
|
8
8
|
import {
|
|
9
9
|
NOYDB_FORMAT_VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HCK2DFEK.js";
|
|
11
11
|
import {
|
|
12
12
|
encrypt
|
|
13
13
|
} from "./chunk-5HZULLHE.js";
|
|
@@ -127,4 +127,4 @@ export {
|
|
|
127
127
|
LinkSet,
|
|
128
128
|
LinkEndpointError
|
|
129
129
|
};
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-AZPGB4OD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pickLocale
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T4NQMPBN.js";
|
|
4
4
|
import {
|
|
5
5
|
sha256Hex
|
|
6
6
|
} from "./chunk-5HZULLHE.js";
|
|
@@ -613,7 +613,7 @@ async function applySatelliteLivenessFilter(vault, dumpJson) {
|
|
|
613
613
|
if (!backup.collections || typeof backup.collections !== "object") return dumpJson;
|
|
614
614
|
if (typeof vault._introspectState !== "function") return dumpJson;
|
|
615
615
|
const { adapter, name, getDEK } = vault._introspectState();
|
|
616
|
-
const { liveBaseIdSetsForBundle } = await import("./dead-filter-
|
|
616
|
+
const { liveBaseIdSetsForBundle } = await import("./dead-filter-NZORV45S.js");
|
|
617
617
|
const satLive = await liveBaseIdSetsForBundle(adapter, name, Object.keys(backup.collections), getDEK);
|
|
618
618
|
if (satLive.size === 0) return dumpJson;
|
|
619
619
|
const next = {};
|
|
@@ -820,4 +820,4 @@ export {
|
|
|
820
820
|
readPod,
|
|
821
821
|
readNoydbBundle
|
|
822
822
|
};
|
|
823
|
-
//# sourceMappingURL=chunk-
|
|
823
|
+
//# sourceMappingURL=chunk-CND5WQLO.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-AURFOK3D.js";
|
|
4
4
|
import {
|
|
5
5
|
isStaticDictDescriptor
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WFBZRXS5.js";
|
|
7
7
|
import {
|
|
8
8
|
getAtPath,
|
|
9
9
|
stripI18nFilled
|
|
@@ -357,27 +357,27 @@ function buildBlobFieldEntries(filenamesByField) {
|
|
|
357
357
|
function withSearch() {
|
|
358
358
|
return {
|
|
359
359
|
async search(ctx, field, query, opts) {
|
|
360
|
-
const { search: search2 } = await import("./collection-facade-
|
|
360
|
+
const { search: search2 } = await import("./collection-facade-JP6N7USE.js");
|
|
361
361
|
return search2(ctx, field, query, opts);
|
|
362
362
|
},
|
|
363
363
|
async retrieve(ctx, query, opts) {
|
|
364
|
-
const { retrieve: retrieve2 } = await import("./collection-facade-
|
|
364
|
+
const { retrieve: retrieve2 } = await import("./collection-facade-JP6N7USE.js");
|
|
365
365
|
return retrieve2(ctx, query, opts);
|
|
366
366
|
},
|
|
367
367
|
async similarTo(ctx, vector, opts) {
|
|
368
|
-
const { similarTo: similarTo2 } = await import("./collection-facade-
|
|
368
|
+
const { similarTo: similarTo2 } = await import("./collection-facade-JP6N7USE.js");
|
|
369
369
|
return similarTo2(ctx, vector, opts);
|
|
370
370
|
},
|
|
371
371
|
async warmIndex(ctx) {
|
|
372
|
-
const { warmIndex: warmIndex2 } = await import("./collection-facade-
|
|
372
|
+
const { warmIndex: warmIndex2 } = await import("./collection-facade-JP6N7USE.js");
|
|
373
373
|
return warmIndex2(ctx);
|
|
374
374
|
},
|
|
375
375
|
async flushIndex(ctx) {
|
|
376
|
-
const { flushIndex: flushIndex2 } = await import("./collection-facade-
|
|
376
|
+
const { flushIndex: flushIndex2 } = await import("./collection-facade-JP6N7USE.js");
|
|
377
377
|
return flushIndex2(ctx);
|
|
378
378
|
},
|
|
379
379
|
async embedOnWrite(ctx, id, record, version) {
|
|
380
|
-
const { embedOnWrite: embedOnWrite2 } = await import("./collection-facade-
|
|
380
|
+
const { embedOnWrite: embedOnWrite2 } = await import("./collection-facade-JP6N7USE.js");
|
|
381
381
|
return embedOnWrite2(ctx, id, record, version);
|
|
382
382
|
}
|
|
383
383
|
};
|
|
@@ -661,4 +661,4 @@ export {
|
|
|
661
661
|
similarTo,
|
|
662
662
|
embedOnWrite
|
|
663
663
|
};
|
|
664
|
-
//# sourceMappingURL=chunk-
|
|
664
|
+
//# sourceMappingURL=chunk-CP3GUIAN.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildAccessibleBundle,
|
|
3
3
|
resolveAccessibleCollections
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DKGZIX6S.js";
|
|
5
5
|
import {
|
|
6
6
|
NOYDB_FORMAT_VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HCK2DFEK.js";
|
|
8
8
|
import {
|
|
9
9
|
sha256Hex
|
|
10
10
|
} from "./chunk-5HZULLHE.js";
|
|
@@ -114,4 +114,4 @@ export {
|
|
|
114
114
|
freezeAndDeleteClosure,
|
|
115
115
|
withdrawAccessibleData
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=chunk-
|
|
117
|
+
//# sourceMappingURL=chunk-DJ4TNF4N.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writePod
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CND5WQLO.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/portability/export-accessible.ts
|
|
6
6
|
function resolveAccessibleCollections(keyring, scope, writableOnly = false) {
|
|
@@ -42,4 +42,4 @@ export {
|
|
|
42
42
|
buildAccessibleBundle,
|
|
43
43
|
exportAccessibleData
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-DKGZIX6S.js.map
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-26FSVNBL.js";
|
|
5
5
|
import {
|
|
6
6
|
rewrapBodyToDek
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JIW3Q5JN.js";
|
|
8
8
|
import {
|
|
9
9
|
NOYDB_FORMAT_VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HCK2DFEK.js";
|
|
11
11
|
import {
|
|
12
12
|
decrypt,
|
|
13
13
|
encrypt,
|
|
@@ -272,4 +272,4 @@ export {
|
|
|
272
272
|
demote,
|
|
273
273
|
classifySealedShred
|
|
274
274
|
};
|
|
275
|
-
//# sourceMappingURL=chunk-
|
|
275
|
+
//# sourceMappingURL=chunk-E3LURVGQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
envelopeBodyForHash
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JIW3Q5JN.js";
|
|
4
4
|
import {
|
|
5
5
|
sha256Hex
|
|
6
6
|
} from "./chunk-5HZULLHE.js";
|
|
@@ -67,4 +67,4 @@ export {
|
|
|
67
67
|
parseIndex,
|
|
68
68
|
envelopePayloadHash
|
|
69
69
|
};
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
70
|
+
//# sourceMappingURL=chunk-G5CFMITA.js.map
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
readDirectoryConfig,
|
|
6
6
|
readUserVisibility,
|
|
7
7
|
saveUserEnvelope
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3CHNKEFI.js";
|
|
9
9
|
import {
|
|
10
10
|
NOYDB_FORMAT_VERSION,
|
|
11
11
|
NOYDB_KEYRING_VERSION
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HCK2DFEK.js";
|
|
13
13
|
import {
|
|
14
14
|
base64ToBuffer,
|
|
15
15
|
bufferToBase64,
|
|
@@ -774,4 +774,4 @@ export {
|
|
|
774
774
|
hasImportCapability,
|
|
775
775
|
evaluateImportCapability
|
|
776
776
|
};
|
|
777
|
-
//# sourceMappingURL=chunk-
|
|
777
|
+
//# sourceMappingURL=chunk-GMZFHDSG.js.map
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SyncScheduler
|
|
3
3
|
} from "./chunk-VQNJ7UZL.js";
|
|
4
|
+
import {
|
|
5
|
+
isDeleteMarker,
|
|
6
|
+
isTombstoneShape
|
|
7
|
+
} from "./chunk-HGQ6UNHE.js";
|
|
4
8
|
import {
|
|
5
9
|
NOYDB_SYNC_VERSION
|
|
6
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HCK2DFEK.js";
|
|
7
11
|
import {
|
|
8
12
|
bufferToBase64,
|
|
9
13
|
decrypt,
|
|
@@ -249,6 +253,12 @@ var SyncEngine = class {
|
|
|
249
253
|
* users.
|
|
250
254
|
*/
|
|
251
255
|
pairExpander;
|
|
256
|
+
/** #598: refreshes Collection in-memory views after a sync-applied local write. Wired by the vault at open. */
|
|
257
|
+
cacheInvalidator;
|
|
258
|
+
/** Wire the Collection-cache invalidation hook (#598). Same injection pattern as `setPairExpander`. */
|
|
259
|
+
setCacheInvalidator(fn) {
|
|
260
|
+
this.cacheInvalidator = fn;
|
|
261
|
+
}
|
|
252
262
|
constructor(opts) {
|
|
253
263
|
this.local = opts.local;
|
|
254
264
|
this.remote = opts.remote;
|
|
@@ -346,6 +356,7 @@ var SyncEngine = class {
|
|
|
346
356
|
await this.ensureLoaded();
|
|
347
357
|
let pushed = 0;
|
|
348
358
|
const conflicts = [];
|
|
359
|
+
const erasures = [];
|
|
349
360
|
const errors = [];
|
|
350
361
|
const completed = [];
|
|
351
362
|
const filter = options?.collections ? new Set(this.pairExpander?.(options.collections) ?? options.collections) : null;
|
|
@@ -365,6 +376,12 @@ var SyncEngine = class {
|
|
|
365
376
|
completed.push(i);
|
|
366
377
|
continue;
|
|
367
378
|
}
|
|
379
|
+
if (isTombstoneShape(envelope)) {
|
|
380
|
+
await this.remote.put(this.vault, entry.collection, entry.id, envelope);
|
|
381
|
+
completed.push(i);
|
|
382
|
+
pushed++;
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
368
385
|
try {
|
|
369
386
|
await this.remote.put(
|
|
370
387
|
this.vault,
|
|
@@ -379,27 +396,42 @@ var SyncEngine = class {
|
|
|
379
396
|
if (err instanceof ConflictError) {
|
|
380
397
|
const remoteEnvelope = await this.remote.get(this.vault, entry.collection, entry.id);
|
|
381
398
|
if (remoteEnvelope) {
|
|
382
|
-
|
|
383
|
-
entry.collection,
|
|
384
|
-
entry.id,
|
|
385
|
-
envelope,
|
|
386
|
-
remoteEnvelope,
|
|
387
|
-
"push"
|
|
388
|
-
);
|
|
389
|
-
conflicts.push(conflict);
|
|
390
|
-
if (handled === "local") {
|
|
391
|
-
await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
|
|
399
|
+
if (isTombstoneShape(remoteEnvelope)) {
|
|
400
|
+
await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
|
|
401
|
+
erasures.push(this.reportErasure(entry.collection, entry.id, remoteEnvelope, envelope, "push"));
|
|
392
402
|
completed.push(i);
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
+
} else if (remoteEnvelope._v === envelope._v && isDeleteMarker(remoteEnvelope) !== isDeleteMarker(envelope) && !this.conflictResolvers.get(entry.collection)) {
|
|
404
|
+
if (isDeleteMarker(remoteEnvelope)) {
|
|
405
|
+
await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
|
|
406
|
+
completed.push(i);
|
|
407
|
+
} else {
|
|
408
|
+
await this.remote.put(this.vault, entry.collection, entry.id, envelope);
|
|
409
|
+
completed.push(i);
|
|
410
|
+
pushed++;
|
|
411
|
+
}
|
|
412
|
+
} else {
|
|
413
|
+
const { handled, conflict } = await this.handleConflict(
|
|
414
|
+
entry.collection,
|
|
415
|
+
entry.id,
|
|
416
|
+
envelope,
|
|
417
|
+
remoteEnvelope,
|
|
418
|
+
"push"
|
|
419
|
+
);
|
|
420
|
+
conflicts.push(conflict);
|
|
421
|
+
if (handled === "local") {
|
|
422
|
+
await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
|
|
423
|
+
completed.push(i);
|
|
424
|
+
pushed++;
|
|
425
|
+
} else if (handled === "remote") {
|
|
426
|
+
await this.applyRemote(entry.collection, entry.id, conflict.remote);
|
|
427
|
+
completed.push(i);
|
|
428
|
+
} else if (handled === "merged" && conflict.local !== envelope) {
|
|
429
|
+
const merged = conflict.local;
|
|
430
|
+
await this.remote.put(this.vault, entry.collection, entry.id, merged);
|
|
431
|
+
await this.applyRemote(entry.collection, entry.id, merged);
|
|
432
|
+
completed.push(i);
|
|
433
|
+
pushed++;
|
|
434
|
+
}
|
|
403
435
|
}
|
|
404
436
|
}
|
|
405
437
|
} else {
|
|
@@ -416,7 +448,7 @@ var SyncEngine = class {
|
|
|
416
448
|
}
|
|
417
449
|
this.lastPush = (/* @__PURE__ */ new Date()).toISOString();
|
|
418
450
|
await this.persistMeta();
|
|
419
|
-
const result = { pushed, conflicts, errors };
|
|
451
|
+
const result = { pushed, conflicts, errors, erasures };
|
|
420
452
|
this.emitter.emit("sync:push", result);
|
|
421
453
|
return result;
|
|
422
454
|
}
|
|
@@ -425,6 +457,7 @@ var SyncEngine = class {
|
|
|
425
457
|
await this.ensureLoaded();
|
|
426
458
|
let pulled = 0;
|
|
427
459
|
const conflicts = [];
|
|
460
|
+
const erasures = [];
|
|
428
461
|
const errors = [];
|
|
429
462
|
const filter = options?.collections ? new Set(this.pairExpander?.(options.collections) ?? options.collections) : null;
|
|
430
463
|
try {
|
|
@@ -434,14 +467,44 @@ var SyncEngine = class {
|
|
|
434
467
|
continue;
|
|
435
468
|
}
|
|
436
469
|
for (const [id, remoteEnvelope] of Object.entries(records)) {
|
|
437
|
-
if (options?.modifiedSince && remoteEnvelope._ts <= options.modifiedSince) {
|
|
470
|
+
if (options?.modifiedSince && remoteEnvelope._ts <= options.modifiedSince && !isTombstoneShape(remoteEnvelope) && !isDeleteMarker(remoteEnvelope)) {
|
|
438
471
|
continue;
|
|
439
472
|
}
|
|
440
473
|
try {
|
|
441
474
|
const localEnvelope = await this.local.get(this.vault, collName, id);
|
|
475
|
+
const remoteIsTombstone = isTombstoneShape(remoteEnvelope);
|
|
442
476
|
if (!localEnvelope) {
|
|
443
|
-
await this.
|
|
477
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
478
|
+
pulled++;
|
|
479
|
+
} else if (isTombstoneShape(localEnvelope)) {
|
|
480
|
+
if (remoteIsTombstone) {
|
|
481
|
+
if (remoteEnvelope._v > localEnvelope._v) await this.applyRemote(collName, id, remoteEnvelope);
|
|
482
|
+
} else {
|
|
483
|
+
erasures.push(await this.reassertTombstone(collName, id, localEnvelope, remoteEnvelope));
|
|
484
|
+
}
|
|
485
|
+
} else if (remoteIsTombstone) {
|
|
486
|
+
const wasDirty = this.dirty.some((d) => d.collection === collName && d.id === id);
|
|
487
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
488
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
444
489
|
pulled++;
|
|
490
|
+
if (wasDirty) erasures.push(this.reportErasure(collName, id, remoteEnvelope, localEnvelope, "pull"));
|
|
491
|
+
} else if (remoteEnvelope._v === localEnvelope._v && isDeleteMarker(remoteEnvelope) !== isDeleteMarker(localEnvelope)) {
|
|
492
|
+
const resolver = this.conflictResolvers.get(collName);
|
|
493
|
+
if (resolver) {
|
|
494
|
+
const winner = await resolver(id, localEnvelope, remoteEnvelope);
|
|
495
|
+
if (winner !== localEnvelope && winner !== null) {
|
|
496
|
+
if (winner !== remoteEnvelope) {
|
|
497
|
+
await this.remote.put(this.vault, collName, id, winner);
|
|
498
|
+
}
|
|
499
|
+
await this.applyRemote(collName, id, winner);
|
|
500
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
501
|
+
pulled++;
|
|
502
|
+
}
|
|
503
|
+
} else if (isDeleteMarker(remoteEnvelope)) {
|
|
504
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
505
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
506
|
+
pulled++;
|
|
507
|
+
}
|
|
445
508
|
} else if (remoteEnvelope._v > localEnvelope._v) {
|
|
446
509
|
const isDirty = this.dirty.some((d) => d.collection === collName && d.id === id);
|
|
447
510
|
if (isDirty) {
|
|
@@ -454,17 +517,17 @@ var SyncEngine = class {
|
|
|
454
517
|
);
|
|
455
518
|
conflicts.push(conflict);
|
|
456
519
|
if (handled === "remote") {
|
|
457
|
-
await this.
|
|
520
|
+
await this.applyRemote(collName, id, conflict.remote);
|
|
458
521
|
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
459
522
|
pulled++;
|
|
460
523
|
} else if (handled === "merged" && conflict.local !== localEnvelope) {
|
|
461
524
|
const merged = conflict.local;
|
|
462
|
-
await this.
|
|
525
|
+
await this.applyRemote(collName, id, merged);
|
|
463
526
|
this.dirty = this.dirty.filter((d) => !(d.collection === collName && d.id === id));
|
|
464
527
|
pulled++;
|
|
465
528
|
}
|
|
466
529
|
} else {
|
|
467
|
-
await this.
|
|
530
|
+
await this.applyRemote(collName, id, remoteEnvelope);
|
|
468
531
|
pulled++;
|
|
469
532
|
}
|
|
470
533
|
}
|
|
@@ -478,7 +541,7 @@ var SyncEngine = class {
|
|
|
478
541
|
}
|
|
479
542
|
this.lastPull = (/* @__PURE__ */ new Date()).toISOString();
|
|
480
543
|
await this.persistMeta();
|
|
481
|
-
const result = { pulled, conflicts, errors };
|
|
544
|
+
const result = { pulled, conflicts, errors, erasures };
|
|
482
545
|
this.emitter.emit("sync:pull", result);
|
|
483
546
|
return result;
|
|
484
547
|
}
|
|
@@ -497,6 +560,7 @@ var SyncEngine = class {
|
|
|
497
560
|
await this.ensureLoaded();
|
|
498
561
|
let pushed = 0;
|
|
499
562
|
const conflicts = [];
|
|
563
|
+
const erasures = [];
|
|
500
564
|
const errors = [];
|
|
501
565
|
const completed = [];
|
|
502
566
|
for (let i = 0; i < this.dirty.length; i++) {
|
|
@@ -513,6 +577,12 @@ var SyncEngine = class {
|
|
|
513
577
|
completed.push(i);
|
|
514
578
|
continue;
|
|
515
579
|
}
|
|
580
|
+
if (isTombstoneShape(envelope)) {
|
|
581
|
+
await this.remote.put(this.vault, entry.collection, entry.id, envelope);
|
|
582
|
+
completed.push(i);
|
|
583
|
+
pushed++;
|
|
584
|
+
continue;
|
|
585
|
+
}
|
|
516
586
|
try {
|
|
517
587
|
await this.remote.put(
|
|
518
588
|
this.vault,
|
|
@@ -527,27 +597,42 @@ var SyncEngine = class {
|
|
|
527
597
|
if (err instanceof ConflictError) {
|
|
528
598
|
const remoteEnvelope = await this.remote.get(this.vault, entry.collection, entry.id);
|
|
529
599
|
if (remoteEnvelope) {
|
|
530
|
-
|
|
531
|
-
entry.collection,
|
|
532
|
-
entry.id,
|
|
533
|
-
envelope,
|
|
534
|
-
remoteEnvelope,
|
|
535
|
-
"push"
|
|
536
|
-
);
|
|
537
|
-
conflicts.push(conflict);
|
|
538
|
-
if (handled === "local") {
|
|
539
|
-
await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
|
|
540
|
-
completed.push(i);
|
|
541
|
-
pushed++;
|
|
542
|
-
} else if (handled === "remote") {
|
|
543
|
-
await this.local.put(this.vault, entry.collection, entry.id, conflict.remote);
|
|
600
|
+
if (isTombstoneShape(remoteEnvelope)) {
|
|
601
|
+
await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
|
|
602
|
+
erasures.push(this.reportErasure(entry.collection, entry.id, remoteEnvelope, envelope, "push"));
|
|
544
603
|
completed.push(i);
|
|
545
|
-
} else if (
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
604
|
+
} else if (remoteEnvelope._v === envelope._v && isDeleteMarker(remoteEnvelope) !== isDeleteMarker(envelope) && !this.conflictResolvers.get(entry.collection)) {
|
|
605
|
+
if (isDeleteMarker(remoteEnvelope)) {
|
|
606
|
+
await this.applyRemote(entry.collection, entry.id, remoteEnvelope);
|
|
607
|
+
completed.push(i);
|
|
608
|
+
} else {
|
|
609
|
+
await this.remote.put(this.vault, entry.collection, entry.id, envelope);
|
|
610
|
+
completed.push(i);
|
|
611
|
+
pushed++;
|
|
612
|
+
}
|
|
613
|
+
} else {
|
|
614
|
+
const { handled, conflict } = await this.handleConflict(
|
|
615
|
+
entry.collection,
|
|
616
|
+
entry.id,
|
|
617
|
+
envelope,
|
|
618
|
+
remoteEnvelope,
|
|
619
|
+
"push"
|
|
620
|
+
);
|
|
621
|
+
conflicts.push(conflict);
|
|
622
|
+
if (handled === "local") {
|
|
623
|
+
await this.remote.put(this.vault, entry.collection, entry.id, conflict.local);
|
|
624
|
+
completed.push(i);
|
|
625
|
+
pushed++;
|
|
626
|
+
} else if (handled === "remote") {
|
|
627
|
+
await this.applyRemote(entry.collection, entry.id, conflict.remote);
|
|
628
|
+
completed.push(i);
|
|
629
|
+
} else if (handled === "merged" && conflict.local !== envelope) {
|
|
630
|
+
const merged = conflict.local;
|
|
631
|
+
await this.remote.put(this.vault, entry.collection, entry.id, merged);
|
|
632
|
+
await this.applyRemote(entry.collection, entry.id, merged);
|
|
633
|
+
completed.push(i);
|
|
634
|
+
pushed++;
|
|
635
|
+
}
|
|
551
636
|
}
|
|
552
637
|
}
|
|
553
638
|
} else {
|
|
@@ -564,7 +649,7 @@ var SyncEngine = class {
|
|
|
564
649
|
}
|
|
565
650
|
this.lastPush = (/* @__PURE__ */ new Date()).toISOString();
|
|
566
651
|
await this.persistMeta();
|
|
567
|
-
const result = { pushed, conflicts, errors };
|
|
652
|
+
const result = { pushed, conflicts, errors, erasures };
|
|
568
653
|
this.emitter.emit("sync:push", result);
|
|
569
654
|
return result;
|
|
570
655
|
}
|
|
@@ -613,6 +698,33 @@ var SyncEngine = class {
|
|
|
613
698
|
this.isOnline = false;
|
|
614
699
|
this.emitter.emit("sync:offline", void 0);
|
|
615
700
|
};
|
|
701
|
+
/** Apply an envelope to the local store and refresh in-memory views (#598). */
|
|
702
|
+
async applyRemote(collection, id, envelope) {
|
|
703
|
+
await this.local.put(this.vault, collection, id, envelope);
|
|
704
|
+
await this.cacheInvalidator?.(collection, id);
|
|
705
|
+
}
|
|
706
|
+
/** Record + emit a tombstone enforcement (#590). */
|
|
707
|
+
reportErasure(collection, id, tombstone, suppressed, direction) {
|
|
708
|
+
const enforcement = { vault: this.vault, collection, id, tombstone, suppressed, direction };
|
|
709
|
+
this.emitter.emit("sync:erasure", enforcement);
|
|
710
|
+
return enforcement;
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Re-assert a local tombstone over a live remote envelope (#590): the shred
|
|
714
|
+
* wins in both directions, regardless of `_v`. Bumps the tombstone to the
|
|
715
|
+
* suppressed envelope's `_v` when higher so per-key version counters stay
|
|
716
|
+
* monotonic on every store; `_by` (the shredding actor) is preserved.
|
|
717
|
+
*/
|
|
718
|
+
async reassertTombstone(collection, id, tombstone, suppressedRemote) {
|
|
719
|
+
let winner = tombstone;
|
|
720
|
+
if (suppressedRemote._v > tombstone._v) {
|
|
721
|
+
winner = { ...tombstone, _v: suppressedRemote._v, _ts: (/* @__PURE__ */ new Date()).toISOString() };
|
|
722
|
+
await this.applyRemote(collection, id, winner);
|
|
723
|
+
}
|
|
724
|
+
await this.remote.put(this.vault, collection, id, winner);
|
|
725
|
+
this.dirty = this.dirty.filter((d) => !(d.collection === collection && d.id === id));
|
|
726
|
+
return this.reportErasure(collection, id, winner, suppressedRemote, "pull");
|
|
727
|
+
}
|
|
616
728
|
/**
|
|
617
729
|
* Resolve a conflict, checking per-collection resolvers first,
|
|
618
730
|
* then falling back to the db-level `ConflictStrategy`.
|
|
@@ -755,7 +867,8 @@ var SyncTransaction = class {
|
|
|
755
867
|
return {
|
|
756
868
|
status: pushResult.conflicts.length > 0 ? "conflict" : "committed",
|
|
757
869
|
pushed: pushResult.pushed,
|
|
758
|
-
conflicts: pushResult.conflicts
|
|
870
|
+
conflicts: pushResult.conflicts,
|
|
871
|
+
...pushResult.erasures?.length ? { erasures: pushResult.erasures } : {}
|
|
759
872
|
};
|
|
760
873
|
}
|
|
761
874
|
};
|
|
@@ -765,4 +878,4 @@ export {
|
|
|
765
878
|
SyncEngine,
|
|
766
879
|
SyncTransaction
|
|
767
880
|
};
|
|
768
|
-
//# sourceMappingURL=chunk-
|
|
881
|
+
//# sourceMappingURL=chunk-H3MPSYCH.js.map
|