@steinscheng/zhaotongkuan 0.8.0 → 0.8.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/README.md CHANGED
@@ -6,6 +6,17 @@
6
6
  npx @steinscheng/zhaotongkuan@latest install --start --json
7
7
  ```
8
8
 
9
+ 自动化或远程部署在只想验证安装、启动、授权门禁后立即退出时,使用:
10
+
11
+ ```bash
12
+ npx @steinscheng/zhaotongkuan@latest install \
13
+ --start \
14
+ --stop-after-check \
15
+ --json
16
+ ```
17
+
18
+ `--stop-after-check` 必须与 `--start` 同时使用;成功结果不会留下本地服务进程。
19
+
9
20
  私有 GitHub Release 会优先使用已登录的 `gh` CLI 下载;引导器不读取、保存或输出 GitHub Token。也可以安装发行方通过其他可信渠道交付的本地 ZIP:
10
21
 
11
22
  ```bash
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@steinscheng/zhaotongkuan",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Small, verifiable installer bootstrap for the Zhaotongkuan Codex plugin",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "zhaotongkuan": "bin/zhaotongkuan.js"
8
8
  },
9
9
  "files": [
10
- "bin/",
11
- "src/",
10
+ "bin/zhaotongkuan.js",
11
+ "src/cli.js",
12
+ "src/extract_installer.py",
13
+ "src/release-channel.json",
12
14
  "README.md",
13
15
  "LICENSE.txt"
14
16
  ],
package/src/cli.js CHANGED
@@ -81,6 +81,7 @@ export function parseArgs(argv) {
81
81
  json: false,
82
82
  dryRun: false,
83
83
  start: false,
84
+ stopAfterCheck: false,
84
85
  archive: "",
85
86
  expectedSha256: "",
86
87
  version: "",
@@ -110,6 +111,7 @@ export function parseArgs(argv) {
110
111
  if (flag === "--json") result.json = true;
111
112
  else if (flag === "--dry-run") result.dryRun = true;
112
113
  else if (flag === "--start") result.start = true;
114
+ else if (flag === "--stop-after-check") result.stopAfterCheck = true;
113
115
  else if (flag === "--help" || flag === "-h") result.command = "help";
114
116
  else if (flag === "--bootstrap-version") result.command = "version";
115
117
  else if (valueFlags.has(flag)) {
@@ -316,6 +318,7 @@ export function installerArgv(options, release, archivePath, installerPath) {
316
318
  ];
317
319
  if (options.dryRun) argv.push("--dry-run");
318
320
  if (options.start) argv.push("--start");
321
+ if (options.stopAfterCheck) argv.push("--stop-after-check");
319
322
  const mappings = [
320
323
  [options.dataDir, "--data-dir"],
321
324
  [options.installRoot, "--install-root"],
@@ -366,7 +369,7 @@ export function sanitizeForJson(value, key = "", depth = 0) {
366
369
  }
367
370
 
368
371
  function help() {
369
- return `Usage:\n npx @steinscheng/zhaotongkuan@latest install [options]\n\nSupported hosts:\n macOS or Linux on x64/arm64\n\nOptions:\n --archive <path-or-https-url> Install an explicit release archive\n --expected-sha256 <digest> Trusted SHA-256 (required with --archive)\n --dry-run Validate without writing\n --start Start and health-check the service\n --data-dir <path> Preserve business data outside the program\n --install-root <path> Override managed program directory\n --codex-bin <path> Use an explicit Codex CLI\n --python <path> Use an explicit Python 3.10+ executable\n --json Emit one JSON object\n`;
372
+ return `Usage:\n npx @steinscheng/zhaotongkuan@latest install [options]\n\nSupported hosts:\n macOS or Linux on x64/arm64\n\nOptions:\n --archive <path-or-https-url> Install an explicit release archive\n --expected-sha256 <digest> Trusted SHA-256 (required with --archive)\n --dry-run Validate without writing\n --start Start and health-check the service\n --stop-after-check Stop after a successful startup health check\n --data-dir <path> Preserve business data outside the program\n --install-root <path> Override managed program directory\n --codex-bin <path> Use an explicit Codex CLI\n --python <path> Use an explicit Python 3.10+ executable\n --json Emit one JSON object\n`;
370
373
  }
371
374
 
372
375
  function emitError(error, jsonMode) {
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "repository": "SchengSteins/zhaotongkuan",
4
- "version": "0.8.0",
4
+ "version": "0.8.1",
5
5
  "artifacts": {
6
6
  "any": {
7
- "url": "https://github.com/SchengSteins/zhaotongkuan/releases/download/v0.8.0/zhaotongkuan-0.8.0.zip",
8
- "sha256": "4bee7fcb5a24facbaa8d943ce8a41a6e900464de9f371bd06a545bc4aae14ad5"
7
+ "url": "https://github.com/SchengSteins/zhaotongkuan/releases/download/v0.8.1/zhaotongkuan-0.8.1.zip",
8
+ "sha256": "998cf8435956791f40f15fb89e62862e43872074a3210ce8e1746f56ef101b71"
9
9
  }
10
10
  }
11
11
  }