@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/blobs/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlobStrategy } from '../types-
|
|
2
|
-
export { z as BLOB_CHUNKS_COLLECTION, A as BLOB_COLLECTION, C as BLOB_EVICTION_AUDIT_COLLECTION, E as BLOB_INDEX_COLLECTION, F as BLOB_SLOTS_PREFIX, G as BLOB_VERSIONS_PREFIX, H as BlobEvictionEntry, J as BlobFieldPolicy, K as BlobFieldsConfig, M as BlobObject, N as BlobPutOptions, Q as BlobResponseOptions, T as BlobSet, U as BlobStrategyOpenArgs, V as CompactRunOptions, W as CompactionContext, X as CompactionResult, Y as DEFAULT_CHUNK_SIZE, Z as EXPORT_AUDIT_COLLECTION, _ as ExportBlobsAbortedError, $ as ExportBlobsAuditEntry, a0 as ExportBlobsHandle, a1 as ExportBlobsOptions, a2 as ExportedBlob, a3 as SlotInfo, a4 as SlotRecord, a5 as VersionRecord, a6 as createExportBlobsHandle, a7 as runCompaction } from '../types-
|
|
1
|
+
import { B as BlobStrategy } from '../types-DiSXn3a4.cjs';
|
|
2
|
+
export { z as BLOB_CHUNKS_COLLECTION, A as BLOB_COLLECTION, C as BLOB_EVICTION_AUDIT_COLLECTION, E as BLOB_INDEX_COLLECTION, F as BLOB_SLOTS_PREFIX, G as BLOB_VERSIONS_PREFIX, H as BlobEvictionEntry, J as BlobFieldPolicy, K as BlobFieldsConfig, M as BlobObject, N as BlobPutOptions, Q as BlobResponseOptions, T as BlobSet, U as BlobStrategyOpenArgs, V as CompactRunOptions, W as CompactionContext, X as CompactionResult, Y as DEFAULT_CHUNK_SIZE, Z as EXPORT_AUDIT_COLLECTION, _ as ExportBlobsAbortedError, $ as ExportBlobsAuditEntry, a0 as ExportBlobsHandle, a1 as ExportBlobsOptions, a2 as ExportedBlob, a3 as SlotInfo, a4 as SlotRecord, a5 as VersionRecord, a6 as createExportBlobsHandle, a7 as runCompaction } from '../types-DiSXn3a4.cjs';
|
|
3
3
|
export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.cjs';
|
|
4
4
|
import '../lazy-builder-Ci5_YG73.cjs';
|
|
5
5
|
import '../predicate-Bt5ft-9c.cjs';
|
package/dist/blobs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlobStrategy } from '../types-
|
|
2
|
-
export { z as BLOB_CHUNKS_COLLECTION, A as BLOB_COLLECTION, C as BLOB_EVICTION_AUDIT_COLLECTION, E as BLOB_INDEX_COLLECTION, F as BLOB_SLOTS_PREFIX, G as BLOB_VERSIONS_PREFIX, H as BlobEvictionEntry, J as BlobFieldPolicy, K as BlobFieldsConfig, M as BlobObject, N as BlobPutOptions, Q as BlobResponseOptions, T as BlobSet, U as BlobStrategyOpenArgs, V as CompactRunOptions, W as CompactionContext, X as CompactionResult, Y as DEFAULT_CHUNK_SIZE, Z as EXPORT_AUDIT_COLLECTION, _ as ExportBlobsAbortedError, $ as ExportBlobsAuditEntry, a0 as ExportBlobsHandle, a1 as ExportBlobsOptions, a2 as ExportedBlob, a3 as SlotInfo, a4 as SlotRecord, a5 as VersionRecord, a6 as createExportBlobsHandle, a7 as runCompaction } from '../types-
|
|
1
|
+
import { B as BlobStrategy } from '../types-CD8mc8zR.js';
|
|
2
|
+
export { z as BLOB_CHUNKS_COLLECTION, A as BLOB_COLLECTION, C as BLOB_EVICTION_AUDIT_COLLECTION, E as BLOB_INDEX_COLLECTION, F as BLOB_SLOTS_PREFIX, G as BLOB_VERSIONS_PREFIX, H as BlobEvictionEntry, J as BlobFieldPolicy, K as BlobFieldsConfig, M as BlobObject, N as BlobPutOptions, Q as BlobResponseOptions, T as BlobSet, U as BlobStrategyOpenArgs, V as CompactRunOptions, W as CompactionContext, X as CompactionResult, Y as DEFAULT_CHUNK_SIZE, Z as EXPORT_AUDIT_COLLECTION, _ as ExportBlobsAbortedError, $ as ExportBlobsAuditEntry, a0 as ExportBlobsHandle, a1 as ExportBlobsOptions, a2 as ExportedBlob, a3 as SlotInfo, a4 as SlotRecord, a5 as VersionRecord, a6 as createExportBlobsHandle, a7 as runCompaction } from '../types-CD8mc8zR.js';
|
|
3
3
|
export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.js';
|
|
4
4
|
import '../lazy-builder-D5GU14TS.js';
|
|
5
5
|
import '../predicate-Bt5ft-9c.js';
|
package/dist/blobs/index.js
CHANGED
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
detectMagic,
|
|
10
10
|
detectMimeType,
|
|
11
11
|
isPreCompressed
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-V2PZC6AW.js";
|
|
13
13
|
import {
|
|
14
14
|
BLOB_EVICTION_AUDIT_COLLECTION,
|
|
15
15
|
EXPORT_AUDIT_COLLECTION,
|
|
16
16
|
ExportBlobsAbortedError,
|
|
17
17
|
createExportBlobsHandle,
|
|
18
18
|
runCompaction
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-77DWLQRY.js";
|
|
20
|
+
import "../chunk-SLV4LAKX.js";
|
|
21
21
|
import "../chunk-R233SLY3.js";
|
|
22
22
|
import "../chunk-O6EJ6WTI.js";
|
|
23
23
|
|
package/dist/bundle/index.cjs
CHANGED
|
@@ -1498,6 +1498,18 @@ async function loadKeyring(adapter, vault, userId, passphrase) {
|
|
|
1498
1498
|
...keyringFile.policy !== void 0 && { policy: keyringFile.policy }
|
|
1499
1499
|
};
|
|
1500
1500
|
}
|
|
1501
|
+
async function assertKeyringOpenAllowed(store, vault, userId, create) {
|
|
1502
|
+
const keyringUsers = await store.list(vault, "_keyring");
|
|
1503
|
+
if (keyringUsers.includes(userId)) return;
|
|
1504
|
+
if (!create) {
|
|
1505
|
+
throw new NoAccessError(`Vault "${vault}" not opened: create disabled and no keyring for "${userId}".`);
|
|
1506
|
+
}
|
|
1507
|
+
if (keyringUsers.length > 0) {
|
|
1508
|
+
throw new NoAccessError(
|
|
1509
|
+
`No keyring for user "${userId}" in vault "${vault}" (held by other principals) \u2014 refusing to self-provision.`
|
|
1510
|
+
);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1501
1513
|
async function createOwnerKeyring(adapter, vault, userId, passphrase, passphraseOpts) {
|
|
1502
1514
|
if (passphraseOpts?.validate && !passphraseOpts.allowWeakPassphrase) {
|
|
1503
1515
|
assertStrongPassphrase(passphrase, passphraseOpts);
|
|
@@ -16279,7 +16291,7 @@ var init_noydb = __esm({
|
|
|
16279
16291
|
}
|
|
16280
16292
|
return comp;
|
|
16281
16293
|
}
|
|
16282
|
-
const keyring = await this.getKeyringInternal(name);
|
|
16294
|
+
const keyring = await this.getKeyringInternal(name, { create: opts?.create !== false });
|
|
16283
16295
|
if (!this.activeTier.has(name)) {
|
|
16284
16296
|
this.activeTier.set(name, 1);
|
|
16285
16297
|
}
|
|
@@ -16707,7 +16719,7 @@ var init_noydb = __esm({
|
|
|
16707
16719
|
const vaultId = vaultIds[idx];
|
|
16708
16720
|
const task = (async () => {
|
|
16709
16721
|
try {
|
|
16710
|
-
const comp = await this.openVault(vaultId);
|
|
16722
|
+
const comp = await this.openVault(vaultId, { create: options.create !== false });
|
|
16711
16723
|
const result = await fn(comp);
|
|
16712
16724
|
results[idx] = { vault: vaultId, result };
|
|
16713
16725
|
} catch (err) {
|
|
@@ -18049,7 +18061,7 @@ var init_noydb = __esm({
|
|
|
18049
18061
|
* accesses see them. Not exposed publicly — callers outside hub
|
|
18050
18062
|
* should use {@link getKeyring}, which returns a defensive copy.
|
|
18051
18063
|
*/
|
|
18052
|
-
async getKeyringInternal(vault) {
|
|
18064
|
+
async getKeyringInternal(vault, opts = { create: true }) {
|
|
18053
18065
|
if (this.options.encrypt === false) {
|
|
18054
18066
|
return createPlaintextKeyring(this.options.user);
|
|
18055
18067
|
}
|
|
@@ -18060,6 +18072,7 @@ var init_noydb = __esm({
|
|
|
18060
18072
|
this.keyringCache.set(vault, keyring2);
|
|
18061
18073
|
return keyring2;
|
|
18062
18074
|
}
|
|
18075
|
+
await assertKeyringOpenAllowed(this.options.store, vault, this.options.user, opts.create);
|
|
18063
18076
|
let effectiveSecret;
|
|
18064
18077
|
if (this.options.passphraseMode === "managed") {
|
|
18065
18078
|
effectiveSecret = await resolveManagedSecret(
|