@synopackageland/templates 0.41.2 → 0.41.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.41.4
4
+
5
+ - Align SDK/App references and locks across native and Compose templates with 0.53.9
6
+ - Use frontend SDK ~0.53.9 and UI ~0.23.8, and require CLI ~0.52.6 in generated Apps
7
+ - Document light-only DSM windows and HTTPS-only standalone login for Apps opened outside DSM windows
8
+ - Keep login opt-in only when the product needs independent sign-in
9
+
10
+ ## 0.41.3
11
+
12
+ - Align SDK/App references across Go, Python, Node.js, Rust and Compose templates with 0.53.2 and refresh dependency locks
13
+ - Use frontend SDK ~0.53.2 and UI ~0.23.3 with a refreshed public npm lockfile
14
+ - Require CLI ~0.52.3 in generated Apps and verify the shared scaffold dependency in layout checks
15
+
3
16
  ## 0.41.2
4
17
 
5
18
  - Align SDK/App references across native and Compose templates 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
- Many CRUD, settings and file Apps work over HTTP; templates do not force HTTPS.
155
- Require it only for secure context features (`getUserMedia`, clipboard, Service
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.2",
3
+ "version": "0.41.4",
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
- Do not force HTTPS for ordinary CRUD/settings/file Apps. Only secure context
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.49.0",
14
+ "@synopackageland/cli": "~0.52.6",
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.1
26
+ sdk: 0.53.9
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, and
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 login
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,6 +1,6 @@
1
1
  Native Go package build dependencies
2
2
 
3
- github.com/synopackageland/syno-pkg-land-sdk v0.53.1 (MIT)
3
+ github.com/synopackageland/syno-pkg-land-sdk v0.53.9 (MIT)
4
4
 
5
5
  Copyright (c) 2026 synopkgland
6
6
 
@@ -2,6 +2,6 @@ module __PACKAGE__
2
2
 
3
3
  go 1.26.10
4
4
 
5
- require github.com/synopackageland/syno-pkg-land-sdk v0.53.1
5
+ require github.com/synopackageland/syno-pkg-land-sdk v0.53.9
6
6
 
7
7
  require golang.org/x/sys v0.44.0 // indirect
@@ -1,4 +1,4 @@
1
- github.com/synopackageland/syno-pkg-land-sdk v0.53.1 h1:bgfWJRVjWWAofaIxRh4lhGrToPdhZ2AwbQp+YQMWqMo=
2
- github.com/synopackageland/syno-pkg-land-sdk v0.53.1/go.mod h1:JMfenGwAhlVgGUtoSQFA9XRbtN8Zcs+0xdrOaaam+Fg=
1
+ github.com/synopackageland/syno-pkg-land-sdk v0.53.9 h1:lZVxNX0JdRCv9Rn+IAhYdYvqgBfgW345fCvAZC3lVM0=
2
+ github.com/synopackageland/syno-pkg-land-sdk v0.53.9/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 and capabilities.files: session, jobs: true, identity: standalone, rootOps: true. Use --with login to declare standalone identity. Existing projects use synopkgland add <cap>...; app entrypoints stay app-owned, SDK conflicts are refused. check, inspect, build, deploy and status accept --json.
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.1",
11
- "@synopackageland/ui": "~0.23.2",
10
+ "@synopackageland/sdk": "~0.53.9",
11
+ "@synopackageland/ui": "~0.23.8",
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.1",
1178
- "resolved": "https://registry.npmjs.org/@synopackageland/sdk/-/sdk-0.53.1.tgz",
1179
- "integrity": "sha512-Riw45zAJW4L4aU7VxLT95q3NhG+zD2dIFsuiHyqPZizugeT3e2U4bckFRTMY8YPL5Nc0jz4Jk4MFpDSCnXddqw==",
1177
+ "version": "0.53.9",
1178
+ "resolved": "https://registry.npmjs.org/@synopackageland/sdk/-/sdk-0.53.9.tgz",
1179
+ "integrity": "sha512-tFuT4oBjWHIYQMKy5RoMd6jDstEnZo2cdfU4zXsJJrlNpbDNjCYnSwGAskt2Uevr2fq72fKYuojPaXpgd5+k1A==",
1180
1180
  "license": "MIT",
1181
1181
  "peerDependencies": {
1182
1182
  "@lucide/vue": "^1.48.0",
1183
- "@synopackageland/ui": ">=0.23.2 <0.24.0",
1183
+ "@synopackageland/ui": ">=0.23.5 <0.24.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.23.2",
1197
- "resolved": "https://registry.npmjs.org/@synopackageland/ui/-/ui-0.23.2.tgz",
1198
- "integrity": "sha512-3qVl482czZERMsxd2M0ueP+Qy6INW1+OlaalX9RpUMxp6z5eydN/9s6HhT8SQZSX2dpboZg61R8djgQm9PqOuQ==",
1196
+ "version": "0.23.8",
1197
+ "resolved": "https://registry.npmjs.org/@synopackageland/ui/-/ui-0.23.8.tgz",
1198
+ "integrity": "sha512-VjHGSB1kx64lml6o18vSzskYJkU285W9fM4w3YEQNTsViKit32IAZKvWpWsZMozf4hIU33KJvnM7zSrAfJR0jw==",
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.12",
2516
- "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.12.tgz",
2517
- "integrity": "sha512-Ue2gTmXMa7EhpLNhC7J+h4+ykD8ha12K6rrZFFKKJHBForfIStw5gJ6Zrf1mqqAa9NmpmEB4wp9bKmA4eUVjWg==",
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"
@@ -8,8 +8,8 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@lucide/vue": "1.48.0",
11
- "@synopackageland/sdk": "~0.53.1",
12
- "@synopackageland/ui": "~0.23.2",
11
+ "@synopackageland/sdk": "~0.53.9",
12
+ "@synopackageland/ui": "~0.23.8",
13
13
  "vue": "3.5.43"
14
14
  },
15
15
  "devDependencies": {
@@ -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{
@@ -49,7 +49,7 @@
49
49
  "license": "MIT"
50
50
  },
51
51
  "vendor/@synopackageland/app": {
52
- "version": "0.53.1",
52
+ "version": "0.53.9",
53
53
  "license": "MIT",
54
54
  "engines": {
55
55
  "node": ">=22"
@@ -49,7 +49,7 @@ backend:
49
49
  runtime: node
50
50
  dir: backend/app
51
51
  entry: main.js
52
- sdk: 0.53.1
52
+ sdk: 0.53.9
53
53
  node: { package: Node.js_v22 }
54
54
 
55
55
  ui:
@@ -47,7 +47,7 @@ backend:
47
47
  runtime: python
48
48
  dir: backend/app
49
49
  entry: main.py
50
- sdk: 0.53.1
50
+ sdk: 0.53.9
51
51
 
52
52
  ui:
53
53
  # Non-UI-SDK frontends open a full page; Portal is a separate opt-in.
@@ -104,8 +104,8 @@ dependencies = [
104
104
 
105
105
  [[package]]
106
106
  name = "syno-pkg-land-app"
107
- version = "0.53.1"
108
- source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.53.1#67feea7b8c05f0bbb5e31b07e40be617691b9de9"
107
+ version = "0.53.9"
108
+ source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.53.9#5feb4b5cfd136de6e9774c8ba3aa3ab3052665f8"
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.1" }
12
+ syno-pkg-land-app = { git = "https://github.com/synopackageland/syno-pkg-land-sdk", tag = "v0.53.9" }
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.1"
174
- source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.53.1#67feea7b8c05f0bbb5e31b07e40be617691b9de9"
173
+ version = "0.53.9"
174
+ source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.53.9#5feb4b5cfd136de6e9774c8ba3aa3ab3052665f8"
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.1" }
13
+ syno-pkg-land-app = { git = "https://github.com/synopackageland/syno-pkg-land-sdk", tag = "v0.53.9" }
14
14
 
15
15
  [profile.release]
16
16
  # A handler panic becomes an "internal" reply; abort would end the App without one.