@noy-db/hub 0.2.0-pre.10 → 0.2.0-pre.11
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/attestation/index.cjs.map +1 -1
- package/dist/attestation/index.d.cts +1 -1
- package/dist/attestation/index.d.ts +1 -1
- package/dist/attestation/index.js +4 -4
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +2 -2
- package/dist/blobs/index.d.ts +2 -2
- package/dist/blobs/index.js +3 -3
- package/dist/bundle/index.cjs +16 -3
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +3 -3
- package/dist/bundle/index.d.ts +3 -3
- package/dist/bundle/index.js +7 -7
- package/dist/{chunk-3LPV6BXR.js → chunk-3DGHRDCX.js} +2 -2
- package/dist/{chunk-4CLICFEY.js → chunk-6MFH4BMK.js} +2 -2
- package/dist/{chunk-5IXJGFF2.js → chunk-73YLDCNF.js} +3 -3
- package/dist/{chunk-DRXIZOFV.js → chunk-77DWLQRY.js} +2 -2
- package/dist/{chunk-TY32C732.js → chunk-EBVBE7UK.js} +3 -3
- package/dist/{chunk-HHOO7HGH.js → chunk-GKI4SDP7.js} +2 -2
- package/dist/{chunk-2N62W5YP.js → chunk-JQ4NEJJ6.js} +2 -2
- package/dist/{chunk-PM3QYWUU.js → chunk-LJXYPGRH.js} +2 -2
- package/dist/{chunk-4USCAEDT.js → chunk-MPOLUAMI.js} +25 -23
- package/dist/{chunk-4USCAEDT.js.map → chunk-MPOLUAMI.js.map} +1 -1
- package/dist/{chunk-5OX6XVNS.js → chunk-PC3ZZBTO.js} +3 -3
- package/dist/{chunk-HQSQC2XL.js → chunk-QCXNMCHN.js} +15 -2
- package/dist/chunk-QCXNMCHN.js.map +1 -0
- package/dist/{chunk-WIRRPTFH.js → chunk-SLV4LAKX.js} +1 -1
- package/dist/{chunk-WIRRPTFH.js.map → chunk-SLV4LAKX.js.map} +1 -1
- package/dist/{chunk-BB27JMWB.js → chunk-TGALXXLV.js} +2 -2
- package/dist/{chunk-6EOXTJS2.js → chunk-V2PZC6AW.js} +2 -2
- package/dist/{chunk-PXTQPZO4.js → chunk-YVZRTCGG.js} +3 -3
- package/dist/{chunk-DJRWA3Q5.js → chunk-YW5DBAPG.js} +2 -2
- package/dist/{chunk-GNHAC43Q.js → chunk-ZBBW7YQN.js} +3 -3
- package/dist/consent/index.d.cts +2 -2
- package/dist/consent/index.d.ts +2 -2
- package/dist/derivations/index.d.cts +3 -3
- package/dist/derivations/index.d.ts +3 -3
- package/dist/{dev-unlock-BOEYl1xl.d.ts → dev-unlock-BH6y3Hx0.d.ts} +1 -1
- package/dist/{dev-unlock-AglVnkPY.d.cts → dev-unlock-H1Xwxc3U.d.cts} +1 -1
- package/dist/{fanout-sidecar-OKPMMPLG.js → fanout-sidecar-F3ZRFU4H.js} +2 -2
- package/dist/guards/index.d.cts +3 -3
- package/dist/guards/index.d.ts +3 -3
- package/dist/{hash-B9m3_fhj.d.ts → hash-D89JdDbj.d.ts} +1 -1
- package/dist/{hash-RVqz2zi8.d.cts → hash-_sDFvtmX.d.cts} +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +3 -3
- package/dist/history/index.d.ts +3 -3
- package/dist/history/index.js +2 -2
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +2 -2
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +3 -3
- package/dist/index.cjs +16 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +14 -14
- package/dist/{issue-3W6IVLKH.js → issue-IVTVSKWW.js} +4 -4
- package/dist/{ledger-O7FXOG3D.js → ledger-NYCGJX2D.js} +3 -3
- package/dist/materialized-views/index.d.cts +3 -3
- package/dist/materialized-views/index.d.ts +3 -3
- package/dist/{noydb-YAZNH5TI.js → noydb-SH4RLE47.js} +11 -11
- package/dist/overlay-views/index.d.cts +3 -3
- package/dist/overlay-views/index.d.ts +3 -3
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +2 -2
- package/dist/periods/index.d.ts +2 -2
- package/dist/periods/index.js +3 -3
- package/dist/{public-envelope-HMYHZIRH.js → public-envelope-QOXZEHKH.js} +3 -3
- package/dist/{revoke-S6JMSLUN.js → revoke-RT7QYB4G.js} +4 -4
- package/dist/session/index.d.cts +3 -3
- package/dist/session/index.d.ts +3 -3
- package/dist/shadow/index.d.cts +2 -2
- package/dist/shadow/index.d.ts +2 -2
- package/dist/{signer-7NPTB3SQ.js → signer-QNU66JF5.js} +3 -3
- package/dist/snapshots/index.d.cts +2 -2
- package/dist/snapshots/index.d.ts +2 -2
- package/dist/snapshots/index.js +3 -3
- package/dist/store/index.d.cts +2 -2
- package/dist/store/index.d.ts +2 -2
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +1 -1
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.js +2 -2
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +2 -2
- package/dist/team/index.d.ts +2 -2
- package/dist/team/index.js +5 -5
- package/dist/tx/index.d.cts +2 -2
- package/dist/tx/index.d.ts +2 -2
- package/dist/{types-CaNQm4i8.d.ts → types-CD8mc8zR.d.ts} +9 -0
- package/dist/{types-n2_IfwlQ.d.cts → types-DiSXn3a4.d.cts} +9 -0
- package/dist/{ulid-B9SMWj5i.d.ts → ulid-8p83wbR4.d.ts} +1 -1
- package/dist/{ulid-CLMjmyhG.d.cts → ulid-DQ1hcJvZ.d.cts} +1 -1
- package/dist/{with-derivation-aKrtS7Jj.d.cts → with-derivation-CVT7-dUt.d.cts} +1 -1
- package/dist/{with-derivation-CVIOPTUf.d.ts → with-derivation-DWMTpgEH.d.ts} +1 -1
- package/dist/{with-guard-DseETUrF.d.ts → with-guard-BRvt53da.d.ts} +1 -1
- package/dist/{with-guard-DZQbPzoP.d.cts → with-guard-Dx2zZnTA.d.cts} +1 -1
- package/dist/{with-materialized-view-C1eA1_T_.d.cts → with-materialized-view-BTTU3BNK.d.cts} +1 -1
- package/dist/{with-materialized-view-DaYaE8-Q.d.ts → with-materialized-view-X0CoL8-L.d.ts} +1 -1
- package/dist/{with-overlayed-view-DQsh2p8H.d.ts → with-overlayed-view-DQjO_DSG.d.ts} +1 -1
- package/dist/{with-overlayed-view-DleJfKcV.d.cts → with-overlayed-view-DcacRRsS.d.cts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-HQSQC2XL.js.map +0 -1
- /package/dist/{chunk-3LPV6BXR.js.map → chunk-3DGHRDCX.js.map} +0 -0
- /package/dist/{chunk-4CLICFEY.js.map → chunk-6MFH4BMK.js.map} +0 -0
- /package/dist/{chunk-5IXJGFF2.js.map → chunk-73YLDCNF.js.map} +0 -0
- /package/dist/{chunk-DRXIZOFV.js.map → chunk-77DWLQRY.js.map} +0 -0
- /package/dist/{chunk-TY32C732.js.map → chunk-EBVBE7UK.js.map} +0 -0
- /package/dist/{chunk-HHOO7HGH.js.map → chunk-GKI4SDP7.js.map} +0 -0
- /package/dist/{chunk-2N62W5YP.js.map → chunk-JQ4NEJJ6.js.map} +0 -0
- /package/dist/{chunk-PM3QYWUU.js.map → chunk-LJXYPGRH.js.map} +0 -0
- /package/dist/{chunk-5OX6XVNS.js.map → chunk-PC3ZZBTO.js.map} +0 -0
- /package/dist/{chunk-BB27JMWB.js.map → chunk-TGALXXLV.js.map} +0 -0
- /package/dist/{chunk-6EOXTJS2.js.map → chunk-V2PZC6AW.js.map} +0 -0
- /package/dist/{chunk-PXTQPZO4.js.map → chunk-YVZRTCGG.js.map} +0 -0
- /package/dist/{chunk-DJRWA3Q5.js.map → chunk-YW5DBAPG.js.map} +0 -0
- /package/dist/{chunk-GNHAC43Q.js.map → chunk-ZBBW7YQN.js.map} +0 -0
- /package/dist/{fanout-sidecar-OKPMMPLG.js.map → fanout-sidecar-F3ZRFU4H.js.map} +0 -0
- /package/dist/{issue-3W6IVLKH.js.map → issue-IVTVSKWW.js.map} +0 -0
- /package/dist/{ledger-O7FXOG3D.js.map → ledger-NYCGJX2D.js.map} +0 -0
- /package/dist/{noydb-YAZNH5TI.js.map → noydb-SH4RLE47.js.map} +0 -0
- /package/dist/{public-envelope-HMYHZIRH.js.map → public-envelope-QOXZEHKH.js.map} +0 -0
- /package/dist/{revoke-S6JMSLUN.js.map → revoke-RT7QYB4G.js.map} +0 -0
- /package/dist/{signer-7NPTB3SQ.js.map → signer-QNU66JF5.js.map} +0 -0
package/dist/i18n/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, L as Layer, O as OnMissing, h as OnMissingPolicy, R as ResolveI18nOptions, S as ScriptWarning, i as applyI18nLocale, j as dictCollectionName, k as dictKey, l as enforceScript, m as getAtPath, n as i18nText, o as inferScripts, p as isDictCollectionName, q as isDictKeyDescriptor, r as isI18nTextDescriptor, s as resolveI18nText, t as resolvePolicy, u as setAtPathInPlace, v as validateI18nTextValue } from '../types-
|
|
1
|
+
import { I as I18nStrategy } from '../types-DiSXn3a4.cjs';
|
|
2
|
+
export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, L as Layer, O as OnMissing, h as OnMissingPolicy, R as ResolveI18nOptions, S as ScriptWarning, i as applyI18nLocale, j as dictCollectionName, k as dictKey, l as enforceScript, m as getAtPath, n as i18nText, o as inferScripts, p as isDictCollectionName, q as isDictKeyDescriptor, r as isI18nTextDescriptor, s as resolveI18nText, t as resolvePolicy, u as setAtPathInPlace, v as validateI18nTextValue } from '../types-DiSXn3a4.cjs';
|
|
3
3
|
export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, S as ScriptViolationError, T as TranslatorNotConfiguredError } from '../index-B8bjExET.cjs';
|
|
4
4
|
import '../lazy-builder-Ci5_YG73.cjs';
|
|
5
5
|
import '../predicate-Bt5ft-9c.cjs';
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, L as Layer, O as OnMissing, h as OnMissingPolicy, R as ResolveI18nOptions, S as ScriptWarning, i as applyI18nLocale, j as dictCollectionName, k as dictKey, l as enforceScript, m as getAtPath, n as i18nText, o as inferScripts, p as isDictCollectionName, q as isDictKeyDescriptor, r as isI18nTextDescriptor, s as resolveI18nText, t as resolvePolicy, u as setAtPathInPlace, v as validateI18nTextValue } from '../types-
|
|
1
|
+
import { I as I18nStrategy } from '../types-CD8mc8zR.js';
|
|
2
|
+
export { D as DICT_COLLECTION_PREFIX, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, e as I18nMap, f as I18nTextDescriptor, g as I18nTextOptions, L as Layer, O as OnMissing, h as OnMissingPolicy, R as ResolveI18nOptions, S as ScriptWarning, i as applyI18nLocale, j as dictCollectionName, k as dictKey, l as enforceScript, m as getAtPath, n as i18nText, o as inferScripts, p as isDictCollectionName, q as isDictKeyDescriptor, r as isI18nTextDescriptor, s as resolveI18nText, t as resolvePolicy, u as setAtPathInPlace, v as validateI18nTextValue } from '../types-CD8mc8zR.js';
|
|
3
3
|
export { D as DictKeyInUseError, a as DictKeyMissingError, L as LocaleNotSpecifiedError, M as MissingTranslationError, R as ReservedCollectionNameError, S as ScriptViolationError, T as TranslatorNotConfiguredError } from '../index-DfUbNad8.js';
|
|
4
4
|
import '../lazy-builder-D5GU14TS.js';
|
|
5
5
|
import '../predicate-Bt5ft-9c.js';
|
package/dist/i18n/index.js
CHANGED
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
resolvePolicy,
|
|
18
18
|
setAtPathInPlace,
|
|
19
19
|
validateI18nTextValue
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-ZBBW7YQN.js";
|
|
21
|
+
import "../chunk-QCXNMCHN.js";
|
|
22
22
|
import "../chunk-Z6FNBOTC.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-SLV4LAKX.js";
|
|
24
24
|
import "../chunk-R233SLY3.js";
|
|
25
25
|
import {
|
|
26
26
|
DictKeyInUseError,
|
package/dist/index.cjs
CHANGED
|
@@ -7940,6 +7940,18 @@ async function loadKeyring(adapter, vault, userId, passphrase) {
|
|
|
7940
7940
|
...keyringFile.policy !== void 0 && { policy: keyringFile.policy }
|
|
7941
7941
|
};
|
|
7942
7942
|
}
|
|
7943
|
+
async function assertKeyringOpenAllowed(store, vault, userId, create) {
|
|
7944
|
+
const keyringUsers = await store.list(vault, "_keyring");
|
|
7945
|
+
if (keyringUsers.includes(userId)) return;
|
|
7946
|
+
if (!create) {
|
|
7947
|
+
throw new NoAccessError(`Vault "${vault}" not opened: create disabled and no keyring for "${userId}".`);
|
|
7948
|
+
}
|
|
7949
|
+
if (keyringUsers.length > 0) {
|
|
7950
|
+
throw new NoAccessError(
|
|
7951
|
+
`No keyring for user "${userId}" in vault "${vault}" (held by other principals) \u2014 refusing to self-provision.`
|
|
7952
|
+
);
|
|
7953
|
+
}
|
|
7954
|
+
}
|
|
7943
7955
|
async function createOwnerKeyring(adapter, vault, userId, passphrase, passphraseOpts) {
|
|
7944
7956
|
if (passphraseOpts?.validate && !passphraseOpts.allowWeakPassphrase) {
|
|
7945
7957
|
assertStrongPassphrase(passphrase, passphraseOpts);
|
|
@@ -20779,7 +20791,7 @@ var Noydb = class {
|
|
|
20779
20791
|
}
|
|
20780
20792
|
return comp;
|
|
20781
20793
|
}
|
|
20782
|
-
const keyring = await this.getKeyringInternal(name);
|
|
20794
|
+
const keyring = await this.getKeyringInternal(name, { create: opts?.create !== false });
|
|
20783
20795
|
if (!this.activeTier.has(name)) {
|
|
20784
20796
|
this.activeTier.set(name, 1);
|
|
20785
20797
|
}
|
|
@@ -21207,7 +21219,7 @@ var Noydb = class {
|
|
|
21207
21219
|
const vaultId = vaultIds[idx];
|
|
21208
21220
|
const task = (async () => {
|
|
21209
21221
|
try {
|
|
21210
|
-
const comp = await this.openVault(vaultId);
|
|
21222
|
+
const comp = await this.openVault(vaultId, { create: options.create !== false });
|
|
21211
21223
|
const result = await fn(comp);
|
|
21212
21224
|
results[idx] = { vault: vaultId, result };
|
|
21213
21225
|
} catch (err) {
|
|
@@ -22549,7 +22561,7 @@ var Noydb = class {
|
|
|
22549
22561
|
* accesses see them. Not exposed publicly — callers outside hub
|
|
22550
22562
|
* should use {@link getKeyring}, which returns a defensive copy.
|
|
22551
22563
|
*/
|
|
22552
|
-
async getKeyringInternal(vault) {
|
|
22564
|
+
async getKeyringInternal(vault, opts = { create: true }) {
|
|
22553
22565
|
if (this.options.encrypt === false) {
|
|
22554
22566
|
return createPlaintextKeyring(this.options.user);
|
|
22555
22567
|
}
|
|
@@ -22560,6 +22572,7 @@ var Noydb = class {
|
|
|
22560
22572
|
this.keyringCache.set(vault, keyring2);
|
|
22561
22573
|
return keyring2;
|
|
22562
22574
|
}
|
|
22575
|
+
await assertKeyringOpenAllowed(this.options.store, vault, this.options.user, opts.create);
|
|
22563
22576
|
let effectiveSecret;
|
|
22564
22577
|
if (this.options.passphraseMode === "managed") {
|
|
22565
22578
|
effectiveSecret = await resolveManagedSecret(
|