cicy-desktop 2.1.306 → 2.1.307

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/.gitattributes ADDED
@@ -0,0 +1,4 @@
1
+ *.js text eol=lf
2
+ *.json text eol=lf
3
+ *.sh text eol=lf
4
+ *.yml text eol=lf
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.306",
3
+ "version": "2.1.307",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -144,10 +144,10 @@
144
144
  "//optionalDependencies": "(2026-06 回调): mac/linux 改回 native cicy-code(:8008,colima 在 16G mac 上压垮内存)→ 重新内置 cicy-code-<plat> / cicy-mihomo-<plat>,localbin.fromBundle 零网络 seed(npm 仅作更新通道,带 npmmirror→npmjs 回退)。这些由 scripts/sync-runtime-deps.cjs 在 tag-push 时同步到最新版。npm 的 os/cpu 字段保证每个平台只装自己那份。Windows 仍走 docker(WSL :8009),它那份 cicy-code-windows 用不到但 bundle 着无害。",
145
145
  "optionalDependencies": {
146
146
  "electron": "41.0.3",
147
- "cicy-code-darwin-x64": "2.3.575",
148
- "cicy-code-darwin-arm64": "2.3.575",
149
- "cicy-code-linux-x64": "2.3.575",
150
- "cicy-code-linux-arm64": "2.3.575",
147
+ "cicy-code-darwin-x64": "2.3.578",
148
+ "cicy-code-darwin-arm64": "2.3.578",
149
+ "cicy-code-linux-x64": "2.3.578",
150
+ "cicy-code-linux-arm64": "2.3.578",
151
151
  "cicy-code-windows-x64": "2.3.193",
152
152
  "cicy-mihomo-darwin-x64": "1.10.4",
153
153
  "cicy-mihomo-darwin-arm64": "1.10.4",
@@ -1510,7 +1510,7 @@ async function update({ onProgress, container = "cicy-code-docker", port = 8008
1510
1510
  emit({ phase: "image", status: "running", message: latest ? t("docker.updating.toVersion", { v: latest }) : t("docker.updating.pulling") });
1511
1511
  // cp 结果出到 drawer(诊断:之前静默失败 → 回落镜像内旧脚本 → 又卡 2 分钟,看不出来)。
1512
1512
  try {
1513
- const b64 = fs.readFileSync(path.join(__dirname, "container-scripts", "cicy-code-update.sh")).toString("base64");
1513
+ const b64 = Buffer.from(fs.readFileSync(path.join(__dirname, "container-scripts", "cicy-code-update.sh"), "utf8").replace(/\r\n?/g, "\n"), "utf8").toString("base64"); // CI 的 Windows runner 会把 .sh 转成 CRLF → 容器里 shebang 变 /bin/bash\r 执行不了
1514
1514
  await wslRun(buildPushUpdateScriptCommand(b64, container), { timeout: 30000 });
1515
1515
  emit({ phase: "image", status: "running", message: t("docker.updating.scriptReady") });
1516
1516
  } catch (e) {
@@ -134,3 +134,8 @@ test("an unreachable WSL VM (socket timeout from wsl.exe) resets WSL and retries
134
134
  assert.match(w, /err\.wslVmUnreachable = isWslVmUnreachable\(err\)/);
135
135
  assert.match(w, /if \(e && e\.wslVmUnreachable\) \{[^]*await wslTerminate\(\)[^]*await wslShutdown\(\)[^]*reason: "wsl_vm_unreachable"/);
136
136
  });
137
+
138
+ test("the container update script is pushed with LF endings even from a CRLF checkout", () => {
139
+ assert.match(read("src/sidecar/wsl-docker.js"), /cicy-code-update\.sh"\), "utf8"\)\.replace\(\/\\r\\n\?\/g, "\\n"\)/);
140
+ assert.match(read(".gitattributes"), /\*\.sh text eol=lf/);
141
+ });