@camstack/addon-decoder-nodeav 1.2.134 → 1.2.136
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/index.js +17 -17
- package/dist/index.mjs +17 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5418,7 +5418,7 @@ var ZodIssueCode = {
|
|
|
5418
5418
|
var ZodFirstPartyTypeKind;
|
|
5419
5419
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5420
5420
|
//#endregion
|
|
5421
|
-
//#region ../types/dist/sleep-
|
|
5421
|
+
//#region ../types/dist/sleep-_sV1BE2f.mjs
|
|
5422
5422
|
/**
|
|
5423
5423
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5424
5424
|
* window to float samples (D455).
|
|
@@ -5535,7 +5535,7 @@ function isKeychainStoredField(field) {
|
|
|
5535
5535
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5536
5536
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5537
5537
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5538
|
-
function isRecord$
|
|
5538
|
+
function isRecord$6(value) {
|
|
5539
5539
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5540
5540
|
}
|
|
5541
5541
|
function makeSecretMarker(ref) {
|
|
@@ -5546,12 +5546,12 @@ function makeSecretMarker(ref) {
|
|
|
5546
5546
|
}
|
|
5547
5547
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5548
5548
|
function isSecretMarker(value) {
|
|
5549
|
-
if (!isRecord$
|
|
5549
|
+
if (!isRecord$6(value)) return false;
|
|
5550
5550
|
const ref = value["$secret"];
|
|
5551
5551
|
return typeof ref === "string" && ref.length > 0;
|
|
5552
5552
|
}
|
|
5553
5553
|
function isSecretClear(value) {
|
|
5554
|
-
return isRecord$
|
|
5554
|
+
return isRecord$6(value) && value["$secretClear"] === true;
|
|
5555
5555
|
}
|
|
5556
5556
|
/**
|
|
5557
5557
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6161,7 +6161,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6161
6161
|
}
|
|
6162
6162
|
};
|
|
6163
6163
|
var KEEP = { kind: "keep" };
|
|
6164
|
-
function isRecord$
|
|
6164
|
+
function isRecord$5(value) {
|
|
6165
6165
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6166
6166
|
}
|
|
6167
6167
|
function defaultMintId() {
|
|
@@ -6174,7 +6174,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6174
6174
|
return out;
|
|
6175
6175
|
}
|
|
6176
6176
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6177
|
-
else if (isRecord$
|
|
6177
|
+
else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6178
6178
|
return out;
|
|
6179
6179
|
}
|
|
6180
6180
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6229,7 +6229,7 @@ function rowId(row, idKey) {
|
|
|
6229
6229
|
return null;
|
|
6230
6230
|
}
|
|
6231
6231
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6232
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6232
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
|
|
6233
6233
|
if (!Array.isArray(incoming)) {
|
|
6234
6234
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6235
6235
|
return {
|
|
@@ -6245,7 +6245,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6245
6245
|
const kept = /* @__PURE__ */ new Set();
|
|
6246
6246
|
const rows = [];
|
|
6247
6247
|
for (const row of incoming) {
|
|
6248
|
-
if (!isRecord$
|
|
6248
|
+
if (!isRecord$5(row)) {
|
|
6249
6249
|
rows.push(row);
|
|
6250
6250
|
continue;
|
|
6251
6251
|
}
|
|
@@ -6270,7 +6270,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6270
6270
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6271
6271
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6272
6272
|
case "object": {
|
|
6273
|
-
if (!isRecord$
|
|
6273
|
+
if (!isRecord$5(incoming)) {
|
|
6274
6274
|
if (incoming === void 0) return KEEP;
|
|
6275
6275
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6276
6276
|
return {
|
|
@@ -6278,7 +6278,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6278
6278
|
value: incoming
|
|
6279
6279
|
};
|
|
6280
6280
|
}
|
|
6281
|
-
const storedObj = isRecord$
|
|
6281
|
+
const storedObj = isRecord$5(stored) ? stored : {};
|
|
6282
6282
|
return {
|
|
6283
6283
|
kind: "value",
|
|
6284
6284
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6401,7 +6401,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6401
6401
|
value: items
|
|
6402
6402
|
};
|
|
6403
6403
|
}
|
|
6404
|
-
if (isRecord$
|
|
6404
|
+
if (isRecord$5(v)) {
|
|
6405
6405
|
const out = {};
|
|
6406
6406
|
for (const [k, child] of Object.entries(v)) {
|
|
6407
6407
|
const s = substitute(child);
|
|
@@ -6433,7 +6433,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6433
6433
|
this.name = "SecretOverwriteRefusedError";
|
|
6434
6434
|
}
|
|
6435
6435
|
};
|
|
6436
|
-
function isRecord$
|
|
6436
|
+
function isRecord$4(value) {
|
|
6437
6437
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6438
6438
|
}
|
|
6439
6439
|
function resolvedValue(pass, marker) {
|
|
@@ -6462,7 +6462,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6462
6462
|
return incoming.map((item, index) => {
|
|
6463
6463
|
const twin = stored[index];
|
|
6464
6464
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6465
|
-
if (isRecord$
|
|
6465
|
+
if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
|
|
6466
6466
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6467
6467
|
return item;
|
|
6468
6468
|
});
|
|
@@ -6473,7 +6473,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6473
6473
|
const twin = stored[key];
|
|
6474
6474
|
if (isSecretMarker(twin)) {
|
|
6475
6475
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6476
|
-
} else if (isRecord$
|
|
6476
|
+
} else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6477
6477
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6478
6478
|
}
|
|
6479
6479
|
return out;
|
|
@@ -6481,7 +6481,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6481
6481
|
async function walk(pass, incoming, stored) {
|
|
6482
6482
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6483
6483
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6484
|
-
if (!isRecord$
|
|
6484
|
+
if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
|
|
6485
6485
|
const out = { ...incoming };
|
|
6486
6486
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6487
6487
|
return out;
|
|
@@ -6512,7 +6512,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6512
6512
|
function isJsonEqual(a, b) {
|
|
6513
6513
|
if (Object.is(a, b)) return true;
|
|
6514
6514
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6515
|
-
if (isRecord$
|
|
6515
|
+
if (isRecord$4(a) && isRecord$4(b)) {
|
|
6516
6516
|
const keys = Object.keys(a);
|
|
6517
6517
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6518
6518
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6536,7 +6536,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6536
6536
|
}
|
|
6537
6537
|
function nodeFromStored(value, owner) {
|
|
6538
6538
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6539
|
-
if (!isRecord$
|
|
6539
|
+
if (!isRecord$4(value)) return null;
|
|
6540
6540
|
const children = /* @__PURE__ */ new Map();
|
|
6541
6541
|
for (const [key, child] of Object.entries(value)) {
|
|
6542
6542
|
const node = nodeFromStored(child, owner);
|
package/dist/index.mjs
CHANGED
|
@@ -5414,7 +5414,7 @@ var ZodIssueCode = {
|
|
|
5414
5414
|
var ZodFirstPartyTypeKind;
|
|
5415
5415
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5416
5416
|
//#endregion
|
|
5417
|
-
//#region ../types/dist/sleep-
|
|
5417
|
+
//#region ../types/dist/sleep-_sV1BE2f.mjs
|
|
5418
5418
|
/**
|
|
5419
5419
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5420
5420
|
* window to float samples (D455).
|
|
@@ -5531,7 +5531,7 @@ function isKeychainStoredField(field) {
|
|
|
5531
5531
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5532
5532
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5533
5533
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5534
|
-
function isRecord$
|
|
5534
|
+
function isRecord$6(value) {
|
|
5535
5535
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5536
5536
|
}
|
|
5537
5537
|
function makeSecretMarker(ref) {
|
|
@@ -5542,12 +5542,12 @@ function makeSecretMarker(ref) {
|
|
|
5542
5542
|
}
|
|
5543
5543
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5544
5544
|
function isSecretMarker(value) {
|
|
5545
|
-
if (!isRecord$
|
|
5545
|
+
if (!isRecord$6(value)) return false;
|
|
5546
5546
|
const ref = value["$secret"];
|
|
5547
5547
|
return typeof ref === "string" && ref.length > 0;
|
|
5548
5548
|
}
|
|
5549
5549
|
function isSecretClear(value) {
|
|
5550
|
-
return isRecord$
|
|
5550
|
+
return isRecord$6(value) && value["$secretClear"] === true;
|
|
5551
5551
|
}
|
|
5552
5552
|
/**
|
|
5553
5553
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6157,7 +6157,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6157
6157
|
}
|
|
6158
6158
|
};
|
|
6159
6159
|
var KEEP = { kind: "keep" };
|
|
6160
|
-
function isRecord$
|
|
6160
|
+
function isRecord$5(value) {
|
|
6161
6161
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6162
6162
|
}
|
|
6163
6163
|
function defaultMintId() {
|
|
@@ -6170,7 +6170,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6170
6170
|
return out;
|
|
6171
6171
|
}
|
|
6172
6172
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6173
|
-
else if (isRecord$
|
|
6173
|
+
else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6174
6174
|
return out;
|
|
6175
6175
|
}
|
|
6176
6176
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6225,7 +6225,7 @@ function rowId(row, idKey) {
|
|
|
6225
6225
|
return null;
|
|
6226
6226
|
}
|
|
6227
6227
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6228
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6228
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
|
|
6229
6229
|
if (!Array.isArray(incoming)) {
|
|
6230
6230
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6231
6231
|
return {
|
|
@@ -6241,7 +6241,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6241
6241
|
const kept = /* @__PURE__ */ new Set();
|
|
6242
6242
|
const rows = [];
|
|
6243
6243
|
for (const row of incoming) {
|
|
6244
|
-
if (!isRecord$
|
|
6244
|
+
if (!isRecord$5(row)) {
|
|
6245
6245
|
rows.push(row);
|
|
6246
6246
|
continue;
|
|
6247
6247
|
}
|
|
@@ -6266,7 +6266,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6266
6266
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6267
6267
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6268
6268
|
case "object": {
|
|
6269
|
-
if (!isRecord$
|
|
6269
|
+
if (!isRecord$5(incoming)) {
|
|
6270
6270
|
if (incoming === void 0) return KEEP;
|
|
6271
6271
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6272
6272
|
return {
|
|
@@ -6274,7 +6274,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6274
6274
|
value: incoming
|
|
6275
6275
|
};
|
|
6276
6276
|
}
|
|
6277
|
-
const storedObj = isRecord$
|
|
6277
|
+
const storedObj = isRecord$5(stored) ? stored : {};
|
|
6278
6278
|
return {
|
|
6279
6279
|
kind: "value",
|
|
6280
6280
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6397,7 +6397,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6397
6397
|
value: items
|
|
6398
6398
|
};
|
|
6399
6399
|
}
|
|
6400
|
-
if (isRecord$
|
|
6400
|
+
if (isRecord$5(v)) {
|
|
6401
6401
|
const out = {};
|
|
6402
6402
|
for (const [k, child] of Object.entries(v)) {
|
|
6403
6403
|
const s = substitute(child);
|
|
@@ -6429,7 +6429,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6429
6429
|
this.name = "SecretOverwriteRefusedError";
|
|
6430
6430
|
}
|
|
6431
6431
|
};
|
|
6432
|
-
function isRecord$
|
|
6432
|
+
function isRecord$4(value) {
|
|
6433
6433
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6434
6434
|
}
|
|
6435
6435
|
function resolvedValue(pass, marker) {
|
|
@@ -6458,7 +6458,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6458
6458
|
return incoming.map((item, index) => {
|
|
6459
6459
|
const twin = stored[index];
|
|
6460
6460
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6461
|
-
if (isRecord$
|
|
6461
|
+
if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
|
|
6462
6462
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6463
6463
|
return item;
|
|
6464
6464
|
});
|
|
@@ -6469,7 +6469,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6469
6469
|
const twin = stored[key];
|
|
6470
6470
|
if (isSecretMarker(twin)) {
|
|
6471
6471
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6472
|
-
} else if (isRecord$
|
|
6472
|
+
} else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6473
6473
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6474
6474
|
}
|
|
6475
6475
|
return out;
|
|
@@ -6477,7 +6477,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6477
6477
|
async function walk(pass, incoming, stored) {
|
|
6478
6478
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6479
6479
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6480
|
-
if (!isRecord$
|
|
6480
|
+
if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
|
|
6481
6481
|
const out = { ...incoming };
|
|
6482
6482
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6483
6483
|
return out;
|
|
@@ -6508,7 +6508,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6508
6508
|
function isJsonEqual(a, b) {
|
|
6509
6509
|
if (Object.is(a, b)) return true;
|
|
6510
6510
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6511
|
-
if (isRecord$
|
|
6511
|
+
if (isRecord$4(a) && isRecord$4(b)) {
|
|
6512
6512
|
const keys = Object.keys(a);
|
|
6513
6513
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6514
6514
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6532,7 +6532,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6532
6532
|
}
|
|
6533
6533
|
function nodeFromStored(value, owner) {
|
|
6534
6534
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6535
|
-
if (!isRecord$
|
|
6535
|
+
if (!isRecord$4(value)) return null;
|
|
6536
6536
|
const children = /* @__PURE__ */ new Map();
|
|
6537
6537
|
for (const [key, child] of Object.entries(value)) {
|
|
6538
6538
|
const node = nodeFromStored(child, owner);
|