@camstack/server 1.2.710 → 1.2.712
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.
- package/CHANGELOG.md +12 -0
- package/dist/api/core/cap-providers.js +4 -1
- package/dist/api/trpc/device-config-secret-redaction.js +1 -0
- package/dist/api/trpc/generated-cap-routers.js +8 -0
- package/dist/api/trpc/localized-schema-paths.js +1 -0
- package/dist/core/addon/addon-settings-provider.js +16 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.712] - 2026-10-31
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Integration wizard and settings page ask the addon for the form of the instance being configured
|
|
15
|
+
|
|
16
|
+
## [1.2.711] - 2026-10-31
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Creating a second instance of a single-instance integration is refused with a typed conflict
|
|
21
|
+
|
|
10
22
|
## [1.2.710] - 2026-10-31
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -922,7 +922,10 @@ function buildIntegrationsProvider(ar, eb, loggingService, capabilityRegistry) {
|
|
|
922
922
|
tags: { addonId: input.addonId, integrationId: existing[0].id },
|
|
923
923
|
meta: { phase: 'create' },
|
|
924
924
|
});
|
|
925
|
-
throw new
|
|
925
|
+
throw new server_1.TRPCError({
|
|
926
|
+
code: 'CONFLICT',
|
|
927
|
+
message: `Addon "${input.addonId}" is unique-instance and already has an integration (${existing[0].id})`,
|
|
928
|
+
});
|
|
926
929
|
}
|
|
927
930
|
}
|
|
928
931
|
// ── the gate ────────────────────────────────────────────────────
|
|
@@ -484,6 +484,7 @@ exports.NON_ADMIN_CONFIG_REDACTED_METHODS = new Map([
|
|
|
484
484
|
// ── Addon settings forms (D634) — hydrated with the STORED secret ──
|
|
485
485
|
['addonSettings.getGlobalSettings', redactSettingsForm],
|
|
486
486
|
['addonSettings.getIntegrationSettings', redactSettingsForm],
|
|
487
|
+
['addonSettings.getIntegrationFormSchema', redactSettingsForm],
|
|
487
488
|
['addonSettings.getDeviceSettings', redactSettingsForm],
|
|
488
489
|
['deviceExport.getStatus', redactExportSetup],
|
|
489
490
|
// ── Round-3 sweep: the per-device device-ops twins and the listings ──
|
|
@@ -650,6 +650,14 @@ function createCapRouter_addonSettings(getProvider, _createRemoteProxy) {
|
|
|
650
650
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
651
651
|
return p.getIntegrationSettings(input);
|
|
652
652
|
}),
|
|
653
|
+
getIntegrationFormSchema: trpc_middleware_js_1.protectedProcedure
|
|
654
|
+
.input(types_10.addonSettingsCapability.methods.getIntegrationFormSchema.input.loose())
|
|
655
|
+
.output(types_10.addonSettingsCapability.methods.getIntegrationFormSchema.output)
|
|
656
|
+
.query(async ({ input, ctx }) => {
|
|
657
|
+
const p = requireCapProvider('addon-settings', () => getProvider(ctx));
|
|
658
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
659
|
+
return p.getIntegrationFormSchema(input);
|
|
660
|
+
}),
|
|
653
661
|
getDeclaredSettingsKeys: trpc_middleware_js_1.adminProcedure
|
|
654
662
|
.input(types_10.addonSettingsCapability.methods.getDeclaredSettingsKeys.input.loose())
|
|
655
663
|
.output(types_10.addonSettingsCapability.methods.getDeclaredSettingsKeys.output)
|
|
@@ -14,6 +14,7 @@ exports.LOCALIZED_SCHEMA_PATHS = void 0;
|
|
|
14
14
|
exports.LOCALIZED_SCHEMA_PATHS = new Set([
|
|
15
15
|
'addonSettings.getGlobalSettings',
|
|
16
16
|
'addonSettings.getIntegrationSettings',
|
|
17
|
+
'addonSettings.getIntegrationFormSchema',
|
|
17
18
|
'addonSettings.getDeviceSettings',
|
|
18
19
|
'deviceManager.getDeviceSettingsAggregate',
|
|
19
20
|
'deviceManager.getDeviceLiveInfoAggregate',
|
|
@@ -114,6 +114,22 @@ function createAddonSettingsProvider(deps) {
|
|
|
114
114
|
}
|
|
115
115
|
return forkedGet(input.addonId, 'getIntegrationSettings', { ...(input.nodeId ? { nodeId: input.nodeId } : {}) }, input.nodeId);
|
|
116
116
|
},
|
|
117
|
+
async getIntegrationFormSchema(input) {
|
|
118
|
+
if (gateway.isInProcess(input.addonId, input.nodeId)) {
|
|
119
|
+
const addon = getAddon(input.addonId);
|
|
120
|
+
if (!addon)
|
|
121
|
+
return null;
|
|
122
|
+
// The per-instance hook when the addon has one; its global schema otherwise (what the
|
|
123
|
+
// wizard and the edit page always showed).
|
|
124
|
+
const result = typeof addon.getIntegrationFormSchema === 'function'
|
|
125
|
+
? await addon.getIntegrationFormSchema(input.instance, input.nodeId)
|
|
126
|
+
: typeof addon.getGlobalSettings === 'function'
|
|
127
|
+
? await addon.getGlobalSettings(undefined, undefined, input.nodeId)
|
|
128
|
+
: null;
|
|
129
|
+
return result ? reshapeForOutput(result) : null;
|
|
130
|
+
}
|
|
131
|
+
return forkedGet(input.addonId, 'getIntegrationFormSchema', { instance: input.instance, ...(input.nodeId ? { nodeId: input.nodeId } : {}) }, input.nodeId);
|
|
132
|
+
},
|
|
117
133
|
async getDeclaredSettingsKeys(input) {
|
|
118
134
|
try {
|
|
119
135
|
if (gateway.isInProcess(input.addonId, input.nodeId)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.712",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
54
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
53
|
+
"@camstack/addon-admin-ui": "1.2.535",
|
|
54
|
+
"@camstack/addon-agent-ui": "1.2.304",
|
|
55
55
|
"@camstack/addon-auth": "1.2.173",
|
|
56
|
-
"@camstack/addon-benchmark": "1.2.
|
|
56
|
+
"@camstack/addon-benchmark": "1.2.303",
|
|
57
57
|
"@camstack/addon-decoder-nodeav": "1.2.144",
|
|
58
58
|
"@camstack/addon-notifiers": "1.2.625",
|
|
59
59
|
"@camstack/addon-pipeline": "1.2.635",
|
|
60
60
|
"@camstack/addon-pipeline-orchestrator": "1.2.645",
|
|
61
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
61
|
+
"@camstack/addon-post-analysis": "1.2.656",
|
|
62
62
|
"@camstack/develop": "0.1.41",
|
|
63
63
|
"@camstack/sdk": "1.2.154",
|
|
64
|
-
"@camstack/system": "1.2.
|
|
65
|
-
"@camstack/types": "1.2.
|
|
66
|
-
"@camstack/ui-library": "1.2.
|
|
64
|
+
"@camstack/system": "1.2.533",
|
|
65
|
+
"@camstack/types": "1.2.458",
|
|
66
|
+
"@camstack/ui-library": "1.2.362",
|
|
67
67
|
"@fastify/compress": "^9.0.0",
|
|
68
68
|
"@fastify/cookie": "^11.0.2",
|
|
69
69
|
"@fastify/cors": "^11.2.0",
|