@camstack/addon-matter-broker 0.2.65 → 0.2.66
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
|
@@ -33200,7 +33200,15 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
33200
33200
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
33201
33201
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
|
33202
33202
|
await this.healSavedConfig(saved, savedDevices);
|
|
33203
|
-
|
|
33203
|
+
try {
|
|
33204
|
+
await this.ctx.kernel.devices.create(saved.stableId, Class, {}, saved.parentDeviceId);
|
|
33205
|
+
} catch (err) {
|
|
33206
|
+
if (!(await this.ctx.kernel.devices.getAll()).some((device) => device.stableId === saved.stableId)) throw err;
|
|
33207
|
+
this.ctx.logger.debug("Restore row came to life during its own dial — kept", { tags: {
|
|
33208
|
+
deviceId: saved.id,
|
|
33209
|
+
stableId: saved.stableId
|
|
33210
|
+
} });
|
|
33211
|
+
}
|
|
33204
33212
|
restored.add(saved.id);
|
|
33205
33213
|
};
|
|
33206
33214
|
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
package/dist/addon.mjs
CHANGED
|
@@ -33198,7 +33198,15 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
33198
33198
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
33199
33199
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
|
33200
33200
|
await this.healSavedConfig(saved, savedDevices);
|
|
33201
|
-
|
|
33201
|
+
try {
|
|
33202
|
+
await this.ctx.kernel.devices.create(saved.stableId, Class, {}, saved.parentDeviceId);
|
|
33203
|
+
} catch (err) {
|
|
33204
|
+
if (!(await this.ctx.kernel.devices.getAll()).some((device) => device.stableId === saved.stableId)) throw err;
|
|
33205
|
+
this.ctx.logger.debug("Restore row came to life during its own dial — kept", { tags: {
|
|
33206
|
+
deviceId: saved.id,
|
|
33207
|
+
stableId: saved.stableId
|
|
33208
|
+
} });
|
|
33209
|
+
}
|
|
33202
33210
|
restored.add(saved.id);
|
|
33203
33211
|
};
|
|
33204
33212
|
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-matter-broker",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.66",
|
|
4
4
|
"description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|