@camunda8/cli 3.4.0-alpha.3 → 4.0.0-alpha.2

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.
@@ -26,8 +26,17 @@
26
26
  * the two constructs that survive double quotes — an embedded `"` and a
27
27
  * `%VAR%` environment-variable reference — are rejected outright rather than
28
28
  * escaped.
29
+ *
30
+ * A second Windows-only hazard is npm's own `--prefix` handling: a CLI
31
+ * `--prefix` sets the *global* prefix as well as the local one, and Windows
32
+ * puts the global install root directly under the prefix, so for a plain
33
+ * `npm install --prefix <dir>` npm cannot tell a local install apart from a
34
+ * global one and silently installs the *process cwd* instead (#526). That case
35
+ * is re-expressed as a cwd — see `rescopeWindowsLocalInstall()`.
29
36
  */
30
37
  import { execFileSync, execSync, } from "node:child_process";
38
+ import { readFileSync } from "node:fs";
39
+ import { join } from "node:path";
31
40
  /** Characters that cannot be represented inside a double-quoted cmd.exe argument: quotes, line breaks and NUL. */
32
41
  const WINDOWS_UNQUOTABLE = /["\r\n\0]/;
33
42
  /** A cmd.exe `%VAR%` environment-variable reference, which cmd.exe expands even inside double quotes.
@@ -44,13 +53,142 @@ const WINDOWS_CMD_VARIABLE = /%[A-Z_][^%]*?%/i;
44
53
  function quoteWindowsArg(arg) {
45
54
  return `"${arg.replace(/(\\+)$/, "$1$1")}"`;
46
55
  }
56
+ /** npm's `install` verb and every alias npm maps onto it (`npm help install`, `lib/utils/cmd-list.js`). */
57
+ const NPM_INSTALL_COMMANDS = new Set([
58
+ "install",
59
+ "add",
60
+ "i",
61
+ "in",
62
+ "ins",
63
+ "inst",
64
+ "insta",
65
+ "instal",
66
+ "isnt",
67
+ "isnta",
68
+ "isntal",
69
+ "isntall",
70
+ ]);
71
+ /** `--prefix` and its documented short form `-C`. */
72
+ function isPrefixFlag(arg) {
73
+ return arg === "--prefix" || arg === "-C";
74
+ }
75
+ /** `-g`, any single-dash cluster containing `g` (`-gf`), `--global`, or `--location=global`. */
76
+ function isGlobalFlag(arg) {
77
+ if (arg === "--global" || arg === "--global=true")
78
+ return true;
79
+ if (arg === "--location=global")
80
+ return true;
81
+ return /^-[a-z]*g[a-z]*$/i.test(arg);
82
+ }
83
+ /** Any spelling of npm's workspace selectors — `-w`, `--workspace(s)`, `--no-workspaces`. */
84
+ function isWorkspaceFlag(arg) {
85
+ return arg === "-w" || /^--(no-)?workspaces?(=|$)/.test(arg);
86
+ }
87
+ /**
88
+ * Re-express `npm install --prefix <dir>` (no package specs) as an npm run
89
+ * whose *working directory* is `<dir>`.
90
+ *
91
+ * npm applies a CLI `--prefix` to both the local and the global prefix. On
92
+ * Windows the global install root is `<prefix>\node_modules`, while on POSIX
93
+ * it is `<prefix>/lib/node_modules`, so on Windows `npm install --prefix <dir>`
94
+ * makes the local install target (`npm.prefix`) and the global install target
95
+ * (`dirname(npm.globalDir)`) the *same* directory. npm's install command reads
96
+ * that as a global install of the current directory:
97
+ *
98
+ * // `npm i -g` => "install this package globally"
99
+ * if (where === globalTop && !args.length) { args = ['.'] }
100
+ *
101
+ * `.` is then resolved against the *process* cwd, so npm stops installing the
102
+ * dependencies declared in `<dir>` and instead tries to read `package.json`
103
+ * from the cwd — the ENOENT reported in #526. POSIX never trips the collision.
104
+ *
105
+ * Setting npm's cwd expresses the same intent without the prefix collision:
106
+ * `npm.localPrefix` walks up from the cwd and settles on `<dir>`, which is
107
+ * where the `package.json` lives. The two are not *quite* interchangeable —
108
+ * having settled on `<dir>`, npm keeps walking up to see whether an ancestor
109
+ * declares `<dir>` as one of its workspaces and promotes the local prefix to
110
+ * that ancestor if so, something `--prefix` never does — so the rewrite also
111
+ * passes `--workspaces=false`, which makes npm stop at `<dir>` (see
112
+ * `@npmcli/config`'s `loadLocalPrefix()`). The rewrite is deliberately
113
+ * conservative:
114
+ *
115
+ * - only the install verb with no package spec is affected — every other npm
116
+ * command, and `npm install <pkg> --prefix <dir>`, resolves `--prefix`
117
+ * correctly on Windows;
118
+ * - a global install keeps `--prefix`, which is exactly what it means there;
119
+ * - any other bare token (e.g. the value of `--loglevel warn`) is treated as
120
+ * a possible package spec and suppresses the rewrite;
121
+ * - `<dir>` must actually contain a `package.json`, so npm can never walk up
122
+ * past `<dir>` and install some parent directory's dependencies instead;
123
+ * - a `<dir>` that is itself a workspace root, or an invocation that already
124
+ * carries a workspace selector, is left alone: `--workspaces=false` would
125
+ * drop the workspaces from the install instead of merely bounding the
126
+ * walk-up.
127
+ */
128
+ function rescopeWindowsLocalInstall(args, readPrefixManifest) {
129
+ const kept = [];
130
+ const bareTokens = [];
131
+ let prefix;
132
+ for (let i = 0; i < args.length; i++) {
133
+ const arg = args[i];
134
+ if (arg === undefined)
135
+ continue;
136
+ if (isGlobalFlag(arg) || isWorkspaceFlag(arg))
137
+ return null;
138
+ if (isPrefixFlag(arg)) {
139
+ const value = args[i + 1];
140
+ // A dangling `--prefix` is npm's problem to report, not ours.
141
+ if (value === undefined || value.startsWith("-"))
142
+ return null;
143
+ prefix = value;
144
+ i++;
145
+ continue;
146
+ }
147
+ if (arg.startsWith("--prefix=")) {
148
+ prefix = arg.slice("--prefix=".length);
149
+ continue;
150
+ }
151
+ if (!arg.startsWith("-"))
152
+ bareTokens.push(arg);
153
+ kept.push(arg);
154
+ }
155
+ if (prefix === undefined || prefix === "")
156
+ return null;
157
+ const command = bareTokens[0];
158
+ if (bareTokens.length !== 1 || command === undefined)
159
+ return null;
160
+ if (!NPM_INSTALL_COMMANDS.has(command))
161
+ return null;
162
+ const manifest = readPrefixManifest(prefix);
163
+ if (manifest === null || manifest.declaresWorkspaces)
164
+ return null;
165
+ return { args: [...kept, "--workspaces=false"], cwd: prefix };
166
+ }
167
+ /** Read `<dir>/package.json`; `null` when it is absent or unreadable. */
168
+ function readPackageJson(dir) {
169
+ let parsed;
170
+ try {
171
+ const source = readFileSync(join(dir, "package.json"), "utf-8");
172
+ // npm reads manifests through json-parse-even-better-errors, which
173
+ // tolerates a leading BOM — Windows editors write them, and the whole
174
+ // point of this branch is Windows.
175
+ parsed = JSON.parse(source.replace(/^\uFEFF/, ""));
176
+ }
177
+ catch {
178
+ // Absent or malformed: either way there is nothing to re-scope onto.
179
+ return null;
180
+ }
181
+ const declaresWorkspaces = typeof parsed === "object" && parsed !== null && "workspaces" in parsed;
182
+ return { declaresWorkspaces };
183
+ }
47
184
  /**
48
185
  * Resolve how npm has to be spawned on the given platform.
49
186
  *
50
187
  * Exported for unit testing: pass an explicit `platform` to exercise the
51
- * Windows branch from a POSIX host.
188
+ * Windows branch from a POSIX host, and `readPrefixManifest` to exercise the
189
+ * Windows `--prefix` rescope without touching the filesystem.
52
190
  */
53
- export function buildNpmInvocation({ args, platform = process.platform, }) {
191
+ export function buildNpmInvocation({ args, platform = process.platform, readPrefixManifest = readPackageJson, }) {
54
192
  if (platform !== "win32") {
55
193
  return { command: "npm", args: [...args], shell: false };
56
194
  }
@@ -62,14 +200,18 @@ export function buildNpmInvocation({ args, platform = process.platform, }) {
62
200
  throw new Error(`Refusing to run npm: argument contains a cmd.exe environment variable reference: ${JSON.stringify(arg)}`);
63
201
  }
64
202
  }
203
+ // Validation runs on the arguments as given, so rescoping never widens what
204
+ // is accepted: a hostile `--prefix` value is rejected before it can become a cwd.
205
+ const rescoped = rescopeWindowsLocalInstall(args, readPrefixManifest);
65
206
  return {
66
207
  command: "npm.cmd",
67
- args: args.map(quoteWindowsArg),
208
+ args: (rescoped?.args ?? args).map(quoteWindowsArg),
68
209
  shell: true,
210
+ ...(rescoped ? { cwd: rescoped.cwd } : {}),
69
211
  };
70
212
  }
71
213
  export function npm({ args, ...opts }) {
72
- const { command, args: resolvedArgs, shell } = buildNpmInvocation({ args });
214
+ const { command, args: resolvedArgs, shell, cwd, } = buildNpmInvocation({ args });
73
215
  // On Windows, `shell` is true because npm is a .cmd shim that requires cmd.exe.
74
216
  // execFileSync(command, args, { shell: true }) triggers DEP0190 in Node ≥ 22 when
75
217
  // an args array is combined with shell: true. execSync(commandString) takes a
@@ -82,10 +224,11 @@ export function npm({ args, ...opts }) {
82
224
  stdout: execSync(cmdLine, {
83
225
  stdio: ["ignore", "pipe", "pipe"],
84
226
  encoding: "utf-8",
227
+ cwd,
85
228
  }),
86
229
  };
87
230
  }
88
- execSync(cmdLine, { stdio: opts.stdio });
231
+ execSync(cmdLine, { stdio: opts.stdio, cwd });
89
232
  return undefined;
90
233
  }
91
234
  if (opts.stdout) {
@@ -94,10 +237,11 @@ export function npm({ args, ...opts }) {
94
237
  stdio: ["ignore", "pipe", "pipe"],
95
238
  encoding: "utf-8",
96
239
  shell: false,
240
+ cwd,
97
241
  }),
98
242
  };
99
243
  }
100
- execFileSync(command, resolvedArgs, { stdio: opts.stdio, shell: false });
244
+ execFileSync(command, resolvedArgs, { stdio: opts.stdio, shell: false, cwd });
101
245
  return undefined;
102
246
  }
103
247
  //# sourceMappingURL=npm-exec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"npm-exec.js","sourceRoot":"","sources":["../../../src/utils/shared/npm-exec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAEN,YAAY,EACZ,QAAQ,GACR,MAAM,oBAAoB,CAAC;AA4B5B,kHAAkH;AAClH,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAEvC;;;yEAGyE;AACzE,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAE/C;;;;;GAKG;AACH,SAAS,eAAe,CAAC,GAAW;IACnC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAClC,IAAI,EACJ,QAAQ,GAAG,OAAO,CAAC,QAAQ,GAI3B;IACA,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC1B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,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