@noy-db/hub 0.2.0-pre.5 → 0.2.0-pre.6
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.d.cts +1 -1
- package/dist/attestation/index.d.ts +1 -1
- package/dist/blobs/index.d.cts +2 -2
- package/dist/blobs/index.d.ts +2 -2
- package/dist/bundle/index.cjs +53 -6
- 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 +1 -1
- package/dist/{chunk-YZ6JETII.js → chunk-JICBEFBT.js} +176 -1
- package/dist/chunk-JICBEFBT.js.map +1 -0
- package/dist/{chunk-BT7544RM.js → chunk-W277AG6N.js} +14 -9
- package/dist/chunk-W277AG6N.js.map +1 -0
- 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--ahUTrhc.d.ts → dev-unlock-Cvo-xCQC.d.ts} +1 -1
- package/dist/{dev-unlock-BIwt2V3p.d.cts → dev-unlock-Dy1qVpkL.d.cts} +1 -1
- package/dist/guards/index.d.cts +3 -3
- package/dist/guards/index.d.ts +3 -3
- package/dist/{hash-CJEFQxSD.d.ts → hash-BAlWR4WD.d.ts} +1 -1
- package/dist/{hash-BQVrGV-t.d.cts → hash-BgEQklQc.d.cts} +1 -1
- package/dist/history/index.d.cts +3 -3
- package/dist/history/index.d.ts +3 -3
- package/dist/i18n/index.cjs +75 -10
- 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 +11 -9
- package/dist/index.cjs +176 -114
- 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 +8 -10
- package/dist/index.js.map +1 -1
- package/dist/materialized-views/index.d.cts +3 -3
- package/dist/materialized-views/index.d.ts +3 -3
- package/dist/{noydb-6TADQIYH.js → noydb-FY2666NY.js} +3 -3
- package/dist/overlay-views/index.d.cts +3 -3
- package/dist/overlay-views/index.d.ts +3 -3
- package/dist/periods/index.d.cts +2 -2
- package/dist/periods/index.d.ts +2 -2
- 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/store/index.d.cts +2 -2
- package/dist/store/index.d.ts +2 -2
- package/dist/sync/index.d.cts +1 -1
- package/dist/sync/index.d.ts +1 -1
- package/dist/team/index.d.cts +2 -2
- package/dist/team/index.d.ts +2 -2
- package/dist/tx/index.d.cts +2 -2
- package/dist/tx/index.d.ts +2 -2
- package/dist/{types-BeKi0hCx.d.cts → types-DVlvNn2c.d.cts} +22 -5
- package/dist/{types-BV4AZKmx.d.ts → types-DlnZh1_i.d.ts} +22 -5
- package/dist/{ulid-CQc0eBxE.d.ts → ulid-CzPONlhG.d.ts} +1 -1
- package/dist/{ulid-Cvljl7ZZ.d.cts → ulid-r98nkjVd.d.cts} +1 -1
- package/dist/{with-derivation-BWcwmevt.d.ts → with-derivation-B98shCV8.d.ts} +1 -1
- package/dist/{with-derivation-BkOBDhsu.d.cts → with-derivation-BMQ9pIHe.d.cts} +1 -1
- package/dist/{with-guard-BD4Hyu8s.d.cts → with-guard-DUnC3JDN.d.cts} +1 -1
- package/dist/{with-guard-Du54s3Ti.d.ts → with-guard-DmT50nVG.d.ts} +1 -1
- package/dist/{with-materialized-view-B5W4wFAC.d.ts → with-materialized-view-Bp_M3sNG.d.ts} +1 -1
- package/dist/{with-materialized-view-BCPPZdjC.d.cts → with-materialized-view-eMTZ65_J.d.cts} +1 -1
- package/dist/{with-overlayed-view-B8RrlLsG.d.cts → with-overlayed-view-BoY6PB3n.d.cts} +1 -1
- package/dist/{with-overlayed-view-Cw-h9p9N.d.ts → with-overlayed-view-zzSnRQmS.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-BT7544RM.js.map +0 -1
- package/dist/chunk-NONMIU6C.js +0 -118
- package/dist/chunk-NONMIU6C.js.map +0 -1
- package/dist/chunk-YZ6JETII.js.map +0 -1
- /package/dist/{noydb-6TADQIYH.js.map → noydb-FY2666NY.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aQ as NoydbStore } from '../types-DVlvNn2c.cjs';
|
|
2
2
|
import { AttestationFieldSchema, QrPayload, RevocationList } from '@noy-db/attestation';
|
|
3
3
|
export { AttestationFieldSchema, QrPayload, RevocationList, VerifyInput, VerifyResult, decodeQr, isRevoked, signRevocationList, verifyAttestation, verifyRevocationList } from '@noy-db/attestation';
|
|
4
4
|
export { m as AttestationError } from '../index-5I0MZ0jQ.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aQ as NoydbStore } from '../types-DlnZh1_i.js';
|
|
2
2
|
import { AttestationFieldSchema, QrPayload, RevocationList } from '@noy-db/attestation';
|
|
3
3
|
export { AttestationFieldSchema, QrPayload, RevocationList, VerifyInput, VerifyResult, decodeQr, isRevoked, signRevocationList, verifyAttestation, verifyRevocationList } from '@noy-db/attestation';
|
|
4
4
|
export { m as AttestationError } from '../index-fIPPh5dg.js';
|
package/dist/blobs/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlobStrategy } from '../types-
|
|
2
|
-
export {
|
|
1
|
+
import { B as BlobStrategy } from '../types-DVlvNn2c.cjs';
|
|
2
|
+
export { q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, u as BLOB_EVICTION_AUDIT_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, z as BlobEvictionEntry, A as BlobFieldPolicy, C as BlobFieldsConfig, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, J as BlobStrategyOpenArgs, K as CompactRunOptions, L as CompactionContext, M as CompactionResult, N as DEFAULT_CHUNK_SIZE, O as EXPORT_AUDIT_COLLECTION, Q as ExportBlobsAbortedError, R as ExportBlobsAuditEntry, T as ExportBlobsHandle, U as ExportBlobsOptions, V as ExportedBlob, W as SlotInfo, X as SlotRecord, Y as VersionRecord, Z as createExportBlobsHandle, _ as runCompaction } from '../types-DVlvNn2c.cjs';
|
|
3
3
|
export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.cjs';
|
|
4
4
|
import '../lazy-builder-DXlSCNCJ.cjs';
|
|
5
5
|
import '../predicate-B0IKeBXx.cjs';
|
package/dist/blobs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlobStrategy } from '../types-
|
|
2
|
-
export {
|
|
1
|
+
import { B as BlobStrategy } from '../types-DlnZh1_i.js';
|
|
2
|
+
export { q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, u as BLOB_EVICTION_AUDIT_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, z as BlobEvictionEntry, A as BlobFieldPolicy, C as BlobFieldsConfig, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, J as BlobStrategyOpenArgs, K as CompactRunOptions, L as CompactionContext, M as CompactionResult, N as DEFAULT_CHUNK_SIZE, O as EXPORT_AUDIT_COLLECTION, Q as ExportBlobsAbortedError, R as ExportBlobsAuditEntry, T as ExportBlobsHandle, U as ExportBlobsOptions, V as ExportedBlob, W as SlotInfo, X as SlotRecord, Y as VersionRecord, Z as createExportBlobsHandle, _ as runCompaction } from '../types-DlnZh1_i.js';
|
|
3
3
|
export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.js';
|
|
4
4
|
import '../lazy-builder-D1MyR1qH.js';
|
|
5
5
|
import '../predicate-B0IKeBXx.js';
|
package/dist/bundle/index.cjs
CHANGED
|
@@ -3471,6 +3471,48 @@ var init_strategy = __esm({
|
|
|
3471
3471
|
}
|
|
3472
3472
|
});
|
|
3473
3473
|
|
|
3474
|
+
// src/i18n/core.ts
|
|
3475
|
+
function getAtPath(obj, path) {
|
|
3476
|
+
const arrayIdx = path.indexOf("[].");
|
|
3477
|
+
if (arrayIdx !== -1) {
|
|
3478
|
+
const arrayKey = path.slice(0, arrayIdx);
|
|
3479
|
+
const restPath = path.slice(arrayIdx + 3);
|
|
3480
|
+
const arr = obj[arrayKey];
|
|
3481
|
+
if (!Array.isArray(arr)) return [];
|
|
3482
|
+
return arr.flatMap((item) => {
|
|
3483
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) return [];
|
|
3484
|
+
return getAtPath(item, restPath);
|
|
3485
|
+
});
|
|
3486
|
+
}
|
|
3487
|
+
const dotIdx = path.indexOf(".");
|
|
3488
|
+
if (dotIdx !== -1) {
|
|
3489
|
+
const head = path.slice(0, dotIdx);
|
|
3490
|
+
const rest = path.slice(dotIdx + 1);
|
|
3491
|
+
const nested = obj[head];
|
|
3492
|
+
if (!nested || typeof nested !== "object" || Array.isArray(nested)) return [];
|
|
3493
|
+
return getAtPath(nested, rest);
|
|
3494
|
+
}
|
|
3495
|
+
const val = obj[path];
|
|
3496
|
+
return val !== void 0 ? [val] : [];
|
|
3497
|
+
}
|
|
3498
|
+
function setAtPathInPlace(obj, path, value) {
|
|
3499
|
+
const dotIdx = path.indexOf(".");
|
|
3500
|
+
if (dotIdx !== -1) {
|
|
3501
|
+
const head = path.slice(0, dotIdx);
|
|
3502
|
+
const rest = path.slice(dotIdx + 1);
|
|
3503
|
+
const nested = obj[head];
|
|
3504
|
+
if (!nested || typeof nested !== "object" || Array.isArray(nested)) return;
|
|
3505
|
+
setAtPathInPlace(nested, rest, value);
|
|
3506
|
+
return;
|
|
3507
|
+
}
|
|
3508
|
+
obj[path] = value;
|
|
3509
|
+
}
|
|
3510
|
+
var init_core = __esm({
|
|
3511
|
+
"src/i18n/core.ts"() {
|
|
3512
|
+
"use strict";
|
|
3513
|
+
}
|
|
3514
|
+
});
|
|
3515
|
+
|
|
3474
3516
|
// src/i18n/strategy.ts
|
|
3475
3517
|
function notEnabled(op) {
|
|
3476
3518
|
return new Error(
|
|
@@ -6542,6 +6584,7 @@ var init_collection = __esm({
|
|
|
6542
6584
|
"use strict";
|
|
6543
6585
|
init_types();
|
|
6544
6586
|
init_strategy();
|
|
6587
|
+
init_core();
|
|
6545
6588
|
init_strategy2();
|
|
6546
6589
|
init_crypto();
|
|
6547
6590
|
init_errors();
|
|
@@ -7153,7 +7196,9 @@ var init_collection = __esm({
|
|
|
7153
7196
|
const obj = record;
|
|
7154
7197
|
for (const [field, descriptor] of Object.entries(this.i18nFields)) {
|
|
7155
7198
|
if (!descriptor.options.autoTranslate) continue;
|
|
7156
|
-
const
|
|
7199
|
+
const leafValues = getAtPath(obj, field);
|
|
7200
|
+
if (leafValues.length !== 1) continue;
|
|
7201
|
+
const value = leafValues[0];
|
|
7157
7202
|
if (!value || typeof value !== "object" || Array.isArray(value)) continue;
|
|
7158
7203
|
const map = value;
|
|
7159
7204
|
const { languages, required } = descriptor.options;
|
|
@@ -7177,8 +7222,7 @@ var init_collection = __esm({
|
|
|
7177
7222
|
this.name
|
|
7178
7223
|
);
|
|
7179
7224
|
}
|
|
7180
|
-
;
|
|
7181
|
-
record[field] = translated;
|
|
7225
|
+
setAtPathInPlace(obj, field, translated);
|
|
7182
7226
|
}
|
|
7183
7227
|
}
|
|
7184
7228
|
if (this.i18nPutValidator !== void 0) {
|
|
@@ -11450,6 +11494,7 @@ var init_vault = __esm({
|
|
|
11450
11494
|
init_strategy9();
|
|
11451
11495
|
init_refs();
|
|
11452
11496
|
init_dictionary();
|
|
11497
|
+
init_core();
|
|
11453
11498
|
init_strategy2();
|
|
11454
11499
|
init_sync_strategy();
|
|
11455
11500
|
init_errors();
|
|
@@ -12053,9 +12098,11 @@ var init_vault = __esm({
|
|
|
12053
12098
|
if (!record || typeof record !== "object") return;
|
|
12054
12099
|
const obj = record;
|
|
12055
12100
|
for (const [field, descriptor] of Object.entries(i18nFields)) {
|
|
12056
|
-
const
|
|
12057
|
-
|
|
12058
|
-
|
|
12101
|
+
const values = getAtPath(obj, field);
|
|
12102
|
+
for (const value of values) {
|
|
12103
|
+
if (value === void 0 || value === null) continue;
|
|
12104
|
+
this.i18nStrategy.validateI18nTextValue(value, field, descriptor);
|
|
12105
|
+
}
|
|
12059
12106
|
}
|
|
12060
12107
|
}
|
|
12061
12108
|
/**
|