@camstack/addon-provider-hikvision 1.2.74 → 1.2.75
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 +9 -1
- package/dist/addon.mjs +9 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -33860,7 +33860,15 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
33860
33860
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
33861
33861
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
|
33862
33862
|
await this.healSavedConfig(saved, savedDevices);
|
|
33863
|
-
|
|
33863
|
+
try {
|
|
33864
|
+
await this.ctx.kernel.devices.create(saved.stableId, Class, {}, saved.parentDeviceId);
|
|
33865
|
+
} catch (err) {
|
|
33866
|
+
if (!(await this.ctx.kernel.devices.getAll()).some((device) => device.stableId === saved.stableId)) throw err;
|
|
33867
|
+
this.ctx.logger.debug("Restore row came to life during its own dial — kept", { tags: {
|
|
33868
|
+
deviceId: saved.id,
|
|
33869
|
+
stableId: saved.stableId
|
|
33870
|
+
} });
|
|
33871
|
+
}
|
|
33864
33872
|
restored.add(saved.id);
|
|
33865
33873
|
};
|
|
33866
33874
|
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
package/dist/addon.mjs
CHANGED
|
@@ -33861,7 +33861,15 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
33861
33861
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
33862
33862
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
|
33863
33863
|
await this.healSavedConfig(saved, savedDevices);
|
|
33864
|
-
|
|
33864
|
+
try {
|
|
33865
|
+
await this.ctx.kernel.devices.create(saved.stableId, Class, {}, saved.parentDeviceId);
|
|
33866
|
+
} catch (err) {
|
|
33867
|
+
if (!(await this.ctx.kernel.devices.getAll()).some((device) => device.stableId === saved.stableId)) throw err;
|
|
33868
|
+
this.ctx.logger.debug("Restore row came to life during its own dial — kept", { tags: {
|
|
33869
|
+
deviceId: saved.id,
|
|
33870
|
+
stableId: saved.stableId
|
|
33871
|
+
} });
|
|
33872
|
+
}
|
|
33865
33873
|
restored.add(saved.id);
|
|
33866
33874
|
};
|
|
33867
33875
|
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-hikvision",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.75",
|
|
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",
|