@synopackageland/cli 0.15.3 → 0.15.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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.15.4 (2026-10-18)
4
+
5
+ - Fix Compose import and undeclared SDK defaults after CLI-only patch releases. Resolve the SDK from the exactly pinned templates' Go module instead of assuming the CLI and SDK share a patch version; daemon-control defaults use the same source.
6
+ - Preserve explicit Compose and identity-gateway SDK declarations. Add subprocess regressions with differing CLI/SDK versions and no SDK source override, plus release smoke coverage for real Compose imports and headless manifests.
7
+ - Keep templates/SDK pinned to 0.15.2 and every executor/lifecycle digest entry unchanged. Upgrade from CLI 0.15.3 to 0.15.4 to restore `init -t compose --from`; SDK/helper bytes do not change and no new administrator reapproval requirement is introduced.
8
+
9
+ 繁中摘要:修正 CLI 與 SDK patch 版本不同時,Compose 匯入/未宣告 SDK 的預設路徑下載不存在 SDK tag 的問題;改由固定 templates 的 Go module 讀取 SDK pin,daemon-control 預設值亦同步。保留明確 SDK 宣告的優先順序,新增無 source override 的版本拆分回歸測試與正式產物 smoke。templates/SDK 保持 0.15.2,全部 executor/lifecycle digest 不變;請由 CLI 0.15.3 升級至 0.15.4,不新增管理員重新核准要求。
10
+
3
11
  ## 0.15.3 (2026-10-18)
4
12
 
5
13
  - Pin templates and SDK fixtures/examples to 0.15.2, including UI 0.12.0 scaffolds, concise UI copy/tokens and delegate DTO contract checks.
package/README.md CHANGED
@@ -61,6 +61,9 @@ children's `GOPRIVATE`, `GONOPROXY` and `GONOSUMDB`, preserving existing environ
61
61
  `https://github.com/synopackageland/syno-pkg-land-sdk` (check with `git ls-remote`);
62
62
  a failed fetch reports `SDK_DOWNLOAD_FAILED`.
63
63
 
64
+ CLI-only patch releases can differ from the SDK patch. Compose import and SDK defaults
65
+ read the SDK pin from the installed templates; explicit App SDK declarations take precedence.
66
+
64
67
  `init` and `add` read their templates from `@synopackageland/templates`, an exact-pinned
65
68
  dependency. For development against local checkouts, set `SYNOPKGLAND_TEMPLATES_DIR` to a
66
69
  templates checkout and `SYNOPKGLAND_SDK_DIR` to an SDK checkout; SPKs built with
@@ -5,7 +5,7 @@ import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync
5
5
  import { tmpdir } from "node:os";
6
6
  import { dirname, join } from "node:path";
7
7
  import { parse } from "yaml";
8
- import { CLI_VERSION } from "../cli-version.js";
8
+ import { templateSdkVersion } from "../template-paths.js";
9
9
  import { goChildEnv } from "../runtime/go-env.js";
10
10
  import { sdkSource } from "../runtime/sdk-source.js";
11
11
  import { readDaemon } from "./daemon.js";
@@ -69,7 +69,7 @@ export function readComposeApp(value, root, arches, fail, context = {}) {
69
69
  if (value.sdk !== undefined &&
70
70
  (typeof value.sdk !== "string" || !/^\d+\.\d+\.\d+$/.test(value.sdk)))
71
71
  return invalid("compose.sdk must name the matching SDK release.", "SDK_COMPOSE_UNSUPPORTED");
72
- const sdk = typeof value.sdk === "string" ? value.sdk : (context.sdk ?? CLI_VERSION);
72
+ const sdk = typeof value.sdk === "string" ? value.sdk : (context.sdk ?? templateSdkVersion());
73
73
  let targets = {};
74
74
  if (value.helpers !== undefined) {
75
75
  const d = readDaemon({ exec: "_sso/gateway", targets: value.helpers }, root, arches, fail);
@@ -250,7 +250,7 @@ export function lockComposeImages(m, arch, resolveImages, imageProofs) {
250
250
  return { ...m, compose };
251
251
  }
252
252
  export function composeInputs(root, file, envFile) {
253
- const result = spawnSync(planner(CLI_VERSION), [
253
+ const result = spawnSync(planner(templateSdkVersion()), [
254
254
  "sources",
255
255
  "--root",
256
256
  root,
@@ -3,7 +3,7 @@ import { chmodSync, copyFileSync, lstatSync, mkdirSync, readdirSync, realpathSyn
3
3
  import { isAbsolute, join, relative, resolve } from "node:path";
4
4
  import { PINNED_GO_HINT, pinnedGoBuildEnv, pinnedGoProblem, } from "../build-spk/go-toolchain.js";
5
5
  import { sdkSource, appSdkVersion } from "../runtime/sdk-source.js";
6
- import { CLI_VERSION } from "../cli-version.js";
6
+ import { templateSdkVersion } from "../template-paths.js";
7
7
  import { checkCgiBinary } from "./binary.js";
8
8
  import { composeDaemon, composeNetwork } from "./compose.js";
9
9
  import { gatewayDaemon } from "./identity-gateway.js";
@@ -141,7 +141,7 @@ export async function buildDaemonControl(manifest, arch, work, run) {
141
141
  (manifest.backend.kind === "go"
142
142
  ? appSdkVersion(manifest.backend)
143
143
  : undefined) ??
144
- CLI_VERSION).goDir,
144
+ templateSdkVersion()).goDir,
145
145
  env: goChildEnv({ ...process.env, ...pinnedGoBuildEnv(arch) }),
146
146
  });
147
147
  if (result.missing || result.status !== 0)
@@ -3,3 +3,7 @@
3
3
  * package; SYNOPKGLAND_TEMPLATES_DIR points at a templates checkout instead.
4
4
  */
5
5
  export declare function templatesRoot(env?: NodeJS.ProcessEnv, from?: string): string;
6
+ /** The installed templates' SDK pin also supplies CLI-owned runtime defaults.
7
+ * CLI-only patch releases must never turn their own version into an SDK tag.
8
+ */
9
+ export declare function templateSdkVersion(env?: NodeJS.ProcessEnv): string;
@@ -1,5 +1,6 @@
1
1
  import { createRequire } from "node:module";
2
2
  import { dirname, join } from "node:path";
3
+ import { sdkRequirement } from "./runtime/sdk-source.js";
3
4
  /**
4
5
  * The scaffold templates come from the exactly pinned @synopackageland/templates
5
6
  * package; SYNOPKGLAND_TEMPLATES_DIR points at a templates checkout instead.
@@ -14,3 +15,13 @@ export function templatesRoot(env = process.env, from = import.meta.url) {
14
15
  throw new Error("[TEMPLATES_MISSING] @synopackageland/templates is not installed; reinstall @synopackageland/cli, or set SYNOPKGLAND_TEMPLATES_DIR to a templates checkout.");
15
16
  }
16
17
  }
18
+ /** The installed templates' SDK pin also supplies CLI-owned runtime defaults.
19
+ * CLI-only patch releases must never turn their own version into an SDK tag.
20
+ */
21
+ export function templateSdkVersion(env = process.env) {
22
+ const version = sdkRequirement(join(templatesRoot(env), "native-go/backend"));
23
+ if (!version || !/^\d+\.\d+\.\d+$/.test(version)) {
24
+ throw new Error("[TEMPLATES_MISSING] The installed templates have no valid SDK pin; reinstall @synopackageland/templates.");
25
+ }
26
+ return version;
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/cli",
3
- "version": "0.15.3",
3
+ "version": "0.15.4",
4
4
  "description": "Syno Package Land Developer Kit CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -151,7 +151,7 @@ declared availability readiness, LAN isolation/egress, protected grant lifecycle
151
151
  ACLs, two-user visibility and clean install/upgrade/reboot/stop/uninstall before
152
152
  calling the package supported on a NAS. No NAS is accessed by the build gate.
153
153
 
154
- The unified Compose contract uses SDK/templates 0.15.2 with CLI 0.15.3. Use the published, matching versions together; the legacy packaging route and bridge publish mode are removed.
154
+ The unified Compose contract uses SDK/templates 0.15.2 with CLI 0.15.4. Use the published, matching versions together; the legacy packaging route and bridge publish mode are removed.
155
155
 
156
156
  Primary override files, and each included override set, must share a directory. Cross-directory override bases are rejected before loader I/O. Included implicit .env files are confined, inventoried and preserved; symlinks are rejected.
157
157