devfix-cli 1.0.5 → 1.0.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.
Files changed (2) hide show
  1. package/bin/index.js +5 -3
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from "commander";
3
+ import { createRequire } from "module";
3
4
 
4
5
  import { loginCommand } from "../src/commands/login.js";
5
6
  import { logoutCommand } from "../src/commands/logout.js";
@@ -7,13 +8,15 @@ import { whoamiCommand } from "../src/commands/whoami.js";
7
8
  import { analyzeCommand } from "../src/commands/analyze.js";
8
9
  import { runCommand } from "../src/utils/run.js";
9
10
 
11
+ const require = createRequire(import.meta.url);
12
+ const pkg = require("../package.json");
10
13
 
11
14
  const program = new Command();
12
15
 
13
16
  program
14
17
  .name("devfix")
15
18
  .description("DevFix CLI - AI tool to solve errors and bugs")
16
- .version("1.0.0");
19
+ .version(pkg.version);
17
20
 
18
21
  program.command("login").description("Login and save session for 7 days").action(loginCommand);
19
22
 
@@ -35,7 +38,7 @@ program
35
38
  file: options.file,
36
39
  stack: options.stack,
37
40
  model: options.model,
38
- useContext: options.context,
41
+ useContext: options.context,
39
42
  });
40
43
  });
41
44
 
@@ -54,5 +57,4 @@ program
54
57
  });
55
58
  });
56
59
 
57
-
58
60
  program.parse(process.argv);
package/package.json CHANGED
@@ -18,5 +18,5 @@
18
18
  "marked-terminal": "^7.3.0",
19
19
  "ora": "^9.3.0"
20
20
  },
21
- "version": "1.0.5"
21
+ "version": "1.0.6"
22
22
  }