@glasshome/sync-layer 0.9.0 → 0.9.1

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.
@@ -1,2 +1,2 @@
1
- import { t as runHaBridgeWorker } from "../worker-main-DamaVb7B.js";
1
+ import { t as runHaBridgeWorker } from "../worker-main-B6eeHPDQ.js";
2
2
  export { runHaBridgeWorker };
@@ -145,9 +145,10 @@ function runHaBridgeWorker(scope) {
145
145
  const refresh = () => {
146
146
  loadRegistryMirror(c).catch(() => {});
147
147
  };
148
- c.subscribeEvents(refresh, "entity_registry_updated");
149
- c.subscribeEvents(refresh, "device_registry_updated");
150
- c.subscribeEvents(refresh, "area_registry_updated");
148
+ const watchFailed = (err) => console.error("registry mirror watch failed:", err);
149
+ c.subscribeEvents(refresh, "entity_registry_updated").catch(watchFailed);
150
+ c.subscribeEvents(refresh, "device_registry_updated").catch(watchFailed);
151
+ c.subscribeEvents(refresh, "area_registry_updated").catch(watchFailed);
151
152
  }
152
153
  function attachWidgetPort(widgetId, caps, port) {
153
154
  widgets.get(widgetId)?.port.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glasshome/sync-layer",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Type-safe, reactive state synchronization layer for Home Assistant",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,7 +29,7 @@
29
29
  "./package.json": "./package.json"
30
30
  },
31
31
  "peerDependencies": {
32
- "@glasshome/ha-types": "0.1.2",
32
+ "@glasshome/ha-types": "0.2.0",
33
33
  "solid-js": "^1.9.0"
34
34
  },
35
35
  "peerDependenciesMeta": {
@@ -47,15 +47,17 @@
47
47
  "build": "tsdown && tsc --noEmit && bun scripts/check-widget-reachable-surface.ts",
48
48
  "dev": "tsdown --watch",
49
49
  "test": "bun test",
50
- "lint": "tsc --noEmit"
50
+ "lint": "tsc --noEmit",
51
+ "check:dead": "fallow dead-code --fail-on-issues"
51
52
  },
52
53
  "dependencies": {
53
54
  "home-assistant-js-websocket": "^9.6.0",
54
55
  "@glasshome/widget-contract": "0.3.0"
55
56
  },
56
57
  "devDependencies": {
57
- "@glasshome/ha-types": "0.1.2",
58
+ "@glasshome/ha-types": "0.2.0",
58
59
  "@types/bun": "^1.4.0",
60
+ "fallow": "3.17.0",
59
61
  "solid-js": "^1.9.0",
60
62
  "tsdown": "^0.22.14",
61
63
  "typescript": "^7.0.2"