@usejourney/cli 0.1.0 → 0.1.2
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 +8 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
+
import { readFileSync as readFileSync2, realpathSync } from "fs";
|
|
4
5
|
import { resolve as resolvePath } from "path";
|
|
6
|
+
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
5
7
|
import { Command } from "commander";
|
|
6
8
|
|
|
7
9
|
// src/commands/envList.ts
|
|
@@ -1714,9 +1716,12 @@ async function handle(fn) {
|
|
|
1714
1716
|
process.exit(1);
|
|
1715
1717
|
}
|
|
1716
1718
|
}
|
|
1719
|
+
var { version } = JSON.parse(
|
|
1720
|
+
readFileSync2(new URL("../package.json", import.meta.url), "utf8")
|
|
1721
|
+
);
|
|
1717
1722
|
function buildProgram() {
|
|
1718
1723
|
const program = new Command();
|
|
1719
|
-
program.name("journey").description("Local-first API testing & orchestration tool").version(
|
|
1724
|
+
program.name("journey").description("Local-first API testing & orchestration tool").version(version);
|
|
1720
1725
|
program.command("init <dir>").requiredOption("--spec <path>", "OpenAPI spec file").option("--force", "Scaffold into a non-empty directory", false).description("Scaffold a new Journey project from an OpenAPI spec").action(
|
|
1721
1726
|
(dir, options) => handle(
|
|
1722
1727
|
() => runInit({
|
|
@@ -1831,7 +1836,8 @@ function buildProgram() {
|
|
|
1831
1836
|
envCmd.command("list").description("List available environments").action(() => handle(() => runEnvList(process.cwd())));
|
|
1832
1837
|
return program;
|
|
1833
1838
|
}
|
|
1834
|
-
var
|
|
1839
|
+
var invoked = process.argv[1];
|
|
1840
|
+
var isDirectRun = invoked != null && import.meta.url === pathToFileURL2(realpathSync(invoked)).href;
|
|
1835
1841
|
if (isDirectRun) {
|
|
1836
1842
|
buildProgram().parseAsync(process.argv);
|
|
1837
1843
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usejourney/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"commander": "^12.1.0",
|
|
24
24
|
"tsx": "^4.21.0",
|
|
25
25
|
"undici": "^8.3.0",
|
|
26
|
-
"@usejourney/codegen": "^0.1.
|
|
27
|
-
"@usejourney/core": "0.1.
|
|
28
|
-
"@usejourney/
|
|
29
|
-
"@usejourney/
|
|
26
|
+
"@usejourney/codegen": "^0.1.2",
|
|
27
|
+
"@usejourney/core": "0.1.2",
|
|
28
|
+
"@usejourney/k6-adapter": "^0.1.2",
|
|
29
|
+
"@usejourney/postman-adapter": "^0.1.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/newman": "^5.3.6",
|