@camstack/server 1.2.377 → 1.2.378
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.
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
64
64
|
exports.SOURCE_LISTING_METHOD = void 0;
|
|
65
65
|
exports.requireDeviceCollection = requireDeviceCollection;
|
|
66
|
+
const system_1 = require("@camstack/system");
|
|
66
67
|
const types_1 = require("@camstack/types");
|
|
67
68
|
const server_1 = require("@trpc/server");
|
|
68
69
|
/**
|
|
@@ -232,10 +233,32 @@ async function callSource(source, method, input, capName, deviceId) {
|
|
|
232
233
|
if (typeof fn !== 'function') {
|
|
233
234
|
throw new server_1.TRPCError({
|
|
234
235
|
code: 'NOT_IMPLEMENTED',
|
|
235
|
-
message:
|
|
236
|
+
message: notImplementedMessage(capName, source.addonId, deviceId, method),
|
|
236
237
|
});
|
|
237
238
|
}
|
|
238
|
-
|
|
239
|
+
// …and that check is VACUOUS for a forked provider: the UDS proxy fabricates
|
|
240
|
+
// a callable for every property, so the absence is only observable on the
|
|
241
|
+
// child. `child-cap-dispatch` answers a method declared `optionalMethod`
|
|
242
|
+
// with a prefixed message, which becomes the SAME refusal here — otherwise
|
|
243
|
+
// an honest "this source has no file behind it" arrives as
|
|
244
|
+
// INTERNAL_SERVER_ERROR and reads as a method somebody forgot.
|
|
245
|
+
try {
|
|
246
|
+
return await fn.call(source.provider, input);
|
|
247
|
+
}
|
|
248
|
+
catch (err) {
|
|
249
|
+
if (errMessage(err).includes(system_1.CAP_METHOD_NOT_IMPLEMENTED)) {
|
|
250
|
+
throw new server_1.TRPCError({
|
|
251
|
+
code: 'NOT_IMPLEMENTED',
|
|
252
|
+
message: notImplementedMessage(capName, source.addonId, deviceId, method),
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
throw err;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
/** One sentence for both arms, so the two paths cannot describe the same fact
|
|
259
|
+
* differently. */
|
|
260
|
+
function notImplementedMessage(capName, addonId, deviceId, method) {
|
|
261
|
+
return `Capability "${capName}" source "${addonId}" for device ${deviceId} does not implement "${method}"`;
|
|
239
262
|
}
|
|
240
263
|
/**
|
|
241
264
|
* The `startMs` a row is ordered by, or null when the row does not declare a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.378",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
38
|
+
"@camstack/addon-admin-ui": "1.2.259",
|
|
39
39
|
"@camstack/addon-agent-ui": "1.2.141",
|
|
40
40
|
"@camstack/addon-auth": "1.2.123",
|
|
41
41
|
"@camstack/addon-decoder-nodeav": "1.2.115",
|
|
42
42
|
"@camstack/addon-notifiers": "1.2.119",
|
|
43
43
|
"@camstack/addon-pipeline": "1.2.290",
|
|
44
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
44
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.246",
|
|
45
45
|
"@camstack/addon-post-analysis": "1.2.274",
|
|
46
46
|
"@camstack/sdk": "1.2.118",
|
|
47
|
-
"@camstack/system": "1.2.
|
|
48
|
-
"@camstack/types": "1.2.
|
|
47
|
+
"@camstack/system": "1.2.292",
|
|
48
|
+
"@camstack/types": "1.2.248",
|
|
49
49
|
"@camstack/ui-library": "1.2.199",
|
|
50
50
|
"@fastify/compress": "^9.0.0",
|
|
51
51
|
"@fastify/cookie": "^11.0.2",
|