executor 1.4.0-beta.1 → 1.4.0-beta.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/executor +30 -1
- package/package.json +2 -2
- /package/{postinstall.mjs → postinstall.cjs} +0 -0
package/bin/executor
CHANGED
|
@@ -16,7 +16,36 @@ if (process.env.EXECUTOR_BIN_PATH) run(process.env.EXECUTOR_BIN_PATH);
|
|
|
16
16
|
|
|
17
17
|
const scriptDir = path.dirname(fs.realpathSync(__filename));
|
|
18
18
|
const cached = path.join(scriptDir, process.platform === "win32" ? ".executor.exe" : ".executor");
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
const installIfNeeded = () => {
|
|
21
|
+
if (fs.existsSync(cached)) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const installer = path.resolve(scriptDir, "..", "postinstall.cjs");
|
|
26
|
+
if (!fs.existsSync(installer)) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
console.error("executor binary is missing; downloading release asset...");
|
|
31
|
+
const result = childProcess.spawnSync(process.execPath, [installer], {
|
|
32
|
+
stdio: "inherit",
|
|
33
|
+
env: process.env,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
if (result.error) {
|
|
37
|
+
console.error(result.error.message);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (typeof result.status === "number" && result.status !== 0) {
|
|
42
|
+
process.exit(result.status);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return fs.existsSync(cached);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
if (!installIfNeeded()) {
|
|
20
49
|
console.error("executor binary is missing. Reinstall the package or run 'npm rebuild executor'.");
|
|
21
50
|
process.exit(1);
|
|
22
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "executor",
|
|
3
|
-
"version": "1.4.0-beta.
|
|
3
|
+
"version": "1.4.0-beta.2",
|
|
4
4
|
"description": "Local AI executor with a CLI, local API server, and web UI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"executor",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"executor": "bin/executor"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
|
-
"postinstall": "node ./postinstall.
|
|
26
|
+
"postinstall": "node ./postinstall.cjs"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=20"
|
|
File without changes
|