claude-codex-wechat 0.1.28 → 0.1.29

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/dist/server/cli.js +13 -2
  2. package/package.json +1 -1
@@ -2463,6 +2463,10 @@ function executableExtensions() {
2463
2463
  const pathext = process.env.PATHEXT ?? ".COM;.EXE;.BAT;.CMD";
2464
2464
  return ["", ...pathext.split(";").filter(Boolean)];
2465
2465
  }
2466
+ function isTemporaryShim(candidate) {
2467
+ const tempDir = tmpdir();
2468
+ return candidate.startsWith(tempDir);
2469
+ }
2466
2470
  async function findExecutable(command) {
2467
2471
  const extensions = executableExtensions();
2468
2472
  if (command.includes("/") || command.includes("\\")) {
@@ -2472,13 +2476,20 @@ async function findExecutable(command) {
2472
2476
  return void 0;
2473
2477
  }
2474
2478
  const dirs = (process.env.PATH ?? "").split(delimiter).filter(Boolean);
2479
+ let fallback;
2475
2480
  for (const dir of dirs) {
2476
2481
  for (const ext of extensions) {
2477
2482
  const candidate = join9(dir, command + ext);
2478
- if (await isExecutableFile(candidate)) return candidate;
2483
+ if (await isExecutableFile(candidate)) {
2484
+ if (isTemporaryShim(candidate)) {
2485
+ fallback ??= candidate;
2486
+ continue;
2487
+ }
2488
+ return candidate;
2489
+ }
2479
2490
  }
2480
2491
  }
2481
- return void 0;
2492
+ return fallback;
2482
2493
  }
2483
2494
  function terminateChild(child, signal = "SIGTERM") {
2484
2495
  if (child.pid === void 0 || child.exitCode !== null || child.signalCode !== null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-codex-wechat",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.5.0",