@noy-db/hub 0.2.0-pre.19 → 0.2.0-pre.20
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/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.d.cts +3 -3
- package/dist/aggregate/index.d.ts +3 -3
- package/dist/aggregate/index.js +5 -5
- package/dist/attestation/index.cjs.map +1 -1
- package/dist/attestation/index.d.cts +4 -4
- package/dist/attestation/index.d.ts +4 -4
- package/dist/attestation/index.js +6 -6
- package/dist/blobs/index.cjs +252 -2
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +6 -6
- package/dist/blobs/index.d.ts +6 -6
- package/dist/blobs/index.js +11 -7
- package/dist/blobs/index.js.map +1 -1
- package/dist/bundle/index.cjs +81 -7
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +6 -6
- package/dist/bundle/index.d.ts +6 -6
- package/dist/bundle/index.js +10 -10
- package/dist/{chunk-U7JNBSS3.js → chunk-2XA2ZML4.js} +3 -3
- package/dist/chunk-2XA2ZML4.js.map +1 -0
- package/dist/{chunk-OKOKPYWH.js → chunk-37VGJM3T.js} +2 -2
- package/dist/{chunk-B6E5IRPJ.js → chunk-3HNKR65T.js} +3 -3
- package/dist/{chunk-6KESZO5D.js → chunk-5YTXYPES.js} +5 -5
- package/dist/{chunk-7HD67R6U.js → chunk-6QAZ5O6X.js} +2 -2
- package/dist/{chunk-XPH3FWME.js → chunk-6QE4DUYC.js} +2 -2
- package/dist/{chunk-4ULLGYPA.js → chunk-7MRT7EPB.js} +3 -3
- package/dist/{chunk-KYGGXXT6.js → chunk-7PH4OPBZ.js} +119 -58
- package/dist/chunk-7PH4OPBZ.js.map +1 -0
- package/dist/{chunk-3FSMVWBN.js → chunk-AI4USDRI.js} +4 -4
- package/dist/{chunk-GKQAU52M.js → chunk-BZW5IL43.js} +4 -4
- package/dist/{chunk-NN6IISZO.js → chunk-C2RJVZZL.js} +2 -2
- package/dist/{chunk-VNUE6FHP.js → chunk-C6W5KVDV.js} +3 -3
- package/dist/{chunk-KNKNOJFS.js → chunk-CQYEDODS.js} +3 -3
- package/dist/{chunk-FPHRTW2Z.js → chunk-EYK72OTL.js} +5 -5
- package/dist/{chunk-FBLAWK6A.js → chunk-F5GWNSE2.js} +2 -2
- package/dist/{chunk-Y5J63SMF.js → chunk-F5ILTHMU.js} +5 -5
- package/dist/{chunk-M3FPNTO2.js → chunk-FRRJIUSI.js} +4 -4
- package/dist/chunk-FRRJIUSI.js.map +1 -0
- package/dist/{chunk-Q5MCHUXZ.js → chunk-GJTKMME7.js} +2 -2
- package/dist/{chunk-S22UOMHM.js → chunk-HYJMAV53.js} +6 -6
- package/dist/{chunk-YZE6C3TQ.js → chunk-I3IYTUUI.js} +3 -3
- package/dist/{chunk-5IGWRMEC.js → chunk-IVZWHIEK.js} +5 -5
- package/dist/{chunk-7C6VFNIY.js → chunk-IW4L4X65.js} +2 -2
- package/dist/{chunk-V3VIRTTE.js → chunk-IY24WS2P.js} +3 -3
- package/dist/{chunk-IVP5IVON.js → chunk-J6RGRZOY.js} +2 -2
- package/dist/{chunk-DY3EOJEN.js → chunk-JBBWALNI.js} +2 -2
- package/dist/{chunk-YX333DPS.js → chunk-JDCPRJVS.js} +4 -4
- package/dist/{chunk-E66DSTJP.js → chunk-JOK73NDT.js} +3 -3
- package/dist/{chunk-G4PYA575.js → chunk-JTI57WRT.js} +2 -2
- package/dist/{chunk-OBMYMKGO.js → chunk-JYNH4FIM.js} +4 -4
- package/dist/{chunk-GYAWXHFO.js → chunk-KOAJ3TZM.js} +2 -2
- package/dist/{chunk-X7FJMKT3.js → chunk-MBXKRHSS.js} +2 -2
- package/dist/{chunk-WFK2EVYU.js → chunk-NSXNXLYM.js} +2 -2
- package/dist/{chunk-3Q2AOPLT.js → chunk-NV4IHBZS.js} +5 -5
- package/dist/{chunk-H42KZXNV.js → chunk-O5XKZCUD.js} +5 -5
- package/dist/{chunk-DJF3FXW5.js → chunk-OTWT6BAJ.js} +18 -1
- package/dist/chunk-OTWT6BAJ.js.map +1 -0
- package/dist/{chunk-6OSOE6BY.js → chunk-S45MDEEF.js} +2 -2
- package/dist/{chunk-S3XA7G35.js → chunk-SQKAECUL.js} +2 -2
- package/dist/{chunk-YLRRU72W.js → chunk-SQOK5UM6.js} +2 -2
- package/dist/{chunk-SHIUFIPW.js → chunk-TA6HPKWQ.js} +1 -1
- package/dist/chunk-TA6HPKWQ.js.map +1 -0
- package/dist/{chunk-V5FZWQNN.js → chunk-TAMRU7A2.js} +4 -4
- package/dist/{chunk-PWFTQHYX.js → chunk-TGIJTNM3.js} +2 -2
- package/dist/{chunk-VEIVAYJ7.js → chunk-TNH5SLCD.js} +2 -2
- package/dist/{chunk-IBVTH4JR.js → chunk-TYMDCIQM.js} +4 -4
- package/dist/{chunk-LSIIPKYT.js → chunk-U2XSUCDF.js} +2 -2
- package/dist/{chunk-MI36HL5G.js → chunk-UU6M64HI.js} +4 -4
- package/dist/{chunk-KEDJDWWQ.js → chunk-WE2BUQD2.js} +3 -3
- package/dist/{chunk-OY7RX2VL.js → chunk-WWVJXBOT.js} +256 -8
- package/dist/chunk-WWVJXBOT.js.map +1 -0
- package/dist/{chunk-CYNTFU2D.js → chunk-YPIOFSN3.js} +2 -2
- package/dist/{chunk-PTGQPWMV.js → chunk-ZONKSLF2.js} +2 -2
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-B46VNH6X.js → crypto-456N7UVX.js} +3 -3
- package/dist/{delegation-5HON72PV.js → delegation-DP4COTXB.js} +5 -5
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +6 -6
- package/dist/derivations/index.d.ts +6 -6
- package/dist/derivations/index.js +4 -4
- package/dist/{dev-unlock-BR1rMOS-.d.cts → dev-unlock-CY0HIZA0.d.cts} +1 -1
- package/dist/{dev-unlock-whL49sxV.d.ts → dev-unlock-CpKSkl2c.d.ts} +1 -1
- package/dist/{errors-DL-zTrrF.d.cts → errors-Dkc_fi-S.d.cts} +21 -1
- package/dist/{errors-DL-zTrrF.d.ts → errors-Dkc_fi-S.d.ts} +21 -1
- package/dist/executor-4IEW4KG5.js +8 -0
- package/dist/executor-KYJCJCIN.js +12 -0
- package/dist/executor-W7VIBOBZ.js +8 -0
- package/dist/{fanout-sidecar-DCQWJQ6S.js → fanout-sidecar-YXNAEZ33.js} +2 -2
- package/dist/forget/index.js +4 -4
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +6 -6
- package/dist/guards/index.d.ts +6 -6
- package/dist/guards/index.js +3 -3
- package/dist/{hash-BEUBmmI4.d.cts → hash-BSd0-_L8.d.cts} +1 -1
- package/dist/{hash-Dtb7FwWd.d.ts → hash-BnBQx39y.d.ts} +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +6 -6
- package/dist/history/index.d.ts +6 -6
- package/dist/history/index.js +5 -5
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +5 -5
- package/dist/i18n/index.d.ts +5 -5
- package/dist/i18n/index.js +6 -6
- package/dist/{index-BelbyUwz.d.ts → index-Bm9hIY7t.d.ts} +2 -2
- package/dist/{index-BM7O48Ur.d.cts → index-tZqVB9g5.d.cts} +2 -2
- package/dist/index.cjs +358 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -16
- package/dist/index.d.ts +42 -16
- package/dist/index.js +73 -46
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.js +4 -4
- package/dist/issue-JXC6T2QR.js +12 -0
- package/dist/{ledger-LS6GXCBP.js → ledger-I7JUYP4L.js} +5 -5
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +6 -6
- package/dist/materialized-views/index.d.ts +6 -6
- package/dist/materialized-views/index.js +8 -8
- package/dist/mime-magic-BnJCGJzB.d.cts +103 -0
- package/dist/mime-magic-CjSyakO4.d.ts +103 -0
- package/dist/noydb-ZZCRF6TE.js +38 -0
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +6 -6
- package/dist/overlay-views/index.d.ts +6 -6
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +5 -5
- package/dist/periods/index.d.ts +5 -5
- package/dist/periods/index.js +5 -5
- package/dist/{public-envelope-AGU6SS4Z.js → public-envelope-5XRTUNKF.js} +4 -4
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -3
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +7 -7
- package/dist/registry-ATRHOG5B.js +8 -0
- package/dist/registry-LEHB26TY.js +8 -0
- package/dist/{registry-RDPTFXQ7.js → registry-NWHOLD5M.js} +3 -3
- package/dist/{revoke-IFLXEZA5.js → revoke-5IEK22KT.js} +6 -6
- package/dist/sealed-record/index.cjs.map +1 -1
- package/dist/sealed-record/index.d.cts +1 -1
- package/dist/sealed-record/index.d.ts +1 -1
- package/dist/sealed-record/index.js +2 -2
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +6 -6
- package/dist/session/index.d.ts +6 -6
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +5 -5
- package/dist/shadow/index.d.ts +5 -5
- package/dist/shadow/index.js +2 -2
- package/dist/{signer-UNWOUJAK.js → signer-I6YARZQA.js} +5 -5
- package/dist/snapshots/index.cjs.map +1 -1
- package/dist/snapshots/index.d.cts +5 -5
- package/dist/snapshots/index.d.ts +5 -5
- package/dist/snapshots/index.js +4 -4
- package/dist/{stale-NTEV5SLX.js → stale-CPESGAPL.js} +2 -2
- package/dist/{state-vault-TUTFRTOA.js → state-vault-JR3CFGNP.js} +4 -4
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +5 -5
- package/dist/store/index.d.ts +5 -5
- package/dist/store/index.js +2 -2
- package/dist/{strategy-BDxQnnTX.d.ts → strategy-54eIwox5.d.ts} +1 -1
- package/dist/{strategy-C5ol6NdV.d.cts → strategy-WtB-jXYv.d.cts} +1 -1
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +4 -4
- package/dist/sync/index.d.ts +4 -4
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +5 -5
- package/dist/team/index.d.ts +5 -5
- package/dist/team/index.js +8 -8
- package/dist/{transition-guard-C__YeF3_.d.ts → transition-guard-D4bfIAiW.d.ts} +1 -1
- package/dist/{transition-guard-B1N82hMf.d.cts → transition-guard-Dmpqzg-_.d.cts} +1 -1
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +5 -5
- package/dist/tx/index.d.ts +5 -5
- package/dist/tx/index.js +3 -3
- package/dist/{types-CraiZOyO.d.ts → types-DLfWFr6U.d.ts} +374 -139
- package/dist/{types-D-gr5t0G.d.cts → types-DyOI6XZ_.d.cts} +374 -139
- package/dist/{ulid-FFRRHkVf.d.ts → ulid-B2L_aqVA.d.ts} +1 -1
- package/dist/{ulid-DQnSAP5W.d.cts → ulid-LaxfH2tK.d.cts} +1 -1
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/{vault-group-27EV7KB4.js → vault-group-BB246VIM.js} +7 -7
- package/dist/{with-materialized-view-BboqxyV3.d.cts → with-materialized-view-CeZYGJVf.d.cts} +1 -1
- package/dist/{with-materialized-view-CguCeVcT.d.ts → with-materialized-view-DNULSxoP.d.ts} +1 -1
- package/dist/{with-overlayed-view-DO08u_tx.d.ts → with-overlayed-view-C9joG7UZ.d.ts} +1 -1
- package/dist/{with-overlayed-view-mmsg5Of3.d.cts → with-overlayed-view-kdcPGHih.d.cts} +1 -1
- package/dist/{with-rollup-_TyBzz3T.d.ts → with-rollup-DJDbrxjf.d.ts} +1 -1
- package/dist/{with-rollup-aaxOZcIb.d.cts → with-rollup-s58XAeWO.d.cts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-DJF3FXW5.js.map +0 -1
- package/dist/chunk-KYGGXXT6.js.map +0 -1
- package/dist/chunk-M3FPNTO2.js.map +0 -1
- package/dist/chunk-OY7RX2VL.js.map +0 -1
- package/dist/chunk-SHIUFIPW.js.map +0 -1
- package/dist/chunk-U7JNBSS3.js.map +0 -1
- package/dist/executor-44R5CUS2.js +0 -12
- package/dist/executor-AOACUK7Z.js +0 -8
- package/dist/executor-OKFLQCDW.js +0 -8
- package/dist/issue-EPA2PSWP.js +0 -12
- package/dist/mime-magic-CBBSOkjm.d.cts +0 -50
- package/dist/mime-magic-CBBSOkjm.d.ts +0 -50
- package/dist/noydb-BVKFP74P.js +0 -38
- package/dist/registry-ERNAMRDE.js +0 -8
- package/dist/registry-EXTHSXQW.js +0 -8
- /package/dist/{chunk-OKOKPYWH.js.map → chunk-37VGJM3T.js.map} +0 -0
- /package/dist/{chunk-B6E5IRPJ.js.map → chunk-3HNKR65T.js.map} +0 -0
- /package/dist/{chunk-6KESZO5D.js.map → chunk-5YTXYPES.js.map} +0 -0
- /package/dist/{chunk-7HD67R6U.js.map → chunk-6QAZ5O6X.js.map} +0 -0
- /package/dist/{chunk-XPH3FWME.js.map → chunk-6QE4DUYC.js.map} +0 -0
- /package/dist/{chunk-4ULLGYPA.js.map → chunk-7MRT7EPB.js.map} +0 -0
- /package/dist/{chunk-3FSMVWBN.js.map → chunk-AI4USDRI.js.map} +0 -0
- /package/dist/{chunk-GKQAU52M.js.map → chunk-BZW5IL43.js.map} +0 -0
- /package/dist/{chunk-NN6IISZO.js.map → chunk-C2RJVZZL.js.map} +0 -0
- /package/dist/{chunk-VNUE6FHP.js.map → chunk-C6W5KVDV.js.map} +0 -0
- /package/dist/{chunk-KNKNOJFS.js.map → chunk-CQYEDODS.js.map} +0 -0
- /package/dist/{chunk-FPHRTW2Z.js.map → chunk-EYK72OTL.js.map} +0 -0
- /package/dist/{chunk-FBLAWK6A.js.map → chunk-F5GWNSE2.js.map} +0 -0
- /package/dist/{chunk-Y5J63SMF.js.map → chunk-F5ILTHMU.js.map} +0 -0
- /package/dist/{chunk-Q5MCHUXZ.js.map → chunk-GJTKMME7.js.map} +0 -0
- /package/dist/{chunk-S22UOMHM.js.map → chunk-HYJMAV53.js.map} +0 -0
- /package/dist/{chunk-YZE6C3TQ.js.map → chunk-I3IYTUUI.js.map} +0 -0
- /package/dist/{chunk-5IGWRMEC.js.map → chunk-IVZWHIEK.js.map} +0 -0
- /package/dist/{chunk-7C6VFNIY.js.map → chunk-IW4L4X65.js.map} +0 -0
- /package/dist/{chunk-V3VIRTTE.js.map → chunk-IY24WS2P.js.map} +0 -0
- /package/dist/{chunk-IVP5IVON.js.map → chunk-J6RGRZOY.js.map} +0 -0
- /package/dist/{chunk-DY3EOJEN.js.map → chunk-JBBWALNI.js.map} +0 -0
- /package/dist/{chunk-YX333DPS.js.map → chunk-JDCPRJVS.js.map} +0 -0
- /package/dist/{chunk-E66DSTJP.js.map → chunk-JOK73NDT.js.map} +0 -0
- /package/dist/{chunk-G4PYA575.js.map → chunk-JTI57WRT.js.map} +0 -0
- /package/dist/{chunk-OBMYMKGO.js.map → chunk-JYNH4FIM.js.map} +0 -0
- /package/dist/{chunk-GYAWXHFO.js.map → chunk-KOAJ3TZM.js.map} +0 -0
- /package/dist/{chunk-X7FJMKT3.js.map → chunk-MBXKRHSS.js.map} +0 -0
- /package/dist/{chunk-WFK2EVYU.js.map → chunk-NSXNXLYM.js.map} +0 -0
- /package/dist/{chunk-3Q2AOPLT.js.map → chunk-NV4IHBZS.js.map} +0 -0
- /package/dist/{chunk-H42KZXNV.js.map → chunk-O5XKZCUD.js.map} +0 -0
- /package/dist/{chunk-6OSOE6BY.js.map → chunk-S45MDEEF.js.map} +0 -0
- /package/dist/{chunk-S3XA7G35.js.map → chunk-SQKAECUL.js.map} +0 -0
- /package/dist/{chunk-YLRRU72W.js.map → chunk-SQOK5UM6.js.map} +0 -0
- /package/dist/{chunk-V5FZWQNN.js.map → chunk-TAMRU7A2.js.map} +0 -0
- /package/dist/{chunk-PWFTQHYX.js.map → chunk-TGIJTNM3.js.map} +0 -0
- /package/dist/{chunk-VEIVAYJ7.js.map → chunk-TNH5SLCD.js.map} +0 -0
- /package/dist/{chunk-IBVTH4JR.js.map → chunk-TYMDCIQM.js.map} +0 -0
- /package/dist/{chunk-LSIIPKYT.js.map → chunk-U2XSUCDF.js.map} +0 -0
- /package/dist/{chunk-MI36HL5G.js.map → chunk-UU6M64HI.js.map} +0 -0
- /package/dist/{chunk-KEDJDWWQ.js.map → chunk-WE2BUQD2.js.map} +0 -0
- /package/dist/{chunk-CYNTFU2D.js.map → chunk-YPIOFSN3.js.map} +0 -0
- /package/dist/{chunk-PTGQPWMV.js.map → chunk-ZONKSLF2.js.map} +0 -0
- /package/dist/{crypto-B46VNH6X.js.map → crypto-456N7UVX.js.map} +0 -0
- /package/dist/{delegation-5HON72PV.js.map → delegation-DP4COTXB.js.map} +0 -0
- /package/dist/{executor-44R5CUS2.js.map → executor-4IEW4KG5.js.map} +0 -0
- /package/dist/{executor-AOACUK7Z.js.map → executor-KYJCJCIN.js.map} +0 -0
- /package/dist/{executor-OKFLQCDW.js.map → executor-W7VIBOBZ.js.map} +0 -0
- /package/dist/{fanout-sidecar-DCQWJQ6S.js.map → fanout-sidecar-YXNAEZ33.js.map} +0 -0
- /package/dist/{issue-EPA2PSWP.js.map → issue-JXC6T2QR.js.map} +0 -0
- /package/dist/{ledger-LS6GXCBP.js.map → ledger-I7JUYP4L.js.map} +0 -0
- /package/dist/{noydb-BVKFP74P.js.map → noydb-ZZCRF6TE.js.map} +0 -0
- /package/dist/{public-envelope-AGU6SS4Z.js.map → public-envelope-5XRTUNKF.js.map} +0 -0
- /package/dist/{registry-ERNAMRDE.js.map → registry-ATRHOG5B.js.map} +0 -0
- /package/dist/{registry-EXTHSXQW.js.map → registry-LEHB26TY.js.map} +0 -0
- /package/dist/{registry-RDPTFXQ7.js.map → registry-NWHOLD5M.js.map} +0 -0
- /package/dist/{revoke-IFLXEZA5.js.map → revoke-5IEK22KT.js.map} +0 -0
- /package/dist/{signer-UNWOUJAK.js.map → signer-I6YARZQA.js.map} +0 -0
- /package/dist/{stale-NTEV5SLX.js.map → stale-CPESGAPL.js.map} +0 -0
- /package/dist/{state-vault-TUTFRTOA.js.map → state-vault-JR3CFGNP.js.map} +0 -0
- /package/dist/{vault-group-27EV7KB4.js.map → vault-group-BB246VIM.js.map} +0 -0
package/dist/blobs/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { B as BlobStrategy } from '../types-
|
|
2
|
-
export { o as BLOB_CHUNKS_COLLECTION, p as BLOB_COLLECTION, q as BLOB_EVICTION_AUDIT_COLLECTION, r as BLOB_INDEX_COLLECTION, t as BLOB_SLOTS_PREFIX, u as BLOB_VERSIONS_PREFIX, w as BlobEvictionEntry, x as BlobFieldPolicy, y as BlobFieldsConfig, z as BlobObject, A as BlobPutOptions, C as BlobResponseOptions, E as BlobSet, F as BlobStrategyOpenArgs, G as CompactRunOptions, H as CompactionContext, J as CompactionResult, K as DEFAULT_CHUNK_SIZE, L as EXPORT_AUDIT_COLLECTION, M as ExportBlobsAbortedError, N as ExportBlobsAuditEntry, O as ExportBlobsHandle, Q as ExportBlobsOptions, R as ExportedBlob, T as
|
|
3
|
-
export { d as detectMagic,
|
|
1
|
+
import { B as BlobStrategy } from '../types-DyOI6XZ_.cjs';
|
|
2
|
+
export { o as BLOB_CHUNKS_COLLECTION, p as BLOB_COLLECTION, q as BLOB_EVICTION_AUDIT_COLLECTION, r as BLOB_INDEX_COLLECTION, t as BLOB_SLOTS_PREFIX, u as BLOB_VERSIONS_PREFIX, w as BlobEvictionEntry, x as BlobFieldPolicy, y as BlobFieldsConfig, z as BlobObject, A as BlobPutOptions, C as BlobResponseOptions, E as BlobSet, F as BlobStrategyOpenArgs, G as CompactRunOptions, H as CompactionContext, J as CompactionResult, K as DEFAULT_CHUNK_SIZE, L as EXPORT_AUDIT_COLLECTION, M as ExportBlobsAbortedError, N as ExportBlobsAuditEntry, O as ExportBlobsHandle, Q as ExportBlobsOptions, R as ExportedBlob, T as ObjectListEntry, U as ObjectMeta, V as ObjectProjection, W as ObjectUrlOptions, X as PutObjectOptions, Y as PutUrlOptions, Z as SlotInfo, _ as SlotRecord, $ as VersionRecord, a0 as createExportBlobsHandle, a1 as memoryObjectProjection, a2 as runCompaction } from '../types-DyOI6XZ_.cjs';
|
|
3
|
+
export { I as ImportExternalOptions, a as ImportExternalResult, b as ImportableCollection, d as detectMagic, c as detectMimeType, i as importExternalObjects, e as isPreCompressed } from '../mime-magic-BnJCGJzB.cjs';
|
|
4
4
|
import '../lazy-builder-eYZzLEL1.cjs';
|
|
5
5
|
import '../predicate-BmhBSPCH.cjs';
|
|
6
|
-
import '../strategy-
|
|
7
|
-
import '../errors-
|
|
6
|
+
import '../strategy-WtB-jXYv.cjs';
|
|
7
|
+
import '../errors-Dkc_fi-S.cjs';
|
|
8
8
|
import '../strategy-BSxFXGzb.cjs';
|
|
9
9
|
import '../index-BMmajblo.cjs';
|
|
10
|
-
import '../index-
|
|
10
|
+
import '../index-tZqVB9g5.cjs';
|
|
11
11
|
import '@noy-db/attestation';
|
|
12
12
|
|
|
13
13
|
/**
|
package/dist/blobs/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { B as BlobStrategy } from '../types-
|
|
2
|
-
export { o as BLOB_CHUNKS_COLLECTION, p as BLOB_COLLECTION, q as BLOB_EVICTION_AUDIT_COLLECTION, r as BLOB_INDEX_COLLECTION, t as BLOB_SLOTS_PREFIX, u as BLOB_VERSIONS_PREFIX, w as BlobEvictionEntry, x as BlobFieldPolicy, y as BlobFieldsConfig, z as BlobObject, A as BlobPutOptions, C as BlobResponseOptions, E as BlobSet, F as BlobStrategyOpenArgs, G as CompactRunOptions, H as CompactionContext, J as CompactionResult, K as DEFAULT_CHUNK_SIZE, L as EXPORT_AUDIT_COLLECTION, M as ExportBlobsAbortedError, N as ExportBlobsAuditEntry, O as ExportBlobsHandle, Q as ExportBlobsOptions, R as ExportedBlob, T as
|
|
3
|
-
export { d as detectMagic,
|
|
1
|
+
import { B as BlobStrategy } from '../types-DLfWFr6U.js';
|
|
2
|
+
export { o as BLOB_CHUNKS_COLLECTION, p as BLOB_COLLECTION, q as BLOB_EVICTION_AUDIT_COLLECTION, r as BLOB_INDEX_COLLECTION, t as BLOB_SLOTS_PREFIX, u as BLOB_VERSIONS_PREFIX, w as BlobEvictionEntry, x as BlobFieldPolicy, y as BlobFieldsConfig, z as BlobObject, A as BlobPutOptions, C as BlobResponseOptions, E as BlobSet, F as BlobStrategyOpenArgs, G as CompactRunOptions, H as CompactionContext, J as CompactionResult, K as DEFAULT_CHUNK_SIZE, L as EXPORT_AUDIT_COLLECTION, M as ExportBlobsAbortedError, N as ExportBlobsAuditEntry, O as ExportBlobsHandle, Q as ExportBlobsOptions, R as ExportedBlob, T as ObjectListEntry, U as ObjectMeta, V as ObjectProjection, W as ObjectUrlOptions, X as PutObjectOptions, Y as PutUrlOptions, Z as SlotInfo, _ as SlotRecord, $ as VersionRecord, a0 as createExportBlobsHandle, a1 as memoryObjectProjection, a2 as runCompaction } from '../types-DLfWFr6U.js';
|
|
3
|
+
export { I as ImportExternalOptions, a as ImportExternalResult, b as ImportableCollection, d as detectMagic, c as detectMimeType, i as importExternalObjects, e as isPreCompressed } from '../mime-magic-CjSyakO4.js';
|
|
4
4
|
import '../lazy-builder-ChSqcF5t.js';
|
|
5
5
|
import '../predicate-BmhBSPCH.js';
|
|
6
|
-
import '../strategy-
|
|
7
|
-
import '../errors-
|
|
6
|
+
import '../strategy-54eIwox5.js';
|
|
7
|
+
import '../errors-Dkc_fi-S.js';
|
|
8
8
|
import '../strategy-BSxFXGzb.js';
|
|
9
9
|
import '../index-BMmajblo.js';
|
|
10
|
-
import '../index-
|
|
10
|
+
import '../index-Bm9hIY7t.js';
|
|
11
11
|
import '@noy-db/attestation';
|
|
12
12
|
|
|
13
13
|
/**
|
package/dist/blobs/index.js
CHANGED
|
@@ -8,19 +8,21 @@ import {
|
|
|
8
8
|
DEFAULT_CHUNK_SIZE,
|
|
9
9
|
detectMagic,
|
|
10
10
|
detectMimeType,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
importExternalObjects,
|
|
12
|
+
isPreCompressed,
|
|
13
|
+
memoryObjectProjection
|
|
14
|
+
} from "../chunk-WWVJXBOT.js";
|
|
13
15
|
import {
|
|
14
16
|
BLOB_EVICTION_AUDIT_COLLECTION,
|
|
15
17
|
EXPORT_AUDIT_COLLECTION,
|
|
16
18
|
ExportBlobsAbortedError,
|
|
17
19
|
createExportBlobsHandle,
|
|
18
20
|
runCompaction
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
21
|
+
} from "../chunk-2XA2ZML4.js";
|
|
22
|
+
import "../chunk-BZW5IL43.js";
|
|
23
|
+
import "../chunk-TA6HPKWQ.js";
|
|
24
|
+
import "../chunk-37VGJM3T.js";
|
|
25
|
+
import "../chunk-OTWT6BAJ.js";
|
|
24
26
|
|
|
25
27
|
// src/blobs/active.ts
|
|
26
28
|
function withBlobs() {
|
|
@@ -44,7 +46,9 @@ export {
|
|
|
44
46
|
createExportBlobsHandle,
|
|
45
47
|
detectMagic,
|
|
46
48
|
detectMimeType,
|
|
49
|
+
importExternalObjects,
|
|
47
50
|
isPreCompressed,
|
|
51
|
+
memoryObjectProjection,
|
|
48
52
|
runCompaction,
|
|
49
53
|
withBlobs
|
|
50
54
|
};
|
package/dist/blobs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/blobs/active.ts"],"sourcesContent":["/**\n * Active blob strategy factory. Calling `blobs()` returns a\n * `BlobStrategy` whose `openSlot` constructs a real `BlobSet` bound\n * to the caller's record. The returned strategy is passed into\n * `createNoydb({ blobStrategy: blobs() })` to light up the\n * `collection.blob(id)` path.\n *\n * This module is only reachable through the `@noy-db/hub/blobs`\n * subpath — a consumer that never imports the subpath ships none of\n * this (ESM tree-shaking + hub's `\"sideEffects\": false`).\n */\n\nimport { BlobSet } from './blob-set.js'\nimport type { BlobStrategy } from './strategy.js'\n\n/**\n * Build a default `BlobStrategy` ready to pass into `createNoydb`.\n *\n * Named `withBlobs` (plugin-pattern canonical) rather than `blobs` to\n * avoid shadowing the very common local idiom\n * `const blobs = invoices.blob(id)` in user code.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withBlobs } from '@noy-db/hub/blobs'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * blobStrategy: withBlobs(),\n * })\n *\n * // Now live — delegates to BlobSet.\n * await db.vault('acme').collection('invoices').blob('inv-1').put('receipt.pdf', bytes)\n * ```\n */\nexport function withBlobs(): BlobStrategy {\n return {\n openSlot(args) {\n return new BlobSet(args)\n },\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/blobs/active.ts"],"sourcesContent":["/**\n * Active blob strategy factory. Calling `blobs()` returns a\n * `BlobStrategy` whose `openSlot` constructs a real `BlobSet` bound\n * to the caller's record. The returned strategy is passed into\n * `createNoydb({ blobStrategy: blobs() })` to light up the\n * `collection.blob(id)` path.\n *\n * This module is only reachable through the `@noy-db/hub/blobs`\n * subpath — a consumer that never imports the subpath ships none of\n * this (ESM tree-shaking + hub's `\"sideEffects\": false`).\n */\n\nimport { BlobSet } from './blob-set.js'\nimport type { BlobStrategy } from './strategy.js'\n\n/**\n * Build a default `BlobStrategy` ready to pass into `createNoydb`.\n *\n * Named `withBlobs` (plugin-pattern canonical) rather than `blobs` to\n * avoid shadowing the very common local idiom\n * `const blobs = invoices.blob(id)` in user code.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withBlobs } from '@noy-db/hub/blobs'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * blobStrategy: withBlobs(),\n * })\n *\n * // Now live — delegates to BlobSet.\n * await db.vault('acme').collection('invoices').blob('inv-1').put('receipt.pdf', bytes)\n * ```\n */\nexport function withBlobs(): BlobStrategy {\n return {\n openSlot(args) {\n return new BlobSet(args)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCO,SAAS,YAA0B;AACxC,SAAO;AAAA,IACL,SAAS,MAAM;AACb,aAAO,IAAI,QAAQ,IAAI;AAAA,IACzB;AAAA,EACF;AACF;","names":[]}
|
package/dist/bundle/index.cjs
CHANGED
|
@@ -31,7 +31,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
33
|
// src/errors.ts
|
|
34
|
-
var NoydbError, DecryptionError, TamperedError, InvalidKeyError, KeyringCorruptError, NoAccessError, ReadOnlyError, PermissionDeniedError, ExportCapabilityError, KeyringExpiredError, ImportCapabilityError, StoreCapabilityError, PrivilegeEscalationError, ReservedVaultNameError, FieldFrozenError, InvariantError, AmendmentForbiddenError, TierNotGrantedError, ElevationExpiredError, AlreadyElevatedError, TierDemoteDeniedError, DelegationTargetMissingError, ConflictError, LedgerContentionError, SequenceContentionError, SequenceOfflineError, NumberingUncertaintyError, BundleVersionConflictError, ValidationError, SchemaValidationError, SchemaUpdateError, SchemaFenceError, MigrationRequiredError, QuiesceTimeoutError, GroupCardinalityError, IndexRequiredError, UniqueConstraintError, UnsupportedIndexOptionError, IndexWriteFailureError, BundleIntegrityError, BundleSealMismatchError, ReservedCollectionNameError, LocaleNotSpecifiedError, StaticDictReadonlyError, UnknownDictCodeError, TranslatorNotConfiguredError, BackupLedgerError, BackupCorruptedError, PartitionExtractionError, TransferSealError, AdoptionStateError, AttestationError, JoinTooLargeError, CrossJoinTooLargeError, CrossJoinSourceUnknownError, DanglingReferenceError, DerivationCycleError, DerivationOutputShapeError, DerivationCapExceededError, MaterializedViewCycleError, MaterializedViewSourceUnknownError, MaterializedViewTooLargeError, OverlayBaseIsVirtualError, OverlayCollectionUnavailableError, OverlayNameCollisionError, OverlayIdMismatchError, UnknownShardError, ShardProvisioningError, DataResidencyError, CrossShardJoinError, VaultTemplateNotFoundError, ForgetStrategyNotConfiguredError, RecordCekNotFoundError;
|
|
34
|
+
var NoydbError, DebugPlaintextError, DebugReservedFieldError, DecryptionError, TamperedError, InvalidKeyError, KeyringCorruptError, NoAccessError, ReadOnlyError, PermissionDeniedError, ExportCapabilityError, KeyringExpiredError, ImportCapabilityError, StoreCapabilityError, PrivilegeEscalationError, ReservedVaultNameError, FieldFrozenError, InvariantError, AmendmentForbiddenError, TierNotGrantedError, ElevationExpiredError, AlreadyElevatedError, TierDemoteDeniedError, DelegationTargetMissingError, ConflictError, LedgerContentionError, SequenceContentionError, SequenceOfflineError, NumberingUncertaintyError, BundleVersionConflictError, ValidationError, SchemaValidationError, SchemaUpdateError, SchemaFenceError, MigrationRequiredError, QuiesceTimeoutError, GroupCardinalityError, IndexRequiredError, UniqueConstraintError, UnsupportedIndexOptionError, IndexWriteFailureError, BundleIntegrityError, BundleSealMismatchError, ReservedCollectionNameError, LocaleNotSpecifiedError, StaticDictReadonlyError, UnknownDictCodeError, TranslatorNotConfiguredError, BackupLedgerError, BackupCorruptedError, PartitionExtractionError, TransferSealError, AdoptionStateError, AttestationError, JoinTooLargeError, CrossJoinTooLargeError, CrossJoinSourceUnknownError, DanglingReferenceError, DerivationCycleError, DerivationOutputShapeError, DerivationCapExceededError, MaterializedViewCycleError, MaterializedViewSourceUnknownError, MaterializedViewTooLargeError, OverlayBaseIsVirtualError, OverlayCollectionUnavailableError, OverlayNameCollisionError, OverlayIdMismatchError, UnknownShardError, ShardProvisioningError, DataResidencyError, CrossShardJoinError, VaultTemplateNotFoundError, ForgetStrategyNotConfiguredError, RecordCekNotFoundError;
|
|
35
35
|
var init_errors = __esm({
|
|
36
36
|
"src/errors.ts"() {
|
|
37
37
|
"use strict";
|
|
@@ -44,6 +44,21 @@ var init_errors = __esm({
|
|
|
44
44
|
this.code = code;
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
+
DebugPlaintextError = class extends NoydbError {
|
|
48
|
+
constructor(message = "debugPlaintext requires encrypt: false") {
|
|
49
|
+
super("DEBUG_PLAINTEXT_REQUIRES_UNENCRYPTED", message);
|
|
50
|
+
this.name = "DebugPlaintextError";
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
DebugReservedFieldError = class extends NoydbError {
|
|
54
|
+
constructor(collection, field) {
|
|
55
|
+
super(
|
|
56
|
+
"DEBUG_RESERVED_FIELD",
|
|
57
|
+
`Record in "${collection}" has reserved field "${field}": the _ prefix is reserved under debugPlaintext mode`
|
|
58
|
+
);
|
|
59
|
+
this.name = "DebugReservedFieldError";
|
|
60
|
+
}
|
|
61
|
+
};
|
|
47
62
|
DecryptionError = class extends NoydbError {
|
|
48
63
|
constructor(message = "Decryption failed") {
|
|
49
64
|
super("DECRYPTION_FAILED", message);
|
|
@@ -8776,6 +8791,8 @@ var init_collection = __esm({
|
|
|
8776
8791
|
* reaches the bundle.
|
|
8777
8792
|
*/
|
|
8778
8793
|
blobStrategy;
|
|
8794
|
+
objectStore;
|
|
8795
|
+
blobFields;
|
|
8779
8796
|
aggregateStrategy;
|
|
8780
8797
|
crdtStrategy;
|
|
8781
8798
|
historyStrategy;
|
|
@@ -9053,6 +9070,8 @@ var init_collection = __esm({
|
|
|
9053
9070
|
this.subsystemBus = opts.subsystemBus;
|
|
9054
9071
|
this.activeTxId = opts.activeTxId;
|
|
9055
9072
|
this.blobStrategy = opts.blobStrategy ?? NO_BLOBS;
|
|
9073
|
+
this.objectStore = opts.objectStore;
|
|
9074
|
+
this.blobFields = opts.blobFields;
|
|
9056
9075
|
this.aggregateStrategy = opts.aggregateStrategy ?? NO_AGGREGATE;
|
|
9057
9076
|
this.crdtStrategy = opts.crdtStrategy ?? NO_CRDT;
|
|
9058
9077
|
this.historyStrategy = opts.historyStrategy ?? NO_HISTORY;
|
|
@@ -11193,7 +11212,10 @@ var init_collection = __esm({
|
|
|
11193
11212
|
getDEK: this.getDEK,
|
|
11194
11213
|
encrypted: this.encrypted,
|
|
11195
11214
|
userId: this.keyring.userId,
|
|
11196
|
-
erasableBlobs: this.perRecordCek
|
|
11215
|
+
erasableBlobs: this.perRecordCek,
|
|
11216
|
+
debugPlaintext: this.keyring.debugPlaintext === true,
|
|
11217
|
+
...this.objectStore !== void 0 ? { objectStore: this.objectStore } : {},
|
|
11218
|
+
...this.blobFields !== void 0 ? { blobFields: this.blobFields } : {}
|
|
11197
11219
|
});
|
|
11198
11220
|
}
|
|
11199
11221
|
/** Get all records as encrypted envelopes (for dump). */
|
|
@@ -11579,6 +11601,30 @@ var init_collection = __esm({
|
|
|
11579
11601
|
* path encrypts the body directly under the collection DEK — byte-identical
|
|
11580
11602
|
* to pre-CEK behaviour, so non-adopting collections pay nothing.
|
|
11581
11603
|
*/
|
|
11604
|
+
/**
|
|
11605
|
+
* Build a debug-plaintext envelope: the record's own fields inlined as
|
|
11606
|
+
* top-level keys beside the reserved `_`-metadata, with `_debug: 1` and an
|
|
11607
|
+
* empty `_data`. Lets native store tooling read the record without
|
|
11608
|
+
* unwrapping. Only reached for user collections under `debugPlaintext`
|
|
11609
|
+
* (see {@link encryptRecord}). Rejects `_`-prefixed record fields, which
|
|
11610
|
+
* would collide with the reserved metadata namespace.
|
|
11611
|
+
*/
|
|
11612
|
+
buildDebugEnvelope(record, version) {
|
|
11613
|
+
const rec = record;
|
|
11614
|
+
for (const key of Object.keys(rec)) {
|
|
11615
|
+
if (key.startsWith("_")) throw new DebugReservedFieldError(this.name, key);
|
|
11616
|
+
}
|
|
11617
|
+
return {
|
|
11618
|
+
_noydb: NOYDB_FORMAT_VERSION,
|
|
11619
|
+
_v: version,
|
|
11620
|
+
_ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
11621
|
+
_iv: "",
|
|
11622
|
+
_data: "",
|
|
11623
|
+
_by: this.keyring.userId,
|
|
11624
|
+
_debug: NOYDB_FORMAT_VERSION,
|
|
11625
|
+
...rec
|
|
11626
|
+
};
|
|
11627
|
+
}
|
|
11582
11628
|
async encryptJsonString(json, version, cek) {
|
|
11583
11629
|
const by = this.keyring.userId;
|
|
11584
11630
|
if (!this.encrypted) {
|
|
@@ -11616,6 +11662,9 @@ var init_collection = __esm({
|
|
|
11616
11662
|
};
|
|
11617
11663
|
}
|
|
11618
11664
|
async encryptRecord(record, version, cek) {
|
|
11665
|
+
if (!this.encrypted && this.keyring.debugPlaintext === true && !this.name.startsWith("_")) {
|
|
11666
|
+
return this.buildDebugEnvelope(record, version);
|
|
11667
|
+
}
|
|
11619
11668
|
const base = await this.encryptJsonString(JSON.stringify(record), version, cek);
|
|
11620
11669
|
if (!this.deterministicFields || !this.encrypted) return base;
|
|
11621
11670
|
const dek = await this.getDEK(this.name);
|
|
@@ -11956,7 +12005,16 @@ var init_collection = __esm({
|
|
|
11956
12005
|
*/
|
|
11957
12006
|
async decryptJsonString(envelope, id) {
|
|
11958
12007
|
if (isTombstone(envelope, this.encrypted)) return null;
|
|
11959
|
-
if (!this.encrypted)
|
|
12008
|
+
if (!this.encrypted) {
|
|
12009
|
+
if (envelope._debug !== void 0) {
|
|
12010
|
+
const rec = {};
|
|
12011
|
+
for (const [key, value] of Object.entries(envelope)) {
|
|
12012
|
+
if (!key.startsWith("_")) rec[key] = value;
|
|
12013
|
+
}
|
|
12014
|
+
return JSON.stringify(rec);
|
|
12015
|
+
}
|
|
12016
|
+
return envelope._data;
|
|
12017
|
+
}
|
|
11960
12018
|
const dek = await this.getDEK(this.name);
|
|
11961
12019
|
if (envelope._cek !== void 0) {
|
|
11962
12020
|
const cached = id !== void 0 ? this.cekCache?.get(id) : void 0;
|
|
@@ -15102,6 +15160,7 @@ var init_vault = __esm({
|
|
|
15102
15160
|
* call throws with a pointer at `@noy-db/hub/blobs`.
|
|
15103
15161
|
*/
|
|
15104
15162
|
blobStrategy;
|
|
15163
|
+
objectStore;
|
|
15105
15164
|
/** Cold-storage archival strategy (the archive target store). */
|
|
15106
15165
|
archiveStrategy;
|
|
15107
15166
|
/** Per-collection record archival policies. Indexed by collection name. */
|
|
@@ -15347,6 +15406,7 @@ var init_vault = __esm({
|
|
|
15347
15406
|
this.onRegisterConflictResolver = opts.onRegisterConflictResolver;
|
|
15348
15407
|
this.syncAdapter = opts.syncAdapter;
|
|
15349
15408
|
this.blobStrategy = opts.blobStrategy;
|
|
15409
|
+
this.objectStore = opts.objectStore;
|
|
15350
15410
|
this.archiveStrategy = opts.archiveStrategy;
|
|
15351
15411
|
this.indexStrategy = opts.indexStrategy;
|
|
15352
15412
|
this.aggregateStrategy = opts.aggregateStrategy;
|
|
@@ -15530,6 +15590,8 @@ var init_vault = __esm({
|
|
|
15530
15590
|
// collection. `undefined` is intentionally preserved so the
|
|
15531
15591
|
// Collection constructor uses its NO_BLOBS default.
|
|
15532
15592
|
...this.blobStrategy !== void 0 ? { blobStrategy: this.blobStrategy } : {},
|
|
15593
|
+
...this.objectStore !== void 0 ? { objectStore: this.objectStore } : {},
|
|
15594
|
+
...options?.blobFields !== void 0 ? { blobFields: options.blobFields } : {},
|
|
15533
15595
|
...this.indexStrategy !== void 0 ? { indexStrategy: this.indexStrategy } : {},
|
|
15534
15596
|
...this.aggregateStrategy !== void 0 ? { aggregateStrategy: this.aggregateStrategy } : {},
|
|
15535
15597
|
...this.crdtStrategy !== void 0 ? { crdtStrategy: this.crdtStrategy } : {},
|
|
@@ -20588,7 +20650,7 @@ __export(noydb_exports, {
|
|
|
20588
20650
|
Noydb: () => Noydb,
|
|
20589
20651
|
createNoydb: () => createNoydb
|
|
20590
20652
|
});
|
|
20591
|
-
function createPlaintextKeyring(userId) {
|
|
20653
|
+
function createPlaintextKeyring(userId, debugPlaintext = false) {
|
|
20592
20654
|
return {
|
|
20593
20655
|
userId,
|
|
20594
20656
|
displayName: userId,
|
|
@@ -20597,7 +20659,8 @@ function createPlaintextKeyring(userId) {
|
|
|
20597
20659
|
deks: /* @__PURE__ */ new Map(),
|
|
20598
20660
|
kek: null,
|
|
20599
20661
|
salt: new Uint8Array(0),
|
|
20600
|
-
authenticators: []
|
|
20662
|
+
authenticators: [],
|
|
20663
|
+
...debugPlaintext ? { debugPlaintext } : {}
|
|
20601
20664
|
};
|
|
20602
20665
|
}
|
|
20603
20666
|
async function createNoydb(options) {
|
|
@@ -20752,6 +20815,14 @@ var init_noydb = __esm({
|
|
|
20752
20815
|
_translatorAuditLog = [];
|
|
20753
20816
|
constructor(options) {
|
|
20754
20817
|
this.options = options;
|
|
20818
|
+
if (options.debugPlaintext === true && options.encrypt !== false) {
|
|
20819
|
+
throw new DebugPlaintextError();
|
|
20820
|
+
}
|
|
20821
|
+
if (options.debugPlaintext === true) {
|
|
20822
|
+
console.warn(
|
|
20823
|
+
"[noydb] debugPlaintext is ON \u2014 records are stored UNENCRYPTED and laid out for native store inspection. NEVER use this for production or client data."
|
|
20824
|
+
);
|
|
20825
|
+
}
|
|
20755
20826
|
this.txStrategy = options.txStrategy ?? NO_TX;
|
|
20756
20827
|
this.forgetStrategy = options.forgetStrategy ?? NO_FORGET;
|
|
20757
20828
|
this.sessionStrategy = options.sessionStrategy ?? NO_SESSION;
|
|
@@ -21027,6 +21098,7 @@ var init_noydb = __esm({
|
|
|
21027
21098
|
syncAdapter: targets.length > 0 ? targets[0].store : void 0,
|
|
21028
21099
|
historyConfig: this.options.history,
|
|
21029
21100
|
...this.options.blobStrategy !== void 0 ? { blobStrategy: this.options.blobStrategy } : {},
|
|
21101
|
+
...this.options.objectStore !== void 0 ? { objectStore: this.options.objectStore } : {},
|
|
21030
21102
|
...this.options.archiveStrategy !== void 0 ? { archiveStrategy: this.options.archiveStrategy } : {},
|
|
21031
21103
|
...this.options.indexStrategy !== void 0 ? { indexStrategy: this.options.indexStrategy } : {},
|
|
21032
21104
|
...this.options.aggregateStrategy !== void 0 ? { aggregateStrategy: this.options.aggregateStrategy } : {},
|
|
@@ -21073,7 +21145,7 @@ var init_noydb = __esm({
|
|
|
21073
21145
|
const cached = this.vaultCache.get(name);
|
|
21074
21146
|
if (cached) return cached;
|
|
21075
21147
|
if (this.options.encrypt === false) {
|
|
21076
|
-
const keyring2 = createPlaintextKeyring(this.options.user);
|
|
21148
|
+
const keyring2 = createPlaintextKeyring(this.options.user, this.options.debugPlaintext === true);
|
|
21077
21149
|
const comp2 = new Vault({
|
|
21078
21150
|
adapter: this.options.store,
|
|
21079
21151
|
name,
|
|
@@ -21083,6 +21155,7 @@ var init_noydb = __esm({
|
|
|
21083
21155
|
emitter: this.emitter,
|
|
21084
21156
|
historyConfig: this.options.history,
|
|
21085
21157
|
...this.options.blobStrategy !== void 0 ? { blobStrategy: this.options.blobStrategy } : {},
|
|
21158
|
+
...this.options.objectStore !== void 0 ? { objectStore: this.options.objectStore } : {},
|
|
21086
21159
|
...this.options.archiveStrategy !== void 0 ? { archiveStrategy: this.options.archiveStrategy } : {},
|
|
21087
21160
|
...this.options.indexStrategy !== void 0 ? { indexStrategy: this.options.indexStrategy } : {},
|
|
21088
21161
|
...this.options.aggregateStrategy !== void 0 ? { aggregateStrategy: this.options.aggregateStrategy } : {},
|
|
@@ -21114,6 +21187,7 @@ var init_noydb = __esm({
|
|
|
21114
21187
|
encrypted: true,
|
|
21115
21188
|
historyConfig: this.options.history,
|
|
21116
21189
|
...this.options.blobStrategy !== void 0 ? { blobStrategy: this.options.blobStrategy } : {},
|
|
21190
|
+
...this.options.objectStore !== void 0 ? { objectStore: this.options.objectStore } : {},
|
|
21117
21191
|
...this.options.archiveStrategy !== void 0 ? { archiveStrategy: this.options.archiveStrategy } : {},
|
|
21118
21192
|
...this.options.indexStrategy !== void 0 ? { indexStrategy: this.options.indexStrategy } : {},
|
|
21119
21193
|
...this.options.aggregateStrategy !== void 0 ? { aggregateStrategy: this.options.aggregateStrategy } : {},
|
|
@@ -22814,7 +22888,7 @@ var init_noydb = __esm({
|
|
|
22814
22888
|
*/
|
|
22815
22889
|
async getKeyringInternal(vault, opts = { create: true }) {
|
|
22816
22890
|
if (this.options.encrypt === false) {
|
|
22817
|
-
return createPlaintextKeyring(this.options.user);
|
|
22891
|
+
return createPlaintextKeyring(this.options.user, this.options.debugPlaintext === true);
|
|
22818
22892
|
}
|
|
22819
22893
|
const cached = this.keyringCache.get(vault);
|
|
22820
22894
|
if (cached) return cached;
|