@synopackageland/cli 0.54.10 → 0.54.11

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,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.54.11 (2026-11-22)
4
+
5
+ - `ctl generate` (and `--check`) no longer needs store text: it does not read the project `.env`, ignores `--catalog`/`SYNOPKGLAND_CATALOG`, and accepts a manifest without `description`. It previously failed when the catalog had no release notes for the current version, or when no `.env` supplied the catalog. `check`, `build` and `inspect` still require the catalog text as before.
6
+
3
7
  ## 0.54.10 (2026-11-21)
4
8
 
5
9
  - `check <spk>` and `inspect` scan public `ui/` files over 64 MiB instead of rejecting them with `SPK_UI_UNSAFE`: a larger file (such as a Go CGI) is streamed in 16 MiB windows with 1 MiB overlap, so a match longer than 1 MiB is still flagged but reported by its first 1 MiB. Executables keep their binary-pattern scanning.
package/README.md CHANGED
@@ -594,7 +594,7 @@ Use `synopkgland host add nas --url https://nas.example:5001 --username alice`
594
594
  to register and authenticate a NAS in OS secure storage. A bare host name uses
595
595
  `https://<host>:5001`; provide a full URL for a different scheme or port.
596
596
  The CLI loads only `DSM_*` and `SYNOPKGLAND_*` variables from `.env`; set other
597
- process variables in the shell. `host list --json`
597
+ process variables in the shell. `ctl generate` does not read `.env`. `host list --json`
598
598
  checks sessions; `ctl list --host nas --json` discovers all approved task-level
599
599
  commands and their schemas. Run the listed alias/command with typed flags,
600
600
  `--help` and `--dry-run`; writes require `--yes`. There is no mutable current
package/dist/bin.js CHANGED
@@ -2,7 +2,9 @@
2
2
  import { loadDotEnv } from "./load-env.js";
3
3
  import { runCli } from "./cli.js";
4
4
  import { terminalSafe } from "./terminal-text.js";
5
- loadDotEnv();
5
+ // `ctl generate` is an offline gate: it must not depend on a local secret file.
6
+ if (!(process.argv[2] === "ctl" && process.argv[3] === "generate"))
7
+ loadDotEnv();
6
8
  // Package deployment is explicit; this CLI does not publish releases.
7
9
  // Successful completion leaves Node's default 0 or the command's exitCode intact.
8
10
  runCli(process.argv).catch((error) => {
@@ -5,7 +5,7 @@ export async function generateCommand(args) {
5
5
  const check = args.includes('--check'), rest = args.filter(a => a !== '--check' && a !== '--json');
6
6
  if (rest.length)
7
7
  throw Error('Usage: synopkgland ctl generate [--check] [--json]');
8
- const loaded = loadStandaloneManifest(process.cwd());
8
+ const loaded = loadStandaloneManifest(process.cwd(), { storeText: false });
9
9
  if (!loaded.ok)
10
10
  throw Error(loaded.errors.map(e => e.message).join('\n'));
11
11
  const result = await generateOperations(loaded.manifest, async (command, argv, options) => {
@@ -190,7 +190,15 @@ export type ManifestResult = {
190
190
  errors: StandaloneError[];
191
191
  };
192
192
  export declare const KNOWN_FIELDS: Set<string>;
193
- export declare function loadStandaloneManifest(root: string): ManifestResult;
193
+ export interface ManifestLoadOptions {
194
+ /**
195
+ * false skips store text: no catalog is read (so no release notes are
196
+ * required) and description may be absent. For commands, such as
197
+ * `ctl generate`, that never write INFO or SPK metadata.
198
+ */
199
+ storeText?: boolean;
200
+ }
201
+ export declare function loadStandaloneManifest(root: string, options?: ManifestLoadOptions): ManifestResult;
194
202
  /**
195
203
  * The runtime registers routes from the manifest's methods: a policy for
196
204
  * another method, or an App method with an SDK name, would refuse to start.
@@ -133,7 +133,7 @@ class Collector {
133
133
  return value;
134
134
  }
135
135
  }
136
- export function loadStandaloneManifest(root) {
136
+ export function loadStandaloneManifest(root, options = {}) {
137
137
  const file = join(root, STANDALONE_MANIFEST);
138
138
  if (!existsSync(file)) {
139
139
  return {
@@ -164,12 +164,12 @@ export function loadStandaloneManifest(root) {
164
164
  c.fail("STANDALONE_MANIFEST_YAML", `${STANDALONE_MANIFEST} must be a YAML object.`);
165
165
  return { ok: false, errors: c.errors };
166
166
  }
167
- const manifest = readManifest(raw, c);
167
+ const manifest = readManifest(raw, c, options.storeText !== false);
168
168
  return manifest && c.errors.length === 0
169
169
  ? { ok: true, manifest }
170
170
  : { ok: false, errors: c.errors };
171
171
  }
172
- function readManifest(raw, c) {
172
+ function readManifest(raw, c, storeText) {
173
173
  let uiSecretIgnores = [];
174
174
  try {
175
175
  uiSecretIgnores = readUiSecretIgnores(raw.ui_secret_ignores);
@@ -229,11 +229,13 @@ function readManifest(raw, c) {
229
229
  c.fail("STANDALONE_OS_MIN_VER_INVALID", `root templates require DSM ${DEFAULT_MIN_DSM} or later.`);
230
230
  }
231
231
  const displayname = c.text(raw.displayname, "displayname");
232
- const catalogPath = activeCatalogPath();
232
+ const catalogPath = storeText ? activeCatalogPath() : undefined;
233
233
  // With a catalog, its entry is the only source of store text; the manifest must not repeat it.
234
234
  const description = catalogPath
235
235
  ? catalogOwnedFields(raw, c, catalogPath)
236
- : c.text(raw.description, "description");
236
+ : storeText || raw.description !== undefined
237
+ ? c.text(raw.description, "description")
238
+ : STORE_TEXT_SKIPPED;
237
239
  const maintainer = c.text(raw.maintainer, "maintainer");
238
240
  let metadata;
239
241
  if (raw.metadata !== undefined)
@@ -754,6 +756,8 @@ function readManifest(raw, c) {
754
756
  }
755
757
  return manifest;
756
758
  }
759
+ /** Description placeholder when store text is not loaded; never written to INFO. */
760
+ const STORE_TEXT_SKIPPED = "(store text not loaded)";
757
761
  /** Reports hand-written store text next to a catalog; returns the placeholder the catalog replaces. */
758
762
  function catalogOwnedFields(raw, c, catalogPath) {
759
763
  const found = [];
@@ -23,7 +23,8 @@ packages:
23
23
  Pass the file to `check`, `build` and `inspect` with `--catalog <catalog.yaml>`,
24
24
  or set `SYNOPKGLAND_CATALOG` (also in the project `.env`; a relative path is
25
25
  resolved from the current directory). Without either, the manifest's own text is
26
- used as before.
26
+ used as before. `ctl generate` reads no store text: it ignores the catalog and
27
+ needs neither release notes nor `description`.
27
28
 
28
29
  ## What the build writes
29
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/cli",
3
- "version": "0.54.10",
3
+ "version": "0.54.11",
4
4
  "description": "Syno Package Land Developer Kit CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,20 +26,6 @@
26
26
  "docs/install-memory.md",
27
27
  "docs/catalog-text.md"
28
28
  ],
29
- "scripts": {
30
- "check:docs": "node --test scripts/check-doc-versions.test.mjs && node scripts/check-doc-versions.mjs",
31
- "build": "rm -rf dist && node scripts/prepare-native-http.mjs && tsc",
32
- "test": "pnpm run build && node --import tsx --import ./test/helpers/strict-dsm-setup.ts --test --test-concurrency=${SYNOPKGLAND_GATE_JOBS:-3} test/*.test.ts test/ctl/*.test.ts",
33
- "test:glossary": "node --test scripts/test/glossary-drift.test.mjs",
34
- "test:scripts": "node --test scripts/test/gate.test.mjs scripts/test/release.test.mjs scripts/test/pack-docker.test.mjs scripts/test/npm-pack.test.mjs scripts/test/executor-bump.test.mjs scripts/test/smoke-exports.test.mjs scripts/test/parallel.test.mjs scripts/test/scaffold-matrix.test.mjs scripts/test/frontend-deps.test.mjs scripts/test/docker-gate.test.mjs scripts/test/gate-plan.test.mjs scripts/test/gates.test.mjs && python3 scripts/test/npm-publish.py",
35
- "gates": "bash scripts/ci/gates.sh",
36
- "gates:fast": "bash scripts/ci/gates.sh",
37
- "prepublishOnly": "pnpm run build && node --input-type=module -e 'import {enforceRepositorySecrets} from \"./dist/secret-files.js\"; enforceRepositorySecrets(process.cwd())'",
38
- "gates:full": "bash scripts/ci/gates.sh --full",
39
- "test:basic": "node --import tsx --test test/schema.test.ts test/standalone-manifest.test.ts test/native-arch.test.ts test/archive-inventory.test.ts test/secret-files.test.ts",
40
- "check:dsm-contract": "node scripts/check-dsm-api-contract.mjs",
41
- "check:dsm-hub": "node scripts/check-dsm-api-hub.mjs"
42
- },
43
29
  "dependencies": {
44
30
  "@napi-rs/keyring": "^2.1.1",
45
31
  "@synopackageland/templates": "~0.44.1",
@@ -102,5 +88,17 @@
102
88
  "./native-layout": "./dist/standalone/native-layout.js",
103
89
  "./e2e": "./dist/e2e/dsm.js"
104
90
  },
105
- "packageManager": "pnpm@12.18.0"
106
- }
91
+ "scripts": {
92
+ "check:docs": "node --test scripts/check-doc-versions.test.mjs && node scripts/check-doc-versions.mjs",
93
+ "build": "rm -rf dist && node scripts/prepare-native-http.mjs && tsc",
94
+ "test": "pnpm run build && node --import tsx --import ./test/helpers/strict-dsm-setup.ts --test --test-concurrency=${SYNOPKGLAND_GATE_JOBS:-3} test/*.test.ts test/ctl/*.test.ts",
95
+ "test:glossary": "node --test scripts/test/glossary-drift.test.mjs",
96
+ "test:scripts": "node --test scripts/test/gate.test.mjs scripts/test/release.test.mjs scripts/test/pack-docker.test.mjs scripts/test/npm-pack.test.mjs scripts/test/executor-bump.test.mjs scripts/test/smoke-exports.test.mjs scripts/test/parallel.test.mjs scripts/test/scaffold-matrix.test.mjs scripts/test/frontend-deps.test.mjs scripts/test/docker-gate.test.mjs scripts/test/gate-plan.test.mjs scripts/test/gates.test.mjs && python3 scripts/test/npm-publish.py",
97
+ "gates": "bash scripts/ci/gates.sh",
98
+ "gates:fast": "bash scripts/ci/gates.sh",
99
+ "gates:full": "bash scripts/ci/gates.sh --full",
100
+ "test:basic": "node --import tsx --test test/schema.test.ts test/standalone-manifest.test.ts test/native-arch.test.ts test/archive-inventory.test.ts test/secret-files.test.ts",
101
+ "check:dsm-contract": "node scripts/check-dsm-api-contract.mjs",
102
+ "check:dsm-hub": "node scripts/check-dsm-api-hub.mjs"
103
+ }
104
+ }