@synopackageland/templates 0.32.1 → 0.33.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 +19 -9
- package/package.json +1 -1
- package/templates/_shared/AGENTS.md +8 -2
- package/templates/binary/dsm-package.yaml +14 -0
- package/templates/compose/dsm-package.yaml +3 -1
- 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 +13 -0
- package/templates/native-go-vue/frontend/package-lock.json +4 -4
- package/templates/native-go-vue/frontend/package.json +1 -1
- package/templates/native-node/dsm-package.yaml +14 -1
- package/templates/native-python/dsm-package.yaml +14 -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 +13 -0
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ daemon:
|
|
|
22
22
|
window_seconds: 300
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Templates 0.
|
|
26
|
-
Use CLI 0.
|
|
25
|
+
Templates 0.33.0 pin UI 0.16.1 and SDK 0.35.0 in native and Compose projects.
|
|
26
|
+
Use CLI 0.37.0. The Vue `AppShell` shows a
|
|
27
27
|
non-blocking **Reload** notice when an upgrade replaced the UI an open page
|
|
28
28
|
loaded. Go Apps select
|
|
29
29
|
their controller from their Go SDK requirement; an identity gateway selects it
|
|
@@ -91,11 +91,10 @@ so no UI peer override is needed. Tests use jsdom 30 for UI floating-layer style
|
|
|
91
91
|
|
|
92
92
|
Interactive NAS file operations use same-origin browser calls.
|
|
93
93
|
Custom file handlers use the SDK's
|
|
94
|
-
[session transport migration](https://github.com/synopackageland/syno-pkg-land-sdk/blob/v0.
|
|
95
|
-
CLI 0.
|
|
96
|
-
executor/v0.32.0 and its
|
|
97
|
-
dependency selects this release.
|
|
98
|
-
administrator approval. No device acceptance is claimed.
|
|
94
|
+
[session transport migration](https://github.com/synopackageland/syno-pkg-land-sdk/blob/v0.35.0/docs/dsm-session-transport.md).
|
|
95
|
+
CLI 0.37.0 reads SDK 0.35.0's release manifest, which names immutable
|
|
96
|
+
executor/v0.32.0 and its executor digests. Its `~0.33.0` templates
|
|
97
|
+
dependency selects this release.
|
|
99
98
|
|
|
100
99
|
Every App method must appear in the permissions table, including methods whose
|
|
101
100
|
permission equals `default: administrators`. Dynamic method names and custom
|
|
@@ -107,6 +106,17 @@ authentication. Other paths retain DSM entry admission. See the CLI's
|
|
|
107
106
|
UI and i18n text, including the DSM glossary, omit terminal sentence periods.
|
|
108
107
|
Keep punctuation between sentences and intentional loading ellipses.
|
|
109
108
|
|
|
109
|
+
## Hyper Backup
|
|
110
|
+
|
|
111
|
+
Native Apps appear in Hyper Backup as applications by default. CLI 0.37.0
|
|
112
|
+
builds them with a fixed `scripts/backup/` shim that Hyper Backup runs as
|
|
113
|
+
root; it only switches to the package account, which archives or restores the
|
|
114
|
+
App's data folder with the SDK backup control. The App itself still runs as
|
|
115
|
+
the package user and its privilege tier is unchanged. Opt out with
|
|
116
|
+
`backup: { hyper_backup: false }` in `dsm-package.yaml`; the native templates
|
|
117
|
+
show the other settings as comments. Compose Apps are not covered because
|
|
118
|
+
their data lives in container volumes.
|
|
119
|
+
|
|
110
120
|
## Vue frontend modules
|
|
111
121
|
|
|
112
122
|
Vue scaffolds export `mount(root, ctx)` from `app.module.js` and emit `app.css`.
|
|
@@ -114,7 +124,7 @@ Keep `base: './'`, relative imports and `cssCodeSplit: false`; allow lazy chunks
|
|
|
114
124
|
with `() => import('./Page.vue')` or `defineAsyncComponent`. Each mount creates
|
|
115
125
|
its own Vue App and returns synchronous cleanup.
|
|
116
126
|
|
|
117
|
-
CLI 0.
|
|
127
|
+
CLI 0.37.0 copies the entire output into `ui/app/<tree-sha256>/` and verifies it
|
|
118
128
|
during `inspect`. Changing a lazy chunk changes the snapshot URL. An open page
|
|
119
129
|
may need to reload after an upgrade when an old lazy chunk is unavailable.
|
|
120
130
|
See the SDK's [frontend bundle contract](https://github.com/synopackageland/syno-pkg-land-sdk/blob/main/docs/frontend-bundles.md).
|
|
@@ -253,4 +263,4 @@ The bridge examples expose submission, lookup and cancellation through
|
|
|
253
263
|
|
|
254
264
|
## External access
|
|
255
265
|
|
|
256
|
-
With CLI 0.
|
|
266
|
+
With CLI 0.37.0 and SDK 0.35.0, a gateway App may declare `identity_gateway.external_access: {connect: optional, origin_change: confirm, single_origin: true}` for an upstream that signs in on one fixed URL. The policy is forwarded to the packaged gateway. A single-origin App's `manual_origin` accepts an explicit HTTPS port; the `external-origin` installation setting remains restricted to port 443. The DSM launcher selects a provider destination, probes `/_spl/ping` for up to eight seconds, and explains failures before offering **Open anyway**. A configured single-origin App always opens its primary external origin.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/templates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.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": {
|
|
@@ -58,7 +58,7 @@ List every App method explicitly in permissions.json, including administrator
|
|
|
58
58
|
methods. Dynamic method names and unregistered HTTP dispatchers are rejected; use
|
|
59
59
|
fixed SDK route constructors. Use identity_gateway.upstream_auth_paths for
|
|
60
60
|
client API paths authenticated by the upstream.
|
|
61
|
-
|
|
61
|
+
`api.HandleHTTP("/proxy/", "app.proxy", handler)` serves raw HTTP
|
|
62
62
|
for literal, disjoint full-segment prefixes outside SDK reserved paths. Declare
|
|
63
63
|
the key as authenticated or administrators in permissions.json. Origin, entry,
|
|
64
64
|
identity and permission checks precede raw streaming/initial-upgrade handlers;
|
|
@@ -66,7 +66,13 @@ CGI itself cannot upgrade a connection. For package-private worker HTTP use
|
|
|
66
66
|
`ipc.ServeUnix(ctx, path, handler)` and `ipc.DialUnix`: owned mode-0600 sockets
|
|
67
67
|
directly beneath the package's private `var/run`, with no custom TCP listener.
|
|
68
68
|
The audit follows configured binaries' Linux import graphs and excludes unshipped
|
|
69
|
-
dev commands.
|
|
69
|
+
dev commands.
|
|
70
|
+
Hyper Backup lists the App as an application by default: the build adds a
|
|
71
|
+
fixed `scripts/backup/` shim that Hyper Backup runs as root, which only
|
|
72
|
+
switches to the package account and moves one archive of the data folder. The
|
|
73
|
+
App itself still runs as the package user. Never add or edit files in
|
|
74
|
+
`scripts/backup/`; opt out with `backup: { hyper_backup: false }` in
|
|
75
|
+
dsm-package.yaml.
|
|
70
76
|
Mark routes ordinary users call `authenticated`, mark whole admin routes
|
|
71
77
|
`administrators`, guard global settings inside shared routes with
|
|
72
78
|
the SDK's require-admin check, and hide admin controls with `ctx.user?.isAdmin`
|
|
@@ -37,6 +37,20 @@ backend:
|
|
|
37
37
|
x86_64: prebuilt/api-x86_64
|
|
38
38
|
aarch64: prebuilt/api-aarch64
|
|
39
39
|
ui: {dir: ui, launch: new-page}
|
|
40
|
+
|
|
41
|
+
# Hyper Backup lists this App as an application by default. A backup stops the
|
|
42
|
+
# App, the SDK archives the package's var folder as the package account, and
|
|
43
|
+
# the App starts again; a restore replaces that folder. Hyper Backup runs the
|
|
44
|
+
# generated scripts/backup/ as root: a fixed script that only switches to the
|
|
45
|
+
# package account. See `synopkgland skill show backup`.
|
|
46
|
+
# backup:
|
|
47
|
+
# online: false # true keeps the App running; SQLite is snapshotted
|
|
48
|
+
# data_version: "1.0" # "major.minor"; a restore refuses newer data
|
|
49
|
+
# hook: bin/backup-hook # optional packaged freeze/thaw executable
|
|
50
|
+
# To opt out, use only:
|
|
51
|
+
# backup:
|
|
52
|
+
# hyper_backup: false
|
|
53
|
+
|
|
40
54
|
# UI languages: i18n/messages/<locale>.json for en, zh-TW, zh-CN, ja, ko, de,
|
|
41
55
|
# fr, es and it (DSM's other languages fall back to English); ctx.t(key) reads them.
|
|
42
56
|
i18n:
|
|
@@ -9,12 +9,14 @@ maintainer: Your Name
|
|
|
9
9
|
os_min_ver: "7.2.1-69057"
|
|
10
10
|
arches: [x86_64, aarch64]
|
|
11
11
|
capabilities: {}
|
|
12
|
+
# Hyper Backup application backup is off for Compose Apps: their data lives
|
|
13
|
+
# in container volumes, which it does not cover.
|
|
12
14
|
compose:
|
|
13
15
|
files: [compose.yaml]
|
|
14
16
|
web: {service: web, port: 8080, health: {path: /, status: 200}}
|
|
15
17
|
network: {egress: isolated}
|
|
16
18
|
identity_gateway:
|
|
17
|
-
sdk: 0.
|
|
19
|
+
sdk: 0.35.0
|
|
18
20
|
mode: none
|
|
19
21
|
listen: {http: 28000}
|
|
20
22
|
# Web Apps default to new-page through the shared app-launch resolver.
|
|
@@ -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.35.0 h1:gno3BQEj88f9UZ1tjr6OJ7dcmHeZOv3NHaQq1EZalTE=
|
|
2
|
+
github.com/synopackageland/syno-pkg-land-sdk v0.35.0/go.mod h1:8GwREGbczc8mAk4Gv8FUHaukXXCUstjzkovQrNV59Cc=
|
|
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=
|
|
@@ -72,6 +72,19 @@ i18n:
|
|
|
72
72
|
# Optional SDK capabilities; delegate/rootOps share administrator-approved executor setup.
|
|
73
73
|
capabilities: {}
|
|
74
74
|
|
|
75
|
+
# Hyper Backup lists this App as an application by default. A backup stops the
|
|
76
|
+
# App, the SDK archives the package's var folder as the package account, and
|
|
77
|
+
# the App starts again; a restore replaces that folder. Hyper Backup runs the
|
|
78
|
+
# generated scripts/backup/ as root: a fixed script that only switches to the
|
|
79
|
+
# package account. See `synopkgland skill show backup`.
|
|
80
|
+
# backup:
|
|
81
|
+
# online: false # true keeps the App running; SQLite is snapshotted
|
|
82
|
+
# data_version: "1.0" # "major.minor"; a restore refuses newer data
|
|
83
|
+
# hook: bin/backup-hook # optional packaged freeze/thaw executable
|
|
84
|
+
# To opt out, use only:
|
|
85
|
+
# backup:
|
|
86
|
+
# hyper_backup: false
|
|
87
|
+
|
|
75
88
|
# Optional uninstall hook. DSM runs `exec args` as the package account on a
|
|
76
89
|
# real uninstall (not an upgrade), before the executor is removed, with
|
|
77
90
|
# SYNOPKGLAND_DELETE_STATE=0|1 and SYNOPKGLAND_REMOVE_DATA=0|1 from the wizard.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"name": "native-dsm-vue-app",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@lucide/vue": "1.48.0",
|
|
10
|
-
"@synopackageland/sdk": "0.
|
|
10
|
+
"@synopackageland/sdk": "0.35.0",
|
|
11
11
|
"@synopackageland/ui": "0.16.1",
|
|
12
12
|
"vue": "3.5.43"
|
|
13
13
|
},
|
|
@@ -1152,9 +1152,9 @@
|
|
|
1152
1152
|
}
|
|
1153
1153
|
},
|
|
1154
1154
|
"node_modules/@synopackageland/sdk": {
|
|
1155
|
-
"version": "0.
|
|
1156
|
-
"resolved": "https://registry.npmjs.org/@synopackageland/sdk/-/sdk-0.
|
|
1157
|
-
"integrity": "sha512-
|
|
1155
|
+
"version": "0.35.0",
|
|
1156
|
+
"resolved": "https://registry.npmjs.org/@synopackageland/sdk/-/sdk-0.35.0.tgz",
|
|
1157
|
+
"integrity": "sha512-nUq/+51jAQHHXTWcrXtqXiT81Sn+uCGS8TMLOkcvLyhisNVdOOyKYcC35rsLmIGB1hdsJ5JJCnUvOdTHso0uYg==",
|
|
1158
1158
|
"license": "MIT",
|
|
1159
1159
|
"peerDependencies": {
|
|
1160
1160
|
"@lucide/vue": "^1.48.0",
|
|
@@ -49,7 +49,7 @@ backend:
|
|
|
49
49
|
runtime: node
|
|
50
50
|
dir: backend/app
|
|
51
51
|
entry: main.js
|
|
52
|
-
sdk: 0.
|
|
52
|
+
sdk: 0.35.0
|
|
53
53
|
node: { package: Node.js_v22 }
|
|
54
54
|
|
|
55
55
|
ui:
|
|
@@ -81,6 +81,19 @@ i18n:
|
|
|
81
81
|
# Optional SDK capabilities; delegate/rootOps share administrator-approved executor setup.
|
|
82
82
|
capabilities: {}
|
|
83
83
|
|
|
84
|
+
# Hyper Backup lists this App as an application by default. A backup stops the
|
|
85
|
+
# App, the SDK archives the package's var folder as the package account, and
|
|
86
|
+
# the App starts again; a restore replaces that folder. Hyper Backup runs the
|
|
87
|
+
# generated scripts/backup/ as root: a fixed script that only switches to the
|
|
88
|
+
# package account. See `synopkgland skill show backup`.
|
|
89
|
+
# backup:
|
|
90
|
+
# online: false # true keeps the App running; SQLite is snapshotted
|
|
91
|
+
# data_version: "1.0" # "major.minor"; a restore refuses newer data
|
|
92
|
+
# hook: bin/backup-hook # optional packaged freeze/thaw executable
|
|
93
|
+
# To opt out, use only:
|
|
94
|
+
# backup:
|
|
95
|
+
# hyper_backup: false
|
|
96
|
+
|
|
84
97
|
# Explicit AI commands. Internal/UI methods are not automatically exposed.
|
|
85
98
|
ctl:
|
|
86
99
|
enabled: true
|
|
@@ -47,7 +47,7 @@ backend:
|
|
|
47
47
|
runtime: python
|
|
48
48
|
dir: backend/app
|
|
49
49
|
entry: main.py
|
|
50
|
-
sdk: 0.
|
|
50
|
+
sdk: 0.35.0
|
|
51
51
|
|
|
52
52
|
ui:
|
|
53
53
|
# Non-UI-SDK frontends open a full page; Portal is a separate opt-in.
|
|
@@ -78,6 +78,19 @@ i18n:
|
|
|
78
78
|
# Optional SDK capabilities; delegate/rootOps share administrator-approved executor setup.
|
|
79
79
|
capabilities: {}
|
|
80
80
|
|
|
81
|
+
# Hyper Backup lists this App as an application by default. A backup stops the
|
|
82
|
+
# App, the SDK archives the package's var folder as the package account, and
|
|
83
|
+
# the App starts again; a restore replaces that folder. Hyper Backup runs the
|
|
84
|
+
# generated scripts/backup/ as root: a fixed script that only switches to the
|
|
85
|
+
# package account. See `synopkgland skill show backup`.
|
|
86
|
+
# backup:
|
|
87
|
+
# online: false # true keeps the App running; SQLite is snapshotted
|
|
88
|
+
# data_version: "1.0" # "major.minor"; a restore refuses newer data
|
|
89
|
+
# hook: bin/backup-hook # optional packaged freeze/thaw executable
|
|
90
|
+
# To opt out, use only:
|
|
91
|
+
# backup:
|
|
92
|
+
# hyper_backup: false
|
|
93
|
+
|
|
81
94
|
# Explicit AI commands. Internal/UI methods are not automatically exposed.
|
|
82
95
|
ctl:
|
|
83
96
|
enabled: true
|
|
@@ -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.35.0"
|
|
108
|
+
source = "git+https://github.com/synopackageland/syno-pkg-land-sdk?tag=v0.35.0#461655ff968eb3b646101cbca831dc9e593b929c"
|
|
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.35.0" }
|
|
13
13
|
|
|
14
14
|
[profile.release]
|
|
15
15
|
# A handler panic becomes an "internal" reply; abort would end the App without one.
|
|
@@ -79,6 +79,19 @@ i18n:
|
|
|
79
79
|
# Optional SDK capabilities; delegate/rootOps share administrator-approved executor setup.
|
|
80
80
|
capabilities: {}
|
|
81
81
|
|
|
82
|
+
# Hyper Backup lists this App as an application by default. A backup stops the
|
|
83
|
+
# App, the SDK archives the package's var folder as the package account, and
|
|
84
|
+
# the App starts again; a restore replaces that folder. Hyper Backup runs the
|
|
85
|
+
# generated scripts/backup/ as root: a fixed script that only switches to the
|
|
86
|
+
# package account. See `synopkgland skill show backup`.
|
|
87
|
+
# backup:
|
|
88
|
+
# online: false # true keeps the App running; SQLite is snapshotted
|
|
89
|
+
# data_version: "1.0" # "major.minor"; a restore refuses newer data
|
|
90
|
+
# hook: bin/backup-hook # optional packaged freeze/thaw executable
|
|
91
|
+
# To opt out, use only:
|
|
92
|
+
# backup:
|
|
93
|
+
# hyper_backup: false
|
|
94
|
+
|
|
82
95
|
# Explicit AI commands. Internal/UI methods are not automatically exposed.
|
|
83
96
|
ctl:
|
|
84
97
|
enabled: true
|