@synopackageland/cli 0.47.2 → 0.47.4
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 +11 -0
- package/README.md +17 -0
- package/dist/build-spk/wizard-messages.d.ts +44 -0
- package/dist/build-spk/wizard-messages.js +53 -9
- package/dist/standalone/dsm-window.js +2 -1
- package/dist/standalone/install-ports.d.ts +11 -3
- package/dist/standalone/install-ports.js +51 -26
- package/package.json +1 -1
- package/skills/SKILL.md +9 -1
- package/skills/reference/install.md +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.47.4
|
|
4
|
+
|
|
5
|
+
- Expose ctx.webApi in every generated DSM window, across all backend runtimes and desktop or full-page launches, using the existing session channel and DSM error codes
|
|
6
|
+
- Cover generated calls, session recovery and refusals; document the public context API and SDK helper usage
|
|
7
|
+
|
|
8
|
+
## 0.47.3
|
|
9
|
+
|
|
10
|
+
- Accept DSM service port entries using the all-protocol value, numeric single ports and string ranges
|
|
11
|
+
- Keep installation moving when DSM cannot verify a port; show inline warnings for known service conflicts, reserved ports and duplicate selections
|
|
12
|
+
- Retain number-format and range validation, and name detected conflicts in all nine wizard languages
|
|
13
|
+
|
|
3
14
|
## 0.47.2
|
|
4
15
|
|
|
5
16
|
- Pin CLI-owned Compose planning and daemon controllers to SDK 0.46.1, which includes the gateway command-dispatch fix for inherited CGI environments.
|
package/README.md
CHANGED
|
@@ -582,6 +582,23 @@ cache refresh, host removal/revocation and explicit `ctl.commands` authoring.
|
|
|
582
582
|
API descriptions are private SPK files named `synopkgland-api.json`, served
|
|
583
583
|
only by the authenticated fixed `synopkgland.describe` CGI operation.
|
|
584
584
|
|
|
585
|
+
Every generated DSM window exposes
|
|
586
|
+
`ctx.webApi(api, method, version, params)` for DSM WebAPI calls in the signed-in
|
|
587
|
+
user's own session, across Go, Python, Node, Rust and binary backends. It reuses
|
|
588
|
+
the window's WebAPI channel and SDK session recovery, resolves DSM's data and
|
|
589
|
+
rejects DSM refusals as `{code: "dsm_<n>"}`. DSM enforces the user's permissions;
|
|
590
|
+
the call does not use the package backend or grant administrator access.
|
|
591
|
+
|
|
592
|
+
```ts
|
|
593
|
+
if (!ctx.webApi) throw new Error('DSM window required')
|
|
594
|
+
const data = await ctx.webApi('SYNO.Core.Service.PortInfo', 'load', 1, {})
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
The field is optional in the SDK type for standalone dev servers, custom hosts
|
|
598
|
+
and older generated windows. Prefer SDK helpers such as `readDsmPorts(ctx)`;
|
|
599
|
+
they use this channel when available and keep their documented fallback when
|
|
600
|
+
there is no window channel.
|
|
601
|
+
|
|
585
602
|
Generated SDK windows expose `ctx.batch([{method, params}, ...])` when the
|
|
586
603
|
selected SDK supplies its batch factory. One to eight independent JSON reads
|
|
587
604
|
share a request; results keep input order and retain per-method errors. A batch
|
|
@@ -54,6 +54,50 @@ export declare const WIZARD_MESSAGES: {
|
|
|
54
54
|
es: string;
|
|
55
55
|
it: string;
|
|
56
56
|
};
|
|
57
|
+
"ports.reserved": {
|
|
58
|
+
en: string;
|
|
59
|
+
"zh-TW": string;
|
|
60
|
+
"zh-CN": string;
|
|
61
|
+
ja: string;
|
|
62
|
+
ko: string;
|
|
63
|
+
de: string;
|
|
64
|
+
fr: string;
|
|
65
|
+
es: string;
|
|
66
|
+
it: string;
|
|
67
|
+
};
|
|
68
|
+
"ports.conflict": {
|
|
69
|
+
en: string;
|
|
70
|
+
"zh-TW": string;
|
|
71
|
+
"zh-CN": string;
|
|
72
|
+
ja: string;
|
|
73
|
+
ko: string;
|
|
74
|
+
de: string;
|
|
75
|
+
fr: string;
|
|
76
|
+
es: string;
|
|
77
|
+
it: string;
|
|
78
|
+
};
|
|
79
|
+
"ports.duplicate": {
|
|
80
|
+
en: string;
|
|
81
|
+
"zh-TW": string;
|
|
82
|
+
"zh-CN": string;
|
|
83
|
+
ja: string;
|
|
84
|
+
ko: string;
|
|
85
|
+
de: string;
|
|
86
|
+
fr: string;
|
|
87
|
+
es: string;
|
|
88
|
+
it: string;
|
|
89
|
+
};
|
|
90
|
+
"ports.notice": {
|
|
91
|
+
en: string;
|
|
92
|
+
"zh-TW": string;
|
|
93
|
+
"zh-CN": string;
|
|
94
|
+
ja: string;
|
|
95
|
+
ko: string;
|
|
96
|
+
de: string;
|
|
97
|
+
fr: string;
|
|
98
|
+
es: string;
|
|
99
|
+
it: string;
|
|
100
|
+
};
|
|
57
101
|
"ports.originInvalid": {
|
|
58
102
|
en: string;
|
|
59
103
|
"zh-TW": string;
|
|
@@ -44,15 +44,59 @@ export const WIZARD_MESSAGES = {
|
|
|
44
44
|
"it": "Porte dell’app"
|
|
45
45
|
},
|
|
46
46
|
"ports.invalid": {
|
|
47
|
-
"en": "
|
|
48
|
-
"zh-TW": "
|
|
49
|
-
"zh-CN": "
|
|
50
|
-
"ja": "1024~65535
|
|
51
|
-
"ko": "1024~65535
|
|
52
|
-
"de": "
|
|
53
|
-
"fr": "
|
|
54
|
-
"es": "
|
|
55
|
-
"it": "
|
|
47
|
+
"en": "Enter a port number from 1024 to 65535",
|
|
48
|
+
"zh-TW": "請輸入 1024 至 65535 間的連接埠號碼",
|
|
49
|
+
"zh-CN": "请输入 1024 至 65535 之间的端口号",
|
|
50
|
+
"ja": "1024~65535 のポート番号を入力してください",
|
|
51
|
+
"ko": "1024~65535 사이의 포트 번호를 입력하십시오",
|
|
52
|
+
"de": "Geben Sie eine Portnummer von 1024 bis 65535 ein",
|
|
53
|
+
"fr": "Saisissez un numéro de port de 1024 à 65535",
|
|
54
|
+
"es": "Introducir un número de puerto entre 1024 y 65535",
|
|
55
|
+
"it": "Inserire un numero di porta da 1024 a 65535"
|
|
56
|
+
},
|
|
57
|
+
"ports.reserved": {
|
|
58
|
+
"en": "Port {port} is reserved by DSM",
|
|
59
|
+
"zh-TW": "連接埠 {port} 為 DSM 保留",
|
|
60
|
+
"zh-CN": "端口 {port} 为 DSM 保留",
|
|
61
|
+
"ja": "ポート {port} は DSM が予約しています",
|
|
62
|
+
"ko": "포트 {port}는 DSM에서 예약되어 있습니다",
|
|
63
|
+
"de": "Port {port} ist für DSM reserviert",
|
|
64
|
+
"fr": "Le port {port} est réservé par DSM",
|
|
65
|
+
"es": "El puerto {port} está reservado por DSM",
|
|
66
|
+
"it": "La porta {port} è riservata da DSM"
|
|
67
|
+
},
|
|
68
|
+
"ports.conflict": {
|
|
69
|
+
"en": "Port {port} is used or reserved by {service}",
|
|
70
|
+
"zh-TW": "連接埠 {port} 已由 {service} 使用或保留",
|
|
71
|
+
"zh-CN": "端口 {port} 已由 {service} 使用或保留",
|
|
72
|
+
"ja": "ポート {port} は {service} が使用または予約しています",
|
|
73
|
+
"ko": "포트 {port}는 {service}에서 사용 중이거나 예약되어 있습니다",
|
|
74
|
+
"de": "Port {port} wird von {service} verwendet oder reserviert",
|
|
75
|
+
"fr": "Le port {port} est utilisé ou réservé par {service}",
|
|
76
|
+
"es": "El puerto {port} está en uso o reservado por {service}",
|
|
77
|
+
"it": "La porta {port} è utilizzata o riservata da {service}"
|
|
78
|
+
},
|
|
79
|
+
"ports.duplicate": {
|
|
80
|
+
"en": "Port {port} is already selected in another field",
|
|
81
|
+
"zh-TW": "其他欄位已選用連接埠 {port}",
|
|
82
|
+
"zh-CN": "其他字段已选用端口 {port}",
|
|
83
|
+
"ja": "ポート {port} は別の項目で選択されています",
|
|
84
|
+
"ko": "포트 {port}는 다른 필드에서 이미 선택되었습니다",
|
|
85
|
+
"de": "Port {port} ist bereits in einem anderen Feld ausgewählt",
|
|
86
|
+
"fr": "Le port {port} est déjà sélectionné dans un autre champ",
|
|
87
|
+
"es": "El puerto {port} ya está seleccionado en otro campo",
|
|
88
|
+
"it": "La porta {port} è già selezionata in un altro campo"
|
|
89
|
+
},
|
|
90
|
+
"ports.notice": {
|
|
91
|
+
"en": "Port conflicts are warnings only; installation can continue, but the app may fail to start",
|
|
92
|
+
"zh-TW": "連接埠衝突僅顯示警告,仍可繼續安裝,但應用程式可能無法啟動",
|
|
93
|
+
"zh-CN": "端口冲突仅显示警告,仍可继续安装,但应用程序可能无法启动",
|
|
94
|
+
"ja": "ポートの競合は警告のみで、インストールは続行できますが、アプリが起動できない場合があります",
|
|
95
|
+
"ko": "포트 충돌은 경고만 표시하며 설치를 계속할 수 있지만 앱이 시작되지 않을 수 있습니다",
|
|
96
|
+
"de": "Portkonflikte werden nur als Warnung angezeigt; die Installation kann fortgesetzt werden, aber die App startet möglicherweise nicht",
|
|
97
|
+
"fr": "Les conflits de port sont de simples avertissements ; l’installation peut continuer, mais l’application risque de ne pas démarrer",
|
|
98
|
+
"es": "Los conflictos de puerto solo muestran una advertencia; la instalación puede continuar, pero la aplicación podría no iniciarse",
|
|
99
|
+
"it": "I conflitti di porta sono solo avvisi; l’installazione può continuare, ma l’app potrebbe non avviarsi"
|
|
56
100
|
},
|
|
57
101
|
"ports.originInvalid": {
|
|
58
102
|
"en": "Enter a root HTTPS origin using the HTTPS port selected in this wizard",
|
|
@@ -389,7 +389,7 @@ ${HOST_ADAPTER_RUNTIME}
|
|
|
389
389
|
return createHostAdapter;
|
|
390
390
|
})();
|
|
391
391
|
|
|
392
|
-
${
|
|
392
|
+
${renderWebApi(ns)}// A display hint for hiding or disabling administrator settings; the CGI
|
|
393
393
|
// decides access on its own and never trusts this value.
|
|
394
394
|
${ns}.sessionUser = function () {
|
|
395
395
|
var session = (SYNO.SDS && SYNO.SDS.Session) || {};
|
|
@@ -545,6 +545,7 @@ ${root ? root.mount : ""} ${ns}.loadApp(function (app, error) {
|
|
|
545
545
|
displayName: ${ns}.createI18n(lang, ${JSON.stringify(displayNameCatalogs(manifest))}).t("app_title"),
|
|
546
546
|
call: call,
|
|
547
547
|
batch: batch,
|
|
548
|
+
webApi: ${ns}.webApi(me),
|
|
548
549
|
files: {endpoint: ${JSON.stringify(cgiUrl(pkg))}, token: function () { return SYNO.SDS.Session && SYNO.SDS.Session.SynoToken; }},
|
|
549
550
|
reopen: me.reopenEvents.subscribe,
|
|
550
551
|
launchParams: me.launchParams,
|
|
@@ -5,13 +5,18 @@ export declare function portDefaults(m: Pick<StandaloneManifest, 'identityGatewa
|
|
|
5
5
|
protocol: 'tcp';
|
|
6
6
|
}>;
|
|
7
7
|
export declare function withPort(m: StandaloneManifest, key: string, value: number): StandaloneManifest;
|
|
8
|
-
|
|
8
|
+
interface PortMessages {
|
|
9
|
+
reserved: string;
|
|
10
|
+
conflict: string;
|
|
11
|
+
duplicate: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function portFieldValidator(pkg: string, key: string, reason: string, messages?: PortMessages): string;
|
|
9
14
|
export declare function portInstallSteps(m: Pick<StandaloneManifest, 'package' | 'installPorts' | 'identityGateway'>, definitions?: Record<string, {
|
|
10
15
|
default: number;
|
|
11
16
|
protocol: "tcp";
|
|
12
17
|
}>): (t: Translate) => {
|
|
13
18
|
step_title: string;
|
|
14
|
-
items: {
|
|
19
|
+
items: ({
|
|
15
20
|
type: string;
|
|
16
21
|
desc: string;
|
|
17
22
|
subitems: {
|
|
@@ -23,9 +28,12 @@ export declare function portInstallSteps(m: Pick<StandaloneManifest, 'package' |
|
|
|
23
28
|
fn: string;
|
|
24
29
|
};
|
|
25
30
|
}[];
|
|
26
|
-
}
|
|
31
|
+
} | {
|
|
32
|
+
desc: string;
|
|
33
|
+
})[];
|
|
27
34
|
}[];
|
|
28
35
|
/** Render each artifact with out-of-range marker ports. Only values derived
|
|
29
36
|
* from the selected listener change; an unrelated timer or numeric setting
|
|
30
37
|
* equal to a default port is preserved. Originals remain inspectable in SPK. */
|
|
31
38
|
export declare function writePortPayload(m: StandaloneManifest, root: string, render: (variant: StandaloneManifest) => Record<string, string>): void;
|
|
39
|
+
export {};
|
|
@@ -13,16 +13,37 @@ export function withPort(m, key, value) {
|
|
|
13
13
|
const g = m.identityGateway;
|
|
14
14
|
return { ...m, identityGateway: { ...g, listen: { ...g.listen, ...(key.startsWith('gateway_') ? { [key.slice(8)]: value } : {}) }, ...(g.oidc ? { oidc: { ...g.oidc, ...(key === 'oidc_issuer' ? { issuer_port: value } : {}) } } : {}) } };
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
/** Validate port syntax; service conflicts are advisory and never block Next. */
|
|
17
|
+
function validatePortField(value, pkg, key, reason, messages) {
|
|
17
18
|
const raw = String(value), n = Number(raw);
|
|
18
|
-
|
|
19
|
+
const globals = globalThis;
|
|
20
|
+
const state = globals['synopkglandPorts_' + pkg] || (globals['synopkglandPorts_' + pkg] = {});
|
|
21
|
+
const display = {
|
|
22
|
+
message(text, service = '') { return text.replace(/\{(port|service)\}/g, (_match, name) => name === 'port' ? raw : service); },
|
|
23
|
+
warning(text) {
|
|
24
|
+
const element = typeof document === 'undefined' ? null : document.getElementById('synopkgland-port-warning-' + pkg + '-' + key);
|
|
25
|
+
if (element) {
|
|
26
|
+
element.textContent = text ? '⚠ ' + text : '';
|
|
27
|
+
element.style.visibility = text ? 'visible' : 'hidden';
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
accept(warning = '') { state[key] = n; display.warning(warning); return true; },
|
|
31
|
+
};
|
|
32
|
+
display.warning('');
|
|
33
|
+
delete state[key];
|
|
34
|
+
if (!/^[1-9][0-9]{3,4}$/.test(raw) || n < 1024 || n > 65535)
|
|
19
35
|
return reason;
|
|
36
|
+
if ([1900, 5000, 5001, 5005, 5006, 5353, 6690].includes(n))
|
|
37
|
+
return display.accept(display.message(messages.reserved));
|
|
38
|
+
for (const other in state)
|
|
39
|
+
if (other !== key && state[other] === n)
|
|
40
|
+
return display.accept(display.message(messages.duplicate));
|
|
20
41
|
try {
|
|
21
42
|
let request = new XMLHttpRequest();
|
|
22
43
|
request.open('GET', '/webman/login.cgi?enable_syno_token=yes', false);
|
|
23
44
|
request.send();
|
|
24
45
|
const token = JSON.parse(request.responseText).SynoToken;
|
|
25
|
-
if (!token)
|
|
46
|
+
if (request.status !== 200 || !token)
|
|
26
47
|
throw new Error();
|
|
27
48
|
request = new XMLHttpRequest();
|
|
28
49
|
request.open('POST', '/webapi/entry.cgi', false);
|
|
@@ -30,43 +51,47 @@ function validatePortField(value, pkg, key, reason) {
|
|
|
30
51
|
request.setRequestHeader('X-SYNO-TOKEN', token);
|
|
31
52
|
request.send('api=SYNO.Core.Service.PortInfo&version=1&method=load');
|
|
32
53
|
const result = JSON.parse(request.responseText), rows = result.data?.port_info;
|
|
33
|
-
if (request.status !== 200 || result.success !== true || !Array.isArray(rows)
|
|
54
|
+
if (request.status !== 200 || result.success !== true || !Array.isArray(rows))
|
|
34
55
|
throw new Error();
|
|
35
56
|
for (const row of rows) {
|
|
36
|
-
if (typeof row.protocol !== 'string' || typeof row.port_id !== 'string' || !Array.isArray(row.dst_port)
|
|
37
|
-
|
|
57
|
+
if (!row || typeof row.protocol !== 'string' || typeof row.port_id !== 'string' || !Array.isArray(row.dst_port))
|
|
58
|
+
continue;
|
|
38
59
|
const protocol = row.protocol.toLowerCase().replace(/\s/g, '');
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
if (
|
|
60
|
+
if (protocol !== 'all' && !protocol.split(',').includes('tcp'))
|
|
61
|
+
continue;
|
|
62
|
+
if (row.port_id === 'synopkgland.' + pkg.replaceAll('_', '-') + '.' + key.replaceAll('_', '-'))
|
|
42
63
|
continue;
|
|
43
64
|
for (const item of row.dst_port) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
65
|
+
// DSM returns numeric single ports as well as strings and ranges.
|
|
66
|
+
if (typeof item !== 'string' && !(typeof item === 'number' && Number.isInteger(item)))
|
|
67
|
+
continue;
|
|
68
|
+
const range = /^([0-9]+)(?:[-:]([0-9]+))?$/.exec(String(item).trim());
|
|
47
69
|
if (!range || Number(range[1]) < 1 || Number(range[2] || range[1]) > 65535 || Number(range[1]) > Number(range[2] || range[1]))
|
|
48
|
-
|
|
49
|
-
if (n >= Number(range[1]) && n <= Number(range[2] || range[1])
|
|
50
|
-
return
|
|
70
|
+
continue;
|
|
71
|
+
if (n >= Number(range[1]) && n <= Number(range[2] || range[1]))
|
|
72
|
+
return display.accept(display.message(messages.conflict, typeof row.name === 'string' && row.name ? row.name : row.port_id));
|
|
51
73
|
}
|
|
52
74
|
}
|
|
53
|
-
const globals = globalThis;
|
|
54
|
-
const state = globals['synopkglandPorts_' + pkg] || (globals['synopkglandPorts_' + pkg] = {});
|
|
55
|
-
for (const other in state)
|
|
56
|
-
if (other !== key && state[other] === n)
|
|
57
|
-
return reason;
|
|
58
|
-
state[key] = n;
|
|
59
|
-
return true;
|
|
60
75
|
}
|
|
61
76
|
catch {
|
|
62
|
-
|
|
77
|
+
// An unavailable API cannot establish a conflict; runtime binding is final.
|
|
63
78
|
}
|
|
79
|
+
return display.accept();
|
|
64
80
|
}
|
|
65
|
-
export function portFieldValidator(pkg, key, reason) {
|
|
66
|
-
return `{return (${validatePortField.toString()})(arguments[0],${JSON.stringify(pkg)},${JSON.stringify(key)},${JSON.stringify(reason)})}`;
|
|
81
|
+
export function portFieldValidator(pkg, key, reason, messages = { reserved: reason, conflict: reason, duplicate: reason }) {
|
|
82
|
+
return `{return (${validatePortField.toString()})(arguments[0],${JSON.stringify(pkg)},${JSON.stringify(key)},${JSON.stringify(reason)},${JSON.stringify(messages)})}`;
|
|
67
83
|
}
|
|
68
84
|
export function portInstallSteps(m, definitions = portDefaults(m)) {
|
|
69
|
-
return (t) => m.installPorts ? [{
|
|
85
|
+
return (t) => m.installPorts ? [{
|
|
86
|
+
step_title: t('ports.title'),
|
|
87
|
+
items: [{ desc: t('ports.notice') }, ...Object.entries(definitions).flatMap(([key, p]) => {
|
|
88
|
+
const label = t(key === 'gateway_http' ? 'ports.http' : key === 'gateway_https' ? 'ports.https' : 'ports.signin');
|
|
89
|
+
return [
|
|
90
|
+
{ type: 'textfield', desc: label, subitems: [{ key: 'pkgwizard_port_' + key, desc: label, defaultValue: String(p.default), validator: { allowBlank: false, fn: portFieldValidator(m.package, key, t('ports.invalid'), { reserved: t('ports.reserved', { port: '{port}' }), conflict: t('ports.conflict', { port: '{port}', service: '{service}' }), duplicate: t('ports.duplicate', { port: '{port}' }) }) } }] },
|
|
91
|
+
{ desc: `<div id="synopkgland-port-warning-${m.package}-${key}" role="status" aria-live="polite" style="min-height:44px;visibility:hidden"></div>` },
|
|
92
|
+
];
|
|
93
|
+
})],
|
|
94
|
+
}] : [];
|
|
70
95
|
}
|
|
71
96
|
/** Render each artifact with out-of-range marker ports. Only values derived
|
|
72
97
|
* from the selected listener change; an unrelated timer or numeric setting
|
package/package.json
CHANGED
package/skills/SKILL.md
CHANGED
|
@@ -16,7 +16,7 @@ The CLI verifies bytes before packaging and never fetches a manifest at NAS runt
|
|
|
16
16
|
Unsupported formats require a CLI update; invalid manifests fail closed. Existing
|
|
17
17
|
SDK 0.26.0/0.27.0 use the frozen legacy inventory.
|
|
18
18
|
|
|
19
|
-
For Apps with data folders or gateway listeners, read [reference/install.md](reference/install.md). Default to an App-named dedicated DSM data share and installer-selected ports. Existing-folder access, port
|
|
19
|
+
For Apps with data folders or gateway listeners, read [reference/install.md](reference/install.md). Default to an App-named dedicated DSM data share and installer-selected ports. Existing-folder access, port number format/range and required HTTPS origins use localized wizard validation before Next; detected port conflicts are nonblocking inline warnings, and an unavailable DSM port inventory does not block installation; upgrades retain port selections.
|
|
20
20
|
|
|
21
21
|
All CLI NAS requests share one connection path. NAS certificates are accepted by default, including self-signed, wrong-name and expired certificates. A changed certificate warns once, updates its displayed SHA-256 and continues. `host add --strict-tls` stores strict verification; `--strict-tls` or `--ca <file>` on a command opts in for that command. Read [reference/host-install.md](reference/host-install.md) for host trust and error codes.
|
|
22
22
|
|
|
@@ -123,6 +123,14 @@ Never install, uninstall, publish or modify NAS data without task authorization.
|
|
|
123
123
|
|
|
124
124
|
Native projects use schema 2 capabilities and `--with files,jobs,login,root-ops,delegate`; use `add` for existing projects. Prefer `check --json`, `build --json`, `inspect <spk> --json`, `deploy --dry-run --json`, and `status --host <profile> --json` for structured results. Read the conflict policy in reference/create.md before adding overlays.
|
|
125
125
|
|
|
126
|
+
Every generated DSM window exposes `ctx.webApi(api, method, version, params)`
|
|
127
|
+
in the signed-in user's own DSM session. It resolves DSM data and rejects
|
|
128
|
+
refusals as `{code: "dsm_<n>"}`. Use this channel for DSM JSON calls instead of
|
|
129
|
+
building SynoToken fetches; it applies to all backend languages and needs no
|
|
130
|
+
portal or executor capability. Prefer SDK helpers such as `readDsmPorts(ctx)`
|
|
131
|
+
where available. The SDK field remains optional for standalone dev servers,
|
|
132
|
+
custom hosts and older generated windows; DSM still enforces user permissions.
|
|
133
|
+
|
|
126
134
|
For DSM Package Center dependencies independent of the App language, declare
|
|
127
135
|
`dependencies: {packages: [{name: Node.js_v22, min_version: "22.19.0"}]}` in
|
|
128
136
|
`dsm-package.yaml`; `min_version` is optional. Names are 1-64 ASCII letters,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Native installation settings
|
|
2
2
|
|
|
3
|
-
Use CLI 0.47.
|
|
3
|
+
Use CLI 0.47.3 with the existing supported SDK/App and templates pins. Configure installation through the manifest and generated wizard; do not add App ACL writers, root hooks or independent port state.
|
|
4
4
|
|
|
5
5
|
```yaml
|
|
6
6
|
install:
|
|
@@ -21,7 +21,7 @@ The upgrade wizard prefills and submits the recorded folder without a separate c
|
|
|
21
21
|
|
|
22
22
|
Uninstall retains the share, files and package account's ACL because DSM data-share Release does nothing. Old selected shares can retain that ACL too. To revoke it, an administrator opens Control Panel > Shared Folder > the folder > Edit > Permissions > System internal user, clears the package account's Read only/Read/Write permission and saves, preserving other rows and data. See [shared-folder behavior](../../docs/shared-folders.md).
|
|
23
23
|
|
|
24
|
-
Port fields default to declared gateway HTTP/HTTPS and local OIDC listener ports. Validation refuses noncanonical numbers
|
|
24
|
+
Port fields default to declared gateway HTTP/HTTPS and local OIDC listener ports. Validation refuses noncanonical numbers and values outside 1024–65535. Reserved DSM/discovery ports, duplicate selections and conflicts from DSM's `SYNO.Core.Service.PortInfo` inventory produce inline warnings; Next remains available. The inventory is advisory: API, permission or parsing failures do not block Next, and an unsupported row does not hide a later confirmed conflict. DSM's all-protocol entries cover TCP too; numeric ports and string ranges are accepted. The package-account controller repeats the native service conflict check and materializes gateway, nginx, launcher, daemon and `.sc` port-config data from the selected values. A real conflict can still prevent the App from starting.
|
|
25
25
|
|
|
26
26
|
Native subprocesses and Compose `.env` receive `SYNOPKGLAND_PORT_GATEWAY_HTTP`, `SYNOPKGLAND_PORT_GATEWAY_HTTPS` and, when declared, `SYNOPKGLAND_PORT_OIDC_ISSUER`. Go Apps can read `installsettings.PortValues(payloadRoot)`. Bind upstream public-port configuration declaratively:
|
|
27
27
|
|