@camstack/addon-provider-petkit 0.2.138 → 0.2.140

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 CHANGED
@@ -6516,7 +6516,7 @@ var ZodIssueCode = {
6516
6516
  var ZodFirstPartyTypeKind;
6517
6517
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6518
6518
  //#endregion
6519
- //#region ../types/dist/sleep-CSuN0thG.mjs
6519
+ //#region ../types/dist/sleep-_sV1BE2f.mjs
6520
6520
  /**
6521
6521
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6522
6522
  * window to float samples (D455).
@@ -6633,7 +6633,7 @@ function isKeychainStoredField(field) {
6633
6633
  var SECRET_CLEAR = { $secretClear: true };
6634
6634
  /** The `'***'` token D634 redaction writes for non-admins. */
6635
6635
  var LEGACY_DEVICE_REDACTION = "***";
6636
- function isRecord$5(value) {
6636
+ function isRecord$6(value) {
6637
6637
  return typeof value === "object" && value !== null && !Array.isArray(value);
6638
6638
  }
6639
6639
  function makeSecretMarker(ref) {
@@ -6644,12 +6644,12 @@ function makeSecretMarker(ref) {
6644
6644
  }
6645
6645
  /** A stored marker: an object whose `$secret` is a non-empty string. */
6646
6646
  function isSecretMarker(value) {
6647
- if (!isRecord$5(value)) return false;
6647
+ if (!isRecord$6(value)) return false;
6648
6648
  const ref = value["$secret"];
6649
6649
  return typeof ref === "string" && ref.length > 0;
6650
6650
  }
6651
6651
  function isSecretClear(value) {
6652
- return isRecord$5(value) && value["$secretClear"] === true;
6652
+ return isRecord$6(value) && value["$secretClear"] === true;
6653
6653
  }
6654
6654
  /**
6655
6655
  * The UI view of a stored secret field value: a marker becomes "set", inline
@@ -7259,7 +7259,7 @@ var KeychainWriteRefusedError = class extends Error {
7259
7259
  }
7260
7260
  };
7261
7261
  var KEEP = { kind: "keep" };
7262
- function isRecord$4(value) {
7262
+ function isRecord$5(value) {
7263
7263
  return typeof value === "object" && value !== null && !Array.isArray(value);
7264
7264
  }
7265
7265
  function defaultMintId() {
@@ -7272,7 +7272,7 @@ function collectSecretMarkerRefs(value, out = []) {
7272
7272
  return out;
7273
7273
  }
7274
7274
  if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
7275
- else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
7275
+ else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
7276
7276
  return out;
7277
7277
  }
7278
7278
  async function storedValueEquals(secrets, marker, candidate) {
@@ -7327,7 +7327,7 @@ function rowId(row, idKey) {
7327
7327
  return null;
7328
7328
  }
7329
7329
  async function writeArray(ctx, node, incoming, stored, fieldPath) {
7330
- const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
7330
+ const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
7331
7331
  if (!Array.isArray(incoming)) {
7332
7332
  ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
7333
7333
  return {
@@ -7343,7 +7343,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
7343
7343
  const kept = /* @__PURE__ */ new Set();
7344
7344
  const rows = [];
7345
7345
  for (const row of incoming) {
7346
- if (!isRecord$4(row)) {
7346
+ if (!isRecord$5(row)) {
7347
7347
  rows.push(row);
7348
7348
  continue;
7349
7349
  }
@@ -7368,7 +7368,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
7368
7368
  case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
7369
7369
  case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
7370
7370
  case "object": {
7371
- if (!isRecord$4(incoming)) {
7371
+ if (!isRecord$5(incoming)) {
7372
7372
  if (incoming === void 0) return KEEP;
7373
7373
  ctx.deletes.push(...collectSecretMarkerRefs(stored));
7374
7374
  return {
@@ -7376,7 +7376,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
7376
7376
  value: incoming
7377
7377
  };
7378
7378
  }
7379
- const storedObj = isRecord$4(stored) ? stored : {};
7379
+ const storedObj = isRecord$5(stored) ? stored : {};
7380
7380
  return {
7381
7381
  kind: "value",
7382
7382
  value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
@@ -7499,7 +7499,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
7499
7499
  value: items
7500
7500
  };
7501
7501
  }
7502
- if (isRecord$4(v)) {
7502
+ if (isRecord$5(v)) {
7503
7503
  const out = {};
7504
7504
  for (const [k, child] of Object.entries(v)) {
7505
7505
  const s = substitute(child);
@@ -7531,7 +7531,7 @@ var SecretOverwriteRefusedError = class extends Error {
7531
7531
  this.name = "SecretOverwriteRefusedError";
7532
7532
  }
7533
7533
  };
7534
- function isRecord$3(value) {
7534
+ function isRecord$4(value) {
7535
7535
  return typeof value === "object" && value !== null && !Array.isArray(value);
7536
7536
  }
7537
7537
  function resolvedValue(pass, marker) {
@@ -7560,7 +7560,7 @@ function inArray(pass, incoming, stored) {
7560
7560
  return incoming.map((item, index) => {
7561
7561
  const twin = stored[index];
7562
7562
  if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
7563
- if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
7563
+ if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
7564
7564
  if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
7565
7565
  return item;
7566
7566
  });
@@ -7571,7 +7571,7 @@ function inArrayRow(pass, incoming, stored) {
7571
7571
  const twin = stored[key];
7572
7572
  if (isSecretMarker(twin)) {
7573
7573
  if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
7574
- } else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
7574
+ } else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
7575
7575
  else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
7576
7576
  }
7577
7577
  return out;
@@ -7579,7 +7579,7 @@ function inArrayRow(pass, incoming, stored) {
7579
7579
  async function walk(pass, incoming, stored) {
7580
7580
  if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
7581
7581
  if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
7582
- if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
7582
+ if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
7583
7583
  const out = { ...incoming };
7584
7584
  for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
7585
7585
  return out;
@@ -7610,7 +7610,7 @@ async function restoreUnchangedSecrets(input) {
7610
7610
  function isJsonEqual(a, b) {
7611
7611
  if (Object.is(a, b)) return true;
7612
7612
  if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
7613
- if (isRecord$3(a) && isRecord$3(b)) {
7613
+ if (isRecord$4(a) && isRecord$4(b)) {
7614
7614
  const keys = Object.keys(a);
7615
7615
  if (keys.length !== Object.keys(b).length) return false;
7616
7616
  return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
@@ -7634,7 +7634,7 @@ function markerKeysOf(blob, owner) {
7634
7634
  }
7635
7635
  function nodeFromStored(value, owner) {
7636
7636
  if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
7637
- if (!isRecord$3(value)) return null;
7637
+ if (!isRecord$4(value)) return null;
7638
7638
  const children = /* @__PURE__ */ new Map();
7639
7639
  for (const [key, child] of Object.entries(value)) {
7640
7640
  const node = nodeFromStored(child, owner);
package/dist/addon.mjs CHANGED
@@ -6515,7 +6515,7 @@ var ZodIssueCode = {
6515
6515
  var ZodFirstPartyTypeKind;
6516
6516
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6517
6517
  //#endregion
6518
- //#region ../types/dist/sleep-CSuN0thG.mjs
6518
+ //#region ../types/dist/sleep-_sV1BE2f.mjs
6519
6519
  /**
6520
6520
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6521
6521
  * window to float samples (D455).
@@ -6632,7 +6632,7 @@ function isKeychainStoredField(field) {
6632
6632
  var SECRET_CLEAR = { $secretClear: true };
6633
6633
  /** The `'***'` token D634 redaction writes for non-admins. */
6634
6634
  var LEGACY_DEVICE_REDACTION = "***";
6635
- function isRecord$5(value) {
6635
+ function isRecord$6(value) {
6636
6636
  return typeof value === "object" && value !== null && !Array.isArray(value);
6637
6637
  }
6638
6638
  function makeSecretMarker(ref) {
@@ -6643,12 +6643,12 @@ function makeSecretMarker(ref) {
6643
6643
  }
6644
6644
  /** A stored marker: an object whose `$secret` is a non-empty string. */
6645
6645
  function isSecretMarker(value) {
6646
- if (!isRecord$5(value)) return false;
6646
+ if (!isRecord$6(value)) return false;
6647
6647
  const ref = value["$secret"];
6648
6648
  return typeof ref === "string" && ref.length > 0;
6649
6649
  }
6650
6650
  function isSecretClear(value) {
6651
- return isRecord$5(value) && value["$secretClear"] === true;
6651
+ return isRecord$6(value) && value["$secretClear"] === true;
6652
6652
  }
6653
6653
  /**
6654
6654
  * The UI view of a stored secret field value: a marker becomes "set", inline
@@ -7258,7 +7258,7 @@ var KeychainWriteRefusedError = class extends Error {
7258
7258
  }
7259
7259
  };
7260
7260
  var KEEP = { kind: "keep" };
7261
- function isRecord$4(value) {
7261
+ function isRecord$5(value) {
7262
7262
  return typeof value === "object" && value !== null && !Array.isArray(value);
7263
7263
  }
7264
7264
  function defaultMintId() {
@@ -7271,7 +7271,7 @@ function collectSecretMarkerRefs(value, out = []) {
7271
7271
  return out;
7272
7272
  }
7273
7273
  if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
7274
- else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
7274
+ else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
7275
7275
  return out;
7276
7276
  }
7277
7277
  async function storedValueEquals(secrets, marker, candidate) {
@@ -7326,7 +7326,7 @@ function rowId(row, idKey) {
7326
7326
  return null;
7327
7327
  }
7328
7328
  async function writeArray(ctx, node, incoming, stored, fieldPath) {
7329
- const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
7329
+ const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
7330
7330
  if (!Array.isArray(incoming)) {
7331
7331
  ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
7332
7332
  return {
@@ -7342,7 +7342,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
7342
7342
  const kept = /* @__PURE__ */ new Set();
7343
7343
  const rows = [];
7344
7344
  for (const row of incoming) {
7345
- if (!isRecord$4(row)) {
7345
+ if (!isRecord$5(row)) {
7346
7346
  rows.push(row);
7347
7347
  continue;
7348
7348
  }
@@ -7367,7 +7367,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
7367
7367
  case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
7368
7368
  case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
7369
7369
  case "object": {
7370
- if (!isRecord$4(incoming)) {
7370
+ if (!isRecord$5(incoming)) {
7371
7371
  if (incoming === void 0) return KEEP;
7372
7372
  ctx.deletes.push(...collectSecretMarkerRefs(stored));
7373
7373
  return {
@@ -7375,7 +7375,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
7375
7375
  value: incoming
7376
7376
  };
7377
7377
  }
7378
- const storedObj = isRecord$4(stored) ? stored : {};
7378
+ const storedObj = isRecord$5(stored) ? stored : {};
7379
7379
  return {
7380
7380
  kind: "value",
7381
7381
  value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
@@ -7498,7 +7498,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
7498
7498
  value: items
7499
7499
  };
7500
7500
  }
7501
- if (isRecord$4(v)) {
7501
+ if (isRecord$5(v)) {
7502
7502
  const out = {};
7503
7503
  for (const [k, child] of Object.entries(v)) {
7504
7504
  const s = substitute(child);
@@ -7530,7 +7530,7 @@ var SecretOverwriteRefusedError = class extends Error {
7530
7530
  this.name = "SecretOverwriteRefusedError";
7531
7531
  }
7532
7532
  };
7533
- function isRecord$3(value) {
7533
+ function isRecord$4(value) {
7534
7534
  return typeof value === "object" && value !== null && !Array.isArray(value);
7535
7535
  }
7536
7536
  function resolvedValue(pass, marker) {
@@ -7559,7 +7559,7 @@ function inArray(pass, incoming, stored) {
7559
7559
  return incoming.map((item, index) => {
7560
7560
  const twin = stored[index];
7561
7561
  if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
7562
- if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
7562
+ if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
7563
7563
  if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
7564
7564
  return item;
7565
7565
  });
@@ -7570,7 +7570,7 @@ function inArrayRow(pass, incoming, stored) {
7570
7570
  const twin = stored[key];
7571
7571
  if (isSecretMarker(twin)) {
7572
7572
  if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
7573
- } else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
7573
+ } else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
7574
7574
  else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
7575
7575
  }
7576
7576
  return out;
@@ -7578,7 +7578,7 @@ function inArrayRow(pass, incoming, stored) {
7578
7578
  async function walk(pass, incoming, stored) {
7579
7579
  if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
7580
7580
  if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
7581
- if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
7581
+ if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
7582
7582
  const out = { ...incoming };
7583
7583
  for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
7584
7584
  return out;
@@ -7609,7 +7609,7 @@ async function restoreUnchangedSecrets(input) {
7609
7609
  function isJsonEqual(a, b) {
7610
7610
  if (Object.is(a, b)) return true;
7611
7611
  if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
7612
- if (isRecord$3(a) && isRecord$3(b)) {
7612
+ if (isRecord$4(a) && isRecord$4(b)) {
7613
7613
  const keys = Object.keys(a);
7614
7614
  if (keys.length !== Object.keys(b).length) return false;
7615
7615
  return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
@@ -7633,7 +7633,7 @@ function markerKeysOf(blob, owner) {
7633
7633
  }
7634
7634
  function nodeFromStored(value, owner) {
7635
7635
  if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
7636
- if (!isRecord$3(value)) return null;
7636
+ if (!isRecord$4(value)) return null;
7637
7637
  const children = /* @__PURE__ */ new Map();
7638
7638
  for (const [key, child] of Object.entries(value)) {
7639
7639
  const node = nodeFromStored(child, owner);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-petkit",
3
- "version": "0.2.138",
3
+ "version": "0.2.140",
4
4
  "description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
5
5
  "keywords": [
6
6
  "camstack",