@noy-db/hub 0.1.0-pre.8 → 0.2.0-pre.1
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 +91 -36
- package/dist/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.d.cts +2 -2
- package/dist/aggregate/index.d.ts +2 -2
- package/dist/aggregate/index.js +16 -9
- package/dist/aggregate/index.js.map +1 -1
- 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 +4 -4
- package/dist/bundle/index.cjs +298 -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 +15 -4
- package/dist/{chunk-GOUT6DND.js → chunk-23TTQXVO.js} +173 -91
- package/dist/chunk-23TTQXVO.js.map +1 -0
- package/dist/{chunk-CIMZBAZB.js → chunk-2AXFIYHT.js} +1 -1
- package/dist/chunk-2AXFIYHT.js.map +1 -0
- package/dist/chunk-34YSDCDP.js +73 -0
- package/dist/chunk-34YSDCDP.js.map +1 -0
- package/dist/{chunk-HC7Z5EQZ.js → chunk-4TFSM22V.js} +4 -4
- package/dist/{chunk-7XBQS42M.js → chunk-537VFZTR.js} +4 -4
- package/dist/{chunk-M62XNWRA.js → chunk-5DWL3JBF.js} +2 -2
- package/dist/{chunk-RSPLI376.js → chunk-5SCJ5UEF.js} +3 -3
- package/dist/chunk-5ZGZ6HIZ.js +100 -0
- package/dist/chunk-5ZGZ6HIZ.js.map +1 -0
- package/dist/chunk-6HPZY4ON.js +291 -0
- package/dist/chunk-6HPZY4ON.js.map +1 -0
- package/dist/{chunk-WN6UK7PM.js → chunk-7H6DOO3E.js} +239 -11
- package/dist/chunk-7H6DOO3E.js.map +1 -0
- package/dist/{chunk-ACLDOTNQ.js → chunk-ADQ5MQ54.js} +275 -3
- package/dist/chunk-ADQ5MQ54.js.map +1 -0
- package/dist/chunk-CBAHB2BF.js +893 -0
- package/dist/chunk-CBAHB2BF.js.map +1 -0
- package/dist/chunk-DPMFBCV6.js +296 -0
- package/dist/chunk-DPMFBCV6.js.map +1 -0
- package/dist/chunk-DYBQG5PQ.js +34 -0
- package/dist/chunk-DYBQG5PQ.js.map +1 -0
- package/dist/{chunk-ZFKD4QMV.js → chunk-DYECX3IX.js} +3 -3
- package/dist/chunk-EGQYGYIU.js +51 -0
- package/dist/chunk-EGQYGYIU.js.map +1 -0
- package/dist/chunk-FCXOFQAJ.js +79 -0
- package/dist/chunk-FCXOFQAJ.js.map +1 -0
- package/dist/chunk-HB3Z2GCR.js +124 -0
- package/dist/chunk-HB3Z2GCR.js.map +1 -0
- package/dist/{chunk-SCZXXXU4.js → chunk-I6MX32UC.js} +7 -32
- package/dist/chunk-I6MX32UC.js.map +1 -0
- package/dist/{chunk-VQBTTTUN.js → chunk-KESP7GOK.js} +4 -4
- package/dist/{chunk-VQBTTTUN.js.map → chunk-KESP7GOK.js.map} +1 -1
- package/dist/{chunk-NXFEYLVG.js → chunk-MIQHZESA.js} +4 -3
- package/dist/{chunk-NXFEYLVG.js.map → chunk-MIQHZESA.js.map} +1 -1
- package/dist/chunk-MKSA2V7A.js +19 -0
- package/dist/chunk-MKSA2V7A.js.map +1 -0
- package/dist/{chunk-M5INGEFC.js → chunk-MRIBLZL3.js} +3 -1
- package/dist/chunk-MRIBLZL3.js.map +1 -0
- package/dist/{chunk-2WGMYBYS.js → chunk-NIOHFJPJ.js} +6 -6
- package/dist/chunk-OMLIZL2P.js +61 -0
- package/dist/chunk-OMLIZL2P.js.map +1 -0
- package/dist/{chunk-USKYUS74.js → chunk-P7EQ2S5O.js} +2 -2
- package/dist/{chunk-YVFTBQHL.js → chunk-PA6R5ZCI.js} +217 -10
- package/dist/chunk-PA6R5ZCI.js.map +1 -0
- package/dist/chunk-PEULZC6M.js +118 -0
- package/dist/chunk-PEULZC6M.js.map +1 -0
- package/dist/chunk-RD5LYKD6.js +82 -0
- package/dist/chunk-RD5LYKD6.js.map +1 -0
- package/dist/chunk-SIZWEV2Y.js +145 -0
- package/dist/chunk-SIZWEV2Y.js.map +1 -0
- package/dist/{chunk-Y4CMTMUW.js → chunk-UA4RI7OT.js} +12 -6
- package/dist/chunk-UA4RI7OT.js.map +1 -0
- package/dist/chunk-UMLVJTYV.js +20 -0
- package/dist/chunk-UMLVJTYV.js.map +1 -0
- package/dist/chunk-UZXLQCHP.js +53 -0
- package/dist/chunk-UZXLQCHP.js.map +1 -0
- package/dist/{chunk-R2ZTGEVP.js → chunk-VMIO4IXG.js} +5 -5
- package/dist/{chunk-MR4424N3.js → chunk-WCA2NROQ.js} +2 -2
- package/dist/{chunk-TDR6T5CJ.js → chunk-XGSOTWYX.js} +91 -132
- package/dist/chunk-XGSOTWYX.js.map +1 -0
- package/dist/{chunk-NPC4LFV5.js → chunk-YMYK7US4.js} +2 -2
- package/dist/{chunk-PJK6IOBC.js → chunk-YS3POABP.js} +1 -1
- package/dist/chunk-YS3POABP.js.map +1 -0
- package/dist/chunk-Z72JH4KG.js +209 -0
- package/dist/chunk-Z72JH4KG.js.map +1 -0
- package/dist/{chunk-R36SIKES.js → chunk-ZNOEIM6Y.js} +2 -2
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +6 -6
- package/dist/consent/index.d.ts +6 -6
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-IVKU7YTT.js → crypto-A7FRXYHC.js} +3 -3
- package/dist/{delegation-2DBS2EOH.js → delegation-YBA4X4JN.js} +5 -4
- package/dist/derivations/index.cjs +351 -0
- package/dist/derivations/index.cjs.map +1 -0
- package/dist/derivations/index.d.cts +71 -0
- package/dist/derivations/index.d.ts +71 -0
- package/dist/derivations/index.js +27 -0
- package/dist/{dev-unlock-BygpnIWe.d.ts → dev-unlock-D9s-loPr.d.ts} +1 -1
- package/dist/{dev-unlock-BZKx666y.d.cts → dev-unlock-DRwVSy2S.d.cts} +1 -1
- package/dist/executor-7E3VFGW7.js +11 -0
- package/dist/executor-CEWX2FQI.js +8 -0
- package/dist/executor-CEWX2FQI.js.map +1 -0
- package/dist/executor-X4SQ3ZLC.js +8 -0
- package/dist/executor-X4SQ3ZLC.js.map +1 -0
- package/dist/fanout-sidecar-VJ52RIEY.js +51 -0
- package/dist/fanout-sidecar-VJ52RIEY.js.map +1 -0
- package/dist/guards/index.cjs +315 -0
- package/dist/guards/index.cjs.map +1 -0
- package/dist/guards/index.d.cts +30 -0
- package/dist/guards/index.d.ts +30 -0
- package/dist/guards/index.js +29 -0
- package/dist/guards/index.js.map +1 -0
- package/dist/{hash-B0eU2Qv9.d.ts → hash-DXXXusyk.d.ts} +1 -1
- package/dist/{hash-CIyfmKsg.d.cts → hash-DtRih9MQ.d.cts} +1 -1
- package/dist/history/index.cjs +8 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +7 -7
- package/dist/history/index.d.ts +7 -7
- package/dist/history/index.js +6 -6
- package/dist/i18n/index.cjs +81 -0
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +6 -6
- package/dist/i18n/index.d.ts +6 -6
- package/dist/i18n/index.js +19 -6
- package/dist/i18n/index.js.map +1 -1
- package/dist/{index-Dp4tKCjX.d.ts → index-4agOpzqd.d.ts} +174 -3
- package/dist/{index-6xNpPsxR.d.cts → index-CNwA-B6-.d.ts} +303 -5
- package/dist/{index-DJTf9yxn.d.ts → index-CmVgTkqk.d.cts} +303 -5
- package/dist/{index-DsVbTDZI.d.cts → index-hdFvZkBP.d.cts} +174 -3
- package/dist/index.cjs +5929 -1089
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +207 -16
- package/dist/index.d.ts +207 -16
- package/dist/index.js +2402 -672
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs +2 -0
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.d.cts +3 -3
- package/dist/indexing/index.d.ts +3 -3
- package/dist/indexing/index.js +4 -4
- package/dist/{lazy-builder-CZVLKh0Z.d.cts → lazy-builder-C-rPfWG0.d.cts} +1 -1
- package/dist/{lazy-builder-BwEoBQZ9.d.ts → lazy-builder-Rpd-V3jP.d.ts} +1 -1
- package/dist/{ledger-UQIMMKO5.js → ledger-3TXNP47J.js} +6 -6
- package/dist/ledger-3TXNP47J.js.map +1 -0
- package/dist/materialized-views/index.cjs +837 -0
- package/dist/materialized-views/index.cjs.map +1 -0
- package/dist/materialized-views/index.d.cts +183 -0
- package/dist/materialized-views/index.d.ts +183 -0
- package/dist/materialized-views/index.js +45 -0
- package/dist/materialized-views/index.js.map +1 -0
- package/dist/overlay-views/index.cjs +359 -0
- package/dist/overlay-views/index.cjs.map +1 -0
- package/dist/overlay-views/index.d.cts +81 -0
- package/dist/overlay-views/index.d.ts +81 -0
- package/dist/overlay-views/index.js +23 -0
- package/dist/overlay-views/index.js.map +1 -0
- package/dist/periods/index.cjs +7 -1
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +6 -6
- package/dist/periods/index.d.ts +6 -6
- package/dist/periods/index.js +6 -6
- package/dist/{predicate-SBHmi6D0.d.cts → predicate-Dnu81tsS.d.cts} +25 -1
- package/dist/{predicate-SBHmi6D0.d.ts → predicate-Dnu81tsS.d.ts} +25 -1
- package/dist/{public-envelope-3QTQADDW.js → public-envelope-PY6NKFLI.js} +4 -4
- package/dist/public-envelope-PY6NKFLI.js.map +1 -0
- package/dist/query/index.cjs +302 -124
- 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 +26 -11
- package/dist/read-only-facade-ITU6L7BL.js +7 -0
- package/dist/read-only-facade-ITU6L7BL.js.map +1 -0
- package/dist/registry-3L3N3PTG.js +10 -0
- package/dist/registry-3L3N3PTG.js.map +1 -0
- package/dist/registry-O47PUPSY.js +8 -0
- package/dist/registry-O47PUPSY.js.map +1 -0
- package/dist/registry-RFGGMVNJ.js +7 -0
- package/dist/registry-RFGGMVNJ.js.map +1 -0
- package/dist/registry-WLLMODKN.js +8 -0
- package/dist/registry-WLLMODKN.js.map +1 -0
- package/dist/session/index.cjs +7 -1
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +7 -7
- package/dist/session/index.d.ts +7 -7
- package/dist/session/index.js +10 -3
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +6 -6
- package/dist/shadow/index.d.ts +6 -6
- package/dist/shadow/index.js +2 -2
- package/dist/stale-HSC5YO2O.js +13 -0
- package/dist/stale-HSC5YO2O.js.map +1 -0
- package/dist/store/index.cjs +14 -0
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +6 -6
- package/dist/store/index.d.ts +6 -6
- package/dist/store/index.js +5 -2
- package/dist/{strategy-D-SrOLCl.d.cts → strategy-DSTrsZ8t.d.cts} +72 -19
- package/dist/{strategy-D-SrOLCl.d.ts → strategy-DSTrsZ8t.d.ts} +72 -19
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +5 -5
- package/dist/sync/index.d.ts +5 -5
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs +1554 -2
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +6 -6
- package/dist/team/index.d.ts +6 -6
- package/dist/team/index.js +76 -9
- package/dist/tx/index.cjs +296 -44
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +6 -6
- package/dist/tx/index.d.ts +6 -6
- package/dist/tx/index.js +2 -2
- package/dist/{types-DD9eKKNc.d.ts → types-C4lwMKKF.d.cts} +2771 -322
- package/dist/{types-arFMsCtn.d.cts → types-DW9RGSSs.d.ts} +2771 -322
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/with-derivation-C8LDlV7t.d.cts +13 -0
- package/dist/with-derivation-g-pGoMzL.d.ts +13 -0
- package/dist/with-guard-DWOCK4Ca.d.ts +18 -0
- package/dist/with-guard-jI1x9Z3k.d.cts +18 -0
- package/dist/with-materialized-view-DaKR-N6J.d.ts +27 -0
- package/dist/with-materialized-view-DcTx4H3j.d.cts +27 -0
- package/dist/with-overlayed-view-D-6oWAgM.d.cts +13 -0
- package/dist/with-overlayed-view-N7jYuNOS.d.ts +13 -0
- package/package.json +53 -2
- package/dist/chunk-ACLDOTNQ.js.map +0 -1
- package/dist/chunk-BTDCBVJW.js +0 -160
- package/dist/chunk-BTDCBVJW.js.map +0 -1
- package/dist/chunk-CIMZBAZB.js.map +0 -1
- package/dist/chunk-GOUT6DND.js.map +0 -1
- package/dist/chunk-M5INGEFC.js.map +0 -1
- package/dist/chunk-PJK6IOBC.js.map +0 -1
- package/dist/chunk-SCZXXXU4.js.map +0 -1
- package/dist/chunk-TDR6T5CJ.js.map +0 -1
- package/dist/chunk-TOQK4KAN.js +0 -79
- package/dist/chunk-TOQK4KAN.js.map +0 -1
- package/dist/chunk-WN6UK7PM.js.map +0 -1
- package/dist/chunk-Y4CMTMUW.js.map +0 -1
- package/dist/chunk-YVFTBQHL.js.map +0 -1
- /package/dist/{chunk-HC7Z5EQZ.js.map → chunk-4TFSM22V.js.map} +0 -0
- /package/dist/{chunk-7XBQS42M.js.map → chunk-537VFZTR.js.map} +0 -0
- /package/dist/{chunk-M62XNWRA.js.map → chunk-5DWL3JBF.js.map} +0 -0
- /package/dist/{chunk-RSPLI376.js.map → chunk-5SCJ5UEF.js.map} +0 -0
- /package/dist/{chunk-ZFKD4QMV.js.map → chunk-DYECX3IX.js.map} +0 -0
- /package/dist/{chunk-2WGMYBYS.js.map → chunk-NIOHFJPJ.js.map} +0 -0
- /package/dist/{chunk-USKYUS74.js.map → chunk-P7EQ2S5O.js.map} +0 -0
- /package/dist/{chunk-R2ZTGEVP.js.map → chunk-VMIO4IXG.js.map} +0 -0
- /package/dist/{chunk-MR4424N3.js.map → chunk-WCA2NROQ.js.map} +0 -0
- /package/dist/{chunk-NPC4LFV5.js.map → chunk-YMYK7US4.js.map} +0 -0
- /package/dist/{chunk-R36SIKES.js.map → chunk-ZNOEIM6Y.js.map} +0 -0
- /package/dist/{crypto-IVKU7YTT.js.map → crypto-A7FRXYHC.js.map} +0 -0
- /package/dist/{delegation-2DBS2EOH.js.map → delegation-YBA4X4JN.js.map} +0 -0
- /package/dist/{ledger-UQIMMKO5.js.map → derivations/index.js.map} +0 -0
- /package/dist/{public-envelope-3QTQADDW.js.map → executor-7E3VFGW7.js.map} +0 -0
package/dist/blobs/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { B as BlobStrategy } from '../types-
|
|
2
|
-
export { p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, s as BLOB_EVICTION_AUDIT_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, x as BlobEvictionEntry, y as BlobFieldPolicy, z as BlobFieldsConfig, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, G as BlobStrategyOpenArgs, H as CompactRunOptions, J as CompactionContext, K as CompactionResult, L as DEFAULT_CHUNK_SIZE, M as EXPORT_AUDIT_COLLECTION, N as ExportBlobsAbortedError, O as ExportBlobsAuditEntry, Q as ExportBlobsHandle, R as ExportBlobsOptions, T as ExportedBlob, U as SlotInfo, V as SlotRecord, W as VersionRecord, X as createExportBlobsHandle, Y as runCompaction } from '../types-
|
|
1
|
+
import { B as BlobStrategy } from '../types-C4lwMKKF.cjs';
|
|
2
|
+
export { p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, s as BLOB_EVICTION_AUDIT_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, x as BlobEvictionEntry, y as BlobFieldPolicy, z as BlobFieldsConfig, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, G as BlobStrategyOpenArgs, H as CompactRunOptions, J as CompactionContext, K as CompactionResult, L as DEFAULT_CHUNK_SIZE, M as EXPORT_AUDIT_COLLECTION, N as ExportBlobsAbortedError, O as ExportBlobsAuditEntry, Q as ExportBlobsHandle, R as ExportBlobsOptions, T as ExportedBlob, U as SlotInfo, V as SlotRecord, W as VersionRecord, X as createExportBlobsHandle, Y as runCompaction } from '../types-C4lwMKKF.cjs';
|
|
3
3
|
export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.cjs';
|
|
4
|
-
import '../lazy-builder-
|
|
5
|
-
import '../predicate-
|
|
6
|
-
import '../strategy-
|
|
4
|
+
import '../lazy-builder-C-rPfWG0.cjs';
|
|
5
|
+
import '../predicate-Dnu81tsS.cjs';
|
|
6
|
+
import '../strategy-DSTrsZ8t.cjs';
|
|
7
7
|
import '../strategy-BSxFXGzb.cjs';
|
|
8
|
-
import '../index-
|
|
8
|
+
import '../index-CmVgTkqk.cjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Active blob strategy factory. Calling `blobs()` returns a
|
package/dist/blobs/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { B as BlobStrategy } from '../types-
|
|
2
|
-
export { p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, s as BLOB_EVICTION_AUDIT_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, x as BlobEvictionEntry, y as BlobFieldPolicy, z as BlobFieldsConfig, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, G as BlobStrategyOpenArgs, H as CompactRunOptions, J as CompactionContext, K as CompactionResult, L as DEFAULT_CHUNK_SIZE, M as EXPORT_AUDIT_COLLECTION, N as ExportBlobsAbortedError, O as ExportBlobsAuditEntry, Q as ExportBlobsHandle, R as ExportBlobsOptions, T as ExportedBlob, U as SlotInfo, V as SlotRecord, W as VersionRecord, X as createExportBlobsHandle, Y as runCompaction } from '../types-
|
|
1
|
+
import { B as BlobStrategy } from '../types-DW9RGSSs.js';
|
|
2
|
+
export { p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, s as BLOB_EVICTION_AUDIT_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, x as BlobEvictionEntry, y as BlobFieldPolicy, z as BlobFieldsConfig, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, G as BlobStrategyOpenArgs, H as CompactRunOptions, J as CompactionContext, K as CompactionResult, L as DEFAULT_CHUNK_SIZE, M as EXPORT_AUDIT_COLLECTION, N as ExportBlobsAbortedError, O as ExportBlobsAuditEntry, Q as ExportBlobsHandle, R as ExportBlobsOptions, T as ExportedBlob, U as SlotInfo, V as SlotRecord, W as VersionRecord, X as createExportBlobsHandle, Y as runCompaction } from '../types-DW9RGSSs.js';
|
|
3
3
|
export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.js';
|
|
4
|
-
import '../lazy-builder-
|
|
5
|
-
import '../predicate-
|
|
6
|
-
import '../strategy-
|
|
4
|
+
import '../lazy-builder-Rpd-V3jP.js';
|
|
5
|
+
import '../predicate-Dnu81tsS.js';
|
|
6
|
+
import '../strategy-DSTrsZ8t.js';
|
|
7
7
|
import '../strategy-BSxFXGzb.js';
|
|
8
|
-
import '../index-
|
|
8
|
+
import '../index-CNwA-B6-.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Active blob strategy factory. Calling `blobs()` returns a
|
package/dist/blobs/index.js
CHANGED
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
detectMimeType,
|
|
15
15
|
isPreCompressed,
|
|
16
16
|
runCompaction
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-VMIO4IXG.js";
|
|
18
|
+
import "../chunk-YS3POABP.js";
|
|
19
|
+
import "../chunk-WCA2NROQ.js";
|
|
20
|
+
import "../chunk-ADQ5MQ54.js";
|
|
21
21
|
|
|
22
22
|
// src/blobs/active.ts
|
|
23
23
|
function withBlobs() {
|
package/dist/bundle/index.cjs
CHANGED
|
@@ -20,6 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/bundle/index.ts
|
|
21
21
|
var bundle_exports = {};
|
|
22
22
|
__export(bundle_exports, {
|
|
23
|
+
BackupCorruptedError: () => BackupCorruptedError,
|
|
24
|
+
BackupLedgerError: () => BackupLedgerError,
|
|
25
|
+
BundleIntegrityError: () => BundleIntegrityError,
|
|
26
|
+
BundleSealMismatchError: () => BundleSealMismatchError,
|
|
27
|
+
BundleVersionConflictError: () => BundleVersionConflictError,
|
|
23
28
|
COMPRESSION_BROTLI: () => COMPRESSION_BROTLI,
|
|
24
29
|
COMPRESSION_GZIP: () => COMPRESSION_GZIP,
|
|
25
30
|
COMPRESSION_NONE: () => COMPRESSION_NONE,
|
|
@@ -53,7 +58,8 @@ var ALLOWED_HEADER_KEYS = /* @__PURE__ */ new Set([
|
|
|
53
58
|
"handle",
|
|
54
59
|
"bodyBytes",
|
|
55
60
|
"bodySha256",
|
|
56
|
-
"publicEnvelope"
|
|
61
|
+
"publicEnvelope",
|
|
62
|
+
"autoUnlock"
|
|
57
63
|
]);
|
|
58
64
|
function validateBundleHeader(parsed) {
|
|
59
65
|
if (parsed === null || typeof parsed !== "object") {
|
|
@@ -108,6 +114,14 @@ function validateBundleHeader(parsed) {
|
|
|
108
114
|
);
|
|
109
115
|
}
|
|
110
116
|
}
|
|
117
|
+
if (h["autoUnlock"] !== void 0) {
|
|
118
|
+
if (h["autoUnlock"] !== "unsealed" && h["autoUnlock"] !== "sealed") {
|
|
119
|
+
const got = typeof h["autoUnlock"] === "string" ? `"${h["autoUnlock"]}"` : typeof h["autoUnlock"];
|
|
120
|
+
throw new Error(
|
|
121
|
+
`.noydb bundle header.autoUnlock must be 'unsealed' or 'sealed' when present, got ${got}.`
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
111
125
|
}
|
|
112
126
|
function encodeBundleHeader(header) {
|
|
113
127
|
validateBundleHeader(header);
|
|
@@ -116,7 +130,8 @@ function encodeBundleHeader(header) {
|
|
|
116
130
|
handle: header.handle,
|
|
117
131
|
bodyBytes: header.bodyBytes,
|
|
118
132
|
bodySha256: header.bodySha256,
|
|
119
|
-
...header.publicEnvelope !== void 0 ? { publicEnvelope: header.publicEnvelope } : {}
|
|
133
|
+
...header.publicEnvelope !== void 0 ? { publicEnvelope: header.publicEnvelope } : {},
|
|
134
|
+
...header.autoUnlock !== void 0 ? { autoUnlock: header.autoUnlock } : {}
|
|
120
135
|
});
|
|
121
136
|
return new TextEncoder().encode(json);
|
|
122
137
|
}
|
|
@@ -160,14 +175,276 @@ var NoydbError = class extends Error {
|
|
|
160
175
|
this.code = code;
|
|
161
176
|
}
|
|
162
177
|
};
|
|
178
|
+
var BundleVersionConflictError = class extends NoydbError {
|
|
179
|
+
/** The bundle handle of the newer remote version that rejected the push. */
|
|
180
|
+
remoteVersion;
|
|
181
|
+
constructor(remoteVersion, message = "Bundle version conflict \u2014 remote has been updated") {
|
|
182
|
+
super("BUNDLE_VERSION_CONFLICT", message);
|
|
183
|
+
this.name = "BundleVersionConflictError";
|
|
184
|
+
this.remoteVersion = remoteVersion;
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
var ValidationError = class extends NoydbError {
|
|
188
|
+
constructor(message = "Validation error") {
|
|
189
|
+
super("VALIDATION_ERROR", message);
|
|
190
|
+
this.name = "ValidationError";
|
|
191
|
+
}
|
|
192
|
+
};
|
|
163
193
|
var BundleIntegrityError = class extends NoydbError {
|
|
164
194
|
constructor(message) {
|
|
165
195
|
super("BUNDLE_INTEGRITY", `.noydb bundle integrity check failed: ${message}`);
|
|
166
196
|
this.name = "BundleIntegrityError";
|
|
167
197
|
}
|
|
168
198
|
};
|
|
199
|
+
var BundleSealMismatchError = class extends NoydbError {
|
|
200
|
+
userId;
|
|
201
|
+
pid;
|
|
202
|
+
constructor(userId, pid) {
|
|
203
|
+
super(
|
|
204
|
+
"BUNDLE_SEAL_MISMATCH",
|
|
205
|
+
`bundle carries sealed passphrase for user "${userId}" under provider "${pid}", but no registered provider matches that pid.
|
|
206
|
+
|
|
207
|
+
Resolutions:
|
|
208
|
+
1. Configure a provider matching the pid and retry import.
|
|
209
|
+
2. Pass \`attemptUnsealAcrossProviders: true\` to try each registered
|
|
210
|
+
provider regardless of pid (extra credential prompts may surface).
|
|
211
|
+
3. Inspect the bundle without unsealing \u2014 pass no \`sealingProviders\`
|
|
212
|
+
to receive the sealed entries unmodified for offline analysis.`
|
|
213
|
+
);
|
|
214
|
+
this.name = "BundleSealMismatchError";
|
|
215
|
+
this.userId = userId;
|
|
216
|
+
this.pid = pid;
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
var BackupLedgerError = class extends NoydbError {
|
|
220
|
+
/** First-broken-entry index, if known. */
|
|
221
|
+
divergedAt;
|
|
222
|
+
constructor(message, divergedAt) {
|
|
223
|
+
super("BACKUP_LEDGER", message);
|
|
224
|
+
this.name = "BackupLedgerError";
|
|
225
|
+
if (divergedAt !== void 0) this.divergedAt = divergedAt;
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
var BackupCorruptedError = class extends NoydbError {
|
|
229
|
+
/** The (collection, id) pair whose envelope failed the hash check. */
|
|
230
|
+
collection;
|
|
231
|
+
id;
|
|
232
|
+
constructor(collection, id, message) {
|
|
233
|
+
super("BACKUP_CORRUPTED", message);
|
|
234
|
+
this.name = "BackupCorruptedError";
|
|
235
|
+
this.collection = collection;
|
|
236
|
+
this.id = id;
|
|
237
|
+
}
|
|
238
|
+
};
|
|
169
239
|
|
|
170
240
|
// src/bundle/bundle.ts
|
|
241
|
+
function toAutoCredentials(m) {
|
|
242
|
+
return Object.fromEntries(
|
|
243
|
+
Object.entries(m).map(([u, value]) => [u, { kind: "passphrase", value }])
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
function normalizeAutoUnlock(opts) {
|
|
247
|
+
const set = [
|
|
248
|
+
opts.autoCredentials,
|
|
249
|
+
opts.sealedCredentials,
|
|
250
|
+
opts.autoPassphrases,
|
|
251
|
+
opts.sealedPassphrases
|
|
252
|
+
].filter((v) => v !== void 0).length;
|
|
253
|
+
if (set === 0) return null;
|
|
254
|
+
if (set > 1) {
|
|
255
|
+
throw new ValidationError(
|
|
256
|
+
"writeNoydbBundle: only one of autoCredentials / sealedCredentials / autoPassphrases / sealedPassphrases may be set."
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
if (opts.autoCredentials !== void 0) {
|
|
260
|
+
return { mode: "unsealed", perUser: opts.autoCredentials.perUser };
|
|
261
|
+
}
|
|
262
|
+
if (opts.autoPassphrases !== void 0) {
|
|
263
|
+
return { mode: "unsealed", perUser: toAutoCredentials(opts.autoPassphrases.perUser) };
|
|
264
|
+
}
|
|
265
|
+
if (opts.sealedCredentials !== void 0) {
|
|
266
|
+
return { mode: "sealed", provider: opts.sealedCredentials.provider, perUser: opts.sealedCredentials.perUser };
|
|
267
|
+
}
|
|
268
|
+
return {
|
|
269
|
+
mode: "sealed",
|
|
270
|
+
provider: opts.sealedPassphrases.provider,
|
|
271
|
+
perUser: toAutoCredentials(opts.sealedPassphrases.perUser)
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
function validateAutoUnlockOptions(opts, normalized) {
|
|
275
|
+
if (normalized === null) return null;
|
|
276
|
+
const VALID_KINDS = /* @__PURE__ */ new Set(["passphrase", "password", "pin"]);
|
|
277
|
+
for (const [userId, cred] of Object.entries(normalized.perUser)) {
|
|
278
|
+
if (!VALID_KINDS.has(cred.kind)) {
|
|
279
|
+
throw new ValidationError(
|
|
280
|
+
`writeNoydbBundle: credential for user '${userId}' has unsupported kind '${cred.kind}'. auto-unlock supports passphrase/password/pin only; WebAuthn is hardware-bound and cannot be bundled.`
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
if (normalized.mode === "unsealed") {
|
|
285
|
+
const policy = opts.autoCredentials?.policy ?? opts.autoPassphrases?.policy;
|
|
286
|
+
if (policy !== "public-by-design") {
|
|
287
|
+
throw new ValidationError(
|
|
288
|
+
'writeNoydbBundle: `autoCredentials` (or `autoPassphrases`) requires `policy: "public-by-design"`. This is an explicit opt-in marker \u2014 bundling plaintext credentials is safe only when those credentials are intended to be public (demo data, sample vaults). For production credentials, use `sealedCredentials` instead.'
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
const userCount2 = Object.keys(normalized.perUser).length;
|
|
292
|
+
if (userCount2 === 0) {
|
|
293
|
+
throw new ValidationError(
|
|
294
|
+
"writeNoydbBundle: `autoCredentials.perUser` (or `autoPassphrases.perUser`) must have at least one entry."
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
return "unsealed";
|
|
298
|
+
}
|
|
299
|
+
const mode = opts.sealedCredentials?.mode ?? opts.sealedPassphrases?.mode;
|
|
300
|
+
if (mode !== "self-target") {
|
|
301
|
+
throw new ValidationError(
|
|
302
|
+
`writeNoydbBundle: \`sealedCredentials.mode\` (or \`sealedPassphrases.mode\`) must be 'self-target' in slice 1 (got '${String(mode)}'). Recipient-target sealing via the RecipientSealer interface is deferred per foundation \xA711.4.`
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
if (normalized.provider === void 0) {
|
|
306
|
+
throw new ValidationError(
|
|
307
|
+
"writeNoydbBundle: `sealedCredentials.provider` (or `sealedPassphrases.provider`) is required (a `SealingKeyProvider`)."
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
const userCount = Object.keys(normalized.perUser).length;
|
|
311
|
+
if (userCount === 0) {
|
|
312
|
+
throw new ValidationError(
|
|
313
|
+
"writeNoydbBundle: `sealedCredentials.perUser` (or `sealedPassphrases.perUser`) must have at least one entry."
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
return "sealed";
|
|
317
|
+
}
|
|
318
|
+
async function buildAutoUnlockWrapper(dumpJson, normalized) {
|
|
319
|
+
if (normalized.mode === "unsealed") {
|
|
320
|
+
return {
|
|
321
|
+
_noydb_bundle_body: 1,
|
|
322
|
+
dump: dumpJson,
|
|
323
|
+
_autoUnlock: {
|
|
324
|
+
kind: "unsealed",
|
|
325
|
+
perUser: { ...normalized.perUser }
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
const provider = normalized.provider;
|
|
330
|
+
if (provider === void 0) {
|
|
331
|
+
throw new Error("unreachable \u2014 validation should have caught this");
|
|
332
|
+
}
|
|
333
|
+
const sealedPerUser = {};
|
|
334
|
+
const encoder = new TextEncoder();
|
|
335
|
+
for (const [userId, cred] of Object.entries(normalized.perUser)) {
|
|
336
|
+
const sealed = await provider.seal(encoder.encode(cred.value));
|
|
337
|
+
sealedPerUser[userId] = {
|
|
338
|
+
pid: provider.id,
|
|
339
|
+
sealed: bytesToBase64(sealed),
|
|
340
|
+
alg: "aes-256-gcm",
|
|
341
|
+
kind: cred.kind
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
return {
|
|
345
|
+
_noydb_bundle_body: 1,
|
|
346
|
+
dump: dumpJson,
|
|
347
|
+
_autoUnlock: { kind: "sealed", perUser: sealedPerUser }
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
function parseAutoUnlockBody(bodyString) {
|
|
351
|
+
let parsed;
|
|
352
|
+
try {
|
|
353
|
+
parsed = JSON.parse(bodyString);
|
|
354
|
+
} catch (err) {
|
|
355
|
+
throw new BundleIntegrityError(
|
|
356
|
+
"header declared autoUnlock but body could not be parsed as JSON wrapper: " + (err instanceof Error ? err.message : String(err))
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
360
|
+
throw new BundleIntegrityError("autoUnlock body is not a JSON object");
|
|
361
|
+
}
|
|
362
|
+
const obj = parsed;
|
|
363
|
+
if (obj["_noydb_bundle_body"] !== 1) {
|
|
364
|
+
throw new BundleIntegrityError(
|
|
365
|
+
"autoUnlock body missing `_noydb_bundle_body: 1` discriminator"
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
if (typeof obj["dump"] !== "string") {
|
|
369
|
+
throw new BundleIntegrityError("autoUnlock body must carry a string `dump` field");
|
|
370
|
+
}
|
|
371
|
+
const blob = obj["_autoUnlock"];
|
|
372
|
+
if (typeof blob !== "object" || blob === null) {
|
|
373
|
+
throw new BundleIntegrityError("autoUnlock body missing `_autoUnlock` blob");
|
|
374
|
+
}
|
|
375
|
+
const blobObj = blob;
|
|
376
|
+
const kind = blobObj["kind"];
|
|
377
|
+
if (kind !== "unsealed" && kind !== "sealed") {
|
|
378
|
+
throw new BundleIntegrityError(
|
|
379
|
+
`autoUnlock blob has invalid kind ${String(kind)}; expected 'unsealed' or 'sealed'`
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
return {
|
|
383
|
+
dump: obj["dump"],
|
|
384
|
+
blob
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
function coerceUnsealed(entry) {
|
|
388
|
+
if (typeof entry === "string") return { kind: "passphrase", value: entry };
|
|
389
|
+
return entry;
|
|
390
|
+
}
|
|
391
|
+
async function resolveAutoUnlock(blob, opts) {
|
|
392
|
+
if (blob.kind === "unsealed") {
|
|
393
|
+
const resolved = {};
|
|
394
|
+
for (const [userId, entry] of Object.entries(blob.perUser)) {
|
|
395
|
+
resolved[userId] = coerceUnsealed(entry);
|
|
396
|
+
}
|
|
397
|
+
return { kind: "unsealed", perUser: resolved };
|
|
398
|
+
}
|
|
399
|
+
if (opts.sealingProviders === void 0 || opts.sealingProviders.length === 0) {
|
|
400
|
+
const passthrough = {};
|
|
401
|
+
for (const [userId, entry] of Object.entries(blob.perUser)) {
|
|
402
|
+
passthrough[userId] = { kind: entry.kind ?? "passphrase", value: entry.sealed };
|
|
403
|
+
}
|
|
404
|
+
return { kind: "sealed", perUser: passthrough };
|
|
405
|
+
}
|
|
406
|
+
const providersByPid = /* @__PURE__ */ new Map();
|
|
407
|
+
for (const p of opts.sealingProviders) providersByPid.set(p.id, p);
|
|
408
|
+
const decoder = new TextDecoder();
|
|
409
|
+
const unsealedMap = {};
|
|
410
|
+
for (const [userId, entry] of Object.entries(blob.perUser)) {
|
|
411
|
+
const credKind = entry.kind ?? "passphrase";
|
|
412
|
+
const provider = providersByPid.get(entry.pid);
|
|
413
|
+
if (provider === void 0) {
|
|
414
|
+
if (opts.attemptUnsealAcrossProviders === true) {
|
|
415
|
+
let opened = null;
|
|
416
|
+
for (const candidate of opts.sealingProviders) {
|
|
417
|
+
try {
|
|
418
|
+
const plaintextBytes2 = await candidate.unseal(base64ToBytes(entry.sealed));
|
|
419
|
+
opened = decoder.decode(plaintextBytes2);
|
|
420
|
+
break;
|
|
421
|
+
} catch {
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
if (opened === null) {
|
|
425
|
+
throw new BundleSealMismatchError(userId, entry.pid);
|
|
426
|
+
}
|
|
427
|
+
unsealedMap[userId] = { kind: credKind, value: opened };
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
throw new BundleSealMismatchError(userId, entry.pid);
|
|
431
|
+
}
|
|
432
|
+
const plaintextBytes = await provider.unseal(base64ToBytes(entry.sealed));
|
|
433
|
+
unsealedMap[userId] = { kind: credKind, value: decoder.decode(plaintextBytes) };
|
|
434
|
+
}
|
|
435
|
+
return { kind: "sealed", perUser: unsealedMap };
|
|
436
|
+
}
|
|
437
|
+
function bytesToBase64(bytes) {
|
|
438
|
+
let binary = "";
|
|
439
|
+
for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);
|
|
440
|
+
return btoa(binary);
|
|
441
|
+
}
|
|
442
|
+
function base64ToBytes(b64) {
|
|
443
|
+
const binary = atob(b64);
|
|
444
|
+
const out = new Uint8Array(binary.length);
|
|
445
|
+
for (let i = 0; i < binary.length; i++) out[i] = binary.charCodeAt(i);
|
|
446
|
+
return out;
|
|
447
|
+
}
|
|
171
448
|
var cachedBrotliSupport = null;
|
|
172
449
|
function supportsBrotliCompression() {
|
|
173
450
|
if (cachedBrotliSupport !== null) return cachedBrotliSupport;
|
|
@@ -323,12 +600,15 @@ async function writeNoydbBundle(vault, opts = {}) {
|
|
|
323
600
|
"writeNoydbBundle: pass either exportPassphrase or recipients, not both"
|
|
324
601
|
);
|
|
325
602
|
}
|
|
603
|
+
const normalizedAutoUnlock = normalizeAutoUnlock(opts);
|
|
604
|
+
const autoUnlockMode = validateAutoUnlockOptions(opts, normalizedAutoUnlock);
|
|
326
605
|
const handle = await vault.getBundleHandle();
|
|
327
606
|
const dumpJson = await vault.dump();
|
|
328
607
|
const rekeyed = await applyRecipientRewrap(vault, dumpJson, opts);
|
|
329
608
|
const plainFiltered = await applyPlaintextFilters(vault, rekeyed, opts);
|
|
330
609
|
const filtered = applySliceFilters(plainFiltered, opts);
|
|
331
|
-
const
|
|
610
|
+
const bodyJsonStr = normalizedAutoUnlock === null ? filtered : JSON.stringify(await buildAutoUnlockWrapper(filtered, normalizedAutoUnlock));
|
|
611
|
+
const dumpBytes = new TextEncoder().encode(bodyJsonStr);
|
|
332
612
|
const { format, streamFormat } = selectCompression(opts.compression);
|
|
333
613
|
const body = streamFormat === null ? dumpBytes : await pumpThroughStream(dumpBytes, new CompressionStream(streamFormat));
|
|
334
614
|
const bodySha256 = await sha256Hex(body);
|
|
@@ -338,7 +618,8 @@ async function writeNoydbBundle(vault, opts = {}) {
|
|
|
338
618
|
handle,
|
|
339
619
|
bodyBytes: body.length,
|
|
340
620
|
bodySha256,
|
|
341
|
-
...publicEnvelope !== void 0 ? { publicEnvelope } : {}
|
|
621
|
+
...publicEnvelope !== void 0 ? { publicEnvelope } : {},
|
|
622
|
+
...autoUnlockMode !== null ? { autoUnlock: autoUnlockMode } : {}
|
|
342
623
|
};
|
|
343
624
|
const headerBytes = encodeBundleHeader(header);
|
|
344
625
|
const prefix = new Uint8Array(NOYDB_BUNDLE_PREFIX_BYTES);
|
|
@@ -380,7 +661,7 @@ function parsePrefixAndHeader(bytes) {
|
|
|
380
661
|
function readNoydbBundleHeader(bytes) {
|
|
381
662
|
return parsePrefixAndHeader(bytes).header;
|
|
382
663
|
}
|
|
383
|
-
async function readNoydbBundle(bytes) {
|
|
664
|
+
async function readNoydbBundle(bytes, opts = {}) {
|
|
384
665
|
const { header, bodyOffset, algo } = parsePrefixAndHeader(bytes);
|
|
385
666
|
const body = bytes.slice(bodyOffset);
|
|
386
667
|
if (body.length !== header.bodyBytes) {
|
|
@@ -407,8 +688,13 @@ async function readNoydbBundle(bytes) {
|
|
|
407
688
|
);
|
|
408
689
|
}
|
|
409
690
|
}
|
|
410
|
-
const
|
|
411
|
-
|
|
691
|
+
const bodyString = new TextDecoder("utf-8", { fatal: true }).decode(dumpBytes);
|
|
692
|
+
if (header.autoUnlock === void 0) {
|
|
693
|
+
return { header, dumpJson: bodyString };
|
|
694
|
+
}
|
|
695
|
+
const { dump, blob } = parseAutoUnlockBody(bodyString);
|
|
696
|
+
const autoUnlock = await resolveAutoUnlock(blob, opts);
|
|
697
|
+
return { header, dumpJson: dump, autoUnlock };
|
|
412
698
|
}
|
|
413
699
|
|
|
414
700
|
// src/bundle/ulid.ts
|
|
@@ -439,6 +725,11 @@ function isULID(value) {
|
|
|
439
725
|
}
|
|
440
726
|
// Annotate the CommonJS export names for ESM import in node:
|
|
441
727
|
0 && (module.exports = {
|
|
728
|
+
BackupCorruptedError,
|
|
729
|
+
BackupLedgerError,
|
|
730
|
+
BundleIntegrityError,
|
|
731
|
+
BundleSealMismatchError,
|
|
732
|
+
BundleVersionConflictError,
|
|
442
733
|
COMPRESSION_BROTLI,
|
|
443
734
|
COMPRESSION_GZIP,
|
|
444
735
|
COMPRESSION_NONE,
|