@synopackageland/cli 0.24.1 → 0.25.1
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 +13 -0
- package/README.md +10 -0
- package/dist/build-spk/ui-texts.d.ts +14 -2
- package/dist/build-spk/ui-texts.js +16 -4
- package/dist/contract/app-launch.d.ts +4 -1
- package/dist/contract/app-launch.js +2 -1
- package/dist/error-registry.js +35 -0
- package/dist/runtime/executor-digests.json +1 -12
- package/dist/runtime/sdk-source.js +1 -1
- package/dist/standalone/daemon-ingress.d.ts +21 -0
- package/dist/standalone/daemon-ingress.js +61 -0
- package/dist/standalone/daemon.d.ts +26 -0
- package/dist/standalone/daemon.js +87 -4
- package/dist/standalone/dsm-window.d.ts +6 -1
- package/dist/standalone/dsm-window.js +58 -10
- package/dist/standalone/inspect-spk.js +103 -16
- package/dist/standalone/lifecycle.d.ts +3 -0
- package/dist/standalone/lifecycle.js +35 -10
- package/dist/standalone/manifest.d.ts +9 -0
- package/dist/standalone/manifest.js +36 -0
- package/dist/standalone/resource.d.ts +4 -0
- package/dist/standalone/resource.js +5 -1
- package/dist/standalone/spk.d.ts +5 -0
- package/dist/standalone/spk.js +25 -5
- package/package.json +2 -2
- package/skills/SKILL.md +21 -0
- package/skills/reference/portal.md +9 -0
- package/skills/reference/ui-json.md +29 -0
- package/skills/reference/ui-vue.md +41 -0
- package/skills/reference/upstream-fork.md +5 -0
package/skills/SKILL.md
CHANGED
|
@@ -27,6 +27,18 @@ Read [reference/ui-vue.md](reference/ui-vue.md) when editing Vue components in t
|
|
|
27
27
|
|
|
28
28
|
Read [reference/ui-json.md](reference/ui-json.md) when generating or editing JSON UI; discover the installed catalog, validate the spec, then render and fix layout issues.
|
|
29
29
|
|
|
30
|
+
## UI copywriting
|
|
31
|
+
|
|
32
|
+
For UI/locale strings we author in the SDK, UI package, templates and our own
|
|
33
|
+
Apps, remove the final sentence-ending period in every language, even from
|
|
34
|
+
multi-sentence text; keep periods between sentences. Preserve question marks,
|
|
35
|
+
exclamation marks, ellipses, abbreviations, version numbers, URLs and trailing
|
|
36
|
+
`{key}` placeholders. In upstream forks, apply this only to UI copy we add under
|
|
37
|
+
`synology/` (such as DSM install wizards and gateway pages); leave upstream
|
|
38
|
+
UI/locale strings and release notes unchanged. See
|
|
39
|
+
[Vue copy and i18n](reference/ui-vue.md#ui-copy-and-i18n) and
|
|
40
|
+
[JSON copy and i18n](reference/ui-json.md#ui-copy-and-i18n) for examples.
|
|
41
|
+
|
|
30
42
|
For UI discovery, run `npx --no syno-pkg-land-ui catalog --json` and
|
|
31
43
|
`npx --no syno-pkg-land-ui describe Button --json` from the installed frontend.
|
|
32
44
|
Read its prompt and exported Vue docs/types before choosing component APIs.
|
|
@@ -155,6 +167,15 @@ Application Portal 是獨立 opt-in:不想要別名就省略 `portal`,不生
|
|
|
155
167
|
`defaultAlias`、Portal 面板/capability 或 Web Station alias;沒有 Portal
|
|
156
168
|
不是 inspect/info/doctor 問題。明確啟用 `portal` 時才將其 alias 作為 `defaultAlias`。
|
|
157
169
|
|
|
170
|
+
宣告 `console` 的 App 在主選單有兩個圖示,適用於包裝開源專案、又有額外整合操作的 App。
|
|
171
|
+
原生圖示叫 `displayname`,是 `type: "url"`,經 `sso/open.cgi` 在新分頁開原生 UI。
|
|
172
|
+
主控台預設叫「<displayname> for DSM」,是只給管理員的 `type: "app"` DSM 視窗,掛載 `ui.dir` 的 SDK UI。
|
|
173
|
+
套件中心「開啟」(INFO `dsmapplaunchname`)開主控台;Application Privileges 只列出原生圖示。
|
|
174
|
+
`console: {}` 用預設名稱,`console: { title: "<名稱>" }` 覆寫所有語系。
|
|
175
|
+
省略 `console` 維持單一圖示。`console` 必須搭配 `identity_gateway` 與 SDK UI;
|
|
176
|
+
compose App、沒有 gateway 的 App、`ui.launch` 或 `portal` 都會被 check 拒絕。
|
|
177
|
+
冷登入由 url 圖示經 `open.cgi` 續接,`oidc.browser` 需要支援此續接的 SDK。
|
|
178
|
+
|
|
158
179
|
Schema 2 Compose 使用 `dsm-package.yaml` 的 `compose.files`、`compose.web` 與
|
|
159
180
|
`identity_gateway`;不使用 file/targets/address_env 或手寫 upstream。
|
|
160
181
|
省略 `ui.launch` 時預設 `new-page`,使用 SDK standalone launcher,不帶 Application Portal。
|
|
@@ -57,6 +57,15 @@ Application Portal 是獨立 opt-in:不想要別名就省略 `portal`,不生
|
|
|
57
57
|
`defaultAlias`、Portal 面板/capability 或 Web Station alias;沒有 Portal
|
|
58
58
|
不是 inspect/info/doctor 問題。明確啟用 `portal` 時才將其 alias 作為 `defaultAlias`。
|
|
59
59
|
|
|
60
|
+
宣告 `console` 的 App 在主選單有兩個圖示,適用於包裝開源專案、又有額外整合操作的 App。
|
|
61
|
+
原生圖示叫 `displayname`,是 `type: "url"`,經 `sso/open.cgi` 在新分頁開原生 UI。
|
|
62
|
+
主控台預設叫「<displayname> for DSM」,是只給管理員的 `type: "app"` DSM 視窗,掛載 `ui.dir` 的 SDK UI。
|
|
63
|
+
套件中心「開啟」(INFO `dsmapplaunchname`)開主控台;Application Privileges 只列出原生圖示。
|
|
64
|
+
`console: {}` 用預設名稱,`console: { title: "<名稱>" }` 覆寫所有語系。
|
|
65
|
+
省略 `console` 維持單一圖示。`console` 必須搭配 `identity_gateway` 與 SDK UI;
|
|
66
|
+
compose App、沒有 gateway 的 App、`ui.launch` 或 `portal` 都會被 check 拒絕。
|
|
67
|
+
冷登入由 url 圖示經 `open.cgi` 續接,`oidc.browser` 需要支援此續接的 SDK。
|
|
68
|
+
|
|
60
69
|
Docker/web service App 設定 `integration.web.launch`,內建預設是 `new-page`;
|
|
61
70
|
省略開啟方式時直接開新分頁,不宣告 Application Portal。SDK 原生 App
|
|
62
71
|
省略時使用 `dsm-window`;非 UI SDK 原生 App 必須明確寫 `ui.launch: new-page`。
|
|
@@ -25,6 +25,35 @@ every state path you bind. Use only catalog components and real app-owned action
|
|
|
25
25
|
computed functions and message keys. Keep NAS pickers, native DSM bridges,
|
|
26
26
|
authorization, polling and domain-specific views in Vue/TypeScript extensions.
|
|
27
27
|
|
|
28
|
+
## UI copy and i18n
|
|
29
|
+
|
|
30
|
+
Use the same [UI copy rule as Vue](ui-vue.md#ui-copy-and-i18n) for literal
|
|
31
|
+
display text in JSON specs and the locale catalogs behind message keys. It
|
|
32
|
+
applies to copy we author in the SDK, UI package, templates and our own Apps.
|
|
33
|
+
In upstream forks, only our added UI copy under `synology/` (for example DSM
|
|
34
|
+
install wizards and gateway pages) is in scope. Leave upstream UI/locale
|
|
35
|
+
strings and release notes unchanged; any future checker must exclude upstream
|
|
36
|
+
source and scan only our owned files.
|
|
37
|
+
|
|
38
|
+
In every language, remove the final sentence-ending period (`.`, `。`, `.`),
|
|
39
|
+
even when the string contains multiple sentences. Preserve periods between
|
|
40
|
+
sentences. Keep question marks, exclamation marks, ellipses (`…`, `...`),
|
|
41
|
+
abbreviations such as `etc.`, version numbers, URLs and trailing `{key}`
|
|
42
|
+
placeholders intact. Apply the rule to each translation and plural form, not
|
|
43
|
+
to message keys, action names, URLs or other non-display spec data.
|
|
44
|
+
|
|
45
|
+
| Avoid (message value) | Use (message value) |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `"Saved."` | `"Saved"` |
|
|
48
|
+
| `"Try again. Contact support if it still fails."` | `"Try again. Contact support if it still fails"` |
|
|
49
|
+
| `"請稍後再開。若一直打不開,請聯絡送審的人。"` | `"請稍後再開。若一直打不開,請聯絡送審的人"` |
|
|
50
|
+
| `"保存しました。"` | `"保存しました"` |
|
|
51
|
+
|
|
52
|
+
Keep `"Continue?"`, `"Done!"`, `"Loading…"`, `"Loading..."`, `"Images, etc."`,
|
|
53
|
+
`"Version {version}"`, `"https://example.com"` and `"Saved to {folder}"` unchanged.
|
|
54
|
+
Use a script for bulk corrections rather than editing entries one by one.
|
|
55
|
+
This is authoring guidance; it does not add validation to the commands below.
|
|
56
|
+
|
|
28
57
|
## Validate, fix, render
|
|
29
58
|
|
|
30
59
|
After saving the generated spec as `ui.json`, run:
|
|
@@ -73,6 +73,38 @@ the first screen waits for the startup chain, not the bundle:
|
|
|
73
73
|
- Start polling on its schedule; do not repeat at mount a read startup just
|
|
74
74
|
made. Delay background sampling that the first screen does not need.
|
|
75
75
|
|
|
76
|
+
## UI copy and i18n
|
|
77
|
+
|
|
78
|
+
Apply this rule to UI strings we author in the SDK, UI package, templates and
|
|
79
|
+
our own Apps, whether in locale catalogs or inline Vue/TypeScript copy: buttons,
|
|
80
|
+
titles, labels, field descriptions, hints, toasts and error messages. In an
|
|
81
|
+
upstream fork, apply it only to our added UI copy under `synology/`, including
|
|
82
|
+
DSM install wizards and gateway pages. Never rewrite upstream UI/locale strings
|
|
83
|
+
to match this style; preserve them for future upstream merges. Release notes
|
|
84
|
+
are outside this UI-copy rule.
|
|
85
|
+
|
|
86
|
+
Remove only the final sentence-ending period, including `.` and fullwidth
|
|
87
|
+
periods such as `。` and `.`, in every language. This applies to both single-
|
|
88
|
+
and multi-sentence strings. Keep sentence-separating periods inside the string.
|
|
89
|
+
Preserve question marks (`?`, `?`), exclamation marks (`!`, `!`), ellipses
|
|
90
|
+
(`…`, `...`), abbreviations such as `etc.`, version numbers, URLs and trailing
|
|
91
|
+
`{key}` placeholders; do not trim dots indiscriminately or alter substituted
|
|
92
|
+
values.
|
|
93
|
+
|
|
94
|
+
| Avoid | Use |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| `Save.` | `Save` |
|
|
97
|
+
| `Try again later. If it still fails, contact support.` | `Try again later. If it still fails, contact support` |
|
|
98
|
+
| `請稍後再開。若一直打不開,請聯絡送審的人。` | `請稍後再開。若一直打不開,請聯絡送審的人` |
|
|
99
|
+
| `設定を保存しました。` | `設定を保存しました` |
|
|
100
|
+
|
|
101
|
+
Keep these unchanged: `Continue?`, `Done!`, `Loading…`, `Loading...`,
|
|
102
|
+
`Images, videos, etc.`, `Version {version}`, `https://example.com` and
|
|
103
|
+
`Saved to {folder}`. Preserve internal punctuation in every translation and
|
|
104
|
+
plural form. For bulk copy corrections, use a script rather than editing each
|
|
105
|
+
entry by hand. Any future punctuation checker must scan only our owned files,
|
|
106
|
+
excluding upstream source; this guidance does not add a CLI check or gate.
|
|
107
|
+
|
|
76
108
|
## Verify the actual Vue app
|
|
77
109
|
|
|
78
110
|
From `frontend`, run:
|
|
@@ -124,6 +156,15 @@ Application Portal 是獨立 opt-in:不想要別名就省略 `portal`,不生
|
|
|
124
156
|
`defaultAlias`、Portal 面板/capability 或 Web Station alias;沒有 Portal
|
|
125
157
|
不是 inspect/info/doctor 問題。明確啟用 `portal` 時才將其 alias 作為 `defaultAlias`。
|
|
126
158
|
|
|
159
|
+
宣告 `console` 的 App 在主選單有兩個圖示,適用於包裝開源專案、又有額外整合操作的 App。
|
|
160
|
+
原生圖示叫 `displayname`,是 `type: "url"`,經 `sso/open.cgi` 在新分頁開原生 UI。
|
|
161
|
+
主控台預設叫「<displayname> for DSM」,是只給管理員的 `type: "app"` DSM 視窗,掛載 `ui.dir` 的 SDK UI。
|
|
162
|
+
套件中心「開啟」(INFO `dsmapplaunchname`)開主控台;Application Privileges 只列出原生圖示。
|
|
163
|
+
`console: {}` 用預設名稱,`console: { title: "<名稱>" }` 覆寫所有語系。
|
|
164
|
+
省略 `console` 維持單一圖示。`console` 必須搭配 `identity_gateway` 與 SDK UI;
|
|
165
|
+
compose App、沒有 gateway 的 App、`ui.launch` 或 `portal` 都會被 check 拒絕。
|
|
166
|
+
冷登入由 url 圖示經 `open.cgi` 續接,`oidc.browser` 需要支援此續接的 SDK。
|
|
167
|
+
|
|
127
168
|
Docker/web service App 設定 `integration.web.launch`,內建預設是 `new-page`;
|
|
128
169
|
省略開啟方式時直接開新分頁,不宣告 Application Portal。SDK 原生 App
|
|
129
170
|
省略時使用 `dsm-window`;非 UI SDK 原生 App 必須明確寫 `ui.launch: new-page`。
|
|
@@ -6,6 +6,11 @@ Never edit upstream README, Dockerfile, source, config, workflows or ignore file
|
|
|
6
6
|
Do not rewrite the App or treat it as an SDK component. Use `.git/info/exclude`
|
|
7
7
|
for local output when needed.
|
|
8
8
|
|
|
9
|
+
Apply the [UI copy rule](ui-vue.md#ui-copy-and-i18n) only to UI strings we add
|
|
10
|
+
under `synology/`, such as DSM install wizards and gateway pages; leave upstream
|
|
11
|
+
UI/locale strings and release notes unchanged, and exclude upstream source from
|
|
12
|
+
any future punctuation checker.
|
|
13
|
+
|
|
9
14
|
## Decide whether to expose AI control
|
|
10
15
|
|
|
11
16
|
Ask whether the user needs AI control unless they have already explicitly requested it.
|