feishu-codex-console 1.0.0-beta.7 → 1.0.0-beta.8

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
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes are recorded here. Versions follow Semantic Versioning while the public API stabilizes.
4
4
 
5
+ ## 1.0.0-beta.8 - 2026-07-18
6
+
7
+ ### Fixed
8
+
9
+ - The installed CLI now supports the standard `--help`/`-h` and `--version`/`-v` aliases instead of treating them as options with missing values.
10
+
5
11
  ## 1.0.0-beta.7 - 2026-07-17
6
12
 
7
13
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feishu-codex-console",
3
- "version": "1.0.0-beta.7",
3
+ "version": "1.0.0-beta.8",
4
4
  "description": "A reliable Feishu control plane for local Codex projects, sessions, approvals, and live Card 2.0 tasks.",
5
5
  "private": false,
6
6
  "license": "MIT",
package/scripts/cli.mjs CHANGED
@@ -33,7 +33,15 @@ import { initializeRunbookTemplate } from "./runbook-template.mjs";
33
33
 
34
34
  const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
35
35
  const args = process.argv.slice(2);
36
- const command = args[0] && !args[0].startsWith("-") ? args.shift() : "help";
36
+ const commandToken = args[0];
37
+ const shorthandCommand =
38
+ commandToken === "--help" || commandToken === "-h"
39
+ ? "help"
40
+ : commandToken === "--version" || commandToken === "-v"
41
+ ? "version"
42
+ : undefined;
43
+ if (shorthandCommand) args.shift();
44
+ const command = shorthandCommand ?? (args[0] && !args[0].startsWith("-") ? args.shift() : "help");
37
45
  const flags = parseFlags(args);
38
46
 
39
47
  try {
@@ -31,10 +31,20 @@ try {
31
31
  await access(compatibilityCli);
32
32
  run(cli, ["help"], installDir);
33
33
  run(compatibilityCli, ["help"], installDir);
34
+ const helpAlias = run(cli, ["--help"], installDir);
35
+ if (!helpAlias.includes("用法:")) {
36
+ throw new Error("Installed CLI did not expose help through --help.");
37
+ }
38
+ run(compatibilityCli, ["-h"], installDir);
34
39
  const versionInfo = JSON.parse(run(cli, ["version", "--json"], installDir));
35
40
  if (versionInfo.product !== "feishu-codex-console" || !versionInfo.version) {
36
41
  throw new Error("Installed CLI did not expose version and compatibility metadata.");
37
42
  }
43
+ const versionAlias = run(cli, ["--version"], installDir);
44
+ if (!versionAlias.includes(`feishu-codex-console ${versionInfo.version}`)) {
45
+ throw new Error("Installed CLI did not expose its version through --version.");
46
+ }
47
+ run(compatibilityCli, ["-v"], installDir);
38
48
  runExpectFailure(
39
49
  cli,
40
50
  [
@@ -116,7 +126,7 @@ try {
116
126
  if (configMode !== 0o600) throw new Error(`Config mode is ${configMode.toString(8)}, expected 600.`);
117
127
  if (dataMode !== 0o700) throw new Error(`Data mode is ${dataMode.toString(8)}, expected 700.`);
118
128
  }
119
- console.log("Package smoke test passed: packed, installed, resumed, initialized runbooks, and previewed a safe upgrade.");
129
+ console.log("Package smoke test passed: packed, installed, verified CLI aliases, resumed, initialized runbooks, and previewed a safe upgrade.");
120
130
  } finally {
121
131
  await rm(sandbox, { recursive: true, force: true });
122
132
  if (archive) await rm(path.join(packageRoot, archive), { force: true });