@gea-ai/cli 0.3.261203-alpha.0 → 0.3.261204-alpha.0
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/gea.cjs +16 -7
- package/package.json +3 -3
package/gea.cjs
CHANGED
|
@@ -3,7 +3,7 @@ const { spawn } = require("node:child_process");
|
|
|
3
3
|
const path = require("node:path");
|
|
4
4
|
|
|
5
5
|
const target = `${process.platform}-${process.arch}`;
|
|
6
|
-
if (
|
|
6
|
+
if (!["darwin-arm64", "linux-x64", "win32-x64"].includes(target)) {
|
|
7
7
|
process.stderr.write(`GEA CLI 0.3 does not support ${target}.\n`);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
@@ -17,12 +17,21 @@ try {
|
|
|
17
17
|
);
|
|
18
18
|
process.exit(1);
|
|
19
19
|
}
|
|
20
|
-
const child = spawn(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
const child = spawn(
|
|
21
|
+
path.join(root, process.platform === "win32" ? "gea.exe" : "gea"),
|
|
22
|
+
process.argv.slice(2),
|
|
23
|
+
{
|
|
24
|
+
stdio: "inherit",
|
|
25
|
+
env: { ...process.env, GEA_CLI_DISTRIBUTION_ROOT: root },
|
|
26
|
+
},
|
|
27
|
+
);
|
|
28
|
+
const signals =
|
|
29
|
+
process.platform === "win32" ? ["SIGINT"] : ["SIGINT", "SIGTERM", "SIGHUP"];
|
|
30
|
+
const forward = (signal) => {
|
|
31
|
+
// Windows delivers console Ctrl+C to both processes. child.kill would force
|
|
32
|
+
// the Rust CLI to exit while it is draining its owned processes.
|
|
33
|
+
if (process.platform !== "win32") child.kill(signal);
|
|
34
|
+
};
|
|
26
35
|
for (const signal of signals) process.on(signal, forward);
|
|
27
36
|
child.once("error", (error) => {
|
|
28
37
|
process.stderr.write(`Unable to start gea: ${error.message}\n`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.261204-alpha.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "GEA developer CLI.",
|
|
6
6
|
"homepage": "https://musegea.com/developers/cli",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"linux"
|
|
27
27
|
],
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@gea-ai/cli-darwin-arm64": "0.3.
|
|
30
|
-
"@gea-ai/cli-linux-x64": "0.3.
|
|
29
|
+
"@gea-ai/cli-darwin-arm64": "0.3.261204-alpha.0",
|
|
30
|
+
"@gea-ai/cli-linux-x64": "0.3.261204-alpha.0"
|
|
31
31
|
}
|
|
32
32
|
}
|