@camunda8/cli 4.0.0-alpha.1 → 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.
- package/PLUGIN-HELP.md +9 -0
- package/dist/core/runtime.d.ts +5 -0
- package/dist/core/runtime.d.ts.map +1 -1
- package/dist/core/runtime.js.map +1 -1
- package/dist/default-plugins/bpmn/c8ctl-plugin.js +7 -2
- package/dist/default-plugins/element-template/c8ctl-plugin.js +12 -3
- package/dist/default-plugins/element-template/package.json +1 -1
- package/dist/templates/AGENTS.md +7 -0
- package/dist/utils/shared/npm-exec.d.ts +18 -2
- package/dist/utils/shared/npm-exec.d.ts.map +1 -1
- package/dist/utils/shared/npm-exec.js +150 -6
- package/dist/utils/shared/npm-exec.js.map +1 -1
- package/dist/vendor/bpmn-element-templates.cjs +870 -776
- package/dist/vendor/bpmnlint.cjs +581 -572
- package/package.json +1 -1
package/PLUGIN-HELP.md
CHANGED
|
@@ -202,6 +202,15 @@ c8ctl.npm({ args: ['install', 'c8ctl-plugin-foo'], stdio: 'inherit' });
|
|
|
202
202
|
|
|
203
203
|
`stdout: true` returns `{ stdout: string }`; omitting it returns `undefined`. A non-zero npm exit throws.
|
|
204
204
|
|
|
205
|
+
#### Installing into a directory with `--prefix`
|
|
206
|
+
|
|
207
|
+
`npm install --prefix <dir>` with no package spec misbehaves on Windows: npm applies the CLI `--prefix` to the global prefix too, and because the Windows global install root is `<prefix>\node_modules` (rather than `<prefix>/lib/node_modules` as on POSIX) npm decides the install is global, rewrites the empty argument list to `.`, and resolves that against the process cwd — so it reads the wrong `package.json` ([#526](https://github.com/camunda/c8ctl/issues/526)). `c8ctl.npm()` detects this exact shape on Windows and instead runs npm with its cwd set to the prefix directory, which is equivalent and correct. Plugins do not need to change their cwd or use an npm-specific option form, and POSIX invocations are untouched. The re-scope is bounded (`--workspaces=false`) so npm resolves exactly that directory rather than promoting the install to a workspace root above it, and a prefix that is itself a workspace root is left untouched.
|
|
208
|
+
|
|
209
|
+
```typescript
|
|
210
|
+
// Works the same on Linux, macOS and Windows
|
|
211
|
+
c8ctl.npm({ args: ['install', '--prefix', projectDir], stdout: true });
|
|
212
|
+
```
|
|
213
|
+
|
|
205
214
|
For TypeScript autocomplete, use the exported runtime type:
|
|
206
215
|
|
|
207
216
|
```typescript
|
package/dist/core/runtime.d.ts
CHANGED
|
@@ -93,6 +93,11 @@ export interface C8ctlPluginRuntime {
|
|
|
93
93
|
*
|
|
94
94
|
* Throws if an argument cannot be passed safely to cmd.exe (embedded
|
|
95
95
|
* quote, line break, or a `%VAR%` reference).
|
|
96
|
+
*
|
|
97
|
+
* On Windows a package-spec-less `install --prefix <dir>` is transparently
|
|
98
|
+
* re-scoped to run npm with its cwd set to `<dir>`, because npm's own
|
|
99
|
+
* `--prefix` handling would otherwise install against the process cwd
|
|
100
|
+
* (see `utils/shared/npm-exec.ts` and #526).
|
|
96
101
|
*/
|
|
97
102
|
npm: NpmRunner;
|
|
98
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/core/runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EACX,aAAa,EACb,cAAc,EACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKtD,MAAM,WAAW,QAAQ;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,8DAA8D;AAC9D,MAAM,WAAW,uBAAuB;IACvC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACx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a,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAE1C;IAED,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAErC;IAED,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAEzC;IAED,IAAI,UAAU,IAAI,UAAU,CAE3B;IAED,IAAI,UAAU,CAAC,KAAK,EAAE,UAAU,EAE/B;IAED,IAAI,MAAM,IAAI,MAAM,EAAE,GAAG,SAAS,CAEjC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,EAErC;IAED,IAAI,MAAM,IAAI,OAAO,GAAG,SAAS,CAEhC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,EAEpC;IAED,IAAI,OAAO,IAAI,OAAO,GAAG,SAAS,CAEjC;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,EAErC;IAED,IAAI,eAAe,IAAI,MAAM,GAAG,SAAS,CAExC;IAED,IAAI,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAE5C;CACD;AAED;;GAEG;AAEH,eAAO,MAAM,KAAK,OAAc,CAAC"}
|
package/dist/core/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/core/runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAOzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/core/runtime.ts"],"names":[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,CAAC;IAED,IAAI,OAAO;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAED,IAAI,OAAO,CAAC,KAA0B;QACrC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,eAAe;QAClB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC9B,CAAC;IAED,IAAI,eAAe,CAAC,KAAyB;QAC5C,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAC/B,CAAC;CACD;AAED;;GAEG;AACH,2GAA2G;AAC3G,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
-
var __esm = (fn, res) => function __init() {
|
|
4
|
-
|
|
3
|
+
var __esm = (fn, res, err) => function __init() {
|
|
4
|
+
if (err) throw err[0];
|
|
5
|
+
try {
|
|
6
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
7
|
+
} catch (e) {
|
|
8
|
+
throw err = [e], e;
|
|
9
|
+
}
|
|
5
10
|
};
|
|
6
11
|
var __export = (target, all) => {
|
|
7
12
|
for (var name2 in all)
|
|
@@ -4,11 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __esm = (fn, res) => function __init() {
|
|
8
|
-
|
|
7
|
+
var __esm = (fn, res, err) => function __init() {
|
|
8
|
+
if (err) throw err[0];
|
|
9
|
+
try {
|
|
10
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
|
+
} catch (e) {
|
|
12
|
+
throw err = [e], e;
|
|
13
|
+
}
|
|
9
14
|
};
|
|
10
15
|
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
-
|
|
16
|
+
try {
|
|
17
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
18
|
+
} catch (e) {
|
|
19
|
+
throw mod = 0, e;
|
|
20
|
+
}
|
|
12
21
|
};
|
|
13
22
|
var __export = (target, all) => {
|
|
14
23
|
for (var name2 in all)
|
package/dist/templates/AGENTS.md
CHANGED
|
@@ -78,3 +78,10 @@ Before considering a change complete:
|
|
|
78
78
|
- Make the smallest change required for each task.
|
|
79
79
|
- Do not add unrelated commands or refactors.
|
|
80
80
|
- Keep `metadata.commands` descriptions concise and user-facing.
|
|
81
|
+
|
|
82
|
+
## Git / GitHub CLI output
|
|
83
|
+
|
|
84
|
+
- `git` and `gh` commands can invoke a pager and hang waiting for keyboard input (e.g. `q` to quit), which looks like the terminal is stuck. Always disable paging before running commands whose output might exceed a screen:
|
|
85
|
+
|
|
86
|
+
- Prefix `git` read commands with `--no-pager`, e.g. `git --no-pager log`, `git --no-pager diff`, `git --no-pager show`.
|
|
87
|
+
- Pipe `gh` output through `cat`, e.g. `gh pr list | cat`, `gh pr view 123 | cat`, `gh issue list | cat`.
|
|
@@ -26,6 +26,13 @@
|
|
|
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 { type ExecFileSyncOptions } from "node:child_process";
|
|
31
38
|
export interface NpmInvocation {
|
|
@@ -35,6 +42,8 @@ export interface NpmInvocation {
|
|
|
35
42
|
args: string[];
|
|
36
43
|
/** Whether the invocation must go through a shell. */
|
|
37
44
|
shell: boolean;
|
|
45
|
+
/** Directory to run npm in; `undefined` inherits the process cwd. */
|
|
46
|
+
cwd?: string;
|
|
38
47
|
}
|
|
39
48
|
export interface NpmResult {
|
|
40
49
|
stdout?: string;
|
|
@@ -49,15 +58,22 @@ interface NpmArgsWithoutOutput extends NpmArgs {
|
|
|
49
58
|
stdio?: ExecFileSyncOptions["stdio"];
|
|
50
59
|
stdout?: false;
|
|
51
60
|
}
|
|
61
|
+
/** What a prefix directory's `package.json` says, or `null` if there is none. */
|
|
62
|
+
export interface PrefixManifest {
|
|
63
|
+
/** Whether the manifest declares a `workspaces` field. */
|
|
64
|
+
declaresWorkspaces: boolean;
|
|
65
|
+
}
|
|
52
66
|
/**
|
|
53
67
|
* Resolve how npm has to be spawned on the given platform.
|
|
54
68
|
*
|
|
55
69
|
* Exported for unit testing: pass an explicit `platform` to exercise the
|
|
56
|
-
* Windows branch from a POSIX host
|
|
70
|
+
* Windows branch from a POSIX host, and `readPrefixManifest` to exercise the
|
|
71
|
+
* Windows `--prefix` rescope without touching the filesystem.
|
|
57
72
|
*/
|
|
58
|
-
export declare function buildNpmInvocation({ args, platform, }: {
|
|
73
|
+
export declare function buildNpmInvocation({ args, platform, readPrefixManifest, }: {
|
|
59
74
|
args: readonly string[];
|
|
60
75
|
platform?: NodeJS.Platform;
|
|
76
|
+
readPrefixManifest?: (dir: string) => PrefixManifest | null;
|
|
61
77
|
}): NpmInvocation;
|
|
62
78
|
/**
|
|
63
79
|
* Run npm through the platform-aware wrapper.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm-exec.d.ts","sourceRoot":"","sources":["../../../src/utils/shared/npm-exec.ts"],"names":[],"mappings":"AAAA
|
|
1
|
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AAA;CAAE,CAAC;AACpE,wBAAgB,GAAG,CAAC,OAAO,EAAE,oBAAoB,GAAG,SAAS,CAAC"}
|
|
@@ -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
|
|
1
|
+
{"version":3,"file":"npm-exec.js","sourceRoot":"","sources":["../../../src/utils/shared/npm-exec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAEN,YAAY,EACZ,QAAQ,GACR,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AA8BjC,kHAAkH;AAClH,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAEvC;;;yEAGyE;AACzE,MAAM,oBAAoB,GAAG,iBA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