@noy-db/hub 0.1.0-pre.3 → 0.1.0-pre.4

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.
Files changed (70) hide show
  1. package/dist/blobs/index.cjs.map +1 -1
  2. package/dist/blobs/index.d.cts +2 -2
  3. package/dist/blobs/index.d.ts +2 -2
  4. package/dist/blobs/index.js +2 -2
  5. package/dist/bundle/index.d.cts +2 -2
  6. package/dist/bundle/index.d.ts +2 -2
  7. package/dist/{chunk-EXQRC2L4.js → chunk-AVWFLPNR.js} +2 -2
  8. package/dist/{chunk-ZLMV3TUA.js → chunk-EARQCIL7.js} +3 -3
  9. package/dist/{chunk-4OWFYIDQ.js → chunk-L77MEFCH.js} +3 -3
  10. package/dist/{chunk-5AATM2M2.js → chunk-LSZHBNDG.js} +2 -2
  11. package/dist/{chunk-XHFOENR2.js → chunk-NK2NSXXK.js} +2 -2
  12. package/dist/{chunk-ZRG4V3F5.js → chunk-O5GK62FJ.js} +1 -1
  13. package/dist/chunk-O5GK62FJ.js.map +1 -0
  14. package/dist/{chunk-M2F2JAWB.js → chunk-PSHTHSIX.js} +2 -2
  15. package/dist/{chunk-UQFSPSWG.js → chunk-QZIACZZU.js} +2 -2
  16. package/dist/consent/index.d.cts +2 -2
  17. package/dist/consent/index.d.ts +2 -2
  18. package/dist/{dev-unlock-CeXic1xC.d.cts → dev-unlock-5SmCVGyx.d.cts} +1 -1
  19. package/dist/{dev-unlock-KrKkcqD3.d.ts → dev-unlock-XOUecfQ9.d.ts} +1 -1
  20. package/dist/{hash-ChfJjRjQ.d.ts → hash-Bxud16vM.d.ts} +1 -1
  21. package/dist/{hash-9KO1BGxh.d.cts → hash-CvuKN2gH.d.cts} +1 -1
  22. package/dist/history/index.cjs.map +1 -1
  23. package/dist/history/index.d.cts +3 -3
  24. package/dist/history/index.d.ts +3 -3
  25. package/dist/history/index.js +2 -2
  26. package/dist/i18n/index.cjs.map +1 -1
  27. package/dist/i18n/index.d.cts +2 -2
  28. package/dist/i18n/index.d.ts +2 -2
  29. package/dist/i18n/index.js +3 -3
  30. package/dist/{index-DhjMjz7L.d.cts → index-BvUiM47h.d.cts} +1 -1
  31. package/dist/{index-C8kQtmOk.d.ts → index-Cy-MKrdK.d.ts} +1 -1
  32. package/dist/index.cjs +11 -3
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +5 -5
  35. package/dist/index.d.ts +5 -5
  36. package/dist/index.js +19 -11
  37. package/dist/index.js.map +1 -1
  38. package/dist/{ledger-2NX4L7PN.js → ledger-HWXYGUIQ.js} +3 -3
  39. package/dist/periods/index.cjs.map +1 -1
  40. package/dist/periods/index.d.cts +2 -2
  41. package/dist/periods/index.d.ts +2 -2
  42. package/dist/periods/index.js +3 -3
  43. package/dist/session/index.d.cts +3 -3
  44. package/dist/session/index.d.ts +3 -3
  45. package/dist/shadow/index.d.cts +2 -2
  46. package/dist/shadow/index.d.ts +2 -2
  47. package/dist/store/index.d.cts +2 -2
  48. package/dist/store/index.d.ts +2 -2
  49. package/dist/sync/index.cjs.map +1 -1
  50. package/dist/sync/index.d.cts +1 -1
  51. package/dist/sync/index.d.ts +1 -1
  52. package/dist/sync/index.js +2 -2
  53. package/dist/team/index.cjs.map +1 -1
  54. package/dist/team/index.d.cts +2 -2
  55. package/dist/team/index.d.ts +2 -2
  56. package/dist/team/index.js +4 -4
  57. package/dist/tx/index.d.cts +2 -2
  58. package/dist/tx/index.d.ts +2 -2
  59. package/dist/{types-Bfs0qr5F.d.cts → types-BVSfkYg6.d.cts} +40 -1
  60. package/dist/{types-BZpCZB8N.d.ts → types-Dmi7nrC9.d.ts} +40 -1
  61. package/package.json +1 -1
  62. package/dist/chunk-ZRG4V3F5.js.map +0 -1
  63. /package/dist/{chunk-EXQRC2L4.js.map → chunk-AVWFLPNR.js.map} +0 -0
  64. /package/dist/{chunk-ZLMV3TUA.js.map → chunk-EARQCIL7.js.map} +0 -0
  65. /package/dist/{chunk-4OWFYIDQ.js.map → chunk-L77MEFCH.js.map} +0 -0
  66. /package/dist/{chunk-5AATM2M2.js.map → chunk-LSZHBNDG.js.map} +0 -0
  67. /package/dist/{chunk-XHFOENR2.js.map → chunk-NK2NSXXK.js.map} +0 -0
  68. /package/dist/{chunk-M2F2JAWB.js.map → chunk-PSHTHSIX.js.map} +0 -0
  69. /package/dist/{chunk-UQFSPSWG.js.map → chunk-QZIACZZU.js.map} +0 -0
  70. /package/dist/{ledger-2NX4L7PN.js.map → ledger-HWXYGUIQ.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { I as I18nStrategy } from '../types-Bfs0qr5F.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-Bfs0qr5F.cjs';
1
+ import { I as I18nStrategy } from '../types-BVSfkYg6.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-BVSfkYg6.cjs';
3
3
  import '../lazy-builder-CZVLKh0Z.cjs';
4
4
  import '../predicate-SBHmi6D0.cjs';
5
5
  import '../strategy-D-SrOLCl.cjs';
@@ -1,5 +1,5 @@
1
- import { I as I18nStrategy } from '../types-BZpCZB8N.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-BZpCZB8N.js';
1
+ import { I as I18nStrategy } from '../types-Dmi7nrC9.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-Dmi7nrC9.js';
3
3
  import '../lazy-builder-BwEoBQZ9.js';
4
4
  import '../predicate-SBHmi6D0.js';
5
5
  import '../strategy-D-SrOLCl.js';
@@ -10,10 +10,10 @@ import {
10
10
  isI18nTextDescriptor,
11
11
  resolveI18nText,
12
12
  validateI18nTextValue
13
- } from "../chunk-ZLMV3TUA.js";
14
- import "../chunk-M2F2JAWB.js";
13
+ } from "../chunk-EARQCIL7.js";
14
+ import "../chunk-PSHTHSIX.js";
15
15
  import "../chunk-CIMZBAZB.js";
16
- import "../chunk-ZRG4V3F5.js";
16
+ import "../chunk-O5GK62FJ.js";
17
17
  import "../chunk-MR4424N3.js";
18
18
  import "../chunk-ACLDOTNQ.js";
19
19
 
@@ -1,4 +1,4 @@
1
- import { aU as BundleRecipient, aR as Vault } from './types-Bfs0qr5F.cjs';
1
+ import { aU as BundleRecipient, aR as Vault } from './types-BVSfkYg6.cjs';
2
2
 
3
3
  /**
4
4
  * `.noydb` container format — byte layout, header schema, validators.
@@ -1,4 +1,4 @@
1
- import { aU as BundleRecipient, aR as Vault } from './types-BZpCZB8N.js';
1
+ import { aU as BundleRecipient, aR as Vault } from './types-Dmi7nrC9.js';
2
2
 
3
3
  /**
4
4
  * `.noydb` container format — byte layout, header schema, validators.
package/dist/index.cjs CHANGED
@@ -12837,8 +12837,13 @@ var Noydb = class {
12837
12837
  }
12838
12838
  const cached = this.keyringCache.get(vault);
12839
12839
  if (cached) return cached;
12840
+ if (this.options.getKeyring) {
12841
+ const keyring2 = await this.options.getKeyring(vault);
12842
+ this.keyringCache.set(vault, keyring2);
12843
+ return keyring2;
12844
+ }
12840
12845
  if (!this.options.secret) {
12841
- throw new ValidationError("A secret (passphrase) is required when encryption is enabled");
12846
+ throw new ValidationError("A secret (passphrase) or getKeyring callback is required when encryption is enabled");
12842
12847
  }
12843
12848
  let keyring;
12844
12849
  try {
@@ -12856,8 +12861,11 @@ var Noydb = class {
12856
12861
  };
12857
12862
  async function createNoydb(options) {
12858
12863
  const encrypted = options.encrypt !== false;
12859
- if (encrypted && !options.secret) {
12860
- throw new ValidationError("A secret (passphrase) is required when encryption is enabled");
12864
+ if (options.secret && options.getKeyring) {
12865
+ throw new ValidationError("Provide either `secret` or `getKeyring`, not both");
12866
+ }
12867
+ if (encrypted && !options.secret && !options.getKeyring) {
12868
+ throw new ValidationError("A secret (passphrase) or getKeyring callback is required when encryption is enabled");
12861
12869
  }
12862
12870
  return new Noydb(options);
12863
12871
  }