@simonyea/holysheep-cli 1.7.87 → 1.7.88
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/tools/antigravity.js +15 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simonyea/holysheep-cli",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.88",
|
|
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",
|
package/src/tools/antigravity.js
CHANGED
|
@@ -35,19 +35,19 @@ const INSTALL_CMD = process.platform === 'win32'
|
|
|
35
35
|
? 'brew install --cask antigravity'
|
|
36
36
|
: 'flatpak install flathub com.google.Antigravity'
|
|
37
37
|
|
|
38
|
-
// Windows
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return
|
|
38
|
+
// Windows:通过注册表检测已安装的桌面应用(winget/MSI 安装均会注册)
|
|
39
|
+
function isWindowsAppInstalled() {
|
|
40
|
+
const { execSync } = require('child_process')
|
|
41
|
+
for (const hive of ['HKLM', 'HKCU']) {
|
|
42
|
+
try {
|
|
43
|
+
const out = execSync(
|
|
44
|
+
`reg query "${hive}\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall" /s /f "Antigravity" /d`,
|
|
45
|
+
{ encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'], timeout: 3000 }
|
|
46
|
+
)
|
|
47
|
+
if (out.includes('Antigravity')) return true
|
|
48
|
+
} catch {}
|
|
49
|
+
}
|
|
50
|
+
return false
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
module.exports = {
|
|
@@ -57,8 +57,8 @@ module.exports = {
|
|
|
57
57
|
checkInstalled() {
|
|
58
58
|
// CLI in PATH
|
|
59
59
|
if (commandExists('agy')) return true
|
|
60
|
-
// Windows:
|
|
61
|
-
if (process.platform === 'win32') return
|
|
60
|
+
// Windows: 注册表检测桌面应用
|
|
61
|
+
if (process.platform === 'win32') return isWindowsAppInstalled()
|
|
62
62
|
// macOS: .app 检测
|
|
63
63
|
if (process.platform === 'darwin') return fs.existsSync('/Applications/Antigravity.app')
|
|
64
64
|
return false
|