kodevu 0.1.40 → 0.1.41
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 +1 -0
- package/package.json +1 -1
- package/src/config.js +11 -0
- package/src/index.js +6 -1
package/README.md
CHANGED
|
@@ -49,6 +49,7 @@ npx kodevu [target] [options]
|
|
|
49
49
|
- `--output, -o`: Report output directory (default: `~/.kodevu`).
|
|
50
50
|
- `--format, -f`: Output formats (e.g., `markdown`, `json`, or `markdown,json`).
|
|
51
51
|
- `--debug, -d`: Print debug information.
|
|
52
|
+
- `--version, -V`: Print the current version and exit.
|
|
52
53
|
|
|
53
54
|
### Environment Variables
|
|
54
55
|
|
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -101,6 +101,7 @@ export function parseCliArgs(argv) {
|
|
|
101
101
|
target: "",
|
|
102
102
|
debug: false,
|
|
103
103
|
help: false,
|
|
104
|
+
version: false,
|
|
104
105
|
reviewer: "",
|
|
105
106
|
lang: "",
|
|
106
107
|
prompt: "",
|
|
@@ -118,6 +119,11 @@ export function parseCliArgs(argv) {
|
|
|
118
119
|
continue;
|
|
119
120
|
}
|
|
120
121
|
|
|
122
|
+
if (value === "--version" || value === "-V") {
|
|
123
|
+
args.version = true;
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
|
|
121
127
|
if (value === "--debug" || value === "-d") {
|
|
122
128
|
args.debug = true;
|
|
123
129
|
continue;
|
|
@@ -276,6 +282,7 @@ Options:
|
|
|
276
282
|
--format, -f Output formats (markdown, json, comma-separated)
|
|
277
283
|
--debug, -d Print extra debug information
|
|
278
284
|
--help, -h Show help
|
|
285
|
+
--version, -V Show version
|
|
279
286
|
|
|
280
287
|
Environment Variables:
|
|
281
288
|
KODEVU_REVIEWER Default reviewer
|
|
@@ -285,3 +292,7 @@ Environment Variables:
|
|
|
285
292
|
KODEVU_TIMEOUT Reviewer timeout in ms
|
|
286
293
|
`);
|
|
287
294
|
}
|
|
295
|
+
|
|
296
|
+
export function printVersion() {
|
|
297
|
+
console.log(packageVersion);
|
|
298
|
+
}
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { resolveConfig, parseCliArgs, printHelp } from "./config.js";
|
|
3
|
+
import { resolveConfig, parseCliArgs, printHelp, printVersion } from "./config.js";
|
|
4
4
|
import { runReviewCycle } from "./review-runner.js";
|
|
5
5
|
import { logger } from "./logger.js";
|
|
6
6
|
|
|
@@ -19,6 +19,11 @@ if (cliArgs.help) {
|
|
|
19
19
|
process.exit(0);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
if (cliArgs.version) {
|
|
23
|
+
printVersion();
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
try {
|
|
23
28
|
const config = await resolveConfig(cliArgs);
|
|
24
29
|
logger.init(config);
|