@nowcrew/daemon 0.6.97-beta.12 → 0.6.97-beta.13

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.
@@ -1,9 +1,9 @@
1
1
  import { posix, win32 } from "node:path";
2
- /** Execute POSIX npm through its owning Node binary so service PATH is irrelevant. */
2
+ /** Execute npm through its owning Node binary so PATH and cmd.exe quoting are irrelevant. */
3
3
  export function npmInvocation(platform, nodePath = process.execPath) {
4
4
  const paths = platform === "win32" ? win32 : posix;
5
- const npmPath = paths.join(paths.dirname(nodePath), platform === "win32" ? "npm.cmd" : "npm");
6
- return platform === "win32"
7
- ? { command: npmPath, argsPrefix: [] }
8
- : { command: nodePath, argsPrefix: [npmPath] };
5
+ const npmPath = platform === "win32"
6
+ ? paths.join(paths.dirname(nodePath), "node_modules", "npm", "bin", "npm-cli.js")
7
+ : paths.join(paths.dirname(nodePath), "npm");
8
+ return { command: nodePath, argsPrefix: [npmPath] };
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nowcrew/daemon",
3
- "version": "0.6.97-beta.12",
3
+ "version": "0.6.97-beta.13",
4
4
  "type": "module",
5
5
  "description": "crew daemon — 运行在用户机器:拉起/管理 agent 进程,注入 crew CLI,归一化 runtime 事件",
6
6
  "license": "Apache-2.0",