nx 21.3.7 → 21.3.8
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/bin/post-install.js +8 -22
- package/package.json +11 -11
package/bin/post-install.js
CHANGED
@@ -1,43 +1,28 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const project_graph_1 = require("../src/project-graph/project-graph");
|
4
3
|
const workspace_root_1 = require("../src/utils/workspace-root");
|
5
4
|
const fileutils_1 = require("../src/utils/fileutils");
|
6
5
|
const path_1 = require("path");
|
7
|
-
const client_1 = require("../src/daemon/client/client");
|
8
6
|
const assert_supported_platform_1 = require("../src/native/assert-supported-platform");
|
9
7
|
const update_manager_1 = require("../src/nx-cloud/update-manager");
|
10
8
|
const get_cloud_options_1 = require("../src/nx-cloud/utilities/get-cloud-options");
|
11
9
|
const nx_cloud_utils_1 = require("../src/utils/nx-cloud-utils");
|
12
10
|
const nx_json_1 = require("../src/config/nx-json");
|
13
11
|
const logger_1 = require("../src/utils/logger");
|
14
|
-
|
12
|
+
// The post install is not critical, to avoid any chance that it may hang
|
13
|
+
// we will kill this process after 30 seconds.
|
14
|
+
const postinstallTimeout = setTimeout(() => {
|
15
|
+
logger_1.logger.verbose('Nx post-install timed out.');
|
16
|
+
process.exit(0);
|
17
|
+
}, 30_000);
|
15
18
|
(async () => {
|
16
19
|
const start = new Date();
|
17
20
|
try {
|
18
21
|
if (isMainNxPackage() && (0, fileutils_1.fileExists)((0, path_1.join)(workspace_root_1.workspaceRoot, 'nx.json'))) {
|
19
22
|
(0, assert_supported_platform_1.assertSupportedPlatform)();
|
20
|
-
(0, workspace_context_1.setupWorkspaceContext)(workspace_root_1.workspaceRoot);
|
21
|
-
if (client_1.daemonClient.enabled()) {
|
22
|
-
try {
|
23
|
-
await client_1.daemonClient.stop();
|
24
|
-
}
|
25
|
-
catch (e) { }
|
26
|
-
}
|
27
|
-
const tasks = [
|
28
|
-
(0, project_graph_1.buildProjectGraphAndSourceMapsWithoutDaemon)(),
|
29
|
-
];
|
30
23
|
if ((0, nx_cloud_utils_1.isNxCloudUsed)((0, nx_json_1.readNxJson)())) {
|
31
|
-
|
24
|
+
await (0, update_manager_1.verifyOrUpdateNxCloudClient)((0, get_cloud_options_1.getCloudOptions)());
|
32
25
|
}
|
33
|
-
process.env.NX_DAEMON = 'false';
|
34
|
-
await Promise.all(tasks.map((promise) => {
|
35
|
-
return promise.catch((e) => {
|
36
|
-
if (process.env.NX_VERBOSE_LOGGING === 'true') {
|
37
|
-
console.warn(e);
|
38
|
-
}
|
39
|
-
});
|
40
|
-
}));
|
41
26
|
}
|
42
27
|
}
|
43
28
|
catch (e) {
|
@@ -46,6 +31,7 @@ const workspace_context_1 = require("../src/utils/workspace-context");
|
|
46
31
|
finally {
|
47
32
|
const end = new Date();
|
48
33
|
logger_1.logger.verbose(`Nx postinstall steps took ${end.getTime() - start.getTime()}ms`);
|
34
|
+
clearTimeout(postinstallTimeout);
|
49
35
|
process.exit(0);
|
50
36
|
}
|
51
37
|
})();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "21.3.
|
3
|
+
"version": "21.3.8",
|
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.3.
|
87
|
-
"@nx/nx-darwin-x64": "21.3.
|
88
|
-
"@nx/nx-freebsd-x64": "21.3.
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "21.3.
|
90
|
-
"@nx/nx-linux-arm64-gnu": "21.3.
|
91
|
-
"@nx/nx-linux-arm64-musl": "21.3.
|
92
|
-
"@nx/nx-linux-x64-gnu": "21.3.
|
93
|
-
"@nx/nx-linux-x64-musl": "21.3.
|
94
|
-
"@nx/nx-win32-arm64-msvc": "21.3.
|
95
|
-
"@nx/nx-win32-x64-msvc": "21.3.
|
86
|
+
"@nx/nx-darwin-arm64": "21.3.8",
|
87
|
+
"@nx/nx-darwin-x64": "21.3.8",
|
88
|
+
"@nx/nx-freebsd-x64": "21.3.8",
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "21.3.8",
|
90
|
+
"@nx/nx-linux-arm64-gnu": "21.3.8",
|
91
|
+
"@nx/nx-linux-arm64-musl": "21.3.8",
|
92
|
+
"@nx/nx-linux-x64-gnu": "21.3.8",
|
93
|
+
"@nx/nx-linux-x64-musl": "21.3.8",
|
94
|
+
"@nx/nx-win32-arm64-msvc": "21.3.8",
|
95
|
+
"@nx/nx-win32-x64-msvc": "21.3.8"
|
96
96
|
},
|
97
97
|
"nx-migrations": {
|
98
98
|
"migrations": "./migrations.json",
|