nx 21.6.9 → 21.6.10
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/package.json +11 -11
- package/src/executors/run-commands/running-tasks.js +4 -4
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/running-tasks/node-child-process.d.ts +2 -2
- package/src/tasks-runner/running-tasks/node-child-process.d.ts.map +1 -1
- package/src/tasks-runner/running-tasks/node-child-process.js +11 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "21.6.
|
|
3
|
+
"version": "21.6.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
|
6
6
|
"repository": {
|
|
@@ -83,16 +83,16 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"optionalDependencies": {
|
|
86
|
-
"@nx/nx-darwin-arm64": "21.6.
|
|
87
|
-
"@nx/nx-darwin-x64": "21.6.
|
|
88
|
-
"@nx/nx-freebsd-x64": "21.6.
|
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "21.6.
|
|
90
|
-
"@nx/nx-linux-arm64-gnu": "21.6.
|
|
91
|
-
"@nx/nx-linux-arm64-musl": "21.6.
|
|
92
|
-
"@nx/nx-linux-x64-gnu": "21.6.
|
|
93
|
-
"@nx/nx-linux-x64-musl": "21.6.
|
|
94
|
-
"@nx/nx-win32-arm64-msvc": "21.6.
|
|
95
|
-
"@nx/nx-win32-x64-msvc": "21.6.
|
|
86
|
+
"@nx/nx-darwin-arm64": "21.6.10",
|
|
87
|
+
"@nx/nx-darwin-x64": "21.6.10",
|
|
88
|
+
"@nx/nx-freebsd-x64": "21.6.10",
|
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "21.6.10",
|
|
90
|
+
"@nx/nx-linux-arm64-gnu": "21.6.10",
|
|
91
|
+
"@nx/nx-linux-arm64-musl": "21.6.10",
|
|
92
|
+
"@nx/nx-linux-x64-gnu": "21.6.10",
|
|
93
|
+
"@nx/nx-linux-x64-musl": "21.6.10",
|
|
94
|
+
"@nx/nx-win32-arm64-msvc": "21.6.10",
|
|
95
|
+
"@nx/nx-win32-x64-msvc": "21.6.10"
|
|
96
96
|
},
|
|
97
97
|
"nx-migrations": {
|
|
98
98
|
"migrations": "./migrations.json",
|
|
@@ -322,20 +322,20 @@ class RunningNodeProcess {
|
|
|
322
322
|
});
|
|
323
323
|
// Terminate any task processes on exit
|
|
324
324
|
process.on('exit', () => {
|
|
325
|
-
this.
|
|
325
|
+
this.kill();
|
|
326
326
|
});
|
|
327
327
|
process.on('SIGINT', () => {
|
|
328
|
-
this.
|
|
328
|
+
this.kill('SIGTERM');
|
|
329
329
|
// we exit here because we don't need to write anything to cache.
|
|
330
330
|
process.exit((0, exit_codes_1.signalToCode)('SIGINT'));
|
|
331
331
|
});
|
|
332
332
|
process.on('SIGTERM', () => {
|
|
333
|
-
this.
|
|
333
|
+
this.kill('SIGTERM');
|
|
334
334
|
// no exit here because we expect child processes to terminate which
|
|
335
335
|
// will store results to the cache and will terminate this process
|
|
336
336
|
});
|
|
337
337
|
process.on('SIGHUP', () => {
|
|
338
|
-
this.
|
|
338
|
+
this.kill('SIGTERM');
|
|
339
339
|
// no exit here because we expect child processes to terminate which
|
|
340
340
|
// will store results to the cache and will terminate this process
|
|
341
341
|
});
|
|
Binary file
|
|
@@ -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":"
|
|
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;IAwDrE,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
|
|
93
|
-
this.childProcess.
|
|
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
|
|
194
|
-
this.childProcess.
|
|
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
|
}
|