@camstack/server 1.2.479 → 1.2.480
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.
|
@@ -48,16 +48,17 @@ const types_1 = require("@camstack/types");
|
|
|
48
48
|
const client_1 = require("@trpc/client");
|
|
49
49
|
const addon_call_gateway_js_1 = require("./addon-call-gateway.js");
|
|
50
50
|
const addon_row_manifest_1 = require("./addon-row-manifest");
|
|
51
|
-
const settings_door_wiring_js_1 = require("./settings-door-wiring.js");
|
|
52
51
|
const addon_settings_provider_js_1 = require("./addon-settings-provider.js");
|
|
53
52
|
const device_meta_mirror_js_1 = require("./device-meta-mirror.js");
|
|
53
|
+
const forked_custom_actions_js_1 = require("./forked-custom-actions.js");
|
|
54
54
|
const integration_visibility_js_1 = require("./integration-visibility.js");
|
|
55
|
+
const materialize_route_path_js_1 = require("./materialize-route-path.js");
|
|
55
56
|
const package_dir_utils_1 = require("./package-dir-utils");
|
|
56
|
-
const forked_custom_actions_js_1 = require("./forked-custom-actions.js");
|
|
57
57
|
const prune_misplaced_addons_js_1 = require("./prune-misplaced-addons.js");
|
|
58
58
|
const runner_convergence_1 = require("./runner-convergence");
|
|
59
59
|
const runner_serialization_1 = require("./runner-serialization");
|
|
60
60
|
const runner_spawn_fanout_js_1 = require("./runner-spawn-fanout.js");
|
|
61
|
+
const settings_door_wiring_js_1 = require("./settings-door-wiring.js");
|
|
61
62
|
/**
|
|
62
63
|
* Decide whether an in-memory addon entry should be evicted because it is no
|
|
63
64
|
* longer on disk (the uninstall path in `loadNewAddons`).
|
|
@@ -2672,7 +2673,9 @@ class AddonRegistryService {
|
|
|
2672
2673
|
handler: async (req, reply) => {
|
|
2673
2674
|
const envelope = await invoker.invoke({
|
|
2674
2675
|
method: route.method,
|
|
2675
|
-
path:
|
|
2676
|
+
// The CONCRETE path, not the pattern: the child re-matches it and
|
|
2677
|
+
// would otherwise bind every param to its own `:placeholder`.
|
|
2678
|
+
path: (0, materialize_route_path_js_1.materializeRoutePath)(route.path, req.params),
|
|
2676
2679
|
params: req.params,
|
|
2677
2680
|
query: req.query,
|
|
2678
2681
|
body: req.body,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.materializeRoutePath = materializeRoutePath;
|
|
4
|
+
/**
|
|
5
|
+
* Rebuild the concrete request path from a route pattern and the params the
|
|
6
|
+
* hub already matched (`/:providerId/start` + `{providerId:'authentik'}` →
|
|
7
|
+
* `/authentik/start`).
|
|
8
|
+
*
|
|
9
|
+
* The forked-addon bridge forwards a request to the child's
|
|
10
|
+
* `buildAddonRouteProvider().invoke`, which matches the path again to pick the
|
|
11
|
+
* route and extract params. Sending it the PATTERN made that second match bind
|
|
12
|
+
* every param to its own placeholder (`providerId = ':providerId'`), which
|
|
13
|
+
* overwrote the real value — every parameterized route of a forked addon saw
|
|
14
|
+
* literal `:name` params.
|
|
15
|
+
*/
|
|
16
|
+
function materializeRoutePath(pattern, params) {
|
|
17
|
+
return pattern
|
|
18
|
+
.split('/')
|
|
19
|
+
.map((part) => {
|
|
20
|
+
if (!part.startsWith(':'))
|
|
21
|
+
return part;
|
|
22
|
+
const value = params[part.slice(1)];
|
|
23
|
+
return value === undefined ? part : encodeURIComponent(value);
|
|
24
|
+
})
|
|
25
|
+
.join('/');
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.480",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
]
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
40
|
+
"@camstack/addon-admin-ui": "1.2.353",
|
|
41
41
|
"@camstack/addon-agent-ui": "1.2.190",
|
|
42
42
|
"@camstack/addon-auth": "1.2.130",
|
|
43
43
|
"@camstack/addon-decoder-nodeav": "1.2.121",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@camstack/addon-pipeline-orchestrator": "1.2.297",
|
|
47
47
|
"@camstack/addon-post-analysis": "1.2.342",
|
|
48
48
|
"@camstack/sdk": "1.2.126",
|
|
49
|
-
"@camstack/system": "1.2.
|
|
50
|
-
"@camstack/types": "1.2.
|
|
49
|
+
"@camstack/system": "1.2.375",
|
|
50
|
+
"@camstack/types": "1.2.326",
|
|
51
51
|
"@camstack/ui-library": "1.2.248",
|
|
52
52
|
"@fastify/compress": "^9.0.0",
|
|
53
53
|
"@fastify/cookie": "^11.0.2",
|