@synopackageland/templates 0.41.5 → 0.42.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 +10 -0
- package/README.md +9 -7
- package/package.json +5 -1
- package/templates/_shared/AGENTS.md +11 -11
- package/templates/_shared/package.json +3 -2
- package/templates/_shared/pnpm-lock.yaml +1636 -0
- package/templates/_shared/pnpm-workspace.yaml +2 -0
- package/templates/_shared/third-party-notices.mjs +75 -9
- package/templates/binary/README.md +3 -3
- package/templates/binary/dsm-package.yaml +4 -1
- package/templates/compose/README.md +3 -3
- package/templates/native-go/README.md +6 -6
- package/templates/native-go/dsm-package.yaml +4 -1
- package/templates/native-go-vue/README.md +10 -10
- package/templates/native-go-vue/frontend/DESIGN.md +3 -3
- package/templates/native-go-vue/frontend/package.json +4 -2
- package/templates/native-go-vue/frontend/pnpm-lock.yaml +2269 -0
- package/templates/native-go-vue/frontend/pnpm-workspace.yaml +2 -0
- package/templates/native-node/README.md +8 -8
- package/templates/native-node/backend/app/package.json +2 -1
- package/templates/native-node/backend/app/pnpm-workspace.yaml +2 -0
- package/templates/native-node/backend/package.json +2 -1
- package/templates/native-node/backend/pnpm-lock.yaml +207 -0
- package/templates/native-node/dsm-package.yaml +5 -2
- package/templates/native-node-vue/README.md +9 -9
- package/templates/native-python/README.md +4 -4
- package/templates/native-python/dsm-package.yaml +4 -1
- package/templates/native-python-vue/README.md +9 -9
- package/templates/native-rust/README.md +4 -4
- package/templates/native-rust/dsm-package.yaml +4 -1
- package/templates/native-rust-vue/README.md +9 -9
- package/templates/native-go-vue/frontend/package-lock.json +0 -3115
- package/templates/native-node/backend/package-lock.json +0 -59
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.42.1
|
|
4
|
+
|
|
5
|
+
- The commented `backup` example in the native and binary `dsm-package.yaml` says online backup reads SQLite in place, and shows the optional `exclude` list of data-folder globs left out of the archive (SDK 0.53.35, CLI 0.53.13)
|
|
6
|
+
|
|
7
|
+
## 0.42.0
|
|
8
|
+
|
|
9
|
+
- Scaffold pnpm projects with pinned package managers and reproducible lockfiles
|
|
10
|
+
- Use pnpm in App guides, scripts and development checks
|
|
11
|
+
- Generate the same production license notices from pnpm dependency graphs
|
|
12
|
+
|
|
3
13
|
## 0.41.5
|
|
4
14
|
|
|
5
15
|
- Align SDK/App references and locks across native and Compose templates with 0.53.16
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @synopackageland/templates
|
|
2
2
|
|
|
3
|
+
Use pnpm for JavaScript dependencies and scripts; enable it with `corepack enable pnpm`.
|
|
4
|
+
|
|
3
5
|
Project templates for `synopkgland init` and `synopkgland add`. They hold only
|
|
4
6
|
the files an App owns; the SDK (`github.com/synopackageland/syno-pkg-land-sdk`, npm
|
|
5
7
|
`@synopackageland/sdk`) is a dependency of the generated project, never a copy.
|
|
@@ -56,7 +58,7 @@ identity gateway and keeps its own settings in an administrator-only DSM window.
|
|
|
56
58
|
| `native-go-delegate` | Delegate routes, the delegate background worker, the delegate `CapabilityPanels.vue` |
|
|
57
59
|
| `native-go-root-ops` | The SDK's executor routes and `root.run` in `internal/app`, an example `root/whoami.sh`, and the Vue `ExecutorGate.vue` that holds the pages until the executor is approved |
|
|
58
60
|
| `native-python` | Base: `dsm-package.yaml` (`backend.runtime: python`), the App in `backend/app` (`routes.py`, stub capability modules, `permissions.json`), unittest tests |
|
|
59
|
-
| `native-node` | Base: `dsm-package.yaml` (`backend.runtime: node`), TypeScript in `backend/src` compiled into `backend/app`, node:test tests, `
|
|
61
|
+
| `native-node` | Base: `dsm-package.yaml` (`backend.runtime: node`), TypeScript in `backend/src` compiled into `backend/app`, node:test tests, `pnpm-lock.yaml` |
|
|
60
62
|
| `native-rust` | Base: `dsm-package.yaml` (`backend.runtime: rust`, `methods`), the Cargo project in `backend` on the `syno-pkg-land-app` crate, `Cargo.lock`, `rust-toolchain.toml` |
|
|
61
63
|
| `native-{python,node,rust}-{jobs,root-ops,delegate}` | The capability's example module, replacing the base's stub, with its tests |
|
|
62
64
|
| `native-{python,node,rust}-vue` | The README and `.gitignore` of the Vue shell |
|
|
@@ -239,7 +241,7 @@ SYNOPKGLAND_CLI="$(command -v synopkgland)" node --test scripts/test/scaffold.te
|
|
|
239
241
|
The gate installs the CLI range declared by the shared scaffold into its temporary
|
|
240
242
|
directory, or uses the executable in `SYNOPKGLAND_CLI`. Its existing `node:test`
|
|
241
243
|
harness runs real CLI init for every template and both native UI variants,
|
|
242
|
-
then each generated project's default `
|
|
244
|
+
then each generated project's default `pnpm test`. Native projects assert the
|
|
243
245
|
starter operation; binary and Compose report the expected skip because they
|
|
244
246
|
have no starter registry. One plain native project also runs its generated
|
|
245
247
|
`test:local` check/build/inspect tier. Backend tests and Vue builds stay in the
|
|
@@ -253,7 +255,7 @@ resolves once). Set `SYNOPKGLAND_SDK_TARBALL` to a published tarball to test tha
|
|
|
253
255
|
release without rebuilding the SDK frontend. With `SYNOPKGLAND_UI_TARBALL` set it installs that tarball as
|
|
254
256
|
`@synopackageland/ui`, for a UI version not yet on npm.
|
|
255
257
|
The Python and Node.js combinations need `SYNOPKGLAND_SDK_DIR` (its `python/`,
|
|
256
|
-
and `node/` built with `
|
|
258
|
+
and `node/` built with `pnpm install && pnpm run build`) for their App SDK, and the
|
|
257
259
|
Rust ones fetch the SDK crate from it (`scripts/rust-env.sh`), so it must hold
|
|
258
260
|
the tag `Cargo.lock` pins. The gate runs each language's tests on Linux in
|
|
259
261
|
Docker (`scripts/bridge-linux-test.sh`: Python 3.8, Node.js 22, Rust).
|
|
@@ -268,7 +270,7 @@ prints a failed job's whole log. On `SYNOPKGLAND_DOCKER_SSH` the Rust checks
|
|
|
268
270
|
run in `synopkgland-gate-templates:<hash>` (`scripts/gate.Dockerfile`) with
|
|
269
271
|
the host's shared `synopkgland-cache-cargo` volume, and wait for one of its
|
|
270
272
|
two gate slots. There the Vue frontends' checks (`scripts/frontend-check.sh`:
|
|
271
|
-
|
|
273
|
+
pnpm install, vitest, the build) run too, in the official `node:24.22.1` image
|
|
272
274
|
with the shared `synopkgland-cache-npm` volume
|
|
273
275
|
(`scripts/frontend-docker-checks.sh`; `SYNOPKGLAND_DOCKER_NPM_REGISTRY` to select an alternate registry), so the Mac's load cannot slow them.
|
|
274
276
|
Without `SYNOPKGLAND_DOCKER_SSH` they run here.
|
|
@@ -400,11 +402,11 @@ the fork workflow.
|
|
|
400
402
|
## App-open smoke
|
|
401
403
|
|
|
402
404
|
Every generated project includes `tests/e2e/smoke.e2e.ts`, `e2e.config.ts` and
|
|
403
|
-
a root `package.json`. Run `
|
|
404
|
-
(or `
|
|
405
|
+
a root `package.json`. Run `pnpm install --prod=false` at the project root
|
|
406
|
+
(or `pnpm install --frozen-lockfile --prod=false` after committing its lockfile).
|
|
405
407
|
`NODE_ENV=production` skips devDependencies; `test:local` needs the CLI.
|
|
406
408
|
Install Chromium once with
|
|
407
|
-
`
|
|
409
|
+
`pnpm dlx @e2e-dev/web install chromium`, then run `pnpm run e2e:smoke`. Set `DSM_E2E_SSH` and private mode-600 account files in
|
|
408
410
|
`DSM_E2E_ACCOUNT_ADMIN` and `DSM_E2E_ACCOUNT_NORMAL`; grant the normal account
|
|
409
411
|
Application Privileges first. Missing normal credentials/profile produces a
|
|
410
412
|
reported skip. Profiles reuse the existing CLI target/user cache. `.env` and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/templates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.1",
|
|
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": {
|
|
@@ -20,5 +20,9 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"check:docs": "node --test scripts/check-doc-versions.test.mjs && node scripts/check-doc-versions.mjs",
|
|
22
22
|
"gate": "scripts/gate.sh"
|
|
23
|
+
},
|
|
24
|
+
"packageManager": "pnpm@12.18.0",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"yaml": "^2.9.1"
|
|
23
27
|
}
|
|
24
28
|
}
|
|
@@ -6,10 +6,10 @@ skill with `synopkgland skill show <id>` before editing.
|
|
|
6
6
|
For UI work, read `synopkgland skill show ui-vue` and `synopkgland skill show ui-json`.
|
|
7
7
|
Use the installed SDK contracts and preserve package.json/lockfile pins.
|
|
8
8
|
|
|
9
|
-
For UI discovery, run `
|
|
10
|
-
`
|
|
9
|
+
For UI discovery, run `pnpm exec syno-pkg-land-ui catalog --json` and
|
|
10
|
+
`pnpm exec syno-pkg-land-ui describe Button --json` from the installed frontend.
|
|
11
11
|
Read its prompt and exported Vue docs/types before choosing component APIs.
|
|
12
|
-
Use `syno-pkg-land-ui` directly in
|
|
12
|
+
Use `syno-pkg-land-ui` directly in package scripts; keep AI guidance version-independent.
|
|
13
13
|
|
|
14
14
|
Open the App at once: render its shell immediately and run session, permission
|
|
15
15
|
and status checks in the background, never a full-window "Checking…" placeholder.
|
|
@@ -22,7 +22,7 @@ sections at the end name each language's files, types and test commands.
|
|
|
22
22
|
|
|
23
23
|
From the project root, run `synopkgland check --json`,
|
|
24
24
|
`synopkgland build --json`, then `synopkgland inspect <spk> --json` on the emitted SPK.
|
|
25
|
-
For Vue, first run `
|
|
25
|
+
For Vue, first run `pnpm install --frozen-lockfile --prod=false` and `pnpm run build` in frontend. Run its tests only if the user chose tests.
|
|
26
26
|
Do not connect to or change a NAS without explicit task authorization.
|
|
27
27
|
|
|
28
28
|
## Optional testing
|
|
@@ -32,14 +32,14 @@ Accept no tests, remember the choice, do not nag and never block a build or rele
|
|
|
32
32
|
on tests. Scaffolding is included by default; writing and running tests are optional.
|
|
33
33
|
Read `synopkgland skill show testing` when setting up or extending tests.
|
|
34
34
|
|
|
35
|
-
The default `
|
|
36
|
-
At the project root, run `
|
|
37
|
-
lockfile, use `
|
|
35
|
+
The default `pnpm test` runs only fast local unit/ctl registry contracts.
|
|
36
|
+
At the project root, run `pnpm install --prod=false` first; after committing its
|
|
37
|
+
lockfile, use `pnpm install --frozen-lockfile --prod=false`.
|
|
38
38
|
`NODE_ENV=production` skips devDependencies; `test:local` needs the CLI and frontend builds need dev tools.
|
|
39
39
|
Before `test:local`, prepare the backend/frontend as described below and run
|
|
40
40
|
`synopkgland ctl generate` for a native App.
|
|
41
|
-
`
|
|
42
|
-
run `
|
|
41
|
+
`pnpm run test:local` opts into check/build/inspect. Only on explicit user request,
|
|
42
|
+
run `pnpm run test:nas:ctl`, `pnpm run e2e:smoke`, `pnpm run e2e:ui` or `pnpm run e2e:ai`.
|
|
43
43
|
The full suite is slow. Never call these from build, install, DSM hooks or release.
|
|
44
44
|
For non-AI use, no model/key is required; AI dependencies are optional installs.
|
|
45
45
|
|
|
@@ -396,13 +396,13 @@ their capabilities with `synopkgland init --with`.
|
|
|
396
396
|
- Methods: `backend/src/routes.ts` (`build` registers them, the capability
|
|
397
397
|
modules `jobs.ts`, `root-ops.ts`, `delegate.ts` add theirs); permissions:
|
|
398
398
|
`backend/app/permissions.json`. TypeScript with `"module": "NodeNext"`;
|
|
399
|
-
`
|
|
399
|
+
`pnpm run build` compiles it into `backend/app`, which the SPK ships, so run it
|
|
400
400
|
before `synopkgland check` or `build`.
|
|
401
401
|
- Params: `strings(params, ...names)` (`params.ts`); errors:
|
|
402
402
|
`new AppError(code, message)`, `AppError.badRequest(message)`. Call services
|
|
403
403
|
through `service(ctx, op, params)` (`service.ts`), which passes the runtime's
|
|
404
404
|
refusals on; a bare `ctx.runtime` refusal would reach the browser as `internal`.
|
|
405
|
-
- Test with `(cd backend &&
|
|
405
|
+
- Test with `(cd backend && pnpm install --frozen-lockfile --prod=false && pnpm test && pnpm run typecheck)`; `test/support.ts`'s
|
|
406
406
|
`call` plays the runtime.
|
|
407
407
|
|
|
408
408
|
## Rust backend
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": true,
|
|
3
3
|
"type": "module",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"test": "
|
|
5
|
+
"test": "pnpm run test:unit",
|
|
6
6
|
"test:unit": "node --test tests/unit/*.test.mjs",
|
|
7
7
|
"test:local": "node --test tests/local/*.test.mjs",
|
|
8
8
|
"test:nas:ctl": "node --env-file-if-exists=.env --test tests/ctl/*.test.mjs",
|
|
@@ -14,5 +14,6 @@
|
|
|
14
14
|
"@synopackageland/cli": "~0.52.11",
|
|
15
15
|
"@e2e-dev/web": "^0.14.0",
|
|
16
16
|
"e2e": "^0.19.0"
|
|
17
|
-
}
|
|
17
|
+
},
|
|
18
|
+
"packageManager": "pnpm@12.18.0"
|
|
18
19
|
}
|