@simonyea/holysheep-cli 2.1.8 → 2.1.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "2.1.8",
3
+ "version": "2.1.9",
4
4
  "description": "Claude Code/Cursor/Cline API relay for China — ¥1=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
5
5
  "scripts": {
6
6
  "test": "node tests/droid.test.js && node tests/workspace-store.test.js",
@@ -148,6 +148,22 @@ function downloadAndExtract(url, destDir, expectedSha, logger) {
148
148
  const { execSync } = require('child_process')
149
149
  execSync(`tar -xzf "${tmpFile}" -C "${destDir}" --strip-components=0`, { stdio: 'ignore' })
150
150
  fs.unlinkSync(tmpFile)
151
+ // Post-extract sanity: hs4 once shipped a tarball that only
152
+ // contained dist-server/ — the WebUI launched but every
153
+ // renderer-side feature silently did nothing. Fail loudly here so
154
+ // the user gets a clear error instead of a half-broken UI.
155
+ const serverMjs = path.join(destDir, 'dist-server', 'server.mjs')
156
+ const rendererIndex = path.join(destDir, 'out', 'renderer', 'index.html')
157
+ const missing = []
158
+ if (!fs.existsSync(serverMjs)) missing.push('dist-server/server.mjs')
159
+ if (!fs.existsSync(rendererIndex)) missing.push('out/renderer/index.html')
160
+ if (missing.length) {
161
+ return reject(new Error(
162
+ `Runtime tarball is missing required files: ${missing.join(', ')}.\n` +
163
+ `This runtime cannot launch the WebUI. Check HOLYSHEEP_AIONUI_RUNTIME_URL ` +
164
+ `or report the broken URL (${url}).`
165
+ ))
166
+ }
151
167
  resolve()
152
168
  } catch (e) {
153
169
  try { fs.unlinkSync(tmpFile) } catch {}