@mobilewright/driver-mobilecli 0.0.17 → 0.0.18
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/resolve-binary.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* transpiles the source to CJS.
|
|
2
|
+
* Resolve the mobilecli binary using Node's module resolution so it works
|
|
3
|
+
* from npx caches, global installs, and local node_modules alike.
|
|
5
4
|
*/
|
|
6
5
|
export declare function resolveMobilecliBinary(): string;
|
|
7
6
|
//# sourceMappingURL=resolve-binary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-binary.d.ts","sourceRoot":"","sources":["../src/resolve-binary.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"resolve-binary.d.ts","sourceRoot":"","sources":["../src/resolve-binary.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAa/C"}
|
package/dist/resolve-binary.js
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import { join, dirname } from 'node:path';
|
|
2
|
-
import {
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* transpiles the source to CJS.
|
|
4
|
+
* Resolve the mobilecli binary using Node's module resolution so it works
|
|
5
|
+
* from npx caches, global installs, and local node_modules alike.
|
|
7
6
|
*/
|
|
8
7
|
export function resolveMobilecliBinary() {
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const binary = process.platform === 'darwin'
|
|
14
|
-
? (process.arch === 'arm64' ? 'mobilecli-darwin-arm64' : 'mobilecli-darwin-amd64')
|
|
15
|
-
: process.platform === 'linux'
|
|
16
|
-
? (process.arch === 'arm64' ? 'mobilecli-linux-arm64' : 'mobilecli-linux-amd64')
|
|
17
|
-
: null;
|
|
18
|
-
if (!binary)
|
|
19
|
-
throw new Error(`Unsupported platform: ${process.platform}-${process.arch}`);
|
|
20
|
-
return join(candidate, 'bin', binary);
|
|
21
|
-
}
|
|
22
|
-
const parent = dirname(dir);
|
|
23
|
-
if (parent === dir)
|
|
8
|
+
let binary;
|
|
9
|
+
switch (`${process.platform}-${process.arch}`) {
|
|
10
|
+
case 'darwin-arm64':
|
|
11
|
+
binary = 'mobilecli-darwin-arm64';
|
|
24
12
|
break;
|
|
25
|
-
|
|
13
|
+
case 'darwin-x64':
|
|
14
|
+
binary = 'mobilecli-darwin-amd64';
|
|
15
|
+
break;
|
|
16
|
+
case 'linux-arm64':
|
|
17
|
+
binary = 'mobilecli-linux-arm64';
|
|
18
|
+
break;
|
|
19
|
+
case 'linux-x64':
|
|
20
|
+
binary = 'mobilecli-linux-amd64';
|
|
21
|
+
break;
|
|
22
|
+
default: throw new Error(`Unsupported platform: ${process.platform}-${process.arch}`);
|
|
26
23
|
}
|
|
27
|
-
|
|
24
|
+
const _require = createRequire(import.meta.url);
|
|
25
|
+
const pkgJson = _require.resolve('@mobilenext/mobilecli/package.json');
|
|
26
|
+
return join(dirname(pkgJson), 'bin', binary);
|
|
28
27
|
}
|
|
29
28
|
//# sourceMappingURL=resolve-binary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-binary.js","sourceRoot":"","sources":["../src/resolve-binary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"resolve-binary.js","sourceRoot":"","sources":["../src/resolve-binary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;GAGG;AACH,MAAM,UAAU,sBAAsB;IACpC,IAAI,MAAc,CAAC;IACnB,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;QAC9C,KAAK,cAAc;YAAG,MAAM,GAAG,wBAAwB,CAAC;YAAE,MAAM;QAChE,KAAK,YAAY;YAAK,MAAM,GAAG,wBAAwB,CAAC;YAAE,MAAM;QAChE,KAAK,aAAa;YAAI,MAAM,GAAG,uBAAuB,CAAC;YAAG,MAAM;QAChE,KAAK,WAAW;YAAM,MAAM,GAAG,uBAAuB,CAAC;YAAG,MAAM;QAChE,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,yBAAyB,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,oCAAoC,CAAC,CAAC;IACvE,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobilewright/driver-mobilecli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "mobilecli driver for Mobilewright",
|
|
5
5
|
"homepage": "https://mobilewright.dev",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@mobilenext/mobilecli": "^0.1.62",
|
|
33
|
-
"@mobilewright/protocol": "^0.0.
|
|
33
|
+
"@mobilewright/protocol": "^0.0.18",
|
|
34
34
|
"fast-xml-parser": "^5.0.0",
|
|
35
35
|
"ws": "^8.18.0"
|
|
36
36
|
},
|