@camstack/server 1.2.137 → 1.2.138
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.
|
@@ -42,17 +42,6 @@ function createFilteredIntegrationRegistry(deps) {
|
|
|
42
42
|
// key is bare (D72). Normalise on the way in, or the create guard rejects
|
|
43
43
|
// exactly the builtins that legitimately declare an integration.
|
|
44
44
|
const isInstalled = (addonId) => deps.isAddonInstalled((0, types_1.bareAddonId)(addonId));
|
|
45
|
-
// Integration ids whose addon IS installed. Cached per wrapper — these
|
|
46
|
-
// wrappers are built per `getIntegrationRegistry()` call, so the cache never
|
|
47
|
-
// outlives a request path.
|
|
48
|
-
let activeIntegrationIds = null;
|
|
49
|
-
const ensureActiveIds = async () => {
|
|
50
|
-
if (activeIntegrationIds)
|
|
51
|
-
return activeIntegrationIds;
|
|
52
|
-
const all = await raw.listIntegrations();
|
|
53
|
-
activeIntegrationIds = new Set(all.filter((i) => isInstalled(i.addonId)).map((i) => i.id));
|
|
54
|
-
return activeIntegrationIds;
|
|
55
|
-
};
|
|
56
45
|
/** The suppression log line. Only ever called when the row EXISTS. */
|
|
57
46
|
const logHidden = (integration, phase) => {
|
|
58
47
|
logger.warn('integration hidden — its addon is not installed, so this read answers null even though the row exists', {
|
|
@@ -106,37 +95,5 @@ function createFilteredIntegrationRegistry(deps) {
|
|
|
106
95
|
getIntegrationSettings: (id) => raw.getIntegrationSettings(id),
|
|
107
96
|
setIntegrationSetting: (id, key, value) => raw.setIntegrationSetting(id, key, value),
|
|
108
97
|
setIntegrationSettings: (id, settings) => raw.setIntegrationSettings(id, settings),
|
|
109
|
-
// Devices: filter out devices belonging to hidden integrations
|
|
110
|
-
createDevice: (input) => raw.createDevice(input),
|
|
111
|
-
getDevice: async (id) => {
|
|
112
|
-
const d = await raw.getDevice(id);
|
|
113
|
-
if (!d)
|
|
114
|
-
return null;
|
|
115
|
-
const ids = await ensureActiveIds();
|
|
116
|
-
return ids.has(d.integrationId) ? d : null;
|
|
117
|
-
},
|
|
118
|
-
getDeviceByStableId: async (stableId) => {
|
|
119
|
-
const d = await raw.getDeviceByStableId(stableId);
|
|
120
|
-
if (!d)
|
|
121
|
-
return null;
|
|
122
|
-
const ids = await ensureActiveIds();
|
|
123
|
-
return ids.has(d.integrationId) ? d : null;
|
|
124
|
-
},
|
|
125
|
-
listDevices: async (integrationId) => {
|
|
126
|
-
const devices = await raw.listDevices(integrationId);
|
|
127
|
-
const ids = await ensureActiveIds();
|
|
128
|
-
return devices.filter((d) => ids.has(d.integrationId));
|
|
129
|
-
},
|
|
130
|
-
listCameras: async () => {
|
|
131
|
-
const cameras = await raw.listCameras();
|
|
132
|
-
const ids = await ensureActiveIds();
|
|
133
|
-
return cameras.filter((d) => ids.has(d.integrationId));
|
|
134
|
-
},
|
|
135
|
-
updateDevice: (id, updates) => raw.updateDevice(id, updates),
|
|
136
|
-
deleteDevice: (id) => raw.deleteDevice(id),
|
|
137
|
-
// Device settings: passthrough
|
|
138
|
-
getDeviceSettings: (id) => raw.getDeviceSettings(id),
|
|
139
|
-
setDeviceSetting: (id, key, value) => raw.setDeviceSetting(id, key, value),
|
|
140
|
-
setDeviceSettings: (id, settings) => raw.setDeviceSettings(id, settings),
|
|
141
98
|
};
|
|
142
99
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.138",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -38,13 +38,12 @@
|
|
|
38
38
|
"@camstack/addon-auth": "1.2.26",
|
|
39
39
|
"@camstack/addon-decoder-nodeav": "1.2.22",
|
|
40
40
|
"@camstack/addon-notifiers": "1.2.27",
|
|
41
|
-
"@camstack/addon-pipeline": "1.2.
|
|
42
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
43
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
41
|
+
"@camstack/addon-pipeline": "1.2.101",
|
|
42
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.84",
|
|
43
|
+
"@camstack/addon-post-analysis": "1.2.101",
|
|
44
44
|
"@camstack/sdk": "1.2.25",
|
|
45
|
-
"@camstack/
|
|
46
|
-
"@camstack/
|
|
47
|
-
"@camstack/types": "1.2.90",
|
|
45
|
+
"@camstack/system": "1.2.109",
|
|
46
|
+
"@camstack/types": "1.2.91",
|
|
48
47
|
"@camstack/ui-library": "1.2.62",
|
|
49
48
|
"@fastify/compress": "^9.0.0",
|
|
50
49
|
"@fastify/cookie": "^11.0.2",
|