nori-ai-cli 0.0.15 → 0.0.16
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/nori.js
CHANGED
|
@@ -5,6 +5,7 @@ import { spawn } from "node:child_process";
|
|
|
5
5
|
import { existsSync } from "fs";
|
|
6
6
|
import path from "path";
|
|
7
7
|
import { fileURLToPath } from "url";
|
|
8
|
+
import { getTargetTriple } from "./platform.js";
|
|
8
9
|
|
|
9
10
|
// __dirname equivalent in ESM
|
|
10
11
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -12,48 +13,7 @@ const __dirname = path.dirname(__filename);
|
|
|
12
13
|
|
|
13
14
|
const { platform, arch } = process;
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
switch (platform) {
|
|
17
|
-
case "linux":
|
|
18
|
-
case "android":
|
|
19
|
-
switch (arch) {
|
|
20
|
-
case "x64":
|
|
21
|
-
targetTriple = "x86_64-unknown-linux-musl";
|
|
22
|
-
break;
|
|
23
|
-
case "arm64":
|
|
24
|
-
targetTriple = "aarch64-unknown-linux-musl";
|
|
25
|
-
break;
|
|
26
|
-
default:
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
29
|
-
break;
|
|
30
|
-
case "darwin":
|
|
31
|
-
switch (arch) {
|
|
32
|
-
case "x64":
|
|
33
|
-
targetTriple = "x86_64-apple-darwin";
|
|
34
|
-
break;
|
|
35
|
-
case "arm64":
|
|
36
|
-
targetTriple = "aarch64-apple-darwin";
|
|
37
|
-
break;
|
|
38
|
-
default:
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
break;
|
|
42
|
-
case "win32":
|
|
43
|
-
switch (arch) {
|
|
44
|
-
case "x64":
|
|
45
|
-
targetTriple = "x86_64-pc-windows-msvc";
|
|
46
|
-
break;
|
|
47
|
-
case "arm64":
|
|
48
|
-
targetTriple = "aarch64-pc-windows-msvc";
|
|
49
|
-
break;
|
|
50
|
-
default:
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
break;
|
|
54
|
-
default:
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
16
|
+
const targetTriple = getTargetTriple(platform, arch);
|
|
57
17
|
|
|
58
18
|
if (!targetTriple) {
|
|
59
19
|
throw new Error(`Unsupported platform: ${platform} (${arch})`);
|
package/bin/platform.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the Rust target triple for the given platform and architecture.
|
|
3
|
+
* @param {string} platform - Node.js process.platform value
|
|
4
|
+
* @param {string} arch - Node.js process.arch value
|
|
5
|
+
* @returns {string|null} - Rust target triple or null if unsupported
|
|
6
|
+
*/
|
|
7
|
+
export function getTargetTriple(platform, arch) {
|
|
8
|
+
switch (platform) {
|
|
9
|
+
case "android":
|
|
10
|
+
switch (arch) {
|
|
11
|
+
case "x64":
|
|
12
|
+
return "x86_64-linux-android";
|
|
13
|
+
case "arm64":
|
|
14
|
+
return "aarch64-linux-android";
|
|
15
|
+
default:
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
case "linux":
|
|
19
|
+
switch (arch) {
|
|
20
|
+
case "x64":
|
|
21
|
+
return "x86_64-unknown-linux-musl";
|
|
22
|
+
case "arm64":
|
|
23
|
+
return "aarch64-unknown-linux-musl";
|
|
24
|
+
default:
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
case "darwin":
|
|
28
|
+
switch (arch) {
|
|
29
|
+
case "x64":
|
|
30
|
+
return "x86_64-apple-darwin";
|
|
31
|
+
case "arm64":
|
|
32
|
+
return "aarch64-apple-darwin";
|
|
33
|
+
default:
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
case "win32":
|
|
37
|
+
switch (arch) {
|
|
38
|
+
case "x64":
|
|
39
|
+
return "x86_64-pc-windows-msvc";
|
|
40
|
+
case "arm64":
|
|
41
|
+
return "aarch64-pc-windows-msvc";
|
|
42
|
+
default:
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
default:
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nori-ai-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Nori AI CLI - An AI-powered coding assistant",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"bin": {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"os": [
|
|
15
15
|
"darwin",
|
|
16
|
-
"linux"
|
|
16
|
+
"linux",
|
|
17
|
+
"android"
|
|
17
18
|
],
|
|
18
19
|
"cpu": [
|
|
19
20
|
"x64",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|