yymaxapi 1.0.14 → 1.0.15

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.
Files changed (2) hide show
  1. package/bin/yymaxapi.js +10 -0
  2. package/package.json +1 -1
package/bin/yymaxapi.js CHANGED
@@ -980,8 +980,16 @@ function resolveCliBinary() {
980
980
  // Validate that a found binary is a real gateway CLI, not yymaxapi itself
981
981
  function isRealCli(filePath) {
982
982
  try {
983
+ // Windows 上跳过 Linux 路径(WSL 路径在 Windows cmd.exe 下无法执行)
984
+ if (process.platform === 'win32' && filePath.startsWith('/')) {
985
+ return false;
986
+ }
983
987
  // Resolve symlinks to get the real target
984
988
  const realPath = fs.realpathSync(filePath);
989
+ // Windows 上再次检查解析后的路径
990
+ if (process.platform === 'win32' && realPath.startsWith('/')) {
991
+ return false;
992
+ }
985
993
  const baseName = path.basename(realPath).toLowerCase();
986
994
  // Skip if it points to yymaxapi/openclawapi (our own config tool, not the gateway CLI)
987
995
  if (baseName === 'yymaxapi' || baseName === 'yymaxapi.js' || realPath.includes('yymaxapi') || baseName === 'openclawapi' || baseName === 'openclawapi.js' || realPath.includes('openclawapi')) {
@@ -1139,6 +1147,8 @@ function findCompatibleNode(minMajor = 22) {
1139
1147
  const seen = new Set();
1140
1148
  for (const candidate of candidates) {
1141
1149
  if (!candidate || seen.has(candidate)) continue;
1150
+ // Windows 上跳过 Linux 路径(WSL 路径无法直接执行)
1151
+ if (process.platform === 'win32' && candidate.startsWith('/')) continue;
1142
1152
  seen.add(candidate);
1143
1153
  try {
1144
1154
  if (!fs.existsSync(candidate)) continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yymaxapi",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "跨平台 OpenClaw/Clawdbot 配置管理工具 - 管理中转地址、模型切换、API Keys、测速优化",
5
5
  "main": "bin/yymaxapi.js",
6
6
  "bin": {