testdriverai 5.0.7 → 5.0.9
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/agent.js +8 -0
- package/lib/system.js +11 -5
- package/package.json +4 -3
- package/package-lock.json +0 -8705
package/agent.js
CHANGED
|
@@ -740,6 +740,14 @@ const firstPrompt = async () => {
|
|
|
740
740
|
analytics.track("input", { input });
|
|
741
741
|
|
|
742
742
|
logger.info(""); // adds a nice break between submissions
|
|
743
|
+
|
|
744
|
+
let interpolationVars = JSON.parse(process.env["TD_INTERPOLATION_VARS"] || '{}');
|
|
745
|
+
|
|
746
|
+
// Inject environment variables into any ${VAR} strings
|
|
747
|
+
input = parser.interpolate(input, process.env);
|
|
748
|
+
|
|
749
|
+
// Inject any vars from the TD_INTERPOLATION_VARS variable (typically from the action)
|
|
750
|
+
input = parser.interpolate(input, interpolationVars);
|
|
743
751
|
|
|
744
752
|
let commands = input
|
|
745
753
|
.split(" ")
|
package/lib/system.js
CHANGED
|
@@ -35,13 +35,19 @@ let primaryDisplay = null;
|
|
|
35
35
|
// this is the only display we ever target, because fuck it
|
|
36
36
|
// the vm only has one and most people only have one
|
|
37
37
|
const getPrimaryDisplay = async () => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
|
|
39
|
+
if (!primaryDisplay) {
|
|
40
|
+
|
|
41
|
+
// calculate scaling resolution
|
|
42
|
+
let graphics = await si.graphics();
|
|
43
|
+
primaryDisplay = graphics.displays.find(
|
|
44
|
+
(display) => display.main == true,
|
|
45
|
+
);
|
|
43
46
|
|
|
47
|
+
}
|
|
48
|
+
|
|
44
49
|
return primaryDisplay;
|
|
50
|
+
|
|
45
51
|
};
|
|
46
52
|
|
|
47
53
|
const getSystemInformationOsInfo = async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testdriverai",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.9",
|
|
4
4
|
"description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
},
|
|
51
51
|
"overrides": {
|
|
52
52
|
"glob": "^11.0.1",
|
|
53
|
-
"rimraf": "^5.0.10"
|
|
53
|
+
"rimraf": "^5.0.10",
|
|
54
|
+
"robotjs": "npm:@hurdlegroup/robotjs@^0.12.3"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
57
|
"@eslint/js": "^9.10.0",
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
"@img/sharp-libvips-win32-x64": "^1.0.2",
|
|
69
70
|
"@img/sharp-win32-x64": "^0.33.4",
|
|
70
71
|
"get-windows": "^9.2.0",
|
|
71
|
-
"robotjs": "
|
|
72
|
+
"robotjs": "npm:@hurdlegroup/robotjs@^0.12.3",
|
|
72
73
|
"screenshot-desktop": "^1.15.0"
|
|
73
74
|
}
|
|
74
75
|
}
|