@nodeskai/genehub 2026.3.4-5 → 2026.3.4-6

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/dist/index.js CHANGED
@@ -6,6 +6,8 @@ var __export = (target, all) => {
6
6
  };
7
7
 
8
8
  // src/index.ts
9
+ import { readFileSync, realpathSync } from "fs";
10
+ import { dirname as dirname2, join as join13 } from "path";
9
11
  import { fileURLToPath } from "url";
10
12
  import { Command as Command12 } from "commander";
11
13
 
@@ -7083,7 +7085,17 @@ var uninstallCommand = new Command11("uninstall").description("\u4ECE\u5F53\u524
7083
7085
 
7084
7086
  // src/index.ts
7085
7087
  var program = new Command12();
7086
- program.name("genehub").description("GeneHub CLI - AI \u5458\u5DE5\u57FA\u56E0\u7BA1\u7406\u5DE5\u5177").version("0.1.0");
7088
+ var __filename = fileURLToPath(import.meta.url);
7089
+ var __dirname = dirname2(__filename);
7090
+ function loadVersion() {
7091
+ try {
7092
+ const pkg = JSON.parse(readFileSync(join13(__dirname, "..", "package.json"), "utf-8"));
7093
+ return pkg.version ?? "0.0.0";
7094
+ } catch {
7095
+ return "0.0.0";
7096
+ }
7097
+ }
7098
+ program.name("genehub").description("GeneHub CLI - AI \u5458\u5DE5\u57FA\u56E0\u7BA1\u7406\u5DE5\u5177").version(loadVersion());
7087
7099
  program.addCommand(authCommand);
7088
7100
  program.addCommand(installCommand);
7089
7101
  program.addCommand(uninstallCommand);
@@ -7095,8 +7107,14 @@ program.addCommand(configCommand);
7095
7107
  program.addCommand(learnCommand);
7096
7108
  program.addCommand(genomeCommand);
7097
7109
  program.addCommand(templateCommand);
7098
- var __filename = fileURLToPath(import.meta.url);
7099
- if (process.argv[1] === __filename) {
7110
+ function isDirectRun() {
7111
+ try {
7112
+ return realpathSync(process.argv[1]) === realpathSync(__filename);
7113
+ } catch {
7114
+ return false;
7115
+ }
7116
+ }
7117
+ if (isDirectRun()) {
7100
7118
  program.parse();
7101
7119
  }
7102
7120
  export {