@noy-db/hub 0.1.0-pre.9 → 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-AVVPZ4BC.js → chunk-4TFSM22V.js} +4 -4
- package/dist/{chunk-QGZRWRSL.js → chunk-537VFZTR.js} +4 -4
- package/dist/{chunk-M62XNWRA.js → chunk-5DWL3JBF.js} +2 -2
- package/dist/{chunk-PTVMYYON.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-EXHNQEV4.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-MDDTIZUO.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-WDM5XGGS.js → chunk-PA6R5ZCI.js} +181 -11
- 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-QAVUREFT.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-2CSJGFCB.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-RKJ6OL7K.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-BdPp68qn.d.ts → dev-unlock-D9s-loPr.d.ts} +1 -1
- package/dist/{dev-unlock-Da1B0TIK.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-lsoL3eEW.d.ts → hash-DXXXusyk.d.ts} +1 -1
- package/dist/{hash-BEfzPKwo.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-8QDuznDr.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-CywCC1qZ.d.cts → index-hdFvZkBP.d.cts} +174 -3
- package/dist/index.cjs +5615 -979
- 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 +2302 -741
- 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-QZTTHQAQ.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-6JTACYJV.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-Bnb82f5R.d.cts → types-C4lwMKKF.d.cts} +2605 -328
- package/dist/{types-Bo7NSXJr.d.ts → types-DW9RGSSs.d.ts} +2605 -328
- 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-4PWAI7Q4.js +0 -79
- package/dist/chunk-4PWAI7Q4.js.map +0 -1
- 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-EXHNQEV4.js.map +0 -1
- package/dist/chunk-GOUT6DND.js.map +0 -1
- package/dist/chunk-M5INGEFC.js.map +0 -1
- package/dist/chunk-QAVUREFT.js.map +0 -1
- package/dist/chunk-RKJ6OL7K.js.map +0 -1
- package/dist/chunk-SCZXXXU4.js.map +0 -1
- package/dist/chunk-TDR6T5CJ.js.map +0 -1
- package/dist/chunk-WDM5XGGS.js.map +0 -1
- /package/dist/{chunk-AVVPZ4BC.js.map → chunk-4TFSM22V.js.map} +0 -0
- /package/dist/{chunk-QGZRWRSL.js.map → chunk-537VFZTR.js.map} +0 -0
- /package/dist/{chunk-M62XNWRA.js.map → chunk-5DWL3JBF.js.map} +0 -0
- /package/dist/{chunk-PTVMYYON.js.map → chunk-5SCJ5UEF.js.map} +0 -0
- /package/dist/{chunk-ZFKD4QMV.js.map → chunk-DYECX3IX.js.map} +0 -0
- /package/dist/{chunk-MDDTIZUO.js.map → chunk-NIOHFJPJ.js.map} +0 -0
- /package/dist/{chunk-USKYUS74.js.map → chunk-P7EQ2S5O.js.map} +0 -0
- /package/dist/{chunk-2CSJGFCB.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-QZTTHQAQ.js.map → derivations/index.js.map} +0 -0
- /package/dist/{public-envelope-6JTACYJV.js.map → executor-7E3VFGW7.js.map} +0 -0
package/dist/i18n/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { I as I18nStrategy } from '../types-
|
|
2
|
-
export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nTextDescriptor, f as I18nTextOptions, g as applyI18nLocale, h as dictCollectionName, i as dictKey, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, r as resolveI18nText, v as validateI18nTextValue } from '../types-
|
|
3
|
-
|
|
4
|
-
import '../
|
|
5
|
-
import '../
|
|
1
|
+
import { I as I18nStrategy } from '../types-C4lwMKKF.cjs';
|
|
2
|
+
export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nTextDescriptor, f as I18nTextOptions, g as applyI18nLocale, h as dictCollectionName, i as dictKey, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, r as resolveI18nText, v as validateI18nTextValue } from '../types-C4lwMKKF.cjs';
|
|
3
|
+
export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, T as TranslatorNotConfiguredError } from '../index-CmVgTkqk.cjs';
|
|
4
|
+
import '../lazy-builder-C-rPfWG0.cjs';
|
|
5
|
+
import '../predicate-Dnu81tsS.cjs';
|
|
6
|
+
import '../strategy-DSTrsZ8t.cjs';
|
|
6
7
|
import '../strategy-BSxFXGzb.cjs';
|
|
7
|
-
import '../index-6xNpPsxR.cjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Active i18n strategy — `withI18n()` returns the real implementation
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { I as I18nStrategy } from '../types-
|
|
2
|
-
export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nTextDescriptor, f as I18nTextOptions, g as applyI18nLocale, h as dictCollectionName, i as dictKey, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, r as resolveI18nText, v as validateI18nTextValue } from '../types-
|
|
3
|
-
|
|
4
|
-
import '../
|
|
5
|
-
import '../
|
|
1
|
+
import { I as I18nStrategy } from '../types-DW9RGSSs.js';
|
|
2
|
+
export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nTextDescriptor, f as I18nTextOptions, g as applyI18nLocale, h as dictCollectionName, i as dictKey, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, r as resolveI18nText, v as validateI18nTextValue } from '../types-DW9RGSSs.js';
|
|
3
|
+
export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, T as TranslatorNotConfiguredError } from '../index-CNwA-B6-.js';
|
|
4
|
+
import '../lazy-builder-Rpd-V3jP.js';
|
|
5
|
+
import '../predicate-Dnu81tsS.js';
|
|
6
|
+
import '../strategy-DSTrsZ8t.js';
|
|
6
7
|
import '../strategy-BSxFXGzb.js';
|
|
7
|
-
import '../index-DJTf9yxn.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Active i18n strategy — `withI18n()` returns the real implementation
|
package/dist/i18n/index.js
CHANGED
|
@@ -10,12 +10,19 @@ import {
|
|
|
10
10
|
isI18nTextDescriptor,
|
|
11
11
|
resolveI18nText,
|
|
12
12
|
validateI18nTextValue
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import
|
|
13
|
+
} from "../chunk-NIOHFJPJ.js";
|
|
14
|
+
import "../chunk-PA6R5ZCI.js";
|
|
15
|
+
import "../chunk-2AXFIYHT.js";
|
|
16
|
+
import "../chunk-YS3POABP.js";
|
|
17
|
+
import "../chunk-WCA2NROQ.js";
|
|
18
|
+
import {
|
|
19
|
+
DictKeyInUseError,
|
|
20
|
+
DictKeyMissingError,
|
|
21
|
+
LocaleNotSpecifiedError,
|
|
22
|
+
MissingTranslationError,
|
|
23
|
+
ReservedCollectionNameError,
|
|
24
|
+
TranslatorNotConfiguredError
|
|
25
|
+
} from "../chunk-ADQ5MQ54.js";
|
|
19
26
|
|
|
20
27
|
// src/i18n/active.ts
|
|
21
28
|
function withI18n() {
|
|
@@ -40,7 +47,13 @@ function withI18n() {
|
|
|
40
47
|
}
|
|
41
48
|
export {
|
|
42
49
|
DICT_COLLECTION_PREFIX,
|
|
50
|
+
DictKeyInUseError,
|
|
51
|
+
DictKeyMissingError,
|
|
43
52
|
DictionaryHandle,
|
|
53
|
+
LocaleNotSpecifiedError,
|
|
54
|
+
MissingTranslationError,
|
|
55
|
+
ReservedCollectionNameError,
|
|
56
|
+
TranslatorNotConfiguredError,
|
|
44
57
|
applyI18nLocale,
|
|
45
58
|
dictCollectionName,
|
|
46
59
|
dictKey,
|
package/dist/i18n/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/i18n/active.ts"],"sourcesContent":["/**\n * Active i18n strategy — `withI18n()` returns the real implementation\n * that wires multi-locale resolution, i18nText validation, and the\n * `DictionaryHandle` for `dictKey` fields into the core read/write\n * paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withI18n } from '@noy-db/hub/i18n'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * i18nStrategy: withI18n(),\n * })\n * ```\n *\n * The factory delegates to the existing `core.ts` and `dictionary.ts`\n * modules. Splitting the import chain through this file is what lets\n * tsup tree-shake the `~854 LOC` of dictionary + locale resolution\n * out of the default bundle when no `withI18n()` import is present.\n *\n * @public\n */\n\nimport type { I18nStrategy, BuildDictionaryHandleOptions } from './strategy.js'\nimport { applyI18nLocale, validateI18nTextValue } from './core.js'\nimport { DictionaryHandle } from './dictionary.js'\n\nexport function withI18n(): I18nStrategy {\n return {\n applyI18nLocale,\n validateI18nTextValue,\n buildDictionaryHandle<Keys extends string = string>(\n opts: BuildDictionaryHandleOptions<Keys>,\n ): DictionaryHandle<Keys> {\n return new DictionaryHandle<Keys>(\n opts.adapter,\n opts.compartmentName,\n opts.dictionaryName,\n opts.keyring,\n opts.getDEK,\n opts.encrypted,\n opts.ledger,\n opts.options,\n opts.findAndUpdateReferences,\n opts.emitter,\n )\n },\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/active.ts"],"sourcesContent":["/**\n * Active i18n strategy — `withI18n()` returns the real implementation\n * that wires multi-locale resolution, i18nText validation, and the\n * `DictionaryHandle` for `dictKey` fields into the core read/write\n * paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withI18n } from '@noy-db/hub/i18n'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * i18nStrategy: withI18n(),\n * })\n * ```\n *\n * The factory delegates to the existing `core.ts` and `dictionary.ts`\n * modules. Splitting the import chain through this file is what lets\n * tsup tree-shake the `~854 LOC` of dictionary + locale resolution\n * out of the default bundle when no `withI18n()` import is present.\n *\n * @public\n */\n\nimport type { I18nStrategy, BuildDictionaryHandleOptions } from './strategy.js'\nimport { applyI18nLocale, validateI18nTextValue } from './core.js'\nimport { DictionaryHandle } from './dictionary.js'\n\nexport function withI18n(): I18nStrategy {\n return {\n applyI18nLocale,\n validateI18nTextValue,\n buildDictionaryHandle<Keys extends string = string>(\n opts: BuildDictionaryHandleOptions<Keys>,\n ): DictionaryHandle<Keys> {\n return new DictionaryHandle<Keys>(\n opts.adapter,\n opts.compartmentName,\n opts.dictionaryName,\n opts.keyring,\n opts.getDEK,\n opts.encrypted,\n opts.ledger,\n opts.options,\n opts.findAndUpdateReferences,\n opts.emitter,\n )\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,sBACE,MACwB;AACxB,aAAO,IAAI;AAAA,QACT,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bh as PublicEnvelope, dj as SealingKeyProvider, bu as BundleRecipient, bq as Vault } from './types-DW9RGSSs.js';
|
|
2
|
+
import './index-CNwA-B6-.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* `.noydb` container format — byte layout, header schema, validators.
|
|
@@ -123,6 +124,22 @@ interface NoydbBundleHeader {
|
|
|
123
124
|
* other unknown header key still rejects at parse time.
|
|
124
125
|
*/
|
|
125
126
|
readonly publicEnvelope?: PublicEnvelope;
|
|
127
|
+
/**
|
|
128
|
+
* Auto-unlock material indicator (#197). When present, the bundle
|
|
129
|
+
* body wraps the dump JSON in a structure carrying per-user
|
|
130
|
+
* passphrases — either plaintext (`'unsealed'`, public-by-design)
|
|
131
|
+
* or sealed under a `SealingKeyProvider` (`'sealed'`, requires
|
|
132
|
+
* matching provider on the recipient side).
|
|
133
|
+
*
|
|
134
|
+
* Visible pre-decompression so cloud listing UIs can warn before
|
|
135
|
+
* download: "this bundle opens itself for anyone holding the file"
|
|
136
|
+
* (unsealed) or "this bundle is sealed for a specific provider"
|
|
137
|
+
* (sealed).
|
|
138
|
+
*
|
|
139
|
+
* Absent → the body is a raw `vault.dump()` JSON string (the
|
|
140
|
+
* pre-#197 shape; back-compatible).
|
|
141
|
+
*/
|
|
142
|
+
readonly autoUnlock?: 'unsealed' | 'sealed';
|
|
126
143
|
}
|
|
127
144
|
/**
|
|
128
145
|
* Validate a parsed bundle header. Throws on any deviation from
|
|
@@ -188,6 +205,26 @@ declare function hasNoydbBundleMagic(bytes: Uint8Array): boolean;
|
|
|
188
205
|
* archive utilities that don't care about decryption.
|
|
189
206
|
*/
|
|
190
207
|
|
|
208
|
+
/**
|
|
209
|
+
* The credential kinds that can be bundled for auto-unlock.
|
|
210
|
+
* WebAuthn is intentionally excluded — it is hardware-bound and
|
|
211
|
+
* cannot be embedded as a portable credential.
|
|
212
|
+
*/
|
|
213
|
+
type AutoCredentialKind = 'passphrase' | 'password' | 'pin';
|
|
214
|
+
/**
|
|
215
|
+
* A typed credential for auto-unlock. Carries the credential `kind`
|
|
216
|
+
* alongside the plaintext `value`, so consumers can dispatch the
|
|
217
|
+
* correct login/prefill path rather than treating all credentials
|
|
218
|
+
* as passphrases.
|
|
219
|
+
*
|
|
220
|
+
* `bundle.ts` is a pure format layer — it carries the credential
|
|
221
|
+
* without interpreting it. The consumer is responsible for
|
|
222
|
+
* dispatching on `kind`.
|
|
223
|
+
*/
|
|
224
|
+
interface AutoCredential {
|
|
225
|
+
readonly kind: AutoCredentialKind;
|
|
226
|
+
readonly value: string;
|
|
227
|
+
}
|
|
191
228
|
/**
|
|
192
229
|
* Options accepted by `writeNoydbBundle`.
|
|
193
230
|
*
|
|
@@ -258,6 +295,96 @@ interface WriteNoydbBundleOptions {
|
|
|
258
295
|
* suited to personal backup-and-restore).
|
|
259
296
|
*/
|
|
260
297
|
readonly recipients?: readonly BundleRecipient[];
|
|
298
|
+
/**
|
|
299
|
+
* Auto-unlock — unsealed per-user credentials (#215).
|
|
300
|
+
*
|
|
301
|
+
* Generalises `autoPassphrases` to support any bundleable credential
|
|
302
|
+
* kind (`passphrase` | `password` | `pin`).
|
|
303
|
+
*
|
|
304
|
+
* Public-by-design: anyone holding the bundle bytes can read these
|
|
305
|
+
* plaintext credentials. Use for demo data, sample vaults,
|
|
306
|
+
* prospect onboarding.
|
|
307
|
+
*
|
|
308
|
+
* The `policy: 'public-by-design'` discriminant is mandatory. A
|
|
309
|
+
* bare `{ perUser }` without it is rejected at write time — the
|
|
310
|
+
* safety net against a careless call against a production vault.
|
|
311
|
+
*
|
|
312
|
+
* Mutually exclusive with `sealedCredentials`, `autoPassphrases`,
|
|
313
|
+
* and `sealedPassphrases`.
|
|
314
|
+
*/
|
|
315
|
+
readonly autoCredentials?: {
|
|
316
|
+
readonly policy: 'public-by-design';
|
|
317
|
+
readonly perUser: Record<string, AutoCredential>;
|
|
318
|
+
};
|
|
319
|
+
/**
|
|
320
|
+
* Auto-unlock — per-user credentials sealed under a
|
|
321
|
+
* {@link SealingKeyProvider} (#215).
|
|
322
|
+
*
|
|
323
|
+
* Generalises `sealedPassphrases` to support any bundleable
|
|
324
|
+
* credential kind (`passphrase` | `password` | `pin`).
|
|
325
|
+
*
|
|
326
|
+
* The hub seals each user's plaintext credential under `provider`
|
|
327
|
+
* and embeds the resulting sealed envelopes in the bundle. The
|
|
328
|
+
* recipient must hold a provider with a matching `pid` (i.e.,
|
|
329
|
+
* `provider.id`) to auto-unseal on import.
|
|
330
|
+
*
|
|
331
|
+
* `mode: 'self-target'` is the only supported mode — sender and
|
|
332
|
+
* recipient share the same provider identity (same iCloud Keychain
|
|
333
|
+
* entry, same MDM-provisioned bundle id, same KMS account, etc.).
|
|
334
|
+
*
|
|
335
|
+
* Mutually exclusive with `autoCredentials`, `autoPassphrases`,
|
|
336
|
+
* and `sealedPassphrases`.
|
|
337
|
+
*/
|
|
338
|
+
readonly sealedCredentials?: {
|
|
339
|
+
readonly mode: 'self-target';
|
|
340
|
+
readonly provider: SealingKeyProvider;
|
|
341
|
+
readonly perUser: Record<string, AutoCredential>;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* @deprecated Use `autoCredentials` instead (#215).
|
|
345
|
+
*
|
|
346
|
+
* Auto-unlock — unsealed per-user passphrases (#197 slice 1).
|
|
347
|
+
*
|
|
348
|
+
* Public-by-design: anyone holding the bundle bytes can read these
|
|
349
|
+
* plaintext credentials. Use for demo data, sample vaults,
|
|
350
|
+
* prospect onboarding.
|
|
351
|
+
*
|
|
352
|
+
* The `policy: 'public-by-design'` discriminant is mandatory. A
|
|
353
|
+
* bare `{ perUser }` without it is rejected at write time — the
|
|
354
|
+
* safety net against a careless call against a production vault.
|
|
355
|
+
*
|
|
356
|
+
* Mutually exclusive with `autoCredentials`, `sealedCredentials`,
|
|
357
|
+
* and `sealedPassphrases`.
|
|
358
|
+
*/
|
|
359
|
+
readonly autoPassphrases?: {
|
|
360
|
+
readonly policy: 'public-by-design';
|
|
361
|
+
readonly perUser: Record<string, string>;
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* @deprecated Use `sealedCredentials` instead (#215).
|
|
365
|
+
*
|
|
366
|
+
* Auto-unlock — per-user passphrases sealed under a
|
|
367
|
+
* {@link SealingKeyProvider} (#197 slice 1, self-target only).
|
|
368
|
+
*
|
|
369
|
+
* The hub seals each user's plaintext passphrase under `provider`
|
|
370
|
+
* and embeds the resulting sealed envelopes in the bundle. The
|
|
371
|
+
* recipient must hold a provider with a matching `pid` (i.e.,
|
|
372
|
+
* `provider.id`) to auto-unseal on import.
|
|
373
|
+
*
|
|
374
|
+
* `mode: 'self-target'` is the only mode in slice 1 — sender and
|
|
375
|
+
* recipient share the same provider identity (same iCloud Keychain
|
|
376
|
+
* entry, same MDM-provisioned bundle id, same KMS account, etc.).
|
|
377
|
+
* Recipient-target sealing via the `RecipientSealer` interface
|
|
378
|
+
* (foundation §11.4) is deferred to a follow-up slice.
|
|
379
|
+
*
|
|
380
|
+
* Mutually exclusive with `autoCredentials`, `sealedCredentials`,
|
|
381
|
+
* and `autoPassphrases`.
|
|
382
|
+
*/
|
|
383
|
+
readonly sealedPassphrases?: {
|
|
384
|
+
readonly mode: 'self-target';
|
|
385
|
+
readonly provider: SealingKeyProvider;
|
|
386
|
+
readonly perUser: Record<string, string>;
|
|
387
|
+
};
|
|
261
388
|
}
|
|
262
389
|
/**
|
|
263
390
|
* Result returned by `readNoydbBundle`. The caller is expected to
|
|
@@ -268,6 +395,50 @@ interface WriteNoydbBundleOptions {
|
|
|
268
395
|
interface NoydbBundleReadResult {
|
|
269
396
|
readonly header: NoydbBundleHeader;
|
|
270
397
|
readonly dumpJson: string;
|
|
398
|
+
/**
|
|
399
|
+
* Auto-unlock material (#197, widened in #215). Present only when
|
|
400
|
+
* the header's `autoUnlock` flag is set AND the body's wrapped
|
|
401
|
+
* structure survived parsing. Values are typed credentials — either
|
|
402
|
+
* delivered plain (`kind: 'unsealed'`) or unsealed at read time
|
|
403
|
+
* using one of the supplied `sealingProviders` (`kind: 'sealed'`).
|
|
404
|
+
*
|
|
405
|
+
* Consumers dispatch on `cred.kind` to choose the correct login /
|
|
406
|
+
* prefill path. Pre-0.2 bundles (bare string entries) are coerced
|
|
407
|
+
* to `{ kind: 'passphrase', value }` on read for back-compat.
|
|
408
|
+
*
|
|
409
|
+
* For `kind: 'sealed'` bundles read without `sealingProviders`, the
|
|
410
|
+
* `value` field is the raw base64 sealed bytes — opaque to the
|
|
411
|
+
* consumer until unsealed elsewhere.
|
|
412
|
+
*/
|
|
413
|
+
readonly autoUnlock?: {
|
|
414
|
+
readonly kind: 'unsealed' | 'sealed';
|
|
415
|
+
readonly perUser: Record<string, AutoCredential>;
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Options accepted by {@link readNoydbBundle} for the #197
|
|
420
|
+
* auto-unlock paths. Without these the reader behaves exactly as
|
|
421
|
+
* pre-#197 (header parsed; body returned as `dumpJson`).
|
|
422
|
+
*/
|
|
423
|
+
interface ReadNoydbBundleOptions {
|
|
424
|
+
/**
|
|
425
|
+
* Recipient-side sealing providers used to unseal entries from
|
|
426
|
+
* `sealedPassphrases`. The reader picks the one whose `.id`
|
|
427
|
+
* matches each entry's `pid`. Multiple providers may be supplied
|
|
428
|
+
* (different users may seal under different identities).
|
|
429
|
+
*
|
|
430
|
+
* When unset and the bundle carries sealed envelopes, the
|
|
431
|
+
* `autoUnlock.perUser` map remains the SEALED entries unmodified
|
|
432
|
+
* — callers can inspect them or unseal elsewhere.
|
|
433
|
+
*/
|
|
434
|
+
readonly sealingProviders?: readonly SealingKeyProvider[];
|
|
435
|
+
/**
|
|
436
|
+
* Opt-in trial mode for unsealing — when an entry's `pid` doesn't
|
|
437
|
+
* match a registered provider, try each provider whose alg
|
|
438
|
+
* matches. Default `false` (strict-pid dispatch per foundation
|
|
439
|
+
* §11.9.2). Surfaces extra credential prompts; use deliberately.
|
|
440
|
+
*/
|
|
441
|
+
readonly attemptUnsealAcrossProviders?: boolean;
|
|
271
442
|
}
|
|
272
443
|
/** Test-only: reset the brotli detection cache between tests. */
|
|
273
444
|
declare function resetBrotliSupportCache(): void;
|
|
@@ -344,7 +515,7 @@ declare function readNoydbBundlePublicEnvelope(bytes: Uint8Array, opts?: {
|
|
|
344
515
|
* free of crypto concerns and lets the same code feed format
|
|
345
516
|
* inspectors that never decrypt anything.
|
|
346
517
|
*/
|
|
347
|
-
declare function readNoydbBundle(bytes: Uint8Array): Promise<NoydbBundleReadResult>;
|
|
518
|
+
declare function readNoydbBundle(bytes: Uint8Array, opts?: ReadNoydbBundleOptions): Promise<NoydbBundleReadResult>;
|
|
348
519
|
|
|
349
520
|
/**
|
|
350
521
|
* Minimal ULID generator — zero dependencies, Web Crypto API only.
|
|
@@ -411,4 +582,4 @@ declare function generateULID(): string;
|
|
|
411
582
|
*/
|
|
412
583
|
declare function isULID(value: string): boolean;
|
|
413
584
|
|
|
414
|
-
export { type CompressionAlgo as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type WriteNoydbBundleOptions as W,
|
|
585
|
+
export { type AutoCredential as A, type CompressionAlgo as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type ReadNoydbBundleOptions as R, type WriteNoydbBundleOptions as W, type AutoCredentialKind as a, NOYDB_BUNDLE_MAGIC as b, NOYDB_BUNDLE_PREFIX_BYTES as c, type NoydbBundleHeader as d, type NoydbBundleReadResult as e, readNoydbBundleHeader as f, generateULID as g, hasNoydbBundleMagic as h, isULID as i, readNoydbBundlePublicEnvelope as j, resetBrotliSupportCache as k, COMPRESSION_BROTLI as l, COMPRESSION_GZIP as m, COMPRESSION_NONE as n, FLAG_HAS_INTEGRITY_HASH as o, encodeBundleHeader as p, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
|