@camstack/addon-provider-mqtt-ha 0.1.16 → 0.1.18
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/addon.js +17 -17
- package/dist/addon.mjs +17 -17
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5448,7 +5448,7 @@ var ZodIssueCode = {
|
|
|
5448
5448
|
var ZodFirstPartyTypeKind;
|
|
5449
5449
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5450
5450
|
//#endregion
|
|
5451
|
-
//#region ../types/dist/sleep-
|
|
5451
|
+
//#region ../types/dist/sleep-_sV1BE2f.mjs
|
|
5452
5452
|
/**
|
|
5453
5453
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5454
5454
|
* window to float samples (D455).
|
|
@@ -5565,7 +5565,7 @@ function isKeychainStoredField(field) {
|
|
|
5565
5565
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5566
5566
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5567
5567
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5568
|
-
function isRecord$
|
|
5568
|
+
function isRecord$6(value) {
|
|
5569
5569
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5570
5570
|
}
|
|
5571
5571
|
function makeSecretMarker(ref) {
|
|
@@ -5576,12 +5576,12 @@ function makeSecretMarker(ref) {
|
|
|
5576
5576
|
}
|
|
5577
5577
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5578
5578
|
function isSecretMarker(value) {
|
|
5579
|
-
if (!isRecord$
|
|
5579
|
+
if (!isRecord$6(value)) return false;
|
|
5580
5580
|
const ref = value["$secret"];
|
|
5581
5581
|
return typeof ref === "string" && ref.length > 0;
|
|
5582
5582
|
}
|
|
5583
5583
|
function isSecretClear(value) {
|
|
5584
|
-
return isRecord$
|
|
5584
|
+
return isRecord$6(value) && value["$secretClear"] === true;
|
|
5585
5585
|
}
|
|
5586
5586
|
/**
|
|
5587
5587
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6191,7 +6191,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6191
6191
|
}
|
|
6192
6192
|
};
|
|
6193
6193
|
var KEEP = { kind: "keep" };
|
|
6194
|
-
function isRecord$
|
|
6194
|
+
function isRecord$5(value) {
|
|
6195
6195
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6196
6196
|
}
|
|
6197
6197
|
function defaultMintId() {
|
|
@@ -6204,7 +6204,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6204
6204
|
return out;
|
|
6205
6205
|
}
|
|
6206
6206
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6207
|
-
else if (isRecord$
|
|
6207
|
+
else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6208
6208
|
return out;
|
|
6209
6209
|
}
|
|
6210
6210
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6259,7 +6259,7 @@ function rowId(row, idKey) {
|
|
|
6259
6259
|
return null;
|
|
6260
6260
|
}
|
|
6261
6261
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6262
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6262
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
|
|
6263
6263
|
if (!Array.isArray(incoming)) {
|
|
6264
6264
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6265
6265
|
return {
|
|
@@ -6275,7 +6275,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6275
6275
|
const kept = /* @__PURE__ */ new Set();
|
|
6276
6276
|
const rows = [];
|
|
6277
6277
|
for (const row of incoming) {
|
|
6278
|
-
if (!isRecord$
|
|
6278
|
+
if (!isRecord$5(row)) {
|
|
6279
6279
|
rows.push(row);
|
|
6280
6280
|
continue;
|
|
6281
6281
|
}
|
|
@@ -6300,7 +6300,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6300
6300
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6301
6301
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6302
6302
|
case "object": {
|
|
6303
|
-
if (!isRecord$
|
|
6303
|
+
if (!isRecord$5(incoming)) {
|
|
6304
6304
|
if (incoming === void 0) return KEEP;
|
|
6305
6305
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6306
6306
|
return {
|
|
@@ -6308,7 +6308,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6308
6308
|
value: incoming
|
|
6309
6309
|
};
|
|
6310
6310
|
}
|
|
6311
|
-
const storedObj = isRecord$
|
|
6311
|
+
const storedObj = isRecord$5(stored) ? stored : {};
|
|
6312
6312
|
return {
|
|
6313
6313
|
kind: "value",
|
|
6314
6314
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6431,7 +6431,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6431
6431
|
value: items
|
|
6432
6432
|
};
|
|
6433
6433
|
}
|
|
6434
|
-
if (isRecord$
|
|
6434
|
+
if (isRecord$5(v)) {
|
|
6435
6435
|
const out = {};
|
|
6436
6436
|
for (const [k, child] of Object.entries(v)) {
|
|
6437
6437
|
const s = substitute(child);
|
|
@@ -6463,7 +6463,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6463
6463
|
this.name = "SecretOverwriteRefusedError";
|
|
6464
6464
|
}
|
|
6465
6465
|
};
|
|
6466
|
-
function isRecord$
|
|
6466
|
+
function isRecord$4(value) {
|
|
6467
6467
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6468
6468
|
}
|
|
6469
6469
|
function resolvedValue(pass, marker) {
|
|
@@ -6492,7 +6492,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6492
6492
|
return incoming.map((item, index) => {
|
|
6493
6493
|
const twin = stored[index];
|
|
6494
6494
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6495
|
-
if (isRecord$
|
|
6495
|
+
if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
|
|
6496
6496
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6497
6497
|
return item;
|
|
6498
6498
|
});
|
|
@@ -6503,7 +6503,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6503
6503
|
const twin = stored[key];
|
|
6504
6504
|
if (isSecretMarker(twin)) {
|
|
6505
6505
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6506
|
-
} else if (isRecord$
|
|
6506
|
+
} else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6507
6507
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6508
6508
|
}
|
|
6509
6509
|
return out;
|
|
@@ -6511,7 +6511,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6511
6511
|
async function walk(pass, incoming, stored) {
|
|
6512
6512
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6513
6513
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6514
|
-
if (!isRecord$
|
|
6514
|
+
if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
|
|
6515
6515
|
const out = { ...incoming };
|
|
6516
6516
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6517
6517
|
return out;
|
|
@@ -6542,7 +6542,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6542
6542
|
function isJsonEqual(a, b) {
|
|
6543
6543
|
if (Object.is(a, b)) return true;
|
|
6544
6544
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6545
|
-
if (isRecord$
|
|
6545
|
+
if (isRecord$4(a) && isRecord$4(b)) {
|
|
6546
6546
|
const keys = Object.keys(a);
|
|
6547
6547
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6548
6548
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6566,7 +6566,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6566
6566
|
}
|
|
6567
6567
|
function nodeFromStored(value, owner) {
|
|
6568
6568
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6569
|
-
if (!isRecord$
|
|
6569
|
+
if (!isRecord$4(value)) return null;
|
|
6570
6570
|
const children = /* @__PURE__ */ new Map();
|
|
6571
6571
|
for (const [key, child] of Object.entries(value)) {
|
|
6572
6572
|
const node = nodeFromStored(child, owner);
|
package/dist/addon.mjs
CHANGED
|
@@ -5449,7 +5449,7 @@ var ZodIssueCode = {
|
|
|
5449
5449
|
var ZodFirstPartyTypeKind;
|
|
5450
5450
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5451
5451
|
//#endregion
|
|
5452
|
-
//#region ../types/dist/sleep-
|
|
5452
|
+
//#region ../types/dist/sleep-_sV1BE2f.mjs
|
|
5453
5453
|
/**
|
|
5454
5454
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5455
5455
|
* window to float samples (D455).
|
|
@@ -5566,7 +5566,7 @@ function isKeychainStoredField(field) {
|
|
|
5566
5566
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5567
5567
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5568
5568
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5569
|
-
function isRecord$
|
|
5569
|
+
function isRecord$6(value) {
|
|
5570
5570
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5571
5571
|
}
|
|
5572
5572
|
function makeSecretMarker(ref) {
|
|
@@ -5577,12 +5577,12 @@ function makeSecretMarker(ref) {
|
|
|
5577
5577
|
}
|
|
5578
5578
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5579
5579
|
function isSecretMarker(value) {
|
|
5580
|
-
if (!isRecord$
|
|
5580
|
+
if (!isRecord$6(value)) return false;
|
|
5581
5581
|
const ref = value["$secret"];
|
|
5582
5582
|
return typeof ref === "string" && ref.length > 0;
|
|
5583
5583
|
}
|
|
5584
5584
|
function isSecretClear(value) {
|
|
5585
|
-
return isRecord$
|
|
5585
|
+
return isRecord$6(value) && value["$secretClear"] === true;
|
|
5586
5586
|
}
|
|
5587
5587
|
/**
|
|
5588
5588
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6192,7 +6192,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6192
6192
|
}
|
|
6193
6193
|
};
|
|
6194
6194
|
var KEEP = { kind: "keep" };
|
|
6195
|
-
function isRecord$
|
|
6195
|
+
function isRecord$5(value) {
|
|
6196
6196
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6197
6197
|
}
|
|
6198
6198
|
function defaultMintId() {
|
|
@@ -6205,7 +6205,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6205
6205
|
return out;
|
|
6206
6206
|
}
|
|
6207
6207
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6208
|
-
else if (isRecord$
|
|
6208
|
+
else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6209
6209
|
return out;
|
|
6210
6210
|
}
|
|
6211
6211
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6260,7 +6260,7 @@ function rowId(row, idKey) {
|
|
|
6260
6260
|
return null;
|
|
6261
6261
|
}
|
|
6262
6262
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6263
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6263
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
|
|
6264
6264
|
if (!Array.isArray(incoming)) {
|
|
6265
6265
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6266
6266
|
return {
|
|
@@ -6276,7 +6276,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6276
6276
|
const kept = /* @__PURE__ */ new Set();
|
|
6277
6277
|
const rows = [];
|
|
6278
6278
|
for (const row of incoming) {
|
|
6279
|
-
if (!isRecord$
|
|
6279
|
+
if (!isRecord$5(row)) {
|
|
6280
6280
|
rows.push(row);
|
|
6281
6281
|
continue;
|
|
6282
6282
|
}
|
|
@@ -6301,7 +6301,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6301
6301
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6302
6302
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6303
6303
|
case "object": {
|
|
6304
|
-
if (!isRecord$
|
|
6304
|
+
if (!isRecord$5(incoming)) {
|
|
6305
6305
|
if (incoming === void 0) return KEEP;
|
|
6306
6306
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6307
6307
|
return {
|
|
@@ -6309,7 +6309,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6309
6309
|
value: incoming
|
|
6310
6310
|
};
|
|
6311
6311
|
}
|
|
6312
|
-
const storedObj = isRecord$
|
|
6312
|
+
const storedObj = isRecord$5(stored) ? stored : {};
|
|
6313
6313
|
return {
|
|
6314
6314
|
kind: "value",
|
|
6315
6315
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6432,7 +6432,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6432
6432
|
value: items
|
|
6433
6433
|
};
|
|
6434
6434
|
}
|
|
6435
|
-
if (isRecord$
|
|
6435
|
+
if (isRecord$5(v)) {
|
|
6436
6436
|
const out = {};
|
|
6437
6437
|
for (const [k, child] of Object.entries(v)) {
|
|
6438
6438
|
const s = substitute(child);
|
|
@@ -6464,7 +6464,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6464
6464
|
this.name = "SecretOverwriteRefusedError";
|
|
6465
6465
|
}
|
|
6466
6466
|
};
|
|
6467
|
-
function isRecord$
|
|
6467
|
+
function isRecord$4(value) {
|
|
6468
6468
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6469
6469
|
}
|
|
6470
6470
|
function resolvedValue(pass, marker) {
|
|
@@ -6493,7 +6493,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6493
6493
|
return incoming.map((item, index) => {
|
|
6494
6494
|
const twin = stored[index];
|
|
6495
6495
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6496
|
-
if (isRecord$
|
|
6496
|
+
if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
|
|
6497
6497
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6498
6498
|
return item;
|
|
6499
6499
|
});
|
|
@@ -6504,7 +6504,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6504
6504
|
const twin = stored[key];
|
|
6505
6505
|
if (isSecretMarker(twin)) {
|
|
6506
6506
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6507
|
-
} else if (isRecord$
|
|
6507
|
+
} else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6508
6508
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6509
6509
|
}
|
|
6510
6510
|
return out;
|
|
@@ -6512,7 +6512,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6512
6512
|
async function walk(pass, incoming, stored) {
|
|
6513
6513
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6514
6514
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6515
|
-
if (!isRecord$
|
|
6515
|
+
if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
|
|
6516
6516
|
const out = { ...incoming };
|
|
6517
6517
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6518
6518
|
return out;
|
|
@@ -6543,7 +6543,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6543
6543
|
function isJsonEqual(a, b) {
|
|
6544
6544
|
if (Object.is(a, b)) return true;
|
|
6545
6545
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6546
|
-
if (isRecord$
|
|
6546
|
+
if (isRecord$4(a) && isRecord$4(b)) {
|
|
6547
6547
|
const keys = Object.keys(a);
|
|
6548
6548
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6549
6549
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6567,7 +6567,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6567
6567
|
}
|
|
6568
6568
|
function nodeFromStored(value, owner) {
|
|
6569
6569
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6570
|
-
if (!isRecord$
|
|
6570
|
+
if (!isRecord$4(value)) return null;
|
|
6571
6571
|
const children = /* @__PURE__ */ new Map();
|
|
6572
6572
|
for (const [key, child] of Object.entries(value)) {
|
|
6573
6573
|
const node = nodeFromStored(child, owner);
|
package/package.json
CHANGED