agen-vektor 0.2.0 → 0.2.1
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/cli/index.js +12 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -23,7 +23,18 @@ const logger_1 = require("../utils/logger");
|
|
|
23
23
|
const keyboard_1 = require("./keyboard");
|
|
24
24
|
const terminal_1 = require("../utils/terminal");
|
|
25
25
|
const session_1 = require("../agent/session");
|
|
26
|
-
|
|
26
|
+
// Read version from package.json so --version always matches the published release.
|
|
27
|
+
function getVersion() {
|
|
28
|
+
try {
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
30
|
+
const pkg = require('../../package.json');
|
|
31
|
+
return pkg.version || '0.0.0';
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return '0.0.0';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const VERSION = getVersion();
|
|
27
38
|
function parseArgs(argv) {
|
|
28
39
|
const opts = {};
|
|
29
40
|
const positional = [];
|
package/package.json
CHANGED