@alanwchat/coder 0.1.112 → 0.1.114
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/cli.mjs +4 -9
- package/package.json +5 -5
package/cli.mjs
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
5
|
import path from "node:path";
|
|
7
6
|
import os from "node:os";
|
|
8
7
|
|
|
9
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
8
|
const require = createRequire(import.meta.url);
|
|
11
9
|
|
|
12
10
|
const PLATFORM = os.platform();
|
|
@@ -29,7 +27,9 @@ if (!key) {
|
|
|
29
27
|
|
|
30
28
|
let binaryPath;
|
|
31
29
|
try {
|
|
32
|
-
|
|
30
|
+
// resolve package.json explicitly because the platform package has no "main" field
|
|
31
|
+
const pkgJson = require.resolve(`@alanwchat/coder-${key}/package.json`);
|
|
32
|
+
binaryPath = path.join(path.dirname(pkgJson), PLATFORM === "win32" ? "coder.exe" : "coder");
|
|
33
33
|
} catch {
|
|
34
34
|
console.error(
|
|
35
35
|
`Missing binary for ${PLATFORM} ${ARCH}.\n` +
|
|
@@ -38,12 +38,7 @@ try {
|
|
|
38
38
|
process.exit(1);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
const
|
|
42
|
-
path.dirname(binaryPath),
|
|
43
|
-
PLATFORM === "win32" ? "coder.exe" : "coder"
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
const child = spawn(binary, process.argv.slice(2), {
|
|
41
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
47
42
|
stdio: "inherit",
|
|
48
43
|
});
|
|
49
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alanwchat/coder",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.114",
|
|
4
4
|
"description": "Coder — AI-powered coding assistant",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"coder": "cli.mjs"
|
|
12
12
|
},
|
|
13
13
|
"optionalDependencies": {
|
|
14
|
-
"@alanwchat/coder-darwin-arm64": "0.1.
|
|
15
|
-
"@alanwchat/coder-darwin-x64": "0.1.
|
|
16
|
-
"@alanwchat/coder-linux-x64": "0.1.
|
|
17
|
-
"@alanwchat/coder-win32-x64": "0.1.
|
|
14
|
+
"@alanwchat/coder-darwin-arm64": "0.1.114",
|
|
15
|
+
"@alanwchat/coder-darwin-x64": "0.1.114",
|
|
16
|
+
"@alanwchat/coder-linux-x64": "0.1.114",
|
|
17
|
+
"@alanwchat/coder-win32-x64": "0.1.114"
|
|
18
18
|
}
|
|
19
19
|
}
|