@qoder-ai/qodercli 0.2.3 → 0.2.4
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/package.json +18 -18
- package/scripts/install.js +20 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qoder-ai/qodercli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "qodercli - npm installer",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -44,55 +44,55 @@
|
|
|
44
44
|
],
|
|
45
45
|
"preferGlobal": true,
|
|
46
46
|
"binaries": {
|
|
47
|
-
"version": "0.2.
|
|
47
|
+
"version": "0.2.4",
|
|
48
48
|
"files": [
|
|
49
49
|
{
|
|
50
50
|
"os": "darwin",
|
|
51
51
|
"arch": "arm64",
|
|
52
|
-
"url": "https://qoder-ide.oss-
|
|
53
|
-
"sha256": "
|
|
52
|
+
"url": "https://qoder-ide.oss-accelerate.aliyuncs.com/qodercli/releases/0.2.4/qodercli-darwin-arm64.tar.gz",
|
|
53
|
+
"sha256": "c267fd311bd86e5f8629f57b90d010c9a693b02b5e6319064439459ccace1855"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"os": "darwin",
|
|
57
57
|
"arch": "amd64",
|
|
58
|
-
"url": "https://qoder-ide.oss-
|
|
59
|
-
"sha256": "
|
|
58
|
+
"url": "https://qoder-ide.oss-accelerate.aliyuncs.com/qodercli/releases/0.2.4/qodercli-darwin-x64.tar.gz",
|
|
59
|
+
"sha256": "e50aef06496140e342e66a3ba6324bc6e4086aa212808aa7f1009f3639156d2f"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"os": "linux",
|
|
63
63
|
"arch": "arm64-musl",
|
|
64
|
-
"url": "https://qoder-ide.oss-
|
|
65
|
-
"sha256": "
|
|
64
|
+
"url": "https://qoder-ide.oss-accelerate.aliyuncs.com/qodercli/releases/0.2.4/qodercli-linux-arm64-musl.tar.gz",
|
|
65
|
+
"sha256": "15153bf6a144e122117f601ec55eda2e594e5149bafaf7717fde10fda59b0a0c"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"os": "linux",
|
|
69
69
|
"arch": "arm64",
|
|
70
|
-
"url": "https://qoder-ide.oss-
|
|
71
|
-
"sha256": "
|
|
70
|
+
"url": "https://qoder-ide.oss-accelerate.aliyuncs.com/qodercli/releases/0.2.4/qodercli-linux-arm64.tar.gz",
|
|
71
|
+
"sha256": "b283fdea0105cc9f1bb4ca68ea51065604d158c87f1df7100dc3282cb69d2101"
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
"os": "linux",
|
|
75
75
|
"arch": "amd64-baseline",
|
|
76
|
-
"url": "https://qoder-ide.oss-
|
|
77
|
-
"sha256": "
|
|
76
|
+
"url": "https://qoder-ide.oss-accelerate.aliyuncs.com/qodercli/releases/0.2.4/qodercli-linux-x64-baseline.tar.gz",
|
|
77
|
+
"sha256": "36c392ba003d585632ee695e4f02e54c12a86be0b3c333c0b237af639ad7d338"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"os": "linux",
|
|
81
81
|
"arch": "amd64-musl",
|
|
82
|
-
"url": "https://qoder-ide.oss-
|
|
83
|
-
"sha256": "
|
|
82
|
+
"url": "https://qoder-ide.oss-accelerate.aliyuncs.com/qodercli/releases/0.2.4/qodercli-linux-x64-musl.tar.gz",
|
|
83
|
+
"sha256": "4d883e3a165d70983a8c8ea0d586f02726ffc6f78d9b93af91ccb02973f495d5"
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
"os": "linux",
|
|
87
87
|
"arch": "amd64",
|
|
88
|
-
"url": "https://qoder-ide.oss-
|
|
89
|
-
"sha256": "
|
|
88
|
+
"url": "https://qoder-ide.oss-accelerate.aliyuncs.com/qodercli/releases/0.2.4/qodercli-linux-x64.tar.gz",
|
|
89
|
+
"sha256": "1d84d8d75cb6a29bb4e7120d6a08e938f5305f3da0c83b6daea0d9151907c883"
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
"os": "windows",
|
|
93
93
|
"arch": "amd64",
|
|
94
|
-
"url": "https://qoder-ide.oss-
|
|
95
|
-
"sha256": "
|
|
94
|
+
"url": "https://qoder-ide.oss-accelerate.aliyuncs.com/qodercli/releases/0.2.4/qodercli-windows-x64.zip",
|
|
95
|
+
"sha256": "5d377a6395db94d42515fefa6196550d712bd44dd2613728cdf4e48aa4002d85"
|
|
96
96
|
}
|
|
97
97
|
]
|
|
98
98
|
}
|
package/scripts/install.js
CHANGED
|
@@ -57,6 +57,11 @@ class QoderInstaller {
|
|
|
57
57
|
const arch = process.arch;
|
|
58
58
|
switch (arch) {
|
|
59
59
|
case 'x64':
|
|
60
|
+
// On Linux x64, check if CPU supports AVX instructions.
|
|
61
|
+
// CPUs without AVX need the baseline binary to avoid SIGILL.
|
|
62
|
+
if (process.platform === 'linux' && !this.hasAVX()) {
|
|
63
|
+
return 'amd64-baseline';
|
|
64
|
+
}
|
|
60
65
|
return 'amd64';
|
|
61
66
|
case 'arm64':
|
|
62
67
|
return 'arm64';
|
|
@@ -65,6 +70,21 @@ class QoderInstaller {
|
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Check if the CPU supports AVX instructions by reading /proc/cpuinfo.
|
|
75
|
+
* Returns true if AVX is present or detection is unavailable.
|
|
76
|
+
* Only returns false when we can confirm AVX is absent.
|
|
77
|
+
*/
|
|
78
|
+
hasAVX() {
|
|
79
|
+
try {
|
|
80
|
+
const cpuinfo = fs.readFileSync('/proc/cpuinfo', 'utf-8');
|
|
81
|
+
return /^flags\s*:.*\bavx\b/m.test(cpuinfo);
|
|
82
|
+
} catch (e) {
|
|
83
|
+
// If we can't read cpuinfo, assume AVX is present (safer default)
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
68
88
|
setupLogging() {
|
|
69
89
|
try {
|
|
70
90
|
// Create log directory: ~/.qoder/logs on all platforms
|