pleumrouter 0.5.49 → 0.5.50

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/package.json +1 -1
  2. package/src/launch.mjs +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pleumrouter",
3
- "version": "0.5.49",
3
+ "version": "0.5.50",
4
4
  "description": "Official PleumRouter terminal CLI — launch any coding agent against PleumRouter.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/launch.mjs CHANGED
@@ -49,7 +49,10 @@ function nodeEntryFromWindowsShim(script, { read = readFileSync, exists = exists
49
49
  return null;
50
50
  }
51
51
  // npm cmd-shim uses either %dp0% or %~dp0 followed by the package's JS entry.
52
- const match = /"(?:%~dp0|%dp0%)[\\/]+([^"\r\n]+?\.(?:[cm]?js))"/i.exec(source);
52
+ // Node 동봉 npm.cmd/npx.cmd는 cmd-shim이 아니라 SET "NPM_CLI_JS=%~dp0\...\npm-cli.js" 형식이다.
53
+ // shortcut: npm-prefix.js로 전역 업그레이드된 npm을 고르는 분기는 따르지 않고 동봉 npm을 쓴다 — 같은 prefix 설정을 읽으므로 충분.
54
+ const match = /"(?:%~dp0|%dp0%)[\\/]+([^"\r\n]+?\.(?:[cm]?js))"/i.exec(source)
55
+ ?? /^SET\s+"\w*_CLI_JS=%~dp0[\\/]+([^"\r\n]+?\.(?:[cm]?js))"/im.exec(source);
53
56
  if (!match) return null;
54
57
  const entry = resolve(dirname(script), match[1].replace(/[\\/]+/g, "/"));
55
58
  return exists(entry) ? entry : null;