@camstack/addon-provider-dreame 0.2.145 → 0.2.147
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
|
@@ -5459,7 +5459,7 @@ var ZodIssueCode$1 = {
|
|
|
5459
5459
|
var ZodFirstPartyTypeKind$1;
|
|
5460
5460
|
ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
|
|
5461
5461
|
//#endregion
|
|
5462
|
-
//#region ../types/dist/sleep-
|
|
5462
|
+
//#region ../types/dist/sleep-_sV1BE2f.mjs
|
|
5463
5463
|
/**
|
|
5464
5464
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5465
5465
|
* window to float samples (D455).
|
|
@@ -5576,7 +5576,7 @@ function isKeychainStoredField(field) {
|
|
|
5576
5576
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5577
5577
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5578
5578
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5579
|
-
function isRecord$
|
|
5579
|
+
function isRecord$6(value) {
|
|
5580
5580
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5581
5581
|
}
|
|
5582
5582
|
function makeSecretMarker(ref) {
|
|
@@ -5587,12 +5587,12 @@ function makeSecretMarker(ref) {
|
|
|
5587
5587
|
}
|
|
5588
5588
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5589
5589
|
function isSecretMarker(value) {
|
|
5590
|
-
if (!isRecord$
|
|
5590
|
+
if (!isRecord$6(value)) return false;
|
|
5591
5591
|
const ref = value["$secret"];
|
|
5592
5592
|
return typeof ref === "string" && ref.length > 0;
|
|
5593
5593
|
}
|
|
5594
5594
|
function isSecretClear(value) {
|
|
5595
|
-
return isRecord$
|
|
5595
|
+
return isRecord$6(value) && value["$secretClear"] === true;
|
|
5596
5596
|
}
|
|
5597
5597
|
/**
|
|
5598
5598
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6202,7 +6202,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6202
6202
|
}
|
|
6203
6203
|
};
|
|
6204
6204
|
var KEEP = { kind: "keep" };
|
|
6205
|
-
function isRecord$
|
|
6205
|
+
function isRecord$5(value) {
|
|
6206
6206
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6207
6207
|
}
|
|
6208
6208
|
function defaultMintId() {
|
|
@@ -6215,7 +6215,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6215
6215
|
return out;
|
|
6216
6216
|
}
|
|
6217
6217
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6218
|
-
else if (isRecord$
|
|
6218
|
+
else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6219
6219
|
return out;
|
|
6220
6220
|
}
|
|
6221
6221
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6270,7 +6270,7 @@ function rowId(row, idKey) {
|
|
|
6270
6270
|
return null;
|
|
6271
6271
|
}
|
|
6272
6272
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6273
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6273
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
|
|
6274
6274
|
if (!Array.isArray(incoming)) {
|
|
6275
6275
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6276
6276
|
return {
|
|
@@ -6286,7 +6286,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6286
6286
|
const kept = /* @__PURE__ */ new Set();
|
|
6287
6287
|
const rows = [];
|
|
6288
6288
|
for (const row of incoming) {
|
|
6289
|
-
if (!isRecord$
|
|
6289
|
+
if (!isRecord$5(row)) {
|
|
6290
6290
|
rows.push(row);
|
|
6291
6291
|
continue;
|
|
6292
6292
|
}
|
|
@@ -6311,7 +6311,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6311
6311
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6312
6312
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6313
6313
|
case "object": {
|
|
6314
|
-
if (!isRecord$
|
|
6314
|
+
if (!isRecord$5(incoming)) {
|
|
6315
6315
|
if (incoming === void 0) return KEEP;
|
|
6316
6316
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6317
6317
|
return {
|
|
@@ -6319,7 +6319,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6319
6319
|
value: incoming
|
|
6320
6320
|
};
|
|
6321
6321
|
}
|
|
6322
|
-
const storedObj = isRecord$
|
|
6322
|
+
const storedObj = isRecord$5(stored) ? stored : {};
|
|
6323
6323
|
return {
|
|
6324
6324
|
kind: "value",
|
|
6325
6325
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6442,7 +6442,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6442
6442
|
value: items
|
|
6443
6443
|
};
|
|
6444
6444
|
}
|
|
6445
|
-
if (isRecord$
|
|
6445
|
+
if (isRecord$5(v)) {
|
|
6446
6446
|
const out = {};
|
|
6447
6447
|
for (const [k, child] of Object.entries(v)) {
|
|
6448
6448
|
const s = substitute(child);
|
|
@@ -6474,7 +6474,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6474
6474
|
this.name = "SecretOverwriteRefusedError";
|
|
6475
6475
|
}
|
|
6476
6476
|
};
|
|
6477
|
-
function isRecord$
|
|
6477
|
+
function isRecord$4(value) {
|
|
6478
6478
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6479
6479
|
}
|
|
6480
6480
|
function resolvedValue(pass, marker) {
|
|
@@ -6503,7 +6503,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6503
6503
|
return incoming.map((item, index) => {
|
|
6504
6504
|
const twin = stored[index];
|
|
6505
6505
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6506
|
-
if (isRecord$
|
|
6506
|
+
if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
|
|
6507
6507
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6508
6508
|
return item;
|
|
6509
6509
|
});
|
|
@@ -6514,7 +6514,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6514
6514
|
const twin = stored[key];
|
|
6515
6515
|
if (isSecretMarker(twin)) {
|
|
6516
6516
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6517
|
-
} else if (isRecord$
|
|
6517
|
+
} else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6518
6518
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6519
6519
|
}
|
|
6520
6520
|
return out;
|
|
@@ -6522,7 +6522,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6522
6522
|
async function walk(pass, incoming, stored) {
|
|
6523
6523
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6524
6524
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6525
|
-
if (!isRecord$
|
|
6525
|
+
if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
|
|
6526
6526
|
const out = { ...incoming };
|
|
6527
6527
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6528
6528
|
return out;
|
|
@@ -6553,7 +6553,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6553
6553
|
function isJsonEqual(a, b) {
|
|
6554
6554
|
if (Object.is(a, b)) return true;
|
|
6555
6555
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6556
|
-
if (isRecord$
|
|
6556
|
+
if (isRecord$4(a) && isRecord$4(b)) {
|
|
6557
6557
|
const keys = Object.keys(a);
|
|
6558
6558
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6559
6559
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6577,7 +6577,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6577
6577
|
}
|
|
6578
6578
|
function nodeFromStored(value, owner) {
|
|
6579
6579
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6580
|
-
if (!isRecord$
|
|
6580
|
+
if (!isRecord$4(value)) return null;
|
|
6581
6581
|
const children = /* @__PURE__ */ new Map();
|
|
6582
6582
|
for (const [key, child] of Object.entries(value)) {
|
|
6583
6583
|
const node = nodeFromStored(child, owner);
|
package/dist/addon.mjs
CHANGED
|
@@ -5456,7 +5456,7 @@ var ZodIssueCode$1 = {
|
|
|
5456
5456
|
var ZodFirstPartyTypeKind$1;
|
|
5457
5457
|
ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
|
|
5458
5458
|
//#endregion
|
|
5459
|
-
//#region ../types/dist/sleep-
|
|
5459
|
+
//#region ../types/dist/sleep-_sV1BE2f.mjs
|
|
5460
5460
|
/**
|
|
5461
5461
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5462
5462
|
* window to float samples (D455).
|
|
@@ -5573,7 +5573,7 @@ function isKeychainStoredField(field) {
|
|
|
5573
5573
|
var SECRET_CLEAR = { $secretClear: true };
|
|
5574
5574
|
/** The `'***'` token D634 redaction writes for non-admins. */
|
|
5575
5575
|
var LEGACY_DEVICE_REDACTION = "***";
|
|
5576
|
-
function isRecord$
|
|
5576
|
+
function isRecord$6(value) {
|
|
5577
5577
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5578
5578
|
}
|
|
5579
5579
|
function makeSecretMarker(ref) {
|
|
@@ -5584,12 +5584,12 @@ function makeSecretMarker(ref) {
|
|
|
5584
5584
|
}
|
|
5585
5585
|
/** A stored marker: an object whose `$secret` is a non-empty string. */
|
|
5586
5586
|
function isSecretMarker(value) {
|
|
5587
|
-
if (!isRecord$
|
|
5587
|
+
if (!isRecord$6(value)) return false;
|
|
5588
5588
|
const ref = value["$secret"];
|
|
5589
5589
|
return typeof ref === "string" && ref.length > 0;
|
|
5590
5590
|
}
|
|
5591
5591
|
function isSecretClear(value) {
|
|
5592
|
-
return isRecord$
|
|
5592
|
+
return isRecord$6(value) && value["$secretClear"] === true;
|
|
5593
5593
|
}
|
|
5594
5594
|
/**
|
|
5595
5595
|
* The UI view of a stored secret field value: a marker becomes "set", inline
|
|
@@ -6199,7 +6199,7 @@ var KeychainWriteRefusedError = class extends Error {
|
|
|
6199
6199
|
}
|
|
6200
6200
|
};
|
|
6201
6201
|
var KEEP = { kind: "keep" };
|
|
6202
|
-
function isRecord$
|
|
6202
|
+
function isRecord$5(value) {
|
|
6203
6203
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6204
6204
|
}
|
|
6205
6205
|
function defaultMintId() {
|
|
@@ -6212,7 +6212,7 @@ function collectSecretMarkerRefs(value, out = []) {
|
|
|
6212
6212
|
return out;
|
|
6213
6213
|
}
|
|
6214
6214
|
if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
|
|
6215
|
-
else if (isRecord$
|
|
6215
|
+
else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
|
|
6216
6216
|
return out;
|
|
6217
6217
|
}
|
|
6218
6218
|
async function storedValueEquals(secrets, marker, candidate) {
|
|
@@ -6267,7 +6267,7 @@ function rowId(row, idKey) {
|
|
|
6267
6267
|
return null;
|
|
6268
6268
|
}
|
|
6269
6269
|
async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
6270
|
-
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$
|
|
6270
|
+
const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
|
|
6271
6271
|
if (!Array.isArray(incoming)) {
|
|
6272
6272
|
ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
|
|
6273
6273
|
return {
|
|
@@ -6283,7 +6283,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
|
|
|
6283
6283
|
const kept = /* @__PURE__ */ new Set();
|
|
6284
6284
|
const rows = [];
|
|
6285
6285
|
for (const row of incoming) {
|
|
6286
|
-
if (!isRecord$
|
|
6286
|
+
if (!isRecord$5(row)) {
|
|
6287
6287
|
rows.push(row);
|
|
6288
6288
|
continue;
|
|
6289
6289
|
}
|
|
@@ -6308,7 +6308,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6308
6308
|
case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
|
|
6309
6309
|
case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
|
|
6310
6310
|
case "object": {
|
|
6311
|
-
if (!isRecord$
|
|
6311
|
+
if (!isRecord$5(incoming)) {
|
|
6312
6312
|
if (incoming === void 0) return KEEP;
|
|
6313
6313
|
ctx.deletes.push(...collectSecretMarkerRefs(stored));
|
|
6314
6314
|
return {
|
|
@@ -6316,7 +6316,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
|
|
|
6316
6316
|
value: incoming
|
|
6317
6317
|
};
|
|
6318
6318
|
}
|
|
6319
|
-
const storedObj = isRecord$
|
|
6319
|
+
const storedObj = isRecord$5(stored) ? stored : {};
|
|
6320
6320
|
return {
|
|
6321
6321
|
kind: "value",
|
|
6322
6322
|
value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
|
|
@@ -6439,7 +6439,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
|
|
|
6439
6439
|
value: items
|
|
6440
6440
|
};
|
|
6441
6441
|
}
|
|
6442
|
-
if (isRecord$
|
|
6442
|
+
if (isRecord$5(v)) {
|
|
6443
6443
|
const out = {};
|
|
6444
6444
|
for (const [k, child] of Object.entries(v)) {
|
|
6445
6445
|
const s = substitute(child);
|
|
@@ -6471,7 +6471,7 @@ var SecretOverwriteRefusedError = class extends Error {
|
|
|
6471
6471
|
this.name = "SecretOverwriteRefusedError";
|
|
6472
6472
|
}
|
|
6473
6473
|
};
|
|
6474
|
-
function isRecord$
|
|
6474
|
+
function isRecord$4(value) {
|
|
6475
6475
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6476
6476
|
}
|
|
6477
6477
|
function resolvedValue(pass, marker) {
|
|
@@ -6500,7 +6500,7 @@ function inArray(pass, incoming, stored) {
|
|
|
6500
6500
|
return incoming.map((item, index) => {
|
|
6501
6501
|
const twin = stored[index];
|
|
6502
6502
|
if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
|
|
6503
|
-
if (isRecord$
|
|
6503
|
+
if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
|
|
6504
6504
|
if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
|
|
6505
6505
|
return item;
|
|
6506
6506
|
});
|
|
@@ -6511,7 +6511,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6511
6511
|
const twin = stored[key];
|
|
6512
6512
|
if (isSecretMarker(twin)) {
|
|
6513
6513
|
if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
|
|
6514
|
-
} else if (isRecord$
|
|
6514
|
+
} else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
|
|
6515
6515
|
else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
|
|
6516
6516
|
}
|
|
6517
6517
|
return out;
|
|
@@ -6519,7 +6519,7 @@ function inArrayRow(pass, incoming, stored) {
|
|
|
6519
6519
|
async function walk(pass, incoming, stored) {
|
|
6520
6520
|
if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
|
|
6521
6521
|
if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
|
|
6522
|
-
if (!isRecord$
|
|
6522
|
+
if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
|
|
6523
6523
|
const out = { ...incoming };
|
|
6524
6524
|
for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
|
|
6525
6525
|
return out;
|
|
@@ -6550,7 +6550,7 @@ async function restoreUnchangedSecrets(input) {
|
|
|
6550
6550
|
function isJsonEqual(a, b) {
|
|
6551
6551
|
if (Object.is(a, b)) return true;
|
|
6552
6552
|
if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
|
|
6553
|
-
if (isRecord$
|
|
6553
|
+
if (isRecord$4(a) && isRecord$4(b)) {
|
|
6554
6554
|
const keys = Object.keys(a);
|
|
6555
6555
|
if (keys.length !== Object.keys(b).length) return false;
|
|
6556
6556
|
return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
|
|
@@ -6574,7 +6574,7 @@ function markerKeysOf(blob, owner) {
|
|
|
6574
6574
|
}
|
|
6575
6575
|
function nodeFromStored(value, owner) {
|
|
6576
6576
|
if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
|
|
6577
|
-
if (!isRecord$
|
|
6577
|
+
if (!isRecord$4(value)) return null;
|
|
6578
6578
|
const children = /* @__PURE__ */ new Map();
|
|
6579
6579
|
for (const [key, child] of Object.entries(value)) {
|
|
6580
6580
|
const node = nodeFromStored(child, owner);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreame",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.147",
|
|
4
4
|
"description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|