@noy-db/hub 0.1.0-pre.4 → 0.1.0-pre.7
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 +3 -3
- package/dist/blobs/index.d.ts +3 -3
- package/dist/blobs/index.js +2 -2
- package/dist/bundle/index.cjs +26 -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 +3 -1
- package/dist/{chunk-LSZHBNDG.js → chunk-3WCRU7TI.js} +2 -2
- package/dist/{chunk-PSHTHSIX.js → chunk-6IJQ27XN.js} +213 -10
- package/dist/chunk-6IJQ27XN.js.map +1 -0
- package/dist/{chunk-O5GK62FJ.js → chunk-B6HF6NTZ.js} +1 -1
- package/dist/chunk-B6HF6NTZ.js.map +1 -0
- package/dist/{chunk-AVWFLPNR.js → chunk-CL37QSND.js} +2 -2
- package/dist/chunk-EMIGCR7X.js +39 -0
- package/dist/chunk-EMIGCR7X.js.map +1 -0
- package/dist/{chunk-GJILMRPO.js → chunk-FAAWLVTF.js} +42 -4
- package/dist/chunk-FAAWLVTF.js.map +1 -0
- package/dist/chunk-GILMPJXB.js +155 -0
- package/dist/chunk-GILMPJXB.js.map +1 -0
- package/dist/{chunk-L77MEFCH.js → chunk-INSJBB5W.js} +3 -3
- package/dist/{chunk-QZIACZZU.js → chunk-KPF2HHPI.js} +2 -2
- package/dist/{chunk-NK2NSXXK.js → chunk-N2LMZKLR.js} +2 -2
- package/dist/{chunk-EARQCIL7.js → chunk-NZ4XCIKS.js} +3 -3
- package/dist/{chunk-E445ICYI.js → chunk-UFL4DUEV.js} +5 -3
- package/dist/chunk-UFL4DUEV.js.map +1 -0
- package/dist/consent/index.d.cts +3 -3
- package/dist/consent/index.d.ts +3 -3
- package/dist/{dev-unlock-XOUecfQ9.d.ts → dev-unlock-CcJ1qIi7.d.ts} +1 -1
- package/dist/{dev-unlock-5SmCVGyx.d.cts → dev-unlock-Dk14V6lX.d.cts} +1 -1
- package/dist/{hash-Bxud16vM.d.ts → hash-1Xsqx1jl.d.ts} +1 -1
- package/dist/{hash-CvuKN2gH.d.cts → hash-h_2U3TFb.d.cts} +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +4 -4
- package/dist/history/index.d.ts +4 -4
- package/dist/history/index.js +2 -2
- package/dist/i18n/index.cjs +3 -1
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.js +3 -3
- package/dist/{index-DN-J-5wT.d.cts → index-6xNpPsxR.d.cts} +1 -1
- package/dist/{index-Cy-MKrdK.d.ts → index-Cvb0efA_.d.cts} +39 -5
- package/dist/{index-BRHBCmLt.d.ts → index-DJTf9yxn.d.ts} +1 -1
- package/dist/{index-BvUiM47h.d.cts → index-DZn6Yick.d.ts} +39 -5
- package/dist/index.cjs +2001 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +315 -19
- package/dist/index.d.ts +315 -19
- package/dist/index.js +1503 -41
- package/dist/index.js.map +1 -1
- package/dist/{ledger-HWXYGUIQ.js → ledger-5V67MAIL.js} +3 -3
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +3 -3
- package/dist/periods/index.d.ts +3 -3
- package/dist/periods/index.js +3 -3
- package/dist/public-envelope-DFJZHXVH.js +31 -0
- package/dist/public-envelope-DFJZHXVH.js.map +1 -0
- package/dist/query/index.d.cts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/session/index.cjs +4 -2
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +4 -4
- package/dist/session/index.d.ts +4 -4
- package/dist/session/index.js +1 -1
- package/dist/shadow/index.d.cts +3 -3
- package/dist/shadow/index.d.ts +3 -3
- package/dist/store/index.d.cts +3 -3
- package/dist/store/index.d.ts +3 -3
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +2 -2
- package/dist/sync/index.d.ts +2 -2
- package/dist/sync/index.js +2 -2
- package/dist/team/index.cjs +3 -1
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +3 -3
- package/dist/team/index.d.ts +3 -3
- package/dist/team/index.js +4 -4
- package/dist/tx/index.d.cts +3 -3
- package/dist/tx/index.d.ts +3 -3
- package/dist/{types-Dmi7nrC9.d.ts → types-D-6bmD2c.d.ts} +1271 -3
- package/dist/{types-BVSfkYg6.d.cts → types-D3QLmhlk.d.cts} +1271 -3
- package/package.json +1 -1
- package/dist/chunk-E445ICYI.js.map +0 -1
- package/dist/chunk-GJILMRPO.js.map +0 -1
- package/dist/chunk-O5GK62FJ.js.map +0 -1
- package/dist/chunk-PSHTHSIX.js.map +0 -1
- /package/dist/{chunk-LSZHBNDG.js.map → chunk-3WCRU7TI.js.map} +0 -0
- /package/dist/{chunk-AVWFLPNR.js.map → chunk-CL37QSND.js.map} +0 -0
- /package/dist/{chunk-L77MEFCH.js.map → chunk-INSJBB5W.js.map} +0 -0
- /package/dist/{chunk-QZIACZZU.js.map → chunk-KPF2HHPI.js.map} +0 -0
- /package/dist/{chunk-NK2NSXXK.js.map → chunk-N2LMZKLR.js.map} +0 -0
- /package/dist/{chunk-EARQCIL7.js.map → chunk-NZ4XCIKS.js.map} +0 -0
- /package/dist/{ledger-HWXYGUIQ.js.map → ledger-5V67MAIL.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-
|
|
1
|
+
import { I as I18nStrategy } from '../types-D3QLmhlk.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-D3QLmhlk.cjs';
|
|
3
3
|
import '../lazy-builder-CZVLKh0Z.cjs';
|
|
4
4
|
import '../predicate-SBHmi6D0.cjs';
|
|
5
5
|
import '../strategy-D-SrOLCl.cjs';
|
|
6
6
|
import '../strategy-BSxFXGzb.cjs';
|
|
7
|
-
import '../index-
|
|
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-
|
|
1
|
+
import { I as I18nStrategy } from '../types-D-6bmD2c.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-D-6bmD2c.js';
|
|
3
3
|
import '../lazy-builder-BwEoBQZ9.js';
|
|
4
4
|
import '../predicate-SBHmi6D0.js';
|
|
5
5
|
import '../strategy-D-SrOLCl.js';
|
|
6
6
|
import '../strategy-BSxFXGzb.js';
|
|
7
|
-
import '../index-
|
|
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,10 +10,10 @@ import {
|
|
|
10
10
|
isI18nTextDescriptor,
|
|
11
11
|
resolveI18nText,
|
|
12
12
|
validateI18nTextValue
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
} from "../chunk-NZ4XCIKS.js";
|
|
14
|
+
import "../chunk-6IJQ27XN.js";
|
|
15
15
|
import "../chunk-CIMZBAZB.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-B6HF6NTZ.js";
|
|
17
17
|
import "../chunk-MR4424N3.js";
|
|
18
18
|
import "../chunk-ACLDOTNQ.js";
|
|
19
19
|
|
|
@@ -1937,4 +1937,4 @@ declare class ScanBuilder<T> implements AsyncIterable<T> {
|
|
|
1937
1937
|
private recordMatches;
|
|
1938
1938
|
}
|
|
1939
1939
|
|
|
1940
|
-
export { ScanBuilder as $, AlreadyElevatedError as A, BackupCorruptedError as B, ConflictError as C, DEFAULT_JOIN_MAX_ROWS as D, ElevationExpiredError as E, FilenameSanitizationError as F, GroupCardinalityError as G, type QuerySource as H, ImportCapabilityError as I, type JoinContext as J, KeyringExpiredError as K, LedgerContentionError as L, MissingTranslationError as M,
|
|
1940
|
+
export { ScanBuilder as $, AlreadyElevatedError as A, BackupCorruptedError as B, ConflictError as C, DEFAULT_JOIN_MAX_ROWS as D, ElevationExpiredError as E, FilenameSanitizationError as F, GroupCardinalityError as G, type QuerySource as H, ImportCapabilityError as I, type JoinContext as J, KeyringExpiredError as K, LedgerContentionError as L, MissingTranslationError as M, NoydbError as N, type OrderBy as O, PathEscapeError as P, Query as Q, ReadOnlyAtInstantError as R, ReadOnlyError as S, ReadOnlyFrameError as T, type RefDescriptor as U, RefIntegrityError as V, type RefMode as W, RefRegistry as X, RefScopeError as Y, type RefViolation as Z, ReservedCollectionNameError as _, BackupLedgerError as a, type ScanPageProvider as a0, SchemaValidationError as a1, SessionExpiredError as a2, SessionNotFoundError as a3, SessionPolicyError as a4, StoreCapabilityError as a5, TamperedError as a6, TierDemoteDeniedError as a7, TierNotGrantedError as a8, TranslatorNotConfiguredError as a9, ValidationError as aa, applyJoins as ab, buildLiveQuery as ac, executePlan as ad, ref as ae, resetJoinWarnings as af, BundleIntegrityError as b, BundleVersionConflictError as c, DanglingReferenceError as d, DecryptionError as e, DelegationTargetMissingError as f, DictKeyInUseError as g, DictKeyMissingError as h, ExportCapabilityError as i, IndexRequiredError as j, IndexWriteFailureError as k, InvalidKeyError as l, type JoinLeg as m, type JoinStrategy as n, JoinTooLargeError as o, type JoinableSource as p, type LiveQuery as q, type LiveUpstream as r, LocaleNotSpecifiedError as s, NetworkError as t, NoAccessError as u, NotFoundError as v, PeriodClosedError as w, PermissionDeniedError as x, PrivilegeEscalationError as y, type QueryPlan as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aS as PublicEnvelope, b0 as BundleRecipient, aY as Vault } from './types-D3QLmhlk.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `.noydb` container format — byte layout, header schema, validators.
|
|
@@ -47,6 +47,7 @@ import { aU as BundleRecipient, aR as Vault } from './types-Dmi7nrC9.js';
|
|
|
47
47
|
* carries only what's needed to identify the file as a NOYDB
|
|
48
48
|
* bundle and verify its integrity — nothing about the contents.
|
|
49
49
|
*/
|
|
50
|
+
|
|
50
51
|
/** Magic bytes 'NDB1' (ASCII), identifying a NOYDB bundle. */
|
|
51
52
|
declare const NOYDB_BUNDLE_MAGIC: Uint8Array<ArrayBuffer>;
|
|
52
53
|
/** Total fixed prefix before the header JSON: 4+1+1+4 bytes. */
|
|
@@ -110,6 +111,18 @@ interface NoydbBundleHeader {
|
|
|
110
111
|
readonly bodyBytes: number;
|
|
111
112
|
/** SHA-256 of the compressed body bytes (lowercase hex). Lets readers verify integrity without decompressing. */
|
|
112
113
|
readonly bodySha256: string;
|
|
114
|
+
/**
|
|
115
|
+
* Owner-curated public envelope (`docs/subsystems/public-envelope.md`).
|
|
116
|
+
* Optional — present only when the source vault has a
|
|
117
|
+
* `_meta/public-envelope` document AND the writer's hub is opted
|
|
118
|
+
* into the feature. Treat as **untrusted hint**; the body's
|
|
119
|
+
* encrypted contents remain the source of truth.
|
|
120
|
+
*
|
|
121
|
+
* The envelope deliberately widens the minimum-disclosure rule
|
|
122
|
+
* for explicit, owner-curated label fields (name, icon, …). Every
|
|
123
|
+
* other unknown header key still rejects at parse time.
|
|
124
|
+
*/
|
|
125
|
+
readonly publicEnvelope?: PublicEnvelope;
|
|
113
126
|
}
|
|
114
127
|
/**
|
|
115
128
|
* Validate a parsed bundle header. Throws on any deviation from
|
|
@@ -284,14 +297,35 @@ declare function resetBrotliSupportCache(): void;
|
|
|
284
297
|
declare function writeNoydbBundle(vault: Vault, opts?: WriteNoydbBundleOptions): Promise<Uint8Array>;
|
|
285
298
|
/**
|
|
286
299
|
* Read just the bundle header — no body decompression, no
|
|
287
|
-
* integrity verification.
|
|
288
|
-
*
|
|
289
|
-
* size before downloading the full body.
|
|
300
|
+
* integrity verification. Intended for cloud-listing UIs that want
|
|
301
|
+
* to show the handle and size before downloading the full body.
|
|
290
302
|
*
|
|
291
303
|
* Returns the same `NoydbBundleHeader` shape as the writer, with
|
|
292
304
|
* minimum-disclosure validation already applied.
|
|
305
|
+
*
|
|
306
|
+
* **Cost** — O(prefix + header bytes). The header is normally well
|
|
307
|
+
* under 1 KB, but may grow to roughly 256 KB when a `publicEnvelope`
|
|
308
|
+
* with an inline icon is present. Cloud-listing UIs that previously
|
|
309
|
+
* assumed sub-KB header reads should account for this when sizing
|
|
310
|
+
* range requests against bundles that may carry icons.
|
|
293
311
|
*/
|
|
294
312
|
declare function readNoydbBundleHeader(bytes: Uint8Array): NoydbBundleHeader;
|
|
313
|
+
/**
|
|
314
|
+
* Read just the bundle's public envelope (`docs/subsystems/public-envelope.md`)
|
|
315
|
+
* — without verifying the body or even parsing the dump JSON. Pass
|
|
316
|
+
* the raw bundle bytes; receive the owner-curated metadata or
|
|
317
|
+
* `undefined` if the bundle was written without one.
|
|
318
|
+
*
|
|
319
|
+
* Locale-resolves any `name` / `description` map fields when `locale`
|
|
320
|
+
* is supplied. Omitting `locale` returns the raw envelope.
|
|
321
|
+
*
|
|
322
|
+
* Same security caveat as the on-vault read path — the public
|
|
323
|
+
* envelope is **untrusted hint** in v1; the encrypted body remains
|
|
324
|
+
* the source of truth for vault contents.
|
|
325
|
+
*/
|
|
326
|
+
declare function readNoydbBundlePublicEnvelope(bytes: Uint8Array, opts?: {
|
|
327
|
+
readonly locale?: string;
|
|
328
|
+
}): PublicEnvelope | undefined;
|
|
295
329
|
/**
|
|
296
330
|
* Read a full `.noydb` bundle: validate magic + header, verify
|
|
297
331
|
* integrity hash over the body bytes, decompress, and return the
|
|
@@ -377,4 +411,4 @@ declare function generateULID(): string;
|
|
|
377
411
|
*/
|
|
378
412
|
declare function isULID(value: string): boolean;
|
|
379
413
|
|
|
380
|
-
export { type CompressionAlgo as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type WriteNoydbBundleOptions as W, NOYDB_BUNDLE_MAGIC as a, NOYDB_BUNDLE_PREFIX_BYTES as b, type NoydbBundleHeader as c, type NoydbBundleReadResult as d, readNoydbBundleHeader as e,
|
|
414
|
+
export { type CompressionAlgo as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type WriteNoydbBundleOptions as W, NOYDB_BUNDLE_MAGIC as a, NOYDB_BUNDLE_PREFIX_BYTES as b, type NoydbBundleHeader as c, type NoydbBundleReadResult as d, readNoydbBundleHeader as e, readNoydbBundlePublicEnvelope as f, generateULID as g, hasNoydbBundleMagic as h, isULID as i, resetBrotliSupportCache as j, COMPRESSION_BROTLI as k, COMPRESSION_GZIP as l, COMPRESSION_NONE as m, FLAG_HAS_INTEGRITY_HASH as n, encodeBundleHeader as o, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
|
|
@@ -1937,4 +1937,4 @@ declare class ScanBuilder<T> implements AsyncIterable<T> {
|
|
|
1937
1937
|
private recordMatches;
|
|
1938
1938
|
}
|
|
1939
1939
|
|
|
1940
|
-
export { ScanBuilder as $, AlreadyElevatedError as A, BackupCorruptedError as B, ConflictError as C, DEFAULT_JOIN_MAX_ROWS as D, ElevationExpiredError as E, FilenameSanitizationError as F, GroupCardinalityError as G, type QuerySource as H, ImportCapabilityError as I, type JoinContext as J, KeyringExpiredError as K, LedgerContentionError as L, MissingTranslationError as M,
|
|
1940
|
+
export { ScanBuilder as $, AlreadyElevatedError as A, BackupCorruptedError as B, ConflictError as C, DEFAULT_JOIN_MAX_ROWS as D, ElevationExpiredError as E, FilenameSanitizationError as F, GroupCardinalityError as G, type QuerySource as H, ImportCapabilityError as I, type JoinContext as J, KeyringExpiredError as K, LedgerContentionError as L, MissingTranslationError as M, NoydbError as N, type OrderBy as O, PathEscapeError as P, Query as Q, ReadOnlyAtInstantError as R, ReadOnlyError as S, ReadOnlyFrameError as T, type RefDescriptor as U, RefIntegrityError as V, type RefMode as W, RefRegistry as X, RefScopeError as Y, type RefViolation as Z, ReservedCollectionNameError as _, BackupLedgerError as a, type ScanPageProvider as a0, SchemaValidationError as a1, SessionExpiredError as a2, SessionNotFoundError as a3, SessionPolicyError as a4, StoreCapabilityError as a5, TamperedError as a6, TierDemoteDeniedError as a7, TierNotGrantedError as a8, TranslatorNotConfiguredError as a9, ValidationError as aa, applyJoins as ab, buildLiveQuery as ac, executePlan as ad, ref as ae, resetJoinWarnings as af, BundleIntegrityError as b, BundleVersionConflictError as c, DanglingReferenceError as d, DecryptionError as e, DelegationTargetMissingError as f, DictKeyInUseError as g, DictKeyMissingError as h, ExportCapabilityError as i, IndexRequiredError as j, IndexWriteFailureError as k, InvalidKeyError as l, type JoinLeg as m, type JoinStrategy as n, JoinTooLargeError as o, type JoinableSource as p, type LiveQuery as q, type LiveUpstream as r, LocaleNotSpecifiedError as s, NetworkError as t, NoAccessError as u, NotFoundError as v, PeriodClosedError as w, PermissionDeniedError as x, PrivilegeEscalationError as y, type QueryPlan as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aS as PublicEnvelope, b0 as BundleRecipient, aY as Vault } from './types-D-6bmD2c.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `.noydb` container format — byte layout, header schema, validators.
|
|
@@ -47,6 +47,7 @@ import { aU as BundleRecipient, aR as Vault } from './types-BVSfkYg6.cjs';
|
|
|
47
47
|
* carries only what's needed to identify the file as a NOYDB
|
|
48
48
|
* bundle and verify its integrity — nothing about the contents.
|
|
49
49
|
*/
|
|
50
|
+
|
|
50
51
|
/** Magic bytes 'NDB1' (ASCII), identifying a NOYDB bundle. */
|
|
51
52
|
declare const NOYDB_BUNDLE_MAGIC: Uint8Array<ArrayBuffer>;
|
|
52
53
|
/** Total fixed prefix before the header JSON: 4+1+1+4 bytes. */
|
|
@@ -110,6 +111,18 @@ interface NoydbBundleHeader {
|
|
|
110
111
|
readonly bodyBytes: number;
|
|
111
112
|
/** SHA-256 of the compressed body bytes (lowercase hex). Lets readers verify integrity without decompressing. */
|
|
112
113
|
readonly bodySha256: string;
|
|
114
|
+
/**
|
|
115
|
+
* Owner-curated public envelope (`docs/subsystems/public-envelope.md`).
|
|
116
|
+
* Optional — present only when the source vault has a
|
|
117
|
+
* `_meta/public-envelope` document AND the writer's hub is opted
|
|
118
|
+
* into the feature. Treat as **untrusted hint**; the body's
|
|
119
|
+
* encrypted contents remain the source of truth.
|
|
120
|
+
*
|
|
121
|
+
* The envelope deliberately widens the minimum-disclosure rule
|
|
122
|
+
* for explicit, owner-curated label fields (name, icon, …). Every
|
|
123
|
+
* other unknown header key still rejects at parse time.
|
|
124
|
+
*/
|
|
125
|
+
readonly publicEnvelope?: PublicEnvelope;
|
|
113
126
|
}
|
|
114
127
|
/**
|
|
115
128
|
* Validate a parsed bundle header. Throws on any deviation from
|
|
@@ -284,14 +297,35 @@ declare function resetBrotliSupportCache(): void;
|
|
|
284
297
|
declare function writeNoydbBundle(vault: Vault, opts?: WriteNoydbBundleOptions): Promise<Uint8Array>;
|
|
285
298
|
/**
|
|
286
299
|
* Read just the bundle header — no body decompression, no
|
|
287
|
-
* integrity verification.
|
|
288
|
-
*
|
|
289
|
-
* size before downloading the full body.
|
|
300
|
+
* integrity verification. Intended for cloud-listing UIs that want
|
|
301
|
+
* to show the handle and size before downloading the full body.
|
|
290
302
|
*
|
|
291
303
|
* Returns the same `NoydbBundleHeader` shape as the writer, with
|
|
292
304
|
* minimum-disclosure validation already applied.
|
|
305
|
+
*
|
|
306
|
+
* **Cost** — O(prefix + header bytes). The header is normally well
|
|
307
|
+
* under 1 KB, but may grow to roughly 256 KB when a `publicEnvelope`
|
|
308
|
+
* with an inline icon is present. Cloud-listing UIs that previously
|
|
309
|
+
* assumed sub-KB header reads should account for this when sizing
|
|
310
|
+
* range requests against bundles that may carry icons.
|
|
293
311
|
*/
|
|
294
312
|
declare function readNoydbBundleHeader(bytes: Uint8Array): NoydbBundleHeader;
|
|
313
|
+
/**
|
|
314
|
+
* Read just the bundle's public envelope (`docs/subsystems/public-envelope.md`)
|
|
315
|
+
* — without verifying the body or even parsing the dump JSON. Pass
|
|
316
|
+
* the raw bundle bytes; receive the owner-curated metadata or
|
|
317
|
+
* `undefined` if the bundle was written without one.
|
|
318
|
+
*
|
|
319
|
+
* Locale-resolves any `name` / `description` map fields when `locale`
|
|
320
|
+
* is supplied. Omitting `locale` returns the raw envelope.
|
|
321
|
+
*
|
|
322
|
+
* Same security caveat as the on-vault read path — the public
|
|
323
|
+
* envelope is **untrusted hint** in v1; the encrypted body remains
|
|
324
|
+
* the source of truth for vault contents.
|
|
325
|
+
*/
|
|
326
|
+
declare function readNoydbBundlePublicEnvelope(bytes: Uint8Array, opts?: {
|
|
327
|
+
readonly locale?: string;
|
|
328
|
+
}): PublicEnvelope | undefined;
|
|
295
329
|
/**
|
|
296
330
|
* Read a full `.noydb` bundle: validate magic + header, verify
|
|
297
331
|
* integrity hash over the body bytes, decompress, and return the
|
|
@@ -377,4 +411,4 @@ declare function generateULID(): string;
|
|
|
377
411
|
*/
|
|
378
412
|
declare function isULID(value: string): boolean;
|
|
379
413
|
|
|
380
|
-
export { type CompressionAlgo as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type WriteNoydbBundleOptions as W, NOYDB_BUNDLE_MAGIC as a, NOYDB_BUNDLE_PREFIX_BYTES as b, type NoydbBundleHeader as c, type NoydbBundleReadResult as d, readNoydbBundleHeader as e,
|
|
414
|
+
export { type CompressionAlgo as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type WriteNoydbBundleOptions as W, NOYDB_BUNDLE_MAGIC as a, NOYDB_BUNDLE_PREFIX_BYTES as b, type NoydbBundleHeader as c, type NoydbBundleReadResult as d, readNoydbBundleHeader as e, readNoydbBundlePublicEnvelope as f, generateULID as g, hasNoydbBundleMagic as h, isULID as i, resetBrotliSupportCache as j, COMPRESSION_BROTLI as k, COMPRESSION_GZIP as l, COMPRESSION_NONE as m, FLAG_HAS_INTEGRITY_HASH as n, encodeBundleHeader as o, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
|