@mobilenext/mobilecli 0.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/bin/.gitkeep +0 -0
- package/bin/mobilecli-darwin +0 -0
- package/bin/mobilecli-linux-amd64 +0 -0
- package/bin/mobilecli-linux-arm64 +0 -0
- package/index.js +45 -0
- package/package.json +14 -0
package/bin/.gitkeep
ADDED
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { join } = require("node:path");
|
|
4
|
+
const { spawn } = require("node:child_process");
|
|
5
|
+
|
|
6
|
+
let binary;
|
|
7
|
+
|
|
8
|
+
switch (process.platform) {
|
|
9
|
+
case "darwin":
|
|
10
|
+
binary = "mobilecli-darwin";
|
|
11
|
+
break;
|
|
12
|
+
|
|
13
|
+
case "linux":
|
|
14
|
+
switch (process.arch) {
|
|
15
|
+
case "arm64":
|
|
16
|
+
binary = "mobilecli-linux-arm64";
|
|
17
|
+
break;
|
|
18
|
+
case "x64":
|
|
19
|
+
binary = "mobilecli-linux-amd64";
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
break;
|
|
23
|
+
|
|
24
|
+
default:
|
|
25
|
+
console.error(`Unsupported platform: ${process.platform}-${process.arch}`);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const binaryPath = join(__dirname, "bin", binary);
|
|
30
|
+
|
|
31
|
+
const args = process.argv.slice(2);
|
|
32
|
+
const child = spawn(binaryPath, args, {
|
|
33
|
+
env: process.env,
|
|
34
|
+
cwd: process.cwd(),
|
|
35
|
+
stdio: [process.stdin, process.stdout, process.stderr],
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
child.on("error", (error) => {
|
|
39
|
+
console.error(error);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
child.on("close", (code) => {
|
|
44
|
+
process.exit(code);
|
|
45
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mobilenext/mobilecli",
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"author": "Mobile Next",
|
|
5
|
+
"description": "A universal command-line tool for managing iOS and Android devices, simulators, emulators and apps",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/mobile-next/mobilecli.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"bin": {
|
|
12
|
+
"mobilecli": "index.js"
|
|
13
|
+
}
|
|
14
|
+
}
|