cicy-desktop 2.1.144 → 2.1.146

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.
@@ -115,11 +115,16 @@ jobs:
115
115
  run: |
116
116
  set -euo pipefail
117
117
  rm -rf dist
118
+ # Build BOTH arches: --arm64 (Apple Silicon) AND --x64 (Intel). The runner
119
+ # is arm64 and electron-builder cross-builds x64, so Intel Macs get a NATIVE
120
+ # dmg instead of being forced onto the slow `npx` electron path (the repo had
121
+ # only arm64 dmgs, so x86_64 Macs had no installer). cicy-code sidecar is
122
+ # already built for darwin amd64 + arm64 above.
118
123
  if [ -f build/logo.icns ]; then
119
- npm run build:mac -- --config.mac.icon=build/logo.icns --publish always
124
+ npm run build:mac -- --arm64 --x64 --config.mac.icon=build/logo.icns --publish always
120
125
  else
121
126
  echo "::warning::build/logo.icns missing — using default Electron icon"
122
- npm run build:mac -- --publish always
127
+ npm run build:mac -- --arm64 --x64 --publish always
123
128
  fi
124
129
 
125
130
  - name: Upload macOS artifacts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.144",
3
+ "version": "2.1.146",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -360,6 +360,18 @@ function curlDownload(url, dest, { emit, phase = "image", label = "下载镜像"
360
360
  // (much faster here); falls back to the node downloader if curl is unavailable.
361
361
  async function downloadImageTarball({ emit } = {}) {
362
362
  const dest = imageTarballPath();
363
+ // REUSE a complete tarball already on disk (staged into ~/Downloads, or a prior
364
+ // run) BEFORE curlDownload touches it — curlDownload doesn't skip a complete file
365
+ // (and a failed curl truncates it). headSize uses node http so it works even when
366
+ // curl can't resolve the host. Skips the ~500MB re-download per new user.
367
+ try {
368
+ const expected = await headSize(R2_TARBALL);
369
+ const have = fs.statSync(dest).size;
370
+ if (expected > 0 && have === expected) {
371
+ emit && emit({ phase: "image", status: "skip", message: "镜像:已有完整包,跳过下载", progress: 100, received: have, total: expected });
372
+ return dest;
373
+ }
374
+ } catch {}
363
375
  try { await curlDownload(R2_TARBALL, dest, { emit, phase: "image", label: "下载镜像" }); }
364
376
  catch (e) {
365
377
  emit && emit({ phase: "image", status: "running", message: `curl 下载失败(${e.message}),改用内置下载…` });