@camstack/addon-provider-wyze 0.2.70 → 0.2.71
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
|
@@ -33264,7 +33264,15 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
33264
33264
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
33265
33265
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
|
33266
33266
|
await this.healSavedConfig(saved, savedDevices);
|
|
33267
|
-
|
|
33267
|
+
try {
|
|
33268
|
+
await this.ctx.kernel.devices.create(saved.stableId, Class, {}, saved.parentDeviceId);
|
|
33269
|
+
} catch (err) {
|
|
33270
|
+
if (!(await this.ctx.kernel.devices.getAll()).some((device) => device.stableId === saved.stableId)) throw err;
|
|
33271
|
+
this.ctx.logger.debug("Restore row came to life during its own dial — kept", { tags: {
|
|
33272
|
+
deviceId: saved.id,
|
|
33273
|
+
stableId: saved.stableId
|
|
33274
|
+
} });
|
|
33275
|
+
}
|
|
33268
33276
|
restored.add(saved.id);
|
|
33269
33277
|
};
|
|
33270
33278
|
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
package/dist/addon.mjs
CHANGED
|
@@ -33243,7 +33243,15 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
33243
33243
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
33244
33244
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
|
33245
33245
|
await this.healSavedConfig(saved, savedDevices);
|
|
33246
|
-
|
|
33246
|
+
try {
|
|
33247
|
+
await this.ctx.kernel.devices.create(saved.stableId, Class, {}, saved.parentDeviceId);
|
|
33248
|
+
} catch (err) {
|
|
33249
|
+
if (!(await this.ctx.kernel.devices.getAll()).some((device) => device.stableId === saved.stableId)) throw err;
|
|
33250
|
+
this.ctx.logger.debug("Restore row came to life during its own dial — kept", { tags: {
|
|
33251
|
+
deviceId: saved.id,
|
|
33252
|
+
stableId: saved.stableId
|
|
33253
|
+
} });
|
|
33254
|
+
}
|
|
33247
33255
|
restored.add(saved.id);
|
|
33248
33256
|
};
|
|
33249
33257
|
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-wyze",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.71",
|
|
4
4
|
"description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|