@camstack/addon-provider-dreo 0.2.138 → 0.2.139
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
|
@@ -5450,7 +5450,7 @@ var ZodIssueCode = {
|
|
|
5450
5450
|
var ZodFirstPartyTypeKind;
|
|
5451
5451
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5452
5452
|
//#endregion
|
|
5453
|
-
//#region ../types/dist/sleep-
|
|
5453
|
+
//#region ../types/dist/sleep-_sV1BE2f.mjs
|
|
5454
5454
|
/**
|
|
5455
5455
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5456
5456
|
* window to float samples (D455).
|
|
@@ -5567,7 +5567,7 @@ function isKeychainStoredField(field) {
|
|
|
5567
5567
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5568
5568
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5569
5569
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5570
|
-
function isRecord$
|
|
5570
|
+
function isRecord$6(value) {
|
|
5571
5571
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5572
5572
|
}
|
|
5573
5573
|
function makeSecretMarker(ref) {
|
|
@@ -5578,12 +5578,12 @@ function makeSecretMarker(ref) {
|
|
|
5578
5578
|
}
|
|
5579
5579
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5580
5580
|
function isSecretMarker(value) {
|
|
5581
|
-
if (!isRecord$
|
|
5581
|
+
if (!isRecord$6(value)) return false;
|
|
5582
5582
|
const ref = value["$secret"];
|
|
5583
5583
|
return typeof ref === "string" && ref.length > 0;
|
|
5584
5584
|
}
|
|
5585
5585
|
function isSecretClear(value) {
|
|
5586
|
-
return isRecord$
|
|
5586
|
+
return isRecord$6(value) && value["$secretClear"] === true;
|
|
5587
5587
|
}
|
|
5588
5588
|
/**
|
|
5589
5589
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6193,7 +6193,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6193
6193
|
}
|
|
6194
6194
|
};
|
|
6195
6195
|
var KEEP = { kind: "keep" };
|
|
6196
|
-
function isRecord$
|
|
6196
|
+
function isRecord$5(value) {
|
|
6197
6197
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6198
6198
|
}
|
|
6199
6199
|
function defaultMintId() {
|
|
@@ -6206,7 +6206,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6206
6206
|
return out;
|
|
6207
6207
|
}
|
|
6208
6208
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6209
|
-
else if (isRecord$
|
|
6209
|
+
else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6210
6210
|
return out;
|
|
6211
6211
|
}
|
|
6212
6212
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6261,7 +6261,7 @@ function rowId(row, idKey) {
|
|
|
6261
6261
|
return null;
|
|
6262
6262
|
}
|
|
6263
6263
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6264
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6264
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
|
|
6265
6265
|
if (!Array.isArray(incoming)) {
|
|
6266
6266
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6267
6267
|
return {
|
|
@@ -6277,7 +6277,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6277
6277
|
const kept = /* @__PURE__ */ new Set();
|
|
6278
6278
|
const rows = [];
|
|
6279
6279
|
for (const row of incoming) {
|
|
6280
|
-
if (!isRecord$
|
|
6280
|
+
if (!isRecord$5(row)) {
|
|
6281
6281
|
rows.push(row);
|
|
6282
6282
|
continue;
|
|
6283
6283
|
}
|
|
@@ -6302,7 +6302,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6302
6302
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6303
6303
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6304
6304
|
case "object": {
|
|
6305
|
-
if (!isRecord$
|
|
6305
|
+
if (!isRecord$5(incoming)) {
|
|
6306
6306
|
if (incoming === void 0) return KEEP;
|
|
6307
6307
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6308
6308
|
return {
|
|
@@ -6310,7 +6310,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6310
6310
|
value: incoming
|
|
6311
6311
|
};
|
|
6312
6312
|
}
|
|
6313
|
-
const storedObj = isRecord$
|
|
6313
|
+
const storedObj = isRecord$5(stored) ? stored : {};
|
|
6314
6314
|
return {
|
|
6315
6315
|
kind: "value",
|
|
6316
6316
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6433,7 +6433,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6433
6433
|
value: items
|
|
6434
6434
|
};
|
|
6435
6435
|
}
|
|
6436
|
-
if (isRecord$
|
|
6436
|
+
if (isRecord$5(v)) {
|
|
6437
6437
|
const out = {};
|
|
6438
6438
|
for (const [k, child] of Object.entries(v)) {
|
|
6439
6439
|
const s = substitute(child);
|
|
@@ -6465,7 +6465,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6465
6465
|
this.name = "SecretOverwriteRefusedError";
|
|
6466
6466
|
}
|
|
6467
6467
|
};
|
|
6468
|
-
function isRecord$
|
|
6468
|
+
function isRecord$4(value) {
|
|
6469
6469
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6470
6470
|
}
|
|
6471
6471
|
function resolvedValue(pass, marker) {
|
|
@@ -6494,7 +6494,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6494
6494
|
return incoming.map((item, index) => {
|
|
6495
6495
|
const twin = stored[index];
|
|
6496
6496
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6497
|
-
if (isRecord$
|
|
6497
|
+
if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
|
|
6498
6498
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6499
6499
|
return item;
|
|
6500
6500
|
});
|
|
@@ -6505,7 +6505,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6505
6505
|
const twin = stored[key];
|
|
6506
6506
|
if (isSecretMarker(twin)) {
|
|
6507
6507
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6508
|
-
} else if (isRecord$
|
|
6508
|
+
} else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6509
6509
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6510
6510
|
}
|
|
6511
6511
|
return out;
|
|
@@ -6513,7 +6513,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6513
6513
|
async function walk(pass, incoming, stored) {
|
|
6514
6514
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6515
6515
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6516
|
-
if (!isRecord$
|
|
6516
|
+
if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
|
|
6517
6517
|
const out = { ...incoming };
|
|
6518
6518
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6519
6519
|
return out;
|
|
@@ -6544,7 +6544,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6544
6544
|
function isJsonEqual(a, b) {
|
|
6545
6545
|
if (Object.is(a, b)) return true;
|
|
6546
6546
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6547
|
-
if (isRecord$
|
|
6547
|
+
if (isRecord$4(a) && isRecord$4(b)) {
|
|
6548
6548
|
const keys = Object.keys(a);
|
|
6549
6549
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6550
6550
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6568,7 +6568,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6568
6568
|
}
|
|
6569
6569
|
function nodeFromStored(value, owner) {
|
|
6570
6570
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6571
|
-
if (!isRecord$
|
|
6571
|
+
if (!isRecord$4(value)) return null;
|
|
6572
6572
|
const children = /* @__PURE__ */ new Map();
|
|
6573
6573
|
for (const [key, child] of Object.entries(value)) {
|
|
6574
6574
|
const node = nodeFromStored(child, owner);
|
package/dist/addon.mjs
CHANGED
|
@@ -5451,7 +5451,7 @@ var ZodIssueCode = {
|
|
|
5451
5451
|
var ZodFirstPartyTypeKind;
|
|
5452
5452
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5453
5453
|
//#endregion
|
|
5454
|
-
//#region ../types/dist/sleep-
|
|
5454
|
+
//#region ../types/dist/sleep-_sV1BE2f.mjs
|
|
5455
5455
|
/**
|
|
5456
5456
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5457
5457
|
* window to float samples (D455).
|
|
@@ -5568,7 +5568,7 @@ function isKeychainStoredField(field) {
|
|
|
5568
5568
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5569
5569
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5570
5570
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5571
|
-
function isRecord$
|
|
5571
|
+
function isRecord$6(value) {
|
|
5572
5572
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5573
5573
|
}
|
|
5574
5574
|
function makeSecretMarker(ref) {
|
|
@@ -5579,12 +5579,12 @@ function makeSecretMarker(ref) {
|
|
|
5579
5579
|
}
|
|
5580
5580
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5581
5581
|
function isSecretMarker(value) {
|
|
5582
|
-
if (!isRecord$
|
|
5582
|
+
if (!isRecord$6(value)) return false;
|
|
5583
5583
|
const ref = value["$secret"];
|
|
5584
5584
|
return typeof ref === "string" && ref.length > 0;
|
|
5585
5585
|
}
|
|
5586
5586
|
function isSecretClear(value) {
|
|
5587
|
-
return isRecord$
|
|
5587
|
+
return isRecord$6(value) && value["$secretClear"] === true;
|
|
5588
5588
|
}
|
|
5589
5589
|
/**
|
|
5590
5590
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6194,7 +6194,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6194
6194
|
}
|
|
6195
6195
|
};
|
|
6196
6196
|
var KEEP = { kind: "keep" };
|
|
6197
|
-
function isRecord$
|
|
6197
|
+
function isRecord$5(value) {
|
|
6198
6198
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6199
6199
|
}
|
|
6200
6200
|
function defaultMintId() {
|
|
@@ -6207,7 +6207,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6207
6207
|
return out;
|
|
6208
6208
|
}
|
|
6209
6209
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6210
|
-
else if (isRecord$
|
|
6210
|
+
else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6211
6211
|
return out;
|
|
6212
6212
|
}
|
|
6213
6213
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6262,7 +6262,7 @@ function rowId(row, idKey) {
|
|
|
6262
6262
|
return null;
|
|
6263
6263
|
}
|
|
6264
6264
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6265
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6265
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
|
|
6266
6266
|
if (!Array.isArray(incoming)) {
|
|
6267
6267
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6268
6268
|
return {
|
|
@@ -6278,7 +6278,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6278
6278
|
const kept = /* @__PURE__ */ new Set();
|
|
6279
6279
|
const rows = [];
|
|
6280
6280
|
for (const row of incoming) {
|
|
6281
|
-
if (!isRecord$
|
|
6281
|
+
if (!isRecord$5(row)) {
|
|
6282
6282
|
rows.push(row);
|
|
6283
6283
|
continue;
|
|
6284
6284
|
}
|
|
@@ -6303,7 +6303,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6303
6303
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6304
6304
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6305
6305
|
case "object": {
|
|
6306
|
-
if (!isRecord$
|
|
6306
|
+
if (!isRecord$5(incoming)) {
|
|
6307
6307
|
if (incoming === void 0) return KEEP;
|
|
6308
6308
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6309
6309
|
return {
|
|
@@ -6311,7 +6311,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6311
6311
|
value: incoming
|
|
6312
6312
|
};
|
|
6313
6313
|
}
|
|
6314
|
-
const storedObj = isRecord$
|
|
6314
|
+
const storedObj = isRecord$5(stored) ? stored : {};
|
|
6315
6315
|
return {
|
|
6316
6316
|
kind: "value",
|
|
6317
6317
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6434,7 +6434,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6434
6434
|
value: items
|
|
6435
6435
|
};
|
|
6436
6436
|
}
|
|
6437
|
-
if (isRecord$
|
|
6437
|
+
if (isRecord$5(v)) {
|
|
6438
6438
|
const out = {};
|
|
6439
6439
|
for (const [k, child] of Object.entries(v)) {
|
|
6440
6440
|
const s = substitute(child);
|
|
@@ -6466,7 +6466,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6466
6466
|
this.name = "SecretOverwriteRefusedError";
|
|
6467
6467
|
}
|
|
6468
6468
|
};
|
|
6469
|
-
function isRecord$
|
|
6469
|
+
function isRecord$4(value) {
|
|
6470
6470
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6471
6471
|
}
|
|
6472
6472
|
function resolvedValue(pass, marker) {
|
|
@@ -6495,7 +6495,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6495
6495
|
return incoming.map((item, index) => {
|
|
6496
6496
|
const twin = stored[index];
|
|
6497
6497
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6498
|
-
if (isRecord$
|
|
6498
|
+
if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
|
|
6499
6499
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6500
6500
|
return item;
|
|
6501
6501
|
});
|
|
@@ -6506,7 +6506,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6506
6506
|
const twin = stored[key];
|
|
6507
6507
|
if (isSecretMarker(twin)) {
|
|
6508
6508
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6509
|
-
} else if (isRecord$
|
|
6509
|
+
} else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6510
6510
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6511
6511
|
}
|
|
6512
6512
|
return out;
|
|
@@ -6514,7 +6514,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6514
6514
|
async function walk(pass, incoming, stored) {
|
|
6515
6515
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6516
6516
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6517
|
-
if (!isRecord$
|
|
6517
|
+
if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
|
|
6518
6518
|
const out = { ...incoming };
|
|
6519
6519
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6520
6520
|
return out;
|
|
@@ -6545,7 +6545,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6545
6545
|
function isJsonEqual(a, b) {
|
|
6546
6546
|
if (Object.is(a, b)) return true;
|
|
6547
6547
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6548
|
-
if (isRecord$
|
|
6548
|
+
if (isRecord$4(a) && isRecord$4(b)) {
|
|
6549
6549
|
const keys = Object.keys(a);
|
|
6550
6550
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6551
6551
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6569,7 +6569,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6569
6569
|
}
|
|
6570
6570
|
function nodeFromStored(value, owner) {
|
|
6571
6571
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6572
|
-
if (!isRecord$
|
|
6572
|
+
if (!isRecord$4(value)) return null;
|
|
6573
6573
|
const children = /* @__PURE__ */ new Map();
|
|
6574
6574
|
for (const [key, child] of Object.entries(value)) {
|
|
6575
6575
|
const node = nodeFromStored(child, owner);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.139",
|
|
4
4
|
"description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|