@e2e-dev/limrun 0.2.1-nightly-20261015074742 → 0.2.1
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/.build.json +1 -1
- package/dist/daemon.js +14 -3
- package/package.json +6 -6
package/dist/.build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.2.1
|
|
1
|
+
{"version":"0.2.1"}
|
package/dist/daemon.js
CHANGED
|
@@ -8,18 +8,29 @@ const exec = promisify(execFile);
|
|
|
8
8
|
function installation() {
|
|
9
9
|
let directory = path.dirname(fileURLToPath(import.meta.resolve('agent-device')));
|
|
10
10
|
while (true) {
|
|
11
|
+
const file = path.join(directory, 'package.json');
|
|
12
|
+
let manifest;
|
|
11
13
|
try {
|
|
12
|
-
|
|
13
|
-
if (manifest.name === 'agent-device')
|
|
14
|
-
return { version: manifest.version, bin: path.join(directory, manifest.bin['agent-device']) };
|
|
14
|
+
manifest = JSON.parse(readFileSync(file, 'utf8'));
|
|
15
15
|
}
|
|
16
16
|
catch { /* The entry may be several directories below its package. */ }
|
|
17
|
+
if (isRecord(manifest) && manifest['name'] === 'agent-device') {
|
|
18
|
+
const version = manifest['version'];
|
|
19
|
+
const bin = isRecord(manifest['bin']) ? manifest['bin']['agent-device'] : undefined;
|
|
20
|
+
if (typeof version !== 'string' || typeof bin !== 'string')
|
|
21
|
+
throw new Error(`Cannot find the installed agent-device CLI: ${file} declares no version or agent-device bin`);
|
|
22
|
+
return { version, bin: path.join(directory, bin) };
|
|
23
|
+
}
|
|
17
24
|
const parent = path.dirname(directory);
|
|
18
25
|
if (parent === directory)
|
|
19
26
|
throw new Error('Cannot find the installed agent-device CLI');
|
|
20
27
|
directory = parent;
|
|
21
28
|
}
|
|
22
29
|
}
|
|
30
|
+
/** A plain JSON object, not an array or `null`. */
|
|
31
|
+
function isRecord(value) {
|
|
32
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
33
|
+
}
|
|
23
34
|
export function assertDriverVersion(expected) {
|
|
24
35
|
const actual = installation().version;
|
|
25
36
|
if (actual !== expected)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e2e-dev/limrun",
|
|
3
|
-
"version": "0.2.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Limrun hosted iOS simulators and Android emulators for e2e mobile tests",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"e2e",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"NOTICE"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@e2e-dev/mobile": "0.
|
|
44
|
-
"e2e": "0.
|
|
43
|
+
"@e2e-dev/mobile": ">=0.11.1 <1",
|
|
44
|
+
"e2e": ">=0.15.0 <1",
|
|
45
45
|
"@limrun/api": ">=0.59.0 <1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@e2e-dev/mobile": "0.12.
|
|
48
|
+
"@e2e-dev/mobile": "0.12.3",
|
|
49
49
|
"@types/node": "26.6.2",
|
|
50
|
-
"e2e": "0.21.
|
|
50
|
+
"e2e": "0.21.2",
|
|
51
51
|
"typescript": "7.0.2",
|
|
52
52
|
"vitest": "5.0.1",
|
|
53
53
|
"@limrun/api": "0.59.0"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"node": "^22.22.3 || >=24.8.0"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"agent-device": "0.21.
|
|
59
|
+
"agent-device": "0.21.28"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc --project tsconfig.build.json && node ../../scripts/stamp-dist.ts",
|