@camstack/addon-provider-hikvision 1.0.6 → 1.0.7

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
@@ -4631,7 +4631,7 @@ function _instanceof(cls, params = {}) {
4631
4631
  return inst;
4632
4632
  }
4633
4633
  //#endregion
4634
- //#region ../types/dist/sleep-D7JeS58T.mjs
4634
+ //#region ../types/dist/sleep-B1dKJAMJ.mjs
4635
4635
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4636
4636
  EventCategory["SystemBoot"] = "system.boot";
4637
4637
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5605,7 +5605,7 @@ var BaseAddon = class {
5605
5605
  deviceSettingsSchema() {
5606
5606
  return null;
5607
5607
  }
5608
- async getGlobalSettings(overlay, cap) {
5608
+ async getGlobalSettings(overlay, cap, _nodeId) {
5609
5609
  const schema = this.globalSettingsSchema(cap);
5610
5610
  if (!schema) return { sections: [] };
5611
5611
  const raw = await this._ctx?.settings?.readAddonStore() ?? {};
@@ -5614,7 +5614,7 @@ var BaseAddon = class {
5614
5614
  ...overlay
5615
5615
  } : raw);
5616
5616
  }
5617
- async updateGlobalSettings(patch) {
5617
+ async updateGlobalSettings(patch, _nodeId) {
5618
5618
  await this._ctx?.settings?.writeAddonStore(patch);
5619
5619
  await this.resolveConfig();
5620
5620
  await this.onConfigChanged();
@@ -26264,7 +26264,7 @@ function gridRowHexLen(columns) {
26264
26264
  */
26265
26265
  function decodeGridMap(hex, columns, rows) {
26266
26266
  const total = columns * rows;
26267
- const allTrue = () => new Array(Math.max(0, total)).fill(true);
26267
+ const allTrue = () => Array.from({ length: Math.max(0, total) }, () => true);
26268
26268
  if (columns <= 0 || rows <= 0) return allTrue();
26269
26269
  const clean = hex.trim().toLowerCase();
26270
26270
  const rowHexLen = gridRowHexLen(columns);
@@ -28786,7 +28786,7 @@ var HikvisionCamera = class HikvisionCamera extends BaseDevice {
28786
28786
  rtspUrl: desc.url ?? ""
28787
28787
  });
28788
28788
  });
28789
- for (const camStreamId of [...this.published.keys()]) if (!seen.has(camStreamId)) this.published.delete(camStreamId);
28789
+ for (const camStreamId of Array.from(this.published.keys())) if (!seen.has(camStreamId)) this.published.delete(camStreamId);
28790
28790
  return descriptors;
28791
28791
  }
28792
28792
  /**
package/dist/addon.mjs CHANGED
@@ -4630,7 +4630,7 @@ function _instanceof(cls, params = {}) {
4630
4630
  return inst;
4631
4631
  }
4632
4632
  //#endregion
4633
- //#region ../types/dist/sleep-D7JeS58T.mjs
4633
+ //#region ../types/dist/sleep-B1dKJAMJ.mjs
4634
4634
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4635
4635
  EventCategory["SystemBoot"] = "system.boot";
4636
4636
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5604,7 +5604,7 @@ var BaseAddon = class {
5604
5604
  deviceSettingsSchema() {
5605
5605
  return null;
5606
5606
  }
5607
- async getGlobalSettings(overlay, cap) {
5607
+ async getGlobalSettings(overlay, cap, _nodeId) {
5608
5608
  const schema = this.globalSettingsSchema(cap);
5609
5609
  if (!schema) return { sections: [] };
5610
5610
  const raw = await this._ctx?.settings?.readAddonStore() ?? {};
@@ -5613,7 +5613,7 @@ var BaseAddon = class {
5613
5613
  ...overlay
5614
5614
  } : raw);
5615
5615
  }
5616
- async updateGlobalSettings(patch) {
5616
+ async updateGlobalSettings(patch, _nodeId) {
5617
5617
  await this._ctx?.settings?.writeAddonStore(patch);
5618
5618
  await this.resolveConfig();
5619
5619
  await this.onConfigChanged();
@@ -26263,7 +26263,7 @@ function gridRowHexLen(columns) {
26263
26263
  */
26264
26264
  function decodeGridMap(hex, columns, rows) {
26265
26265
  const total = columns * rows;
26266
- const allTrue = () => new Array(Math.max(0, total)).fill(true);
26266
+ const allTrue = () => Array.from({ length: Math.max(0, total) }, () => true);
26267
26267
  if (columns <= 0 || rows <= 0) return allTrue();
26268
26268
  const clean = hex.trim().toLowerCase();
26269
26269
  const rowHexLen = gridRowHexLen(columns);
@@ -28785,7 +28785,7 @@ var HikvisionCamera = class HikvisionCamera extends BaseDevice {
28785
28785
  rtspUrl: desc.url ?? ""
28786
28786
  });
28787
28787
  });
28788
- for (const camStreamId of [...this.published.keys()]) if (!seen.has(camStreamId)) this.published.delete(camStreamId);
28788
+ for (const camStreamId of Array.from(this.published.keys())) if (!seen.has(camStreamId)) this.published.delete(camStreamId);
28789
28789
  return descriptors;
28790
28790
  }
28791
28791
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",