@camstack/server 1.2.35 → 1.2.36

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.
@@ -2261,8 +2261,28 @@ class AddonRegistryService {
2261
2261
  if (!provider)
2262
2262
  return;
2263
2263
  this.activeSettingsBackend = provider;
2264
- if (isSettingsStore(provider)) {
2265
- this.configService.setSettingsStore(provider);
2264
+ // ConfigManager needs the SYNC legacy surface (`getAllAddon`,
2265
+ // `setAddonDevice`, …), which is not part of the cap. Since D44 the
2266
+ // `settings-store` provider is the storage-orchestrator's
2267
+ // DISPATCHER, and a dispatcher has none of those methods — so this
2268
+ // predicate started returning false and ConfigManager was left
2269
+ // without a store. Nothing said so: `readAddonStore()` then answered
2270
+ // `{}` for every addon, device-manager restored ZERO devices, and no
2271
+ // camera published a stream. Fall back to the ENGINE behind the door
2272
+ // (`data-store-provider` — the SQLite backend does implement both
2273
+ // surfaces), the same move `storage-orchestrator` makes for its
2274
+ // location store. And if neither can serve it, SAY SO: this is the
2275
+ // branch whose silence cost an evening.
2276
+ const syncStore = isSettingsStore(provider)
2277
+ ? provider
2278
+ : this.capabilityRegistry
2279
+ .getCollection('data-store-provider')
2280
+ .find((engine) => isSettingsStore(engine));
2281
+ if (syncStore) {
2282
+ this.configService.setSettingsStore(syncStore);
2283
+ }
2284
+ else {
2285
+ this.logger.error('settings-store provider does not implement the sync ConfigManager surface and no data-store-provider engine does either — every addon store reads empty, devices will NOT be restored', { meta: { addonId, phase: 'v2' } });
2266
2286
  }
2267
2287
  this.storageService.setSettingsBackend(provider);
2268
2288
  // The registry needs the DOOR's own shape, not `ISettingsBackend`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.35",
3
+ "version": "1.2.36",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",