@simonyea/holysheep-cli 1.7.62 → 1.7.64

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": "1.7.62",
3
+ "version": "1.7.64",
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
  "keywords": [
6
6
  "openai-china",
@@ -237,6 +237,21 @@ async function init() {
237
237
  loadTools()
238
238
  loadEnv()
239
239
  renderFooter()
240
+ startUpdateChecker()
241
+ }
242
+
243
+ // ── 定时检查新版本(每 5 分钟)──────────────────────────────────────────────
244
+ let _updateTimer = null
245
+ function startUpdateChecker() {
246
+ if (_updateTimer) return
247
+ _updateTimer = setInterval(async () => {
248
+ try {
249
+ const s = await api('status')
250
+ if (s.updateAvailable) {
251
+ document.getElementById('version').innerHTML = `v${s.version} <span style="color:var(--primary);cursor:pointer;font-weight:600" onclick="doUpgradeTool('holysheep','HolySheep CLI')" title="${t('updateNow')}"> → v${s.updateAvailable} ${t('updateNow')}</span>`
252
+ }
253
+ } catch {}
254
+ }, 5 * 60 * 1000)
240
255
  }
241
256
 
242
257
  // ── API helper ───────────────────────────────────────────────────────────────
@@ -105,7 +105,7 @@ const UPGRADABLE_TOOLS = [
105
105
  : 'curl -fsSL https://claude.ai/install.sh | bash',
106
106
  },
107
107
  { name: 'Codex CLI', id: 'codex', command: 'codex', versionCmd: 'codex --version', npmPkg: '@openai/codex', installCmd: 'npm install -g @openai/codex@latest' },
108
- { name: 'Droid CLI', id: 'droid', command: 'droid', versionCmd: 'droid --version', npmPkg: null, installCmd: 'brew install --cask droid' },
108
+ { name: 'Droid CLI', id: 'droid', command: 'droid', versionCmd: 'droid --version', npmPkg: null, installCmd: process.platform === 'win32' ? 'winget upgrade --id Droid.Droid' : 'brew install --cask droid' },
109
109
  { name: 'OpenCode', id: 'opencode', command: 'opencode', versionCmd: 'opencode --version', npmPkg: 'opencode-ai', installCmd: 'npm install -g opencode-ai@latest' },
110
110
  { name: 'OpenClaw', id: 'openclaw', command: 'openclaw', versionCmd: 'openclaw --version', npmPkg: 'openclaw', installCmd: 'npm install -g openclaw@latest --ignore-scripts' },
111
111
  { name: 'Gemini CLI', id: 'gemini-cli', command: 'gemini', versionCmd: 'gemini --version', npmPkg: '@google/gemini-cli', installCmd: 'npm install -g @google/gemini-cli@latest' },
@@ -115,7 +115,7 @@ const UPGRADABLE_TOOLS = [
115
115
 
116
116
  let _latestVersion = null
117
117
  let _lastCheckTime = 0
118
- const UPDATE_CHECK_INTERVAL = 30 * 60 * 1000
118
+ const UPDATE_CHECK_INTERVAL = 5 * 60 * 1000
119
119
 
120
120
  async function checkLatestVersion() {
121
121
  const now = Date.now()