@snowrabbit/cli 1.1.0 → 1.1.2
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/snowrabbit.js +18 -4
- package/package.json +6 -6
package/bin/snowrabbit.js
CHANGED
|
@@ -11,13 +11,19 @@
|
|
|
11
11
|
import { spawn } from "node:child_process";
|
|
12
12
|
import { existsSync } from "node:fs";
|
|
13
13
|
import { createRequire } from "node:module";
|
|
14
|
-
import { arch, platform } from "node:process";
|
|
15
14
|
import { dirname, join } from "node:path";
|
|
15
|
+
import { arch, platform } from "node:process";
|
|
16
16
|
import { fileURLToPath } from "node:url";
|
|
17
17
|
|
|
18
18
|
const ext = platform === "win32" ? ".exe" : "";
|
|
19
19
|
const pkg = `@snowrabbit/cli-${platform}-${arch}`;
|
|
20
|
-
const SUPPORTED = [
|
|
20
|
+
const SUPPORTED = [
|
|
21
|
+
"win32-x64",
|
|
22
|
+
"darwin-arm64",
|
|
23
|
+
"darwin-x64",
|
|
24
|
+
"linux-x64",
|
|
25
|
+
"linux-arm64",
|
|
26
|
+
];
|
|
21
27
|
|
|
22
28
|
function platformBinary() {
|
|
23
29
|
try {
|
|
@@ -31,7 +37,12 @@ function platformBinary() {
|
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
function devBinary() {
|
|
34
|
-
const bin = join(
|
|
40
|
+
const bin = join(
|
|
41
|
+
dirname(fileURLToPath(import.meta.url)),
|
|
42
|
+
"..",
|
|
43
|
+
"dist",
|
|
44
|
+
`snowrabbit${ext}`
|
|
45
|
+
);
|
|
35
46
|
return existsSync(bin) ? bin : null;
|
|
36
47
|
}
|
|
37
48
|
|
|
@@ -46,7 +57,10 @@ if (!binary) {
|
|
|
46
57
|
process.exit(1);
|
|
47
58
|
}
|
|
48
59
|
|
|
49
|
-
const child = spawn(binary, process.argv.slice(2), {
|
|
60
|
+
const child = spawn(binary, process.argv.slice(2), {
|
|
61
|
+
stdio: "inherit",
|
|
62
|
+
env: process.env,
|
|
63
|
+
});
|
|
50
64
|
child.on("error", (err) => {
|
|
51
65
|
console.error(`snowrabbit: couldn't start ${binary}: ${err.message}`);
|
|
52
66
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snowrabbit/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"homepage": "https://snowrabbit.co",
|
|
6
6
|
"author": "SnowRabbit",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"node": ">=18"
|
|
17
17
|
},
|
|
18
18
|
"optionalDependencies": {
|
|
19
|
-
"@snowrabbit/cli-win32-x64": "1.1.
|
|
20
|
-
"@snowrabbit/cli-darwin-arm64": "1.1.
|
|
21
|
-
"@snowrabbit/cli-darwin-x64": "1.1.
|
|
22
|
-
"@snowrabbit/cli-linux-x64": "1.1.
|
|
23
|
-
"@snowrabbit/cli-linux-arm64": "1.1.
|
|
19
|
+
"@snowrabbit/cli-win32-x64": "1.1.2",
|
|
20
|
+
"@snowrabbit/cli-darwin-arm64": "1.1.2",
|
|
21
|
+
"@snowrabbit/cli-darwin-x64": "1.1.2",
|
|
22
|
+
"@snowrabbit/cli-linux-x64": "1.1.2",
|
|
23
|
+
"@snowrabbit/cli-linux-arm64": "1.1.2"
|
|
24
24
|
}
|
|
25
25
|
}
|