@testflowkit/cli 2.0.0 → 2.1.0
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 -1
- package/bin/cli.js +18 -0
- package/lib/index.js +1 -1
- package/lib/install.js +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ features:
|
|
|
56
56
|
|
|
57
57
|
## Documentation
|
|
58
58
|
|
|
59
|
-
For full documentation, visit [TestFlowKit Documentation](https://testflowkit.github.io/testflowkit/).
|
|
59
|
+
For full documentation, visit [TestFlowKit Documentation](https://testflowkit.github.io/testflowkit/testflowkit/).
|
|
60
60
|
|
|
61
61
|
## Supported Platforms
|
|
62
62
|
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const BINARY_NAME = process.platform === "win32" ? "tkit.exe" : "tkit";
|
|
7
|
+
// Store the actual binary in a 'cli' subdirectory to avoid naming conflict
|
|
8
|
+
const binaryPath = path.join(__dirname, "..", "cli", BINARY_NAME);
|
|
9
|
+
|
|
10
|
+
// Pass all arguments to the binary
|
|
11
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
12
|
+
stdio: "inherit",
|
|
13
|
+
windowsHide: true,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
child.on("exit", (code) => {
|
|
17
|
+
process.exit(code || 0);
|
|
18
|
+
});
|
package/lib/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const path = require("path");
|
|
|
17
17
|
const fs = require("fs");
|
|
18
18
|
|
|
19
19
|
const BINARY_NAME = process.platform === "win32" ? "tkit.exe" : "tkit";
|
|
20
|
-
const binaryPath = path.join(__dirname, "..", "
|
|
20
|
+
const binaryPath = path.join(__dirname, "..", "cli", BINARY_NAME);
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Get the path to the tkit binary
|
package/lib/install.js
CHANGED
|
@@ -115,7 +115,7 @@ function makeExecutable(filePath) {
|
|
|
115
115
|
* Main installation function
|
|
116
116
|
*/
|
|
117
117
|
async function install() {
|
|
118
|
-
const binDir = path.join(__dirname, "..", "
|
|
118
|
+
const binDir = path.join(__dirname, "..", "cli");
|
|
119
119
|
const binaryName = getBinaryName();
|
|
120
120
|
const binaryPath = path.join(binDir, binaryName);
|
|
121
121
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testflowkit/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "TestFlowKit CLI - A powerful end-to-end testing framework using Gherkin syntax",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"bin": {
|
|
10
|
-
"tkit": "
|
|
10
|
+
"tkit": "bin/cli.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"postinstall": "node ./lib/install.js"
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"adm-zip": "^0.5.10"
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
52
|
-
"bin",
|
|
52
|
+
"bin/cli.js",
|
|
53
|
+
"cli",
|
|
53
54
|
"lib/install.js",
|
|
54
55
|
"lib/index.js",
|
|
55
56
|
"README.md"
|