nx 22.2.0-beta.0 → 22.2.0-beta.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.
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": 2,
3
- "title": "Noop",
4
- "description": "An executor that does nothing.",
5
- "type": "object",
6
- "cli": "nx",
7
- "outputCapture": "pipe",
8
- "properties": {},
9
- "additionalProperties": true
2
+ "version": 2,
3
+ "title": "Noop",
4
+ "description": "An executor that does nothing.",
5
+ "type": "object",
6
+ "cli": "nx",
7
+ "outputCapture": "pipe",
8
+ "properties": {},
9
+ "additionalProperties": true
10
10
  }
@@ -337,20 +337,20 @@ class RunningNodeProcess {
337
337
  });
338
338
  // Terminate any task processes on exit
339
339
  process.on('exit', () => {
340
- this.childProcess.kill();
340
+ this.kill();
341
341
  });
342
342
  process.on('SIGINT', () => {
343
- this.childProcess.kill('SIGTERM');
343
+ this.kill('SIGTERM');
344
344
  // we exit here because we don't need to write anything to cache.
345
345
  process.exit((0, exit_codes_1.signalToCode)('SIGINT'));
346
346
  });
347
347
  process.on('SIGTERM', () => {
348
- this.childProcess.kill('SIGTERM');
348
+ this.kill('SIGTERM');
349
349
  // no exit here because we expect child processes to terminate which
350
350
  // will store results to the cache and will terminate this process
351
351
  });
352
352
  process.on('SIGHUP', () => {
353
- this.childProcess.kill('SIGTERM');
353
+ this.kill('SIGTERM');
354
354
  // no exit here because we expect child processes to terminate which
355
355
  // will store results to the cache and will terminate this process
356
356
  });
@@ -1,198 +1,198 @@
1
1
  {
2
- "version": 2,
3
- "title": "Run Commands",
4
- "description": "Run any custom commands with Nx.",
5
- "type": "object",
6
- "cli": "nx",
7
- "outputCapture": "pipe",
8
- "presets": [
9
- {
10
- "name": "Arguments forwarding",
11
- "keys": ["commands"]
12
- },
13
- {
14
- "name": "Custom done conditions",
15
- "keys": ["commands", "readyWhen"]
16
- },
17
- {
18
- "name": "Setting the cwd",
19
- "keys": ["commands", "cwd"]
20
- }
21
- ],
22
- "properties": {
23
- "commands": {
24
- "type": "array",
25
- "description": "Commands to run in child process.",
26
- "items": {
27
- "oneOf": [
28
- {
29
- "type": "object",
30
- "properties": {
31
- "command": {
32
- "type": "string",
33
- "description": "Command to run in child process."
34
- },
35
- "forwardAllArgs": {
36
- "type": "boolean",
37
- "description": "Whether arguments should be forwarded when interpolation is not present."
38
- },
39
- "prefix": {
40
- "type": "string",
41
- "description": "Prefix in front of every line out of the output"
42
- },
43
- "prefixColor": {
44
- "type": "string",
45
- "description": "Color of the prefix",
46
- "enum": [
47
- "black",
48
- "red",
49
- "green",
50
- "yellow",
51
- "blue",
52
- "magenta",
53
- "cyan",
54
- "white"
55
- ]
56
- },
57
- "color": {
58
- "type": "string",
59
- "description": "Color of the output",
60
- "enum": [
61
- "black",
62
- "red",
63
- "green",
64
- "yellow",
65
- "blue",
66
- "magenta",
67
- "cyan",
68
- "white"
69
- ]
70
- },
71
- "bgColor": {
72
- "type": "string",
73
- "description": "Background color of the output",
74
- "enum": [
75
- "bgBlack",
76
- "bgRed",
77
- "bgGreen",
78
- "bgYellow",
79
- "bgBlue",
80
- "bgMagenta",
81
- "bgCyan",
82
- "bgWhite"
83
- ]
84
- },
85
- "description": {
86
- "type": "string",
87
- "description": "An optional description useful for inline documentation purposes. It is not used as part of the execution of the command."
88
- }
89
- },
90
- "additionalProperties": false,
91
- "required": ["command"]
92
- },
93
- {
94
- "type": "string"
95
- }
96
- ]
97
- },
98
- "x-priority": "important"
99
- },
100
- "command": {
101
- "oneOf": [
2
+ "version": 2,
3
+ "title": "Run Commands",
4
+ "description": "Run any custom commands with Nx.",
5
+ "type": "object",
6
+ "cli": "nx",
7
+ "outputCapture": "pipe",
8
+ "presets": [
9
+ {
10
+ "name": "Arguments forwarding",
11
+ "keys": ["commands"]
12
+ },
102
13
  {
103
- "type": "array",
104
- "description": "Command to run in child process, but divided into parts.",
105
- "items": {
106
- "type": "string"
107
- },
108
- "x-priority": "important"
14
+ "name": "Custom done conditions",
15
+ "keys": ["commands", "readyWhen"]
109
16
  },
110
17
  {
111
- "type": "string",
112
- "description": "Command to run in child process."
18
+ "name": "Setting the cwd",
19
+ "keys": ["commands", "cwd"]
20
+ }
21
+ ],
22
+ "properties": {
23
+ "commands": {
24
+ "type": "array",
25
+ "description": "Commands to run in child process.",
26
+ "items": {
27
+ "oneOf": [
28
+ {
29
+ "type": "object",
30
+ "properties": {
31
+ "command": {
32
+ "type": "string",
33
+ "description": "Command to run in child process."
34
+ },
35
+ "forwardAllArgs": {
36
+ "type": "boolean",
37
+ "description": "Whether arguments should be forwarded when interpolation is not present."
38
+ },
39
+ "prefix": {
40
+ "type": "string",
41
+ "description": "Prefix in front of every line out of the output"
42
+ },
43
+ "prefixColor": {
44
+ "type": "string",
45
+ "description": "Color of the prefix",
46
+ "enum": [
47
+ "black",
48
+ "red",
49
+ "green",
50
+ "yellow",
51
+ "blue",
52
+ "magenta",
53
+ "cyan",
54
+ "white"
55
+ ]
56
+ },
57
+ "color": {
58
+ "type": "string",
59
+ "description": "Color of the output",
60
+ "enum": [
61
+ "black",
62
+ "red",
63
+ "green",
64
+ "yellow",
65
+ "blue",
66
+ "magenta",
67
+ "cyan",
68
+ "white"
69
+ ]
70
+ },
71
+ "bgColor": {
72
+ "type": "string",
73
+ "description": "Background color of the output",
74
+ "enum": [
75
+ "bgBlack",
76
+ "bgRed",
77
+ "bgGreen",
78
+ "bgYellow",
79
+ "bgBlue",
80
+ "bgMagenta",
81
+ "bgCyan",
82
+ "bgWhite"
83
+ ]
84
+ },
85
+ "description": {
86
+ "type": "string",
87
+ "description": "An optional description useful for inline documentation purposes. It is not used as part of the execution of the command."
88
+ }
89
+ },
90
+ "additionalProperties": false,
91
+ "required": ["command"]
92
+ },
93
+ {
94
+ "type": "string"
95
+ }
96
+ ]
97
+ },
98
+ "x-priority": "important"
99
+ },
100
+ "command": {
101
+ "oneOf": [
102
+ {
103
+ "type": "array",
104
+ "description": "Command to run in child process, but divided into parts.",
105
+ "items": {
106
+ "type": "string"
107
+ },
108
+ "x-priority": "important"
109
+ },
110
+ {
111
+ "type": "string",
112
+ "description": "Command to run in child process."
113
+ }
114
+ ],
115
+ "type": "string",
116
+ "description": "Command to run in child process.",
117
+ "x-priority": "important"
118
+ },
119
+ "parallel": {
120
+ "type": "boolean",
121
+ "description": "Run commands in parallel.",
122
+ "default": true,
123
+ "x-priority": "important"
124
+ },
125
+ "readyWhen": {
126
+ "description": "String or array of strings to appear in `stdout` or `stderr` that indicate that the task is done. When running multiple commands, this option can only be used when `parallel` is set to `true`. If not specified, the task is done when all the child processes complete.",
127
+ "oneOf": [
128
+ { "type": "string" },
129
+ { "type": "array", "items": { "type": "string" } }
130
+ ]
131
+ },
132
+ "args": {
133
+ "oneOf": [
134
+ {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string"
138
+ }
139
+ },
140
+ {
141
+ "type": "string"
142
+ }
143
+ ],
144
+ "description": "Extra arguments. You can pass them as follows: nx run project:target --args='--wait=100'. You can then use {args.wait} syntax to interpolate them in the workspace config file. See example [above](#chaining-commands-interpolating-args-and-setting-the-cwd)"
145
+ },
146
+ "envFile": {
147
+ "type": "string",
148
+ "description": "You may specify a custom .env file path."
149
+ },
150
+ "color": {
151
+ "type": "boolean",
152
+ "description": "Use colors when showing output of command.",
153
+ "default": false
154
+ },
155
+ "cwd": {
156
+ "type": "string",
157
+ "description": "Current working directory of the commands. If it's not specified the commands will run in the workspace root, if a relative path is specified the commands will run in that path relative to the workspace root and if it's an absolute path the commands will run in that path."
158
+ },
159
+ "env": {
160
+ "type": "object",
161
+ "description": "Environment variables that will be made available to the commands. This property has priority over the `.env` files.",
162
+ "additionalProperties": {
163
+ "type": "string"
164
+ }
165
+ },
166
+ "__unparsed__": {
167
+ "hidden": true,
168
+ "type": "array",
169
+ "items": {
170
+ "type": "string"
171
+ },
172
+ "$default": {
173
+ "$source": "unparsed"
174
+ },
175
+ "x-priority": "internal"
176
+ },
177
+ "forwardAllArgs": {
178
+ "type": "boolean",
179
+ "description": "Whether arguments should be forwarded when interpolation is not present.",
180
+ "default": true
181
+ },
182
+ "tty": {
183
+ "type": "boolean",
184
+ "description": "Whether commands should be run with a tty terminal",
185
+ "hidden": true
113
186
  }
114
- ],
115
- "type": "string",
116
- "description": "Command to run in child process.",
117
- "x-priority": "important"
118
- },
119
- "parallel": {
120
- "type": "boolean",
121
- "description": "Run commands in parallel.",
122
- "default": true,
123
- "x-priority": "important"
124
- },
125
- "readyWhen": {
126
- "description": "String or array of strings to appear in `stdout` or `stderr` that indicate that the task is done. When running multiple commands, this option can only be used when `parallel` is set to `true`. If not specified, the task is done when all the child processes complete.",
127
- "oneOf": [
128
- { "type": "string" },
129
- { "type": "array", "items": { "type": "string" } }
130
- ]
131
187
  },
132
- "args": {
133
- "oneOf": [
188
+ "additionalProperties": true,
189
+ "oneOf": [
134
190
  {
135
- "type": "array",
136
- "items": {
137
- "type": "string"
138
- }
191
+ "required": ["commands"]
139
192
  },
140
193
  {
141
- "type": "string"
194
+ "required": ["command"]
142
195
  }
143
- ],
144
- "description": "Extra arguments. You can pass them as follows: nx run project:target --args='--wait=100'. You can then use {args.wait} syntax to interpolate them in the workspace config file. See example [above](#chaining-commands-interpolating-args-and-setting-the-cwd)"
145
- },
146
- "envFile": {
147
- "type": "string",
148
- "description": "You may specify a custom .env file path."
149
- },
150
- "color": {
151
- "type": "boolean",
152
- "description": "Use colors when showing output of command.",
153
- "default": false
154
- },
155
- "cwd": {
156
- "type": "string",
157
- "description": "Current working directory of the commands. If it's not specified the commands will run in the workspace root, if a relative path is specified the commands will run in that path relative to the workspace root and if it's an absolute path the commands will run in that path."
158
- },
159
- "env": {
160
- "type": "object",
161
- "description": "Environment variables that will be made available to the commands. This property has priority over the `.env` files.",
162
- "additionalProperties": {
163
- "type": "string"
164
- }
165
- },
166
- "__unparsed__": {
167
- "hidden": true,
168
- "type": "array",
169
- "items": {
170
- "type": "string"
171
- },
172
- "$default": {
173
- "$source": "unparsed"
174
- },
175
- "x-priority": "internal"
176
- },
177
- "forwardAllArgs": {
178
- "type": "boolean",
179
- "description": "Whether arguments should be forwarded when interpolation is not present.",
180
- "default": true
181
- },
182
- "tty": {
183
- "type": "boolean",
184
- "description": "Whether commands should be run with a tty terminal",
185
- "hidden": true
186
- }
187
- },
188
- "additionalProperties": true,
189
- "oneOf": [
190
- {
191
- "required": ["commands"]
192
- },
193
- {
194
- "required": ["command"]
195
- }
196
- ],
197
- "examplesFile": "../../../docs/run-commands-examples.md"
196
+ ],
197
+ "examplesFile": "../../../docs/run-commands-examples.md"
198
198
  }
@@ -1,28 +1,28 @@
1
1
  {
2
- "version": 2,
3
- "title": "Run Script",
4
- "description": "Run any NPM script of a project in the project's root directory.",
5
- "type": "object",
6
- "cli": "nx",
7
- "outputCapture": "pipe",
8
- "properties": {
9
- "script": {
10
- "type": "string",
11
- "description": "An npm script name in the `package.json` file of the project (e.g., `build`)."
2
+ "version": 2,
3
+ "title": "Run Script",
4
+ "description": "Run any NPM script of a project in the project's root directory.",
5
+ "type": "object",
6
+ "cli": "nx",
7
+ "outputCapture": "pipe",
8
+ "properties": {
9
+ "script": {
10
+ "type": "string",
11
+ "description": "An npm script name in the `package.json` file of the project (e.g., `build`)."
12
+ },
13
+ "__unparsed__": {
14
+ "hidden": true,
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string"
18
+ },
19
+ "$default": {
20
+ "$source": "unparsed"
21
+ },
22
+ "x-priority": "internal"
23
+ }
12
24
  },
13
- "__unparsed__": {
14
- "hidden": true,
15
- "type": "array",
16
- "items": {
17
- "type": "string"
18
- },
19
- "$default": {
20
- "$source": "unparsed"
21
- },
22
- "x-priority": "internal"
23
- }
24
- },
25
- "additionalProperties": true,
26
- "required": ["script"],
27
- "examplesFile": "../../../docs/run-script-examples.md"
25
+ "additionalProperties": true,
26
+ "required": ["script"],
27
+ "examplesFile": "../../../docs/run-script-examples.md"
28
28
  }
Binary file
@@ -1,41 +1,41 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "id": "NxCloudInit",
4
- "title": "Add Nx Cloud Configuration to the workspace",
5
- "description": "Connect a workspace to Nx Cloud.",
6
- "type": "object",
7
- "cli": "nx",
8
- "properties": {
9
- "analytics": {
10
- "type": "boolean",
11
- "description": "Anonymously store hashed machine ID for task runs",
12
- "default": false
2
+ "$schema": "https://json-schema.org/schema",
3
+ "id": "NxCloudInit",
4
+ "title": "Add Nx Cloud Configuration to the workspace",
5
+ "description": "Connect a workspace to Nx Cloud.",
6
+ "type": "object",
7
+ "cli": "nx",
8
+ "properties": {
9
+ "analytics": {
10
+ "type": "boolean",
11
+ "description": "Anonymously store hashed machine ID for task runs",
12
+ "default": false
13
+ },
14
+ "installationSource": {
15
+ "type": "string",
16
+ "description": "Name of Nx Cloud installation invoker (ex. user, add-nx-to-monorepo, create-nx-workspace, nx-upgrade",
17
+ "default": "user"
18
+ },
19
+ "hideFormatLogs": {
20
+ "type": "boolean",
21
+ "description": "Hide formatting logs",
22
+ "x-priority": "internal"
23
+ },
24
+ "generateToken": {
25
+ "type": "boolean",
26
+ "description": "Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud"
27
+ },
28
+ "github": {
29
+ "type": "boolean",
30
+ "description": "If the user will be using GitHub as their git hosting provider",
31
+ "default": false
32
+ },
33
+ "directory": {
34
+ "type": "string",
35
+ "description": "The directory where the workspace is located",
36
+ "x-priority": "internal"
37
+ }
13
38
  },
14
- "installationSource": {
15
- "type": "string",
16
- "description": "Name of Nx Cloud installation invoker (ex. user, add-nx-to-monorepo, create-nx-workspace, nx-upgrade",
17
- "default": "user"
18
- },
19
- "hideFormatLogs": {
20
- "type": "boolean",
21
- "description": "Hide formatting logs",
22
- "x-priority": "internal"
23
- },
24
- "generateToken": {
25
- "type": "boolean",
26
- "description": "Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud"
27
- },
28
- "github": {
29
- "type": "boolean",
30
- "description": "If the user will be using GitHub as their git hosting provider",
31
- "default": false
32
- },
33
- "directory": {
34
- "type": "string",
35
- "description": "The directory where the workspace is located",
36
- "x-priority": "internal"
37
- }
38
- },
39
- "additionalProperties": false,
40
- "required": []
39
+ "additionalProperties": false,
40
+ "required": []
41
41
  }
@@ -1,5 +1,5 @@
1
- import { ChildProcess, Serializable } from 'child_process';
2
- import { RunningTask } from './running-task';
1
+ import type { ChildProcess, Serializable } from 'child_process';
2
+ import type { RunningTask } from './running-task';
3
3
  export declare class NodeChildProcessWithNonDirectOutput implements RunningTask {
4
4
  private childProcess;
5
5
  private terminalOutput;
@@ -1 +1 @@
1
- {"version":3,"file":"node-child-process.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/running-tasks/node-child-process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,qBAAa,mCAAoC,YAAW,WAAW;IASnE,OAAO,CAAC,YAAY;IARtB,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,aAAa,CAChB;IACL,OAAO,CAAC,eAAe,CAAuC;IAE9D,OAAO,CAAC,QAAQ,CAAS;gBAGf,YAAY,EAAE,YAAY,EAClC,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAyDrE,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI;IAIzD,QAAQ,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;IAI/B,UAAU,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IAcrE,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAK1B,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO;CAKpC;AA2DD,qBAAa,gCAAiC,YAAW,WAAW;IAQhE,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,mBAAmB;IAR7B,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,aAAa,CAAqD;IAE1E,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAS;gBAGf,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,MAAM;IAqBrC,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAMjC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,KAAK,IAAI;IAInD,UAAU,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IAQrE,WAAW;IAMX,iBAAiB;IAKjB,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI;CAKpC"}
1
+ {"version":3,"file":"node-child-process.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/running-tasks/node-child-process.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAKhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,qBAAa,mCAAoC,YAAW,WAAW;IASnE,OAAO,CAAC,YAAY;IARtB,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,aAAa,CAChB;IACL,OAAO,CAAC,eAAe,CAAuC;IAE9D,OAAO,CAAC,QAAQ,CAAS;gBAGf,YAAY,EAAE,YAAY,EAClC,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAyDrE,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI;IAIzD,QAAQ,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;IAI/B,UAAU,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IAcrE,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAK1B,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO;CAOpC;AA2DD,qBAAa,gCAAiC,YAAW,WAAW;IAQhE,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,mBAAmB;IAR7B,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,aAAa,CAAqD;IAE1E,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAS;gBAGf,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,MAAM;IAqBrC,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAMjC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,KAAK,IAAI;IAInD,UAAU,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IAQrE,WAAW;IAMX,iBAAiB;IAKjB,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI;CAOpC"}
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodeChildProcessWithDirectOutput = exports.NodeChildProcessWithNonDirectOutput = void 0;
4
- const exit_codes_1 = require("../../utils/exit-codes");
5
- const stream_1 = require("stream");
6
4
  const chalk = require("chalk");
7
5
  const fs_1 = require("fs");
6
+ const stream_1 = require("stream");
7
+ const treeKill = require("tree-kill");
8
+ const exit_codes_1 = require("../../utils/exit-codes");
8
9
  class NodeChildProcessWithNonDirectOutput {
9
10
  constructor(childProcess, { streamOutput, prefix }) {
10
11
  this.childProcess = childProcess;
@@ -89,8 +90,10 @@ class NodeChildProcessWithNonDirectOutput {
89
90
  }
90
91
  }
91
92
  kill(signal) {
92
- if (this.childProcess.connected) {
93
- this.childProcess.kill(signal);
93
+ if (this.childProcess?.pid) {
94
+ treeKill(this.childProcess.pid, signal, () => {
95
+ // Ignore errors - process may have already exited
96
+ });
94
97
  }
95
98
  }
96
99
  }
@@ -190,8 +193,10 @@ class NodeChildProcessWithDirectOutput {
190
193
  return this.terminalOutput;
191
194
  }
192
195
  kill(signal) {
193
- if (this.childProcess.connected) {
194
- this.childProcess.kill(signal);
196
+ if (this.childProcess?.pid) {
197
+ treeKill(this.childProcess.pid, signal, () => {
198
+ // Ignore errors - process may have already exited
199
+ });
195
200
  }
196
201
  }
197
202
  }
@@ -1 +1 @@
1
- {"version":3,"file":"command-line-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/command-line-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAIvD,MAAM,WAAW,SAAU,SAAQ,MAAM;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,MAAM;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE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AAE,CAAC;CAC7D,CA4HA;AA4CD,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CA8B/D;AAsDD,wBAAgB,eAAe,CAC7B,YAAY,EAAE,MAAM,EAAE,EACtB,EAAE,KAAK,EAAE,EAAE,YAAY,GACtB,MAAM,EAAE,CAEV;AAED,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,UAIzE"}
1
+ {"version":3,"file":"command-line-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/command-line-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAIvD,MAAM,WAAW,SAAU,SAAQ,MAAM;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,MAAM;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KA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BAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,UAIzE"}
@@ -230,6 +230,7 @@ function parseGitOutput(command) {
230
230
  return (0, child_process_1.execSync)(command, {
231
231
  maxBuffer: file_utils_1.TEN_MEGABYTES,
232
232
  cwd: workspace_root_1.workspaceRoot,
233
+ stdio: 'pipe',
233
234
  windowsHide: false,
234
235
  })
235
236
  .toString('utf-8')
@@ -1 +1 @@
1
- {"version":3,"file":"nx-console-prompt.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/nx-console-prompt.ts"],"names":[],"mappings":"AASA,wBAAsB,wBAAwB,kBA+B7C"}
1
+ {"version":3,"file":"nx-console-prompt.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/nx-console-prompt.ts"],"names":[],"mappings":"AAUA,wBAAsB,wBAAwB,kBAkC7C"}