testdriverai 5.0.0-beta.6 → 5.0.0-beta.8
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/electron/overlay.js +4 -4
- package/lib/config.js +1 -1
- package/lib/sandbox.js +11 -7
- package/lib/system.js +2 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
package/electron/overlay.js
CHANGED
|
@@ -15,12 +15,11 @@ app.whenReady().then(() => {
|
|
|
15
15
|
if (config.TD_VM) {
|
|
16
16
|
|
|
17
17
|
windowOptions = {
|
|
18
|
-
width:
|
|
19
|
-
height:
|
|
18
|
+
width: 1024,
|
|
19
|
+
height: 768,
|
|
20
20
|
closable: true,
|
|
21
21
|
resizable: true,
|
|
22
22
|
show: false,
|
|
23
|
-
alwaysOnTop: true,
|
|
24
23
|
webPreferences: {
|
|
25
24
|
nodeIntegration: true,
|
|
26
25
|
contextIsolation: false,
|
|
@@ -64,6 +63,7 @@ app.whenReady().then(() => {
|
|
|
64
63
|
visibleOnFullScreen: true,
|
|
65
64
|
});
|
|
66
65
|
} else {
|
|
66
|
+
window.setContentSize(1024, 768);
|
|
67
67
|
window.setBackgroundColor('#000')
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -74,7 +74,7 @@ app.whenReady().then(() => {
|
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
// open developer tools
|
|
77
|
-
window.webContents.openDevTools();
|
|
77
|
+
// window.webContents.openDevTools();
|
|
78
78
|
|
|
79
79
|
ipc.serve(() => {
|
|
80
80
|
for (const event of eventsArray) {
|
package/lib/config.js
CHANGED
|
@@ -26,7 +26,7 @@ const config = {
|
|
|
26
26
|
TD_ANALYTICS: true,
|
|
27
27
|
TD_NOTIFY: false,
|
|
28
28
|
TD_MINIMIZE: true,
|
|
29
|
-
TD_API_ROOT: "https://replayable-
|
|
29
|
+
TD_API_ROOT: "https://replayable-api-production.herokuapp.com",
|
|
30
30
|
TD_API_KEY: null,
|
|
31
31
|
TD_DEV: parseValue(process.env["DEV"]),
|
|
32
32
|
TD_PROFILE: false,
|
package/lib/sandbox.js
CHANGED
|
@@ -6,6 +6,7 @@ class Sandbox {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.socket = null;
|
|
8
8
|
this.ps = {};
|
|
9
|
+
this.heartbeat = null;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
send(message) {
|
|
@@ -28,12 +29,19 @@ class Sandbox {
|
|
|
28
29
|
|
|
29
30
|
// handle errors
|
|
30
31
|
this.socket.on('error', (err) => {
|
|
31
|
-
console.log('
|
|
32
|
-
console.log(
|
|
32
|
+
console.log('Socket Closed');
|
|
33
|
+
console.log('If this happens during setup, check your API Key (`TD_API_KEY` in `.env`).');
|
|
34
|
+
err && console.log(err);
|
|
35
|
+
clearInterval(this.heartbeat);
|
|
33
36
|
reject();
|
|
34
|
-
});
|
|
37
|
+
});
|
|
35
38
|
|
|
36
39
|
this.socket.on('open', async () => {
|
|
40
|
+
|
|
41
|
+
this.heartbeat = setInterval(() => {
|
|
42
|
+
this.send({type: 'ping'});
|
|
43
|
+
}, 5000);
|
|
44
|
+
|
|
37
45
|
resolve(this);
|
|
38
46
|
});
|
|
39
47
|
|
|
@@ -48,10 +56,6 @@ class Sandbox {
|
|
|
48
56
|
}
|
|
49
57
|
});
|
|
50
58
|
|
|
51
|
-
this.socket.on('close', () => {
|
|
52
|
-
console.log('Disconnected from server. Check your API Key (`TD_API_KEY`).');
|
|
53
|
-
reject();
|
|
54
|
-
});
|
|
55
59
|
});
|
|
56
60
|
}
|
|
57
61
|
}
|
package/lib/system.js
CHANGED
|
@@ -178,7 +178,8 @@ const activeWin = async () => {
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
const getMousePosition = async () => {
|
|
181
|
-
|
|
181
|
+
// @todo vm does expose mouse position, add it back
|
|
182
|
+
return config.TD_VM ? await robot.getMousePos() : null;
|
|
182
183
|
};
|
|
183
184
|
|
|
184
185
|
module.exports = {
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testdriverai",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.7",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "testdriverai",
|
|
9
|
-
"version": "5.0.0-beta.
|
|
9
|
+
"version": "5.0.0-beta.7",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@e2b/desktop": "^1.6.0",
|