@synopackageland/templates 0.13.1 → 0.14.0
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/README.md +34 -2
- package/package.json +1 -1
- package/templates/_shared/AGENTS.md +32 -0
- package/templates/binary/dsm-package.yaml +1 -1
- package/templates/compose/synology-app.yaml +6 -0
- package/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +1 -1
- package/templates/native-go/backend/go.mod +1 -1
- package/templates/native-go/backend/go.sum +2 -2
- package/templates/native-go/dsm-package.yaml +2 -0
- package/templates/native-go-vue/frontend/package-lock.json +7 -7
- package/templates/native-go-vue/frontend/package.json +2 -2
- package/templates/native-node/dsm-package.yaml +3 -1
- package/templates/native-python/dsm-package.yaml +3 -1
- package/templates/native-rust/backend/Cargo.lock +2 -2
- package/templates/native-rust/backend/Cargo.toml +1 -1
- package/templates/native-rust/dsm-package.yaml +2 -0
package/README.md
CHANGED
|
@@ -38,11 +38,11 @@ calls each one from the generated script of the same name (`synopkgland skill sh
|
|
|
38
38
|
The placeholders `__PACKAGE__` (also the Go module path), `__DISPLAY_NAME__` and
|
|
39
39
|
`__BACKGROUND_ENABLED__` are substituted by `init`.
|
|
40
40
|
|
|
41
|
-
`backend/go.mod` requires `github.com/synopackageland/syno-pkg-land-sdk v0.
|
|
41
|
+
`backend/go.mod` requires `github.com/synopackageland/syno-pkg-land-sdk v0.14.0`; that line is
|
|
42
42
|
the single source of the SDK version and `frontend/package.json` pins
|
|
43
43
|
`@synopackageland/sdk` to the same version. Python and Node.js name it in
|
|
44
44
|
`backend.sdk`, Rust in the `syno-pkg-land-app` tag of `backend/Cargo.toml`
|
|
45
|
-
(and `Cargo.lock`); all of them pin 0.
|
|
45
|
+
(and `Cargo.lock`); all of them pin 0.14.0. The Vue frontend pins
|
|
46
46
|
`@synopackageland/ui` 0.11.0.
|
|
47
47
|
|
|
48
48
|
## Notice writer
|
|
@@ -106,3 +106,35 @@ SDK usage, protocol and API documentation: <https://github.com/synopackageland/s
|
|
|
106
106
|
|
|
107
107
|
MIT, see [LICENSE](LICENSE). Generated projects receive
|
|
108
108
|
`templates/_shared/LICENSES/TEMPLATE.txt`.
|
|
109
|
+
|
|
110
|
+
## App launch mode
|
|
111
|
+
|
|
112
|
+
Native Apps declare `ui.launch: dsm-window | new-page` in `dsm-package.yaml`.
|
|
113
|
+
Use `dsm-window` for frontends built with `@synopackageland/ui`; use `new-page`
|
|
114
|
+
for every other frontend. Plain/binary scaffolds explicitly choose new-page; Vue uses the native default. An omitted
|
|
115
|
+
native `ui.launch` resolves to `dsm-window`; the CLI does not guess a frontend's
|
|
116
|
+
framework from its build command. `new-page` registers DSM `type: "standalone"`,
|
|
117
|
+
so the main menu and Package Center open a full page on the DSM origin.
|
|
118
|
+
`ctx.fullPage`, `ctx.appIcon`, session/SynoToken, launch parameters and entry
|
|
119
|
+
permissions use the same wrapper in both modes. The wrapper sets the standalone
|
|
120
|
+
page title, favicon and device-width viewport. It retains ExtJS; `pureEnv` is
|
|
121
|
+
not appropriate, and alternate Portal ports are not needed (`allowAltPort` is omitted).
|
|
122
|
+
|
|
123
|
+
A full page does not need Application Portal. Omit `portal` unless an alias is
|
|
124
|
+
explicitly wanted; only that opt-in adds `defaultAlias`, login styling, Portal
|
|
125
|
+
panels and capabilities. No Portal is a healthy default for inspect/info/doctor.
|
|
126
|
+
|
|
127
|
+
Web service Apps declare `integration.web.launch`; its built-in default is `new-page`.
|
|
128
|
+
Native SDK Apps default to `dsm-window`; non-UI-SDK native frontends must
|
|
129
|
+
explicitly set `ui.launch: new-page`. Headless Compose Apps have no launcher.
|
|
130
|
+
The new-page main menu uses `type: "standalone"` with an explicit `url` at the existing trusted entry: the authenticated
|
|
131
|
+
gateway, or a Web Station alias only with explicit `access: public`. DSM WindowLauncher opens that explicit URL directly; a web service does not
|
|
132
|
+
need an AppInstance/AppWindow JS class.
|
|
133
|
+
Authenticated web Apps do not create a Web Station alias or Application Portal.
|
|
134
|
+
`dsm-window` remains an explicit web launch option with its URL launcher.
|
|
135
|
+
|
|
136
|
+
Schema 2 `dsm-package.yaml` with `identity_gateway` and `compose` is also a web
|
|
137
|
+
service: omitted `ui.launch` resolves to `new-page`, without Application Portal.
|
|
138
|
+
Both Compose routes share `contract/app-launch.ts` for defaults and launcher types.
|
|
139
|
+
An explicit `ui.launch` overrides this default. Native SDK Apps without a web
|
|
140
|
+
service keep `dsm-window` when `ui.launch` is absent.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/templates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Project templates for synopkgland init: native-go, native-python, native-node and native-rust (plain or Vue, with jobs, delegate and root-ops overlays), binary and compose.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {"type": "git", "url": "git+https://github.com/synopackageland/syno-pkg-land-templates.git"},
|
|
@@ -310,3 +310,35 @@ their capabilities with `synopkgland init --with`.
|
|
|
310
310
|
`cargo clippy --locked --all-targets -- -D warnings` and `cargo fmt --check`;
|
|
311
311
|
`test_support::call` plays the runtime. `rust-toolchain.toml` pins the
|
|
312
312
|
toolchain and the DSM targets; keep `Cargo.lock` committed.
|
|
313
|
+
|
|
314
|
+
## App launch mode
|
|
315
|
+
|
|
316
|
+
Native Apps declare `ui.launch: dsm-window | new-page` in `dsm-package.yaml`.
|
|
317
|
+
Use `dsm-window` for frontends built with `@synopackageland/ui`; use `new-page`
|
|
318
|
+
for every other frontend. Plain/binary scaffolds explicitly choose new-page; Vue uses the native default. An omitted
|
|
319
|
+
native `ui.launch` resolves to `dsm-window`; the CLI does not guess a frontend's
|
|
320
|
+
framework from its build command. `new-page` registers DSM `type: "standalone"`,
|
|
321
|
+
so the main menu and Package Center open a full page on the DSM origin.
|
|
322
|
+
`ctx.fullPage`, `ctx.appIcon`, session/SynoToken, launch parameters and entry
|
|
323
|
+
permissions use the same wrapper in both modes. The wrapper sets the standalone
|
|
324
|
+
page title, favicon and device-width viewport. It retains ExtJS; `pureEnv` is
|
|
325
|
+
not appropriate, and alternate Portal ports are not needed (`allowAltPort` is omitted).
|
|
326
|
+
|
|
327
|
+
A full page does not need Application Portal. Omit `portal` unless an alias is
|
|
328
|
+
explicitly wanted; only that opt-in adds `defaultAlias`, login styling, Portal
|
|
329
|
+
panels and capabilities. No Portal is a healthy default for inspect/info/doctor.
|
|
330
|
+
|
|
331
|
+
Web service Apps declare `integration.web.launch`; its built-in default is `new-page`.
|
|
332
|
+
Native SDK Apps default to `dsm-window`; non-UI-SDK native frontends must
|
|
333
|
+
explicitly set `ui.launch: new-page`. Headless Compose Apps have no launcher.
|
|
334
|
+
The new-page main menu uses `type: "standalone"` with an explicit `url` at the existing trusted entry: the authenticated
|
|
335
|
+
gateway, or a Web Station alias only with explicit `access: public`. DSM WindowLauncher opens that explicit URL directly; a web service does not
|
|
336
|
+
need an AppInstance/AppWindow JS class.
|
|
337
|
+
Authenticated web Apps do not create a Web Station alias or Application Portal.
|
|
338
|
+
`dsm-window` remains an explicit web launch option with its URL launcher.
|
|
339
|
+
|
|
340
|
+
Schema 2 `dsm-package.yaml` with `identity_gateway` and `compose` is also a web
|
|
341
|
+
service: omitted `ui.launch` resolves to `new-page`, without Application Portal.
|
|
342
|
+
Both Compose routes share `contract/app-launch.ts` for defaults and launcher types.
|
|
343
|
+
An explicit `ui.launch` overrides this default. Native SDK Apps without a web
|
|
344
|
+
service keep `dsm-window` when `ui.launch` is absent.
|
|
@@ -36,7 +36,7 @@ backend:
|
|
|
36
36
|
files:
|
|
37
37
|
x86_64: prebuilt/api-x86_64
|
|
38
38
|
aarch64: prebuilt/api-aarch64
|
|
39
|
-
ui: {dir: ui}
|
|
39
|
+
ui: {dir: ui, launch: new-page}
|
|
40
40
|
# UI languages: i18n/messages/<locale>.json for en, zh-TW, zh-CN, ja, ko, de,
|
|
41
41
|
# fr, es and it (DSM's other languages fall back to English); ctx.t(key) reads them.
|
|
42
42
|
i18n:
|
|
@@ -14,3 +14,9 @@ install:
|
|
|
14
14
|
type: shared_folder
|
|
15
15
|
RUN_AS:
|
|
16
16
|
type: dsm_user
|
|
17
|
+
|
|
18
|
+
# For a web frontend, declare adminport/adminurl and explicitly choose:
|
|
19
|
+
# integration:
|
|
20
|
+
# web:
|
|
21
|
+
# launch: new-page
|
|
22
|
+
# No Application Portal declaration is needed. Omitted web launch means new-page.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
github.com/synopackageland/syno-pkg-land-sdk v0.
|
|
2
|
-
github.com/synopackageland/syno-pkg-land-sdk v0.
|
|
1
|
+
github.com/synopackageland/syno-pkg-land-sdk v0.14.0 h1:xPsMRsmqtzFT+XWHe8esk1yHMAOztKbaPkCGr2I2DqI=
|
|
2
|
+
github.com/synopackageland/syno-pkg-land-sdk v0.14.0/go.mod h1:hlsvaVuH2wsAoR8jzI1Rg/NeejQSFpAaN6zpIWsVbjI=
|
|
3
3
|
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
|
|
4
4
|
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
|
@@ -44,6 +44,8 @@ backend:
|
|
|
44
44
|
main: ./cmd/app
|
|
45
45
|
|
|
46
46
|
ui:
|
|
47
|
+
# Non-UI-SDK frontends open a full page; Portal is a separate opt-in.
|
|
48
|
+
launch: new-page
|
|
47
49
|
# Static files served at /webman/3rdparty/<package>/app/. app.js and app.css
|
|
48
50
|
# are required; anything else (images, chunks) is copied as is.
|
|
49
51
|
dir: ui
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"name": "native-dsm-vue-app",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@lucide/vue": "1.48.0",
|
|
10
|
-
"@synopackageland/sdk": "0.
|
|
11
|
-
"@synopackageland/ui": "0.11.
|
|
10
|
+
"@synopackageland/sdk": "0.14.0",
|
|
11
|
+
"@synopackageland/ui": "0.11.4",
|
|
12
12
|
"vue": "3.5.43"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
@@ -1148,8 +1148,8 @@
|
|
|
1148
1148
|
}
|
|
1149
1149
|
},
|
|
1150
1150
|
"node_modules/@synopackageland/sdk": {
|
|
1151
|
-
"version": "0.
|
|
1152
|
-
"resolved": "https://registry.npmjs.org/@synopackageland/sdk/-/sdk-0.
|
|
1151
|
+
"version": "0.14.0",
|
|
1152
|
+
"resolved": "https://registry.npmjs.org/@synopackageland/sdk/-/sdk-0.14.0.tgz",
|
|
1153
1153
|
"integrity": "sha512-Uw7T2jMXTb7SQogej2GjVeCQC4baoneoDolt5cjxl+Buqjw5a+Sd4/8FpLTMTdIzKZSwJYTVVegagTXBh1r30Q==",
|
|
1154
1154
|
"license": "MIT",
|
|
1155
1155
|
"peerDependencies": {
|
|
@@ -1167,9 +1167,9 @@
|
|
|
1167
1167
|
}
|
|
1168
1168
|
},
|
|
1169
1169
|
"node_modules/@synopackageland/ui": {
|
|
1170
|
-
"version": "0.11.
|
|
1171
|
-
"resolved": "https://registry.npmjs.org/@synopackageland/ui/-/ui-0.11.
|
|
1172
|
-
"integrity": "sha512-
|
|
1170
|
+
"version": "0.11.4",
|
|
1171
|
+
"resolved": "https://registry.npmjs.org/@synopackageland/ui/-/ui-0.11.4.tgz",
|
|
1172
|
+
"integrity": "sha512-UODxAk0tL79e8tZbNALyjsLEWF9Rf0VgVllOgdUimAYy/xQwFSUKAXIL9KcVVsyXmElHV5NcgRYGLu/C2ggRzg==",
|
|
1173
1173
|
"license": "MIT",
|
|
1174
1174
|
"dependencies": {
|
|
1175
1175
|
"@internationalized/date": "3.12.4",
|
|
@@ -49,10 +49,12 @@ backend:
|
|
|
49
49
|
runtime: node
|
|
50
50
|
dir: backend/app
|
|
51
51
|
entry: main.js
|
|
52
|
-
sdk: 0.
|
|
52
|
+
sdk: 0.14.0
|
|
53
53
|
node: { package: Node.js_v20 }
|
|
54
54
|
|
|
55
55
|
ui:
|
|
56
|
+
# Non-UI-SDK frontends open a full page; Portal is a separate opt-in.
|
|
57
|
+
launch: new-page
|
|
56
58
|
# Static files served at /webman/3rdparty/<package>/app/. app.js and app.css
|
|
57
59
|
# are required; anything else (images, chunks) is copied as is.
|
|
58
60
|
dir: ui
|
|
@@ -47,9 +47,11 @@ backend:
|
|
|
47
47
|
runtime: python
|
|
48
48
|
dir: backend/app
|
|
49
49
|
entry: main.py
|
|
50
|
-
sdk: 0.
|
|
50
|
+
sdk: 0.14.0
|
|
51
51
|
|
|
52
52
|
ui:
|
|
53
|
+
# Non-UI-SDK frontends open a full page; Portal is a separate opt-in.
|
|
54
|
+
launch: new-page
|
|
53
55
|
# Static files served at /webman/3rdparty/<package>/app/. app.js and app.css
|
|
54
56
|
# are required; anything else (images, chunks) is copied as is.
|
|
55
57
|
dir: ui
|
|
@@ -104,8 +104,8 @@ dependencies = [
|
|
|
104
104
|
|
|
105
105
|
[[package]]
|
|
106
106
|
name = "syno-pkg-land-app"
|
|
107
|
-
version = "0.
|
|
108
|
-
source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.
|
|
107
|
+
version = "0.14.0"
|
|
108
|
+
source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.14.0#2f31d2af7eebc8efb97e628cf30e8993d19e1d67"
|
|
109
109
|
dependencies = [
|
|
110
110
|
"libc",
|
|
111
111
|
"serde",
|
|
@@ -9,7 +9,7 @@ libc = "0.2"
|
|
|
9
9
|
serde = { version = "1", features = ["derive"] }
|
|
10
10
|
serde_json = "1"
|
|
11
11
|
# The SDK version is the tag; `synopkgland check` reads it from Cargo.lock.
|
|
12
|
-
syno-pkg-land-app = { git = "https://github.com/synopackageland/syno-pkg-land-sdk", tag = "v0.
|
|
12
|
+
syno-pkg-land-app = { git = "https://github.com/synopackageland/syno-pkg-land-sdk", tag = "v0.14.0" }
|
|
13
13
|
|
|
14
14
|
[profile.release]
|
|
15
15
|
# A handler panic becomes an "internal" reply; abort would end the App without one.
|
|
@@ -51,6 +51,8 @@ backend:
|
|
|
51
51
|
methods: [app.status, greeting.get, greeting.set]
|
|
52
52
|
|
|
53
53
|
ui:
|
|
54
|
+
# Non-UI-SDK frontends open a full page; Portal is a separate opt-in.
|
|
55
|
+
launch: new-page
|
|
54
56
|
# Static files served at /webman/3rdparty/<package>/app/. app.js and app.css
|
|
55
57
|
# are required; anything else (images, chunks) is copied as is.
|
|
56
58
|
dir: ui
|