@noy-db/hub 0.1.0-pre.7 → 0.1.0-pre.9
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/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 +2 -2
- package/dist/bundle/index.d.cts +2 -2
- package/dist/bundle/index.d.ts +2 -2
- package/dist/bundle/index.js +3 -3
- package/dist/{chunk-KPF2HHPI.js → chunk-2CSJGFCB.js} +2 -2
- package/dist/{chunk-INSJBB5W.js → chunk-4PWAI7Q4.js} +3 -3
- package/dist/{chunk-CL37QSND.js → chunk-AVVPZ4BC.js} +2 -2
- package/dist/{chunk-FAAWLVTF.js → chunk-EXHNQEV4.js} +2 -2
- package/dist/{chunk-NZ4XCIKS.js → chunk-MDDTIZUO.js} +3 -3
- package/dist/{chunk-GILMPJXB.js → chunk-PTVMYYON.js} +2 -2
- package/dist/{chunk-N2LMZKLR.js → chunk-QAVUREFT.js} +2 -2
- package/dist/{chunk-3WCRU7TI.js → chunk-QGZRWRSL.js} +2 -2
- package/dist/{chunk-B6HF6NTZ.js → chunk-RKJ6OL7K.js} +1 -1
- package/dist/chunk-RKJ6OL7K.js.map +1 -0
- package/dist/{chunk-XCL3WP6J.js → chunk-SCZXXXU4.js} +2 -1
- package/dist/{chunk-XCL3WP6J.js.map → chunk-SCZXXXU4.js.map} +1 -1
- package/dist/{chunk-UFL4DUEV.js → chunk-VQBTTTUN.js} +1 -1
- package/dist/chunk-VQBTTTUN.js.map +1 -0
- package/dist/{chunk-6IJQ27XN.js → chunk-WDM5XGGS.js} +51 -4
- package/dist/chunk-WDM5XGGS.js.map +1 -0
- package/dist/consent/index.d.cts +2 -2
- package/dist/consent/index.d.ts +2 -2
- package/dist/{delegation-XDJCBTI2.js → delegation-2DBS2EOH.js} +2 -2
- package/dist/{dev-unlock-CcJ1qIi7.d.ts → dev-unlock-BdPp68qn.d.ts} +1 -1
- package/dist/{dev-unlock-Dk14V6lX.d.cts → dev-unlock-Da1B0TIK.d.cts} +1 -1
- package/dist/{hash-h_2U3TFb.d.cts → hash-BEfzPKwo.d.cts} +1 -1
- package/dist/{hash-1Xsqx1jl.d.ts → hash-lsoL3eEW.d.ts} +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 +11 -0
- 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-DZn6Yick.d.ts → index-8QDuznDr.d.ts} +1 -1
- package/dist/{index-Cvb0efA_.d.cts → index-CywCC1qZ.d.cts} +1 -1
- package/dist/index.cjs +590 -59
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +548 -74
- package/dist/index.js.map +1 -1
- package/dist/{ledger-5V67MAIL.js → ledger-QZTTHQAQ.js} +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-DFJZHXVH.js → public-envelope-6JTACYJV.js} +3 -3
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +3 -3
- package/dist/session/index.d.ts +3 -3
- package/dist/session/index.js +1 -1
- package/dist/shadow/index.d.cts +2 -2
- package/dist/shadow/index.d.ts +2 -2
- 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 +11 -0
- 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 +4 -4
- package/dist/tx/index.d.cts +2 -2
- package/dist/tx/index.d.ts +2 -2
- package/dist/{types-D3QLmhlk.d.cts → types-Bnb82f5R.d.cts} +818 -74
- package/dist/{types-D-6bmD2c.d.ts → types-Bo7NSXJr.d.ts} +818 -74
- package/package.json +1 -1
- package/dist/chunk-6IJQ27XN.js.map +0 -1
- package/dist/chunk-B6HF6NTZ.js.map +0 -1
- package/dist/chunk-UFL4DUEV.js.map +0 -1
- /package/dist/{chunk-KPF2HHPI.js.map → chunk-2CSJGFCB.js.map} +0 -0
- /package/dist/{chunk-INSJBB5W.js.map → chunk-4PWAI7Q4.js.map} +0 -0
- /package/dist/{chunk-CL37QSND.js.map → chunk-AVVPZ4BC.js.map} +0 -0
- /package/dist/{chunk-FAAWLVTF.js.map → chunk-EXHNQEV4.js.map} +0 -0
- /package/dist/{chunk-NZ4XCIKS.js.map → chunk-MDDTIZUO.js.map} +0 -0
- /package/dist/{chunk-GILMPJXB.js.map → chunk-PTVMYYON.js.map} +0 -0
- /package/dist/{chunk-N2LMZKLR.js.map → chunk-QAVUREFT.js.map} +0 -0
- /package/dist/{chunk-3WCRU7TI.js.map → chunk-QGZRWRSL.js.map} +0 -0
- /package/dist/{delegation-XDJCBTI2.js.map → delegation-2DBS2EOH.js.map} +0 -0
- /package/dist/{ledger-5V67MAIL.js.map → ledger-QZTTHQAQ.js.map} +0 -0
- /package/dist/{public-envelope-DFJZHXVH.js.map → public-envelope-6JTACYJV.js.map} +0 -0
package/dist/history/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { as as HistoryStrategy, at as NoydbStore, au as HistoryOptions, av as EncryptedEnvelope, aw as PruneOptions } from '../types-
|
|
2
|
-
export { ax as AppendInput, ay as ChangeType, az as CollectionInstant, aA as DiffEntry, aB as JsonPatch, aC as JsonPatchOp, aD as LedgerEntry, aE as LedgerStore, aF as VaultEngine, aG as VaultInstant, aH as VerifyResult, aI as applyPatch, aJ as canonicalJson, aK as computePatch, aL as diff, aM as formatDiff, aN as hashEntry, aO as paddedIndex, aP as parseIndex, aQ as sha256Hex } from '../types-
|
|
3
|
-
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-
|
|
1
|
+
import { as as HistoryStrategy, at as NoydbStore, au as HistoryOptions, av as EncryptedEnvelope, aw as PruneOptions } from '../types-Bnb82f5R.cjs';
|
|
2
|
+
export { ax as AppendInput, ay as ChangeType, az as CollectionInstant, aA as DiffEntry, aB as JsonPatch, aC as JsonPatchOp, aD as LedgerEntry, aE as LedgerStore, aF as VaultEngine, aG as VaultInstant, aH as VerifyResult, aI as applyPatch, aJ as canonicalJson, aK as computePatch, aL as diff, aM as formatDiff, aN as hashEntry, aO as paddedIndex, aP as parseIndex, aQ as sha256Hex } from '../types-Bnb82f5R.cjs';
|
|
3
|
+
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-BEfzPKwo.cjs';
|
|
4
4
|
import '../lazy-builder-CZVLKh0Z.cjs';
|
|
5
5
|
import '../predicate-SBHmi6D0.cjs';
|
|
6
6
|
import '../strategy-D-SrOLCl.cjs';
|
package/dist/history/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { as as HistoryStrategy, at as NoydbStore, au as HistoryOptions, av as EncryptedEnvelope, aw as PruneOptions } from '../types-
|
|
2
|
-
export { ax as AppendInput, ay as ChangeType, az as CollectionInstant, aA as DiffEntry, aB as JsonPatch, aC as JsonPatchOp, aD as LedgerEntry, aE as LedgerStore, aF as VaultEngine, aG as VaultInstant, aH as VerifyResult, aI as applyPatch, aJ as canonicalJson, aK as computePatch, aL as diff, aM as formatDiff, aN as hashEntry, aO as paddedIndex, aP as parseIndex, aQ as sha256Hex } from '../types-
|
|
3
|
-
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-
|
|
1
|
+
import { as as HistoryStrategy, at as NoydbStore, au as HistoryOptions, av as EncryptedEnvelope, aw as PruneOptions } from '../types-Bo7NSXJr.js';
|
|
2
|
+
export { ax as AppendInput, ay as ChangeType, az as CollectionInstant, aA as DiffEntry, aB as JsonPatch, aC as JsonPatchOp, aD as LedgerEntry, aE as LedgerStore, aF as VaultEngine, aG as VaultInstant, aH as VerifyResult, aI as applyPatch, aJ as canonicalJson, aK as computePatch, aL as diff, aM as formatDiff, aN as hashEntry, aO as paddedIndex, aP as parseIndex, aQ as sha256Hex } from '../types-Bo7NSXJr.js';
|
|
3
|
+
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-lsoL3eEW.js';
|
|
4
4
|
import '../lazy-builder-BwEoBQZ9.js';
|
|
5
5
|
import '../predicate-SBHmi6D0.js';
|
|
6
6
|
import '../strategy-D-SrOLCl.js';
|
package/dist/history/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
LedgerStore,
|
|
16
16
|
applyPatch,
|
|
17
17
|
computePatch
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-QAVUREFT.js";
|
|
19
19
|
import {
|
|
20
20
|
canonicalJson,
|
|
21
21
|
envelopePayloadHash,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
parseIndex,
|
|
25
25
|
sha256Hex
|
|
26
26
|
} from "../chunk-CIMZBAZB.js";
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-RKJ6OL7K.js";
|
|
28
28
|
import "../chunk-MR4424N3.js";
|
|
29
29
|
import "../chunk-ACLDOTNQ.js";
|
|
30
30
|
|
package/dist/i18n/index.cjs
CHANGED
|
@@ -63,6 +63,12 @@ var PermissionDeniedError = class extends NoydbError {
|
|
|
63
63
|
this.name = "PermissionDeniedError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
+
var ValidationError = class extends NoydbError {
|
|
67
|
+
constructor(message = "Validation error") {
|
|
68
|
+
super("VALIDATION_ERROR", message);
|
|
69
|
+
this.name = "ValidationError";
|
|
70
|
+
}
|
|
71
|
+
};
|
|
66
72
|
var DictKeyMissingError = class extends NoydbError {
|
|
67
73
|
/** The dictionary name. */
|
|
68
74
|
dictionaryName;
|
|
@@ -306,6 +312,11 @@ async function ensureCollectionDEK(adapter, vault, keyring) {
|
|
|
306
312
|
};
|
|
307
313
|
}
|
|
308
314
|
async function persistKeyring(adapter, vault, keyring) {
|
|
315
|
+
if (!keyring.kek) {
|
|
316
|
+
throw new ValidationError(
|
|
317
|
+
"persistKeyring: keyring.kek is null \u2014 cannot wrap DEKs without the KEK. This typically means the keyring was opened via tier-3 PIN resume, session restore, or a wrap-DEKs tier-2 unlock. Re-authenticate at tier 1 (passphrase) before persisting."
|
|
318
|
+
);
|
|
319
|
+
}
|
|
309
320
|
const wrappedDeks = {};
|
|
310
321
|
for (const [collName, dek] of keyring.deks) {
|
|
311
322
|
wrappedDeks[collName] = await wrapKey(dek, keyring.kek);
|