zeabur 0.5.4 → 0.5.6
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/README.md +5 -1
- package/index.js +36 -25
- package/package.json +3 -2
- package/zeabur_darwin_amd64_v1/zeabur +0 -0
- package/{zeabur_windows_arm64/zeabur.exe → zeabur_darwin_arm64_v8.0/zeabur} +0 -0
- package/zeabur_linux_amd64_v1/zeabur +0 -0
- package/{zeabur_linux_arm64 → zeabur_linux_arm64_v8.0}/zeabur +0 -0
- package/zeabur_windows_amd64_v1/zeabur.exe +0 -0
- package/{zeabur_darwin_arm64/zeabur → zeabur_windows_arm64_v8.0/zeabur.exe} +0 -0
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -1,33 +1,44 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { execSync } from "child_process";
|
|
4
|
+
import os from "os";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
|
|
7
|
+
function getPlatform() {
|
|
8
|
+
const platform = os.platform();
|
|
9
|
+
|
|
10
|
+
switch (platform) {
|
|
11
|
+
case "win32":
|
|
12
|
+
return "windows";
|
|
13
|
+
case "darwin":
|
|
14
|
+
case "linux":
|
|
15
|
+
return platform;
|
|
16
|
+
default:
|
|
17
|
+
console.error(`Unsupported platform: ${platform}`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
10
20
|
}
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
function getArch() {
|
|
23
|
+
let arch = os.arch();
|
|
24
|
+
|
|
25
|
+
switch (arch) {
|
|
26
|
+
case 'arm64':
|
|
27
|
+
return 'arm64_v8.0';
|
|
28
|
+
case 'x64':
|
|
29
|
+
return 'amd64_v1';
|
|
30
|
+
default:
|
|
31
|
+
console.error(`Unsupported architecture: ${arch}`);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
17
34
|
}
|
|
18
35
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const availablePlatform = ['windows', 'linux', 'darwin'];
|
|
25
|
-
if(!availablePlatform.includes(platform)) {
|
|
26
|
-
console.error(`Unsupported platform: ${platform}`);
|
|
27
|
-
process.exit(1);
|
|
28
|
-
}
|
|
36
|
+
(function() {
|
|
37
|
+
const platform = getPlatform();
|
|
38
|
+
const arch = getArch();
|
|
29
39
|
|
|
30
|
-
const
|
|
40
|
+
const pathToBinary = fileURLToPath(new URL(`./zeabur_${platform}_${arch}/zeabur${platform === "windows" ? ".exe" : ""}`, import.meta.url));
|
|
41
|
+
const args = process.argv.slice(2);
|
|
31
42
|
|
|
32
|
-
|
|
33
|
-
|
|
43
|
+
execSync(`${pathToBinary} ${args.join(" ")}`, { stdio: "inherit" });
|
|
44
|
+
})()
|
package/package.json
CHANGED
|
Binary file
|
|
index 24e088e..b4917b8 100755
|
|
|
Binary file
|
|
Binary file
|
|
index ecf78ea..b3a59bc 100755
|
|
|
Binary file
|
|
Binary file
|
|
index 70a1300..3641400 100755
|
|
|
Binary file
|