@synopackageland/templates 0.41.3 → 0.41.5
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/README.md +14 -2
- package/package.json +1 -1
- package/templates/_shared/AGENTS.md +13 -1
- package/templates/_shared/package.json +1 -1
- package/templates/compose/dsm-package.yaml +1 -1
- package/templates/native-go/README.md +15 -2
- 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-vue/README.md +16 -1
- package/templates/native-go-vue/frontend/DESIGN.md +2 -0
- package/templates/native-go-vue/frontend/package-lock.json +12 -12
- package/templates/native-go-vue/frontend/package.json +2 -2
- package/templates/native-go-vue/frontend/test/apps.test.ts +17 -0
- package/templates/native-node/backend/package-lock.json +1 -1
- package/templates/native-node/dsm-package.yaml +1 -1
- package/templates/native-python/dsm-package.yaml +1 -1
- package/templates/native-rust/backend/Cargo.lock +2 -2
- package/templates/native-rust/backend/Cargo.toml +1 -1
- package/templates/native-rust-delegate/backend/Cargo.lock +2 -2
- package/templates/native-rust-delegate/backend/Cargo.toml +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.41.5
|
|
4
|
+
|
|
5
|
+
- Align SDK/App references and locks across native and Compose templates with 0.53.16
|
|
6
|
+
- Use frontend SDK ~0.53.16 and UI ~0.25.2, and require CLI ~0.52.11 in generated Apps
|
|
7
|
+
|
|
8
|
+
## 0.41.4
|
|
9
|
+
|
|
10
|
+
- Align SDK/App references and locks across native and Compose templates with 0.53.9
|
|
11
|
+
- Use frontend SDK ~0.53.9 and UI ~0.23.8, and require CLI ~0.52.6 in generated Apps
|
|
12
|
+
- Document light-only DSM windows and HTTPS-only standalone login for Apps opened outside DSM windows
|
|
13
|
+
- Keep login opt-in only when the product needs independent sign-in
|
|
14
|
+
|
|
3
15
|
## 0.41.3
|
|
4
16
|
|
|
5
17
|
- Align SDK/App references across Go, Python, Node.js, Rust and Compose templates with 0.53.2 and refresh dependency locks
|
package/README.md
CHANGED
|
@@ -151,8 +151,14 @@ See the SDK's [request deadline contract](https://github.com/synopackageland/syn
|
|
|
151
151
|
|
|
152
152
|
## HTTPS and stale DSM tokens
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
`init --with login` declares `identity: standalone`. It is HTTPS-only for both
|
|
155
|
+
password sign-in and Continue with DSM because its session cookie is Secure.
|
|
156
|
+
Use it only for Apps opened outside a DSM window (Portal or their own tab).
|
|
157
|
+
Do not add `--with login` without a product reason for independent sign-in;
|
|
158
|
+
DSM-window Apps use their existing DSM session.
|
|
159
|
+
|
|
160
|
+
Many CRUD, settings and file Apps without standalone identity work over HTTP.
|
|
161
|
+
For those Apps, require HTTPS only for secure context features (`getUserMedia`, clipboard, Service
|
|
156
162
|
Worker, WebCrypto `subtle`), pairing or an explicit secure Origin policy. Return
|
|
157
163
|
`https_required`, distinct from authentication errors, and show a dedicated
|
|
158
164
|
HTTPS page using SDK `identityCopy(locale).httpsTitle` / `errors.https_required`.
|
|
@@ -187,6 +193,12 @@ their data lives in container volumes.
|
|
|
187
193
|
|
|
188
194
|
## Vue frontend modules
|
|
189
195
|
|
|
196
|
+
DSM windows always use the embedded light theme. Do not bind `color-scheme` or
|
|
197
|
+
`colorScheme` to `matchMedia('(prefers-color-scheme: dark)')` in a DSM window.
|
|
198
|
+
Only the App's own full page (Portal or its own tab) may follow the system
|
|
199
|
+
colour scheme, guarded by `ctx.fullPage`. The shared Vue shell leaves the
|
|
200
|
+
SDK's light default in place.
|
|
201
|
+
|
|
190
202
|
Vue scaffolds export `mount(root, ctx)` from `app.module.js` and emit `app.css`.
|
|
191
203
|
Keep `base: './'`, relative imports and `cssCodeSplit: false`; allow lazy chunks
|
|
192
204
|
with `() => import('./Page.vue')` or `defineAsyncComponent`. Each mount creates
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/templates",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.5",
|
|
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": {
|
|
@@ -313,7 +313,19 @@ sweep forward the cancel instead of admitting it.
|
|
|
313
313
|
|
|
314
314
|
## HTTPS and stale DSM tokens
|
|
315
315
|
|
|
316
|
-
|
|
316
|
+
`init --with login` declares `identity: standalone`. It is HTTPS-only for both
|
|
317
|
+
password sign-in and Continue with DSM because its session cookie is Secure.
|
|
318
|
+
Use it only for Apps opened outside a DSM window (Portal or their own tab).
|
|
319
|
+
Do not add `--with login` without a product reason for independent sign-in;
|
|
320
|
+
DSM-window Apps use their existing DSM session.
|
|
321
|
+
|
|
322
|
+
DSM windows always use the embedded light theme. Do not bind `color-scheme` or
|
|
323
|
+
`colorScheme` to `matchMedia('(prefers-color-scheme: dark)')` in a DSM window.
|
|
324
|
+
Only the App's own full page (Portal or its own tab) may follow the system
|
|
325
|
+
colour scheme, guarded by `ctx.fullPage`. Leave the SDK's light default in
|
|
326
|
+
place for DSM windows.
|
|
327
|
+
|
|
328
|
+
Without standalone identity, do not force HTTPS for ordinary CRUD/settings/file Apps. Only secure context
|
|
317
329
|
features, pairing or a strict secure Origin policy justify it. Return
|
|
318
330
|
`https_required`, not a generic authentication error, and render the SDK's
|
|
319
331
|
`identityCopy(locale).httpsTitle` / `errors.https_required` with reopening
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"e2e:ai": "node --env-file-if-exists=.env node_modules/@synopackageland/cli/dist/e2e/dsm.js tunnel -- e2e run --config e2e.ai.config.ts tests/e2e/action.ai.e2e.ts"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@synopackageland/cli": "~0.52.
|
|
14
|
+
"@synopackageland/cli": "~0.52.11",
|
|
15
15
|
"@e2e-dev/web": "^0.14.0",
|
|
16
16
|
"e2e": "^0.19.0"
|
|
17
17
|
}
|
|
@@ -23,7 +23,7 @@ compose:
|
|
|
23
23
|
web: {service: web, port: 8080, health: {path: /, status: 200}}
|
|
24
24
|
network: {egress: isolated}
|
|
25
25
|
identity_gateway:
|
|
26
|
-
sdk: 0.53.
|
|
26
|
+
sdk: 0.53.16
|
|
27
27
|
mode: none
|
|
28
28
|
listen: {http: 28000}
|
|
29
29
|
# Web Apps default to new-page through the shared app-launch resolver.
|
|
@@ -77,14 +77,15 @@ as and what the backend reports.
|
|
|
77
77
|
`dsm-package.yaml` requires `schema: 2` and `backend: {kind: go, dir: backend}`.
|
|
78
78
|
Declare `capabilities.files: session` for interactive File Station access,
|
|
79
79
|
`capabilities.jobs: true` for persistent package-account jobs,
|
|
80
|
-
`capabilities.identity: standalone` for independent DSM login
|
|
80
|
+
`capabilities.identity: standalone` for HTTPS-only independent DSM login outside
|
|
81
|
+
a DSM window, and
|
|
81
82
|
`capabilities.rootOps: true` for administrator-approved fixed executor operations.
|
|
82
83
|
`init --with files,jobs,root-ops` supports plain and Vue UI; `login` and
|
|
83
84
|
`delegate` need the Vue UI. `daemon` cannot be combined with `jobs`, but it can
|
|
84
85
|
be combined with an until-revoked `delegate`.
|
|
85
86
|
|
|
86
87
|
```sh
|
|
87
|
-
synopkgland add files jobs
|
|
88
|
+
synopkgland add files jobs
|
|
88
89
|
synopkgland check --json
|
|
89
90
|
synopkgland status --host my-nas --json
|
|
90
91
|
```
|
|
@@ -96,6 +97,18 @@ resolve them before retrying. Already-declared capabilities are a no-op.
|
|
|
96
97
|
`check`, `build`, `inspect`, `deploy`, `status` emit one stdout object with
|
|
97
98
|
`--json`; failures include `code`, `message`, `hint`.
|
|
98
99
|
|
|
100
|
+
`init --with login` declares `identity: standalone`. It is HTTPS-only for both
|
|
101
|
+
password sign-in and Continue with DSM because its session cookie is Secure.
|
|
102
|
+
Use it only for Apps opened outside a DSM window (Portal or their own tab).
|
|
103
|
+
Do not add `--with login` without a product reason for independent sign-in;
|
|
104
|
+
DSM-window Apps use their existing DSM session.
|
|
105
|
+
|
|
106
|
+
DSM windows always use the embedded light theme. In a Vue frontend, do not
|
|
107
|
+
bind `color-scheme` or `colorScheme` to
|
|
108
|
+
`matchMedia('(prefers-color-scheme: dark)')` in a DSM window. Only the App's own
|
|
109
|
+
full page (Portal or its own tab) may follow the system colour scheme, guarded
|
|
110
|
+
by `ctx.fullPage`.
|
|
111
|
+
|
|
99
112
|
## Project layout
|
|
100
113
|
|
|
101
114
|
| Path | What it is | Edit it? |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
github.com/synopackageland/syno-pkg-land-sdk v0.53.
|
|
2
|
-
github.com/synopackageland/syno-pkg-land-sdk v0.53.
|
|
1
|
+
github.com/synopackageland/syno-pkg-land-sdk v0.53.16 h1:i4FCBCpOr7ma31zFathuS2QLpCWa13y3v9rWvlg+AfE=
|
|
2
|
+
github.com/synopackageland/syno-pkg-land-sdk v0.53.16/go.mod h1:JMfenGwAhlVgGUtoSQFA9XRbtN8Zcs+0xdrOaaam+Fg=
|
|
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=
|
|
@@ -75,7 +75,22 @@ Use public library controls, the embedded theme, per-app modal scope and unique
|
|
|
75
75
|
Vue ID prefixes. Backend route permissions and DSM checks remain authoritative.
|
|
76
76
|
Generated build and unit tests do not establish NAS runtime acceptance.
|
|
77
77
|
|
|
78
|
-
The manifest is dsm-package.yaml schema 2: backend.kind: go
|
|
78
|
+
The manifest is dsm-package.yaml schema 2: backend.kind: go, with optional
|
|
79
|
+
capabilities.files: session, jobs: true and rootOps: true. Existing projects
|
|
80
|
+
use `synopkgland add <cap>...`; app entrypoints stay app-owned, SDK conflicts
|
|
81
|
+
are refused. check, inspect, build, deploy and status accept --json.
|
|
82
|
+
|
|
83
|
+
`init --with login` declares `identity: standalone`. It is HTTPS-only for both
|
|
84
|
+
password sign-in and Continue with DSM because its session cookie is Secure.
|
|
85
|
+
Use it only for Apps opened outside a DSM window (Portal or their own tab).
|
|
86
|
+
Do not add `--with login` without a product reason for independent sign-in;
|
|
87
|
+
DSM-window Apps use their existing DSM session.
|
|
88
|
+
|
|
89
|
+
DSM windows always use the embedded light theme. Do not bind `color-scheme` or
|
|
90
|
+
`colorScheme` to `matchMedia('(prefers-color-scheme: dark)')` in a DSM window.
|
|
91
|
+
Only the App's own full page (Portal or its own tab) may follow the system
|
|
92
|
+
colour scheme, guarded by `ctx.fullPage`. The shared Vue shell leaves the
|
|
93
|
+
SDK's light default in place.
|
|
79
94
|
|
|
80
95
|
Use the installed `@synopackageland/ui` and its declared compatible patch range.
|
|
81
96
|
`App.vue` lays the shell out with the SDK's `AppShell` (`@synopackageland/sdk/vue`):
|
|
@@ -54,6 +54,8 @@ user-and-UID ownership isolation, and stop polling on unmount.
|
|
|
54
54
|
## Do's and Don'ts
|
|
55
55
|
|
|
56
56
|
- Do use existing public UI components, embedded theme tokens and state/recovery copy.
|
|
57
|
+
- Keep DSM windows light. Only an App-owned full page (`ctx.fullPage`) may follow `prefers-color-scheme`; never bind a DSM window's `color-scheme` or `colorScheme` to the system preference.
|
|
58
|
+
- Use `--with login` (`identity: standalone`) only for a product reason for independent sign-in outside a DSM window; it requires HTTPS for password sign-in and Continue with DSM. DSM-window Apps use the existing DSM session.
|
|
57
59
|
- Do retain permission gating, readable loading/empty/error states and per-instance cleanup.
|
|
58
60
|
- Do open the App at once: render `AppShell` immediately and run session, permission and status checks in the background, never a full-window "Checking…" placeholder. Only a confirmed refusal (signed out, expired session, not an administrator) shows the sign-in page or a library `Dialog`; loading text inside a section is fine.
|
|
59
61
|
- Do use the library's `Select`, `Checkbox`, `Input`, `Textarea`, `Form`, `FormItem`, `FilePicker` (`variant="compact"`, in the app locale) and `Link` for controls; there is no native `<input>` or `<a>`. Leave `Form` on its automatic direction (labels stack below 520px of container width) and let a `FormItem` bind its control, with no `direction="vertical"`, `role="group"` or `field.controlId`.
|
|
@@ -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.53.
|
|
11
|
-
"@synopackageland/ui": "~0.
|
|
10
|
+
"@synopackageland/sdk": "~0.53.16",
|
|
11
|
+
"@synopackageland/ui": "~0.25.2",
|
|
12
12
|
"vue": "3.5.43"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
@@ -1174,13 +1174,13 @@
|
|
|
1174
1174
|
"license": "Apache-2.0"
|
|
1175
1175
|
},
|
|
1176
1176
|
"node_modules/@synopackageland/sdk": {
|
|
1177
|
-
"version": "0.53.
|
|
1178
|
-
"resolved": "https://registry.npmjs.org/@synopackageland/sdk/-/sdk-0.53.
|
|
1179
|
-
"integrity": "sha512-
|
|
1177
|
+
"version": "0.53.16",
|
|
1178
|
+
"resolved": "https://registry.npmjs.org/@synopackageland/sdk/-/sdk-0.53.16.tgz",
|
|
1179
|
+
"integrity": "sha512-nqCePqpo6on64Rt8V38JhSmqKuarNc/9I85THJ5Ju5AbIneR3/4/GAU2BdiPzFQ59WRbiq6VBXHGAoY8Ra4PSw==",
|
|
1180
1180
|
"license": "MIT",
|
|
1181
1181
|
"peerDependencies": {
|
|
1182
1182
|
"@lucide/vue": "^1.48.0",
|
|
1183
|
-
"@synopackageland/ui": ">=0.23.
|
|
1183
|
+
"@synopackageland/ui": ">=0.23.5 <0.26.0",
|
|
1184
1184
|
"vue": "^3.5.0"
|
|
1185
1185
|
},
|
|
1186
1186
|
"peerDependenciesMeta": {
|
|
@@ -1193,9 +1193,9 @@
|
|
|
1193
1193
|
}
|
|
1194
1194
|
},
|
|
1195
1195
|
"node_modules/@synopackageland/ui": {
|
|
1196
|
-
"version": "0.
|
|
1197
|
-
"resolved": "https://registry.npmjs.org/@synopackageland/ui/-/ui-0.
|
|
1198
|
-
"integrity": "sha512-
|
|
1196
|
+
"version": "0.25.2",
|
|
1197
|
+
"resolved": "https://registry.npmjs.org/@synopackageland/ui/-/ui-0.25.2.tgz",
|
|
1198
|
+
"integrity": "sha512-n63eDY1uV/3uOk0PCcJL05uoPrsOVeNoW/kULk9e2sZUFPseJeO6Xrdxx/5lc+Ufg0MmCjoi6mRDoMw7yznkSA==",
|
|
1199
1199
|
"license": "MIT",
|
|
1200
1200
|
"dependencies": {
|
|
1201
1201
|
"@floating-ui/dom": "1.8.0",
|
|
@@ -2512,9 +2512,9 @@
|
|
|
2512
2512
|
}
|
|
2513
2513
|
},
|
|
2514
2514
|
"node_modules/prosemirror-model": {
|
|
2515
|
-
"version": "1.25.
|
|
2516
|
-
"resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.
|
|
2517
|
-
"integrity": "sha512-
|
|
2515
|
+
"version": "1.25.13",
|
|
2516
|
+
"resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.13.tgz",
|
|
2517
|
+
"integrity": "sha512-MlDMWGjYXaYOeCiO17jcybntCOzPnN+97U0809ke2QsgPtxW3n5/sD6ZKyJONUgMw1iP93ohZTjeKjnRJ7L6kQ==",
|
|
2518
2518
|
"license": "MIT",
|
|
2519
2519
|
"dependencies": {
|
|
2520
2520
|
"orderedmap": "^2.0.0"
|
|
@@ -30,6 +30,23 @@ test('independent mounts load only their own package status and no sample operat
|
|
|
30
30
|
expect(a.call.mock.calls).toHaveLength(stopped)
|
|
31
31
|
}finally{a.close();b.close()}
|
|
32
32
|
})
|
|
33
|
+
test('a DSM window stays light when the system prefers dark',async()=>{
|
|
34
|
+
const query=window.matchMedia
|
|
35
|
+
Object.defineProperty(window,'matchMedia',{configurable:true,writable:true,value:vi.fn((media:string)=>({
|
|
36
|
+
media,matches:media==='(prefers-color-scheme: dark)',onchange:null,
|
|
37
|
+
addListener:vi.fn(),removeListener:vi.fn(),addEventListener:vi.fn(),removeEventListener:vi.fn(),dispatchEvent:vi.fn(),
|
|
38
|
+
}))})
|
|
39
|
+
const f=fixture('Light')
|
|
40
|
+
try{
|
|
41
|
+
await settle()
|
|
42
|
+
const app=f.root.querySelector<HTMLElement>('[data-ui-app]')
|
|
43
|
+
expect(app).not.toBeNull()
|
|
44
|
+
// The embedded theme's default is light; dark must be an explicit App choice.
|
|
45
|
+
expect(app!.getAttribute('data-ui-color-scheme')).not.toBe('dark')
|
|
46
|
+
expect(app!.style.colorScheme).not.toBe('dark')
|
|
47
|
+
expect(f.root.textContent).toContain('Light')
|
|
48
|
+
}finally{f.close();Object.defineProperty(window,'matchMedia',{configurable:true,writable:true,value:query})}
|
|
49
|
+
})
|
|
33
50
|
test('failed status loading offers a retry and releases the mounting class',async()=>{
|
|
34
51
|
const f=fixture('Failure')
|
|
35
52
|
try{
|
|
@@ -104,8 +104,8 @@ dependencies = [
|
|
|
104
104
|
|
|
105
105
|
[[package]]
|
|
106
106
|
name = "syno-pkg-land-app"
|
|
107
|
-
version = "0.53.
|
|
108
|
-
source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.53.
|
|
107
|
+
version = "0.53.16"
|
|
108
|
+
source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.53.16#6751951c140fb032e5f050dc53f5cc58fcd0bf60"
|
|
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.53.
|
|
12
|
+
syno-pkg-land-app = { git = "https://github.com/synopackageland/syno-pkg-land-sdk", tag = "v0.53.16" }
|
|
13
13
|
|
|
14
14
|
[profile.release]
|
|
15
15
|
# A handler panic becomes an "internal" reply; abort would end the App without one.
|
|
@@ -170,8 +170,8 @@ dependencies = [
|
|
|
170
170
|
|
|
171
171
|
[[package]]
|
|
172
172
|
name = "syno-pkg-land-app"
|
|
173
|
-
version = "0.53.
|
|
174
|
-
source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.53.
|
|
173
|
+
version = "0.53.16"
|
|
174
|
+
source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.53.16#6751951c140fb032e5f050dc53f5cc58fcd0bf60"
|
|
175
175
|
dependencies = [
|
|
176
176
|
"libc",
|
|
177
177
|
"serde",
|
|
@@ -10,7 +10,7 @@ libc = "0.2"
|
|
|
10
10
|
serde = { version = "1", features = ["derive"] }
|
|
11
11
|
serde_json = "1"
|
|
12
12
|
# The SDK version is the tag; `synopkgland check` reads it from Cargo.lock.
|
|
13
|
-
syno-pkg-land-app = { git = "https://github.com/synopackageland/syno-pkg-land-sdk", tag = "v0.53.
|
|
13
|
+
syno-pkg-land-app = { git = "https://github.com/synopackageland/syno-pkg-land-sdk", tag = "v0.53.16" }
|
|
14
14
|
|
|
15
15
|
[profile.release]
|
|
16
16
|
# A handler panic becomes an "internal" reply; abort would end the App without one.
|