yymaxapi 1.0.118 → 1.0.119

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/README.md CHANGED
@@ -16,7 +16,7 @@ npx yymaxapi@latest
16
16
  npx yymaxapi@latest speed-test
17
17
  ```
18
18
  或在具体配置命令后追加 `--speed-test`,按测速结果手动选点。
19
- 如需直接切换到其他云翼域名,可在预设/一键激活命令后追加 `--endpoint-url https://yunyi.cfd`,也兼容 `--base-url https://你的域名/claude` 这种写法。
19
+ 如需直接切换到其他云翼域名,可在预设/一键激活命令后追加 `--endpoint-url https://yunyi.yun`,也兼容 `--base-url https://你的域名/claude` 这种写法。
20
20
 
21
21
  **方式二:一键配置 Claude**
22
22
  ```bash
package/bin/yymaxapi.js CHANGED
@@ -1646,12 +1646,18 @@ function invalidateGatewayEnvCache() {
1646
1646
  function isWslAvailable() {
1647
1647
  if (process.platform !== 'win32') return false;
1648
1648
  if (_wslAvailCache !== null) return _wslAvailCache;
1649
- try {
1650
- execFileSync('wsl', ['echo', 'ok'], { encoding: 'utf8', timeout: 5000, stdio: 'pipe' });
1651
- _wslAvailCache = true;
1652
- } catch {
1653
- _wslAvailCache = false;
1649
+ const probes = [
1650
+ 'wsl -- echo ok',
1651
+ 'wsl -u root -- echo ok'
1652
+ ];
1653
+ for (const cmd of probes) {
1654
+ const result = safeExec(cmd, { timeout: 5000 });
1655
+ if (result.ok && String(result.output || result.stdout || '').includes('ok')) {
1656
+ _wslAvailCache = true;
1657
+ return _wslAvailCache;
1658
+ }
1654
1659
  }
1660
+ _wslAvailCache = false;
1655
1661
  return _wslAvailCache;
1656
1662
  }
1657
1663
 
@@ -13,8 +13,8 @@
13
13
  ```json5
14
14
  {
15
15
  "endpoints": [
16
- { "name": "默认主节点", "url": "https://yunyi.cfd" },
17
- { "name": "CF国外节点1", "url": "https://cdn2.yunyi.cfd" }
16
+ { "name": "默认主节点", "url": "https://yunyi.yun" },
17
+ { "name": "CF国外节点1", "url": "https://cdn2.yunyi.yun" }
18
18
  ],
19
19
  "fallbackEndpoints": [
20
20
  { "name": "备用节点1", "url": "http://47.99.42.193" },
@@ -75,7 +75,7 @@ npx yymaxapi@latest
75
75
  ```json
76
76
  {
77
77
  "provider": "anthropic",
78
- "base_url": "https://yunyi.cfd/claude",
78
+ "base_url": "https://yunyi.yun/claude",
79
79
  "api": "anthropic-messages",
80
80
  "api_key": "<你的云翼 API Key>",
81
81
  "model": {
@@ -90,7 +90,7 @@ npx yymaxapi@latest
90
90
  ```json
91
91
  {
92
92
  "provider": "openai",
93
- "base_url": "https://yunyi.cfd/codex",
93
+ "base_url": "https://yunyi.yun/codex",
94
94
  "api": "openai-completions",
95
95
  "api_key": "<你的云翼 API Key>",
96
96
  "model": {
@@ -121,7 +121,7 @@ npx yymaxapi@latest
121
121
  ```json
122
122
  {
123
123
  "provider": "anthropic",
124
- "base_url": "https://yunyi.cfd/claude",
124
+ "base_url": "https://yunyi.yun/claude",
125
125
  "api": "anthropic-messages",
126
126
  "api_key": "<你的云翼 API Key>",
127
127
  "model": {
@@ -136,7 +136,7 @@ npx yymaxapi@latest
136
136
  ```json
137
137
  {
138
138
  "provider": "openai",
139
- "base_url": "https://yunyi.cfd/codex",
139
+ "base_url": "https://yunyi.yun/codex",
140
140
  "api": "openai-completions",
141
141
  "api_key": "<你的云翼 API Key>",
142
142
  "model": {
@@ -152,10 +152,10 @@ npx yymaxapi@latest
152
152
 
153
153
  ```json
154
154
  {
155
- "apiBaseUrl": "https://yunyi.cfd/claude",
155
+ "apiBaseUrl": "https://yunyi.yun/claude",
156
156
  "env": {
157
157
  "ANTHROPIC_API_KEY": "<你的云翼 API Key>",
158
- "ANTHROPIC_BASE_URL": "https://yunyi.cfd/claude"
158
+ "ANTHROPIC_BASE_URL": "https://yunyi.yun/claude"
159
159
  }
160
160
  }
161
161
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yymaxapi",
3
- "version": "1.0.118",
3
+ "version": "1.0.119",
4
4
  "description": "跨平台 OpenClaw/Clawdbot 配置管理工具 - 管理中转地址、模型切换、API Keys、测速优化",
5
5
  "main": "bin/yymaxapi.js",
6
6
  "bin": {