botrun-horse 2.28.3 → 2.28.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/bin/bh.mjs CHANGED
@@ -16,6 +16,11 @@ import { COMMANDS } from './commands/schema.mjs';
16
16
 
17
17
  const { command, subcommand, flags, positionals } = parseArgs(process.argv);
18
18
 
19
+ // ===== Version =====
20
+ if (flags.version || command === '--version' || command === '-V') {
21
+ process.stdout.write(`${VERSION}\n`); process.exit(0);
22
+ }
23
+
19
24
  // ===== Help 快速路由 =====
20
25
  if (flags.help && !command) {
21
26
  const { showHelp } = await import('./commands/help.mjs');
@@ -3,8 +3,11 @@
3
3
 
4
4
  import fs from 'fs';
5
5
  import path from 'path';
6
+ import { fileURLToPath } from 'url';
6
7
 
7
- const VERSION = '2.0.0';
8
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
9
+ const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../../package.json'), 'utf-8'));
10
+ const VERSION = pkg.version;
8
11
 
9
12
  // 支援的文件副檔名(doc 系列指令)
10
13
  const DOC_EXTS = new Set(['.pdf', '.docx', '.doc', '.odt', '.pptx', '.ppt', '.odp', '.xlsx', '.xls', '.ods', '.txt', '.md', '.rst']);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botrun-horse",
3
- "version": "2.28.3",
3
+ "version": "2.28.4",
4
4
  "description": "多專案文件處理系統 CLI — AI 提示詞管理、文件擷取、公文撰寫",
5
5
  "type": "module",
6
6
  "bin": {