testdriverai 4.1.4 → 4.1.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.
- package/lib/overlay.js +21 -13
- package/package.json +6 -6
package/lib/overlay.js
CHANGED
|
@@ -8,20 +8,28 @@ ipc.config.id = "testdriverai";
|
|
|
8
8
|
ipc.config.retry = 50;
|
|
9
9
|
ipc.config.silent = true;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
let electronProcess;
|
|
12
|
+
|
|
13
|
+
console.log("Starting overlay process...");
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
// Resolve the path to Electron CLI
|
|
17
|
+
const electronCliPath = require.resolve('electron/cli.js');
|
|
18
|
+
|
|
19
|
+
// Construct the path to the overlay.js script
|
|
20
|
+
const overlayScriptPath = path.join(__dirname, '..', 'electron', 'overlay.js');
|
|
21
|
+
|
|
22
|
+
// Fork the Electron process with overlay.js as an argument
|
|
23
|
+
electronProcess = fork(
|
|
24
|
+
electronCliPath,
|
|
25
|
+
[overlayScriptPath],
|
|
26
|
+
{ stdio: 'ignore' }
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error("Failed to locate Electron CLI or start process:", error);
|
|
31
|
+
}
|
|
20
32
|
|
|
21
|
-
process.on("exit", () => electronProcess.kill("SIGTERM"));
|
|
22
|
-
process.on("SIGINT", () => electronProcess.kill("SIGTERM")); // Ctrl+C
|
|
23
|
-
process.on("SIGTERM", () => electronProcess.kill("SIGTERM")); // Termination signal
|
|
24
|
-
process.on("uncaughtException", () => electronProcess.kill("SIGTERM"));
|
|
25
33
|
|
|
26
34
|
module.exports.electronProcessPromise = new Promise((resolve) => {
|
|
27
35
|
ipc.connectTo("testdriverai_overlay");
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testdriverai",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.6",
|
|
4
4
|
"description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"testdriverai": "./
|
|
7
|
+
"testdriverai": "./index.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"start": "node
|
|
11
|
-
"dev": "DEV=true node
|
|
12
|
-
"debug": "DEV=true VERBOSE=true node
|
|
10
|
+
"start": "node index.js",
|
|
11
|
+
"dev": "DEV=true node index.js",
|
|
12
|
+
"debug": "DEV=true VERBOSE=true node index.js",
|
|
13
13
|
"bundle": "node build.mjs"
|
|
14
14
|
},
|
|
15
15
|
"author": "",
|