@camstack/server 1.2.461 → 1.2.462
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.
|
@@ -11,7 +11,7 @@ class HubAddressUnavailableError extends Error {
|
|
|
11
11
|
super(reason === 'local-network-unavailable'
|
|
12
12
|
? `cannot name this hub's ${audience} address: the local-network capability is not available yet`
|
|
13
13
|
: `cannot name this hub's ${audience} address: Network lists no reachable LAN address ` +
|
|
14
|
-
'(
|
|
14
|
+
'(flag an address for this in Settings → Network, or check the allowed addresses)');
|
|
15
15
|
this.audience = audience;
|
|
16
16
|
this.reason = reason;
|
|
17
17
|
this.name = 'HubAddressUnavailableError';
|
|
@@ -27,11 +27,11 @@ async function resolveHubBaseUrl(getSource, audience) {
|
|
|
27
27
|
const source = getSource();
|
|
28
28
|
if (source === null)
|
|
29
29
|
throw new HubAddressUnavailableError(audience, 'local-network-unavailable');
|
|
30
|
-
const baseUrl = (await source.
|
|
30
|
+
const baseUrl = (await source.getAddresses({})).roles[audience].resolved;
|
|
31
31
|
if (baseUrl === null)
|
|
32
32
|
throw new HubAddressUnavailableError(audience, 'no-reachable-endpoint');
|
|
33
33
|
return baseUrl;
|
|
34
34
|
}
|
|
35
35
|
function clusterBaseUrlResolver(getSource) {
|
|
36
|
-
return () => resolveHubBaseUrl(getSource, '
|
|
36
|
+
return () => resolveHubBaseUrl(getSource, 'agents');
|
|
37
37
|
}
|
|
@@ -4912,21 +4912,46 @@ function createCapRouter_localNetwork(getProvider, createRemoteProxy) {
|
|
|
4912
4912
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
4913
4913
|
return p.setViewerEndpoints(methodInput);
|
|
4914
4914
|
}),
|
|
4915
|
-
|
|
4916
|
-
.input(
|
|
4917
|
-
.output(types_65.localNetworkCapability.methods.
|
|
4915
|
+
getAddresses: trpc_middleware_js_1.protectedProcedure
|
|
4916
|
+
.input(types_65.localNetworkCapability.methods.getAddresses.input)
|
|
4917
|
+
.output(types_65.localNetworkCapability.methods.getAddresses.output)
|
|
4918
4918
|
.query(async ({ input, ctx }) => {
|
|
4919
|
-
const p =
|
|
4920
|
-
return p.
|
|
4919
|
+
const p = requireCapProvider('local-network', () => getProvider(ctx));
|
|
4920
|
+
return p.getAddresses(input);
|
|
4921
|
+
}),
|
|
4922
|
+
addCustomAddress: trpc_middleware_js_1.adminProcedure
|
|
4923
|
+
.input(types_65.localNetworkCapability.methods.addCustomAddress.input.loose())
|
|
4924
|
+
.output(types_65.localNetworkCapability.methods.addCustomAddress.output)
|
|
4925
|
+
.mutation(async ({ input, ctx }) => {
|
|
4926
|
+
const { nodeId, ...methodInput } = input;
|
|
4927
|
+
const p = resolveProvider('local-network', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
4928
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
4929
|
+
return p.addCustomAddress(methodInput);
|
|
4921
4930
|
}),
|
|
4922
|
-
|
|
4923
|
-
.input(types_65.localNetworkCapability.methods.
|
|
4924
|
-
.output(types_65.localNetworkCapability.methods.
|
|
4931
|
+
removeCustomAddress: trpc_middleware_js_1.adminProcedure
|
|
4932
|
+
.input(types_65.localNetworkCapability.methods.removeCustomAddress.input.loose())
|
|
4933
|
+
.output(types_65.localNetworkCapability.methods.removeCustomAddress.output)
|
|
4925
4934
|
.mutation(async ({ input, ctx }) => {
|
|
4926
4935
|
const { nodeId, ...methodInput } = input;
|
|
4927
4936
|
const p = resolveProvider('local-network', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
4928
4937
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
4929
|
-
return p.
|
|
4938
|
+
return p.removeCustomAddress(methodInput);
|
|
4939
|
+
}),
|
|
4940
|
+
setAddressRole: trpc_middleware_js_1.adminProcedure
|
|
4941
|
+
.input(types_65.localNetworkCapability.methods.setAddressRole.input.loose())
|
|
4942
|
+
.output(types_65.localNetworkCapability.methods.setAddressRole.output)
|
|
4943
|
+
.mutation(async ({ input, ctx }) => {
|
|
4944
|
+
const { nodeId, ...methodInput } = input;
|
|
4945
|
+
const p = resolveProvider('local-network', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
4946
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
4947
|
+
return p.setAddressRole(methodInput);
|
|
4948
|
+
}),
|
|
4949
|
+
getHubAddresses: trpc_middleware_js_1.protectedProcedure
|
|
4950
|
+
.input(zod_1.z.object({ nodeId: zod_1.z.string().optional() }).optional())
|
|
4951
|
+
.output(types_65.localNetworkCapability.methods.getHubAddresses.output)
|
|
4952
|
+
.query(async ({ input, ctx }) => {
|
|
4953
|
+
const p = resolveProvider('local-network', input?.nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
4954
|
+
return p.getHubAddresses();
|
|
4930
4955
|
}),
|
|
4931
4956
|
getAllowedAddresses: trpc_middleware_js_1.protectedProcedure
|
|
4932
4957
|
.input(zod_1.z.object({ nodeId: zod_1.z.string().optional() }).optional())
|
|
@@ -11527,6 +11552,15 @@ function createCapRouter_webrtcSession(getProvider, createRemoteProxy) {
|
|
|
11527
11552
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
11528
11553
|
return p.getSessionState(methodInput);
|
|
11529
11554
|
}),
|
|
11555
|
+
applyDownlinkProbe: trpc_middleware_js_1.protectedProcedure
|
|
11556
|
+
.input(types_136.webrtcSessionCapability.methods.applyDownlinkProbe.input.loose())
|
|
11557
|
+
.output(types_136.webrtcSessionCapability.methods.applyDownlinkProbe.output)
|
|
11558
|
+
.mutation(async ({ input, ctx }) => {
|
|
11559
|
+
const { nodeId, ...methodInput } = input;
|
|
11560
|
+
const p = resolveProvider('webrtc-session', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
11561
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
11562
|
+
return p.applyDownlinkProbe(methodInput);
|
|
11563
|
+
}),
|
|
11530
11564
|
getSessionDebug: trpc_middleware_js_1.protectedProcedure
|
|
11531
11565
|
.input(types_136.webrtcSessionCapability.methods.getSessionDebug.input.loose())
|
|
11532
11566
|
.output(types_136.webrtcSessionCapability.methods.getSessionDebug.output)
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* variable (every Mac hub: the desktop app has no field for it) handed agents
|
|
10
10
|
* `https://127.0.0.1:4443`, which names the agent, and every addon and model
|
|
11
11
|
* pull to an agent failed. Every reader now asks `local-network`
|
|
12
|
-
* (`
|
|
12
|
+
* (`getAddresses().roles`); nothing reads the variables.
|
|
13
13
|
*
|
|
14
14
|
* A container that still sets one gets a WARN on every boot naming it as
|
|
15
15
|
* ignored, and the variable is removed from this process's environment before
|
package/dist/main.js
CHANGED
|
@@ -1122,7 +1122,7 @@ async function bootstrap() {
|
|
|
1122
1122
|
// The hub's browser-facing address from the `local-network` cap (tunnel,
|
|
1123
1123
|
// then mesh, then LAN). `localhost` only when the palette names nothing —
|
|
1124
1124
|
// the dev case, where it is the truth.
|
|
1125
|
-
publicHubUrl: () => (0, hub_cluster_url_1.resolveHubBaseUrl)(() => capabilityRegistry.getSingleton('local-network'), '
|
|
1125
|
+
publicHubUrl: () => (0, hub_cluster_url_1.resolveHubBaseUrl)(() => capabilityRegistry.getSingleton('local-network'), 'signIn').catch(() => `https://localhost:${port}`),
|
|
1126
1126
|
// Every /authorize refusal is a dropped account-linking attempt. Without
|
|
1127
1127
|
// this scope the drop is invisible in Loki and the only signal left is an
|
|
1128
1128
|
// operator noticing that linking stopped working.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.462",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"files": [
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
]
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
41
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
42
|
-
"@camstack/addon-auth": "1.2.
|
|
40
|
+
"@camstack/addon-admin-ui": "1.2.336",
|
|
41
|
+
"@camstack/addon-agent-ui": "1.2.178",
|
|
42
|
+
"@camstack/addon-auth": "1.2.129",
|
|
43
43
|
"@camstack/addon-decoder-nodeav": "1.2.119",
|
|
44
44
|
"@camstack/addon-notifiers": "1.2.128",
|
|
45
|
-
"@camstack/addon-pipeline": "1.2.
|
|
46
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
47
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
45
|
+
"@camstack/addon-pipeline": "1.2.331",
|
|
46
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.286",
|
|
47
|
+
"@camstack/addon-post-analysis": "1.2.338",
|
|
48
48
|
"@camstack/sdk": "1.2.122",
|
|
49
|
-
"@camstack/system": "1.2.
|
|
50
|
-
"@camstack/types": "1.2.
|
|
51
|
-
"@camstack/ui-library": "1.2.
|
|
49
|
+
"@camstack/system": "1.2.359",
|
|
50
|
+
"@camstack/types": "1.2.310",
|
|
51
|
+
"@camstack/ui-library": "1.2.236",
|
|
52
52
|
"@fastify/compress": "^9.0.0",
|
|
53
53
|
"@fastify/cookie": "^11.0.2",
|
|
54
54
|
"@fastify/cors": "^11.2.0",
|