cicy-desktop 2.1.69 → 2.1.70
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 +1 -1
- package/src/sidecar/native.js +1 -1
- package/src/sidecar/runtime.js +7 -3
package/package.json
CHANGED
package/src/sidecar/native.js
CHANGED
|
@@ -28,7 +28,7 @@ const docker = require("./docker"); // ensureDownloaded/withRetry/waitUntil/prob
|
|
|
28
28
|
// dev/联调 only — read LAZILY (not at require time) so tests/tools can set the
|
|
29
29
|
// env var after loading the module.
|
|
30
30
|
const devExeUrl = () => process.env.CICY_CODE_EXE_URL || "";
|
|
31
|
-
const EXE_PKG = process.env.CICY_CODE_EXE_PKG || "cicy-code-
|
|
31
|
+
const EXE_PKG = process.env.CICY_CODE_EXE_PKG || "cicy-code-windows-x64"; // npm spam filter 403s 'win32' names
|
|
32
32
|
const REGISTRY = process.env.CICY_NPM_REGISTRY || "https://registry.npmmirror.com";
|
|
33
33
|
const BIN_DIR = path.join(os.homedir(), "cicy-ai", "bin");
|
|
34
34
|
// npm prefix dir owned by the sidecar (isolated from the user's global npm).
|
package/src/sidecar/runtime.js
CHANGED
|
@@ -30,8 +30,13 @@ const VERSIONS_JSON = path.join(RUNTIME_DIR, "versions.json");
|
|
|
30
30
|
const REGISTRY = process.env.CICY_NPM_REGISTRY || "https://registry.npmmirror.com";
|
|
31
31
|
const IS_WIN = process.platform === "win32";
|
|
32
32
|
|
|
33
|
+
// npm subpackage platform suffix. NOTE: Windows is "windows" not "win32" —
|
|
34
|
+
// npm's spam filter 403s NEW package names containing 'win32', so EVERY cicy
|
|
35
|
+
// subpackage (code/mihomo/msys2) is published as *-windows-*. This must match
|
|
36
|
+
// the published names exactly or both the bundled-dir lookup AND the npm-pull
|
|
37
|
+
// fallback fail (a 404 that stranded first start on Windows).
|
|
33
38
|
function plat() {
|
|
34
|
-
const osStr = IS_WIN ? "
|
|
39
|
+
const osStr = IS_WIN ? "windows" : process.platform === "darwin" ? "darwin" : "linux";
|
|
35
40
|
const archStr = process.arch === "arm64" ? "arm64" : "x64";
|
|
36
41
|
return `${osStr}-${archStr}`;
|
|
37
42
|
}
|
|
@@ -46,8 +51,7 @@ const COMPONENTS = {
|
|
|
46
51
|
},
|
|
47
52
|
"mihomo": {
|
|
48
53
|
kind: "bin",
|
|
49
|
-
|
|
50
|
-
pkg: () => `cicy-mihomo-${plat().replace("win32", "windows")}`,
|
|
54
|
+
pkg: () => `cicy-mihomo-${plat()}`,
|
|
51
55
|
bin: () => (IS_WIN ? "mihomo.exe" : "mihomo"),
|
|
52
56
|
},
|
|
53
57
|
"msys2": {
|