cicy-desktop 2.1.187 → 2.1.188
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/cicy-code.js +3 -2
package/package.json
CHANGED
package/src/sidecar/cicy-code.js
CHANGED
|
@@ -115,10 +115,11 @@ function brewInstallStream(brew, dep, env, e) {
|
|
|
115
115
|
// 返回 { nodeBinDir, registry } 或 null(失败,drawer 已 emit 原因 + 可重试)。
|
|
116
116
|
async function ensureEnv({ emit } = {}) {
|
|
117
117
|
const e = emit || (() => {});
|
|
118
|
-
// 1)
|
|
118
|
+
// 1) 检查网络是否为 CN → 选 registry + bottle 镜像
|
|
119
|
+
e({ phase: "net", status: "running", message: `检查网络是否为 CN…` });
|
|
119
120
|
const cn = process.env.CICY_NPM_REGISTRY ? true : await probeIsCN();
|
|
120
121
|
const registry = process.env.CICY_NPM_REGISTRY || (cn ? "https://registry.npmmirror.com" : "https://registry.npmjs.org");
|
|
121
|
-
e({ phase: "net", status: "running", message:
|
|
122
|
+
e({ phase: "net", status: "running", message: `网络:${cn ? "CN" : "非 CN"} → registry=${registry.replace(/^https?:\/\//, "")}${cn ? " + 镜像加速" : ""}` });
|
|
122
123
|
|
|
123
124
|
// 2) Node(系统 ≥20 用,否则装 Node 24)
|
|
124
125
|
const nodeBinDir = await ensureNode({ emit });
|