nx 0.0.0-pr-31974-83b6608 → 0.0.0-pr-31972-e7c1663
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/nx.js +2 -19
- package/package.json +11 -11
- package/src/native/index.d.ts +1 -0
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/life-cycle.d.ts +2 -0
- package/src/tasks-runner/life-cycle.js +7 -0
- package/src/tasks-runner/task-orchestrator.js +5 -0
- package/src/tasks-runner/tasks-schedule.d.ts +1 -0
- package/src/tasks-runner/tasks-schedule.js +3 -0
package/bin/nx.js
CHANGED
|
@@ -64,14 +64,14 @@ async function main() {
|
|
|
64
64
|
if (!workspace) {
|
|
65
65
|
handleNoWorkspace(GLOBAL_NX_VERSION);
|
|
66
66
|
}
|
|
67
|
-
if (!localNx
|
|
67
|
+
if (!localNx) {
|
|
68
68
|
handleMissingLocalInstallation(workspace ? workspace.dir : null);
|
|
69
69
|
}
|
|
70
70
|
// this file is already in the local workspace
|
|
71
71
|
if (isLocalInstall) {
|
|
72
72
|
await (0, init_local_1.initLocal)(workspace);
|
|
73
73
|
}
|
|
74
|
-
else
|
|
74
|
+
else {
|
|
75
75
|
// Nx is being run from globally installed CLI - hand off to the local
|
|
76
76
|
warnIfUsingOutdatedGlobalInstall(GLOBAL_NX_VERSION, LOCAL_NX_VERSION);
|
|
77
77
|
if (localNx.includes('.nx')) {
|
|
@@ -82,11 +82,6 @@ async function main() {
|
|
|
82
82
|
require(localNx);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
else if (isNxCloudCommand(process.argv[2])) {
|
|
86
|
-
// nx-cloud commands can run without local Nx installation
|
|
87
|
-
process.env.NX_DAEMON = 'false';
|
|
88
|
-
require('nx/src/command-line/nx-commands').commandsObject.argv;
|
|
89
|
-
}
|
|
90
85
|
}
|
|
91
86
|
}
|
|
92
87
|
function handleNoWorkspace(globalNxVersion) {
|
|
@@ -137,18 +132,6 @@ function resolveNx(workspace) {
|
|
|
137
132
|
paths: [workspace ? workspace.dir : globalsRoot],
|
|
138
133
|
});
|
|
139
134
|
}
|
|
140
|
-
function isNxCloudCommand(command) {
|
|
141
|
-
const nxCloudCommands = [
|
|
142
|
-
'start-ci-run',
|
|
143
|
-
'login',
|
|
144
|
-
'logout',
|
|
145
|
-
'connect',
|
|
146
|
-
'view-logs',
|
|
147
|
-
'fix-ci',
|
|
148
|
-
'record',
|
|
149
|
-
];
|
|
150
|
-
return nxCloudCommands.includes(command);
|
|
151
|
-
}
|
|
152
135
|
function handleMissingLocalInstallation(detectedWorkspaceRoot) {
|
|
153
136
|
output_1.output.error({
|
|
154
137
|
title: detectedWorkspaceRoot
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-31972-e7c1663",
|
|
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": "0.0.0-pr-
|
|
87
|
-
"@nx/nx-darwin-x64": "0.0.0-pr-
|
|
88
|
-
"@nx/nx-freebsd-x64": "0.0.0-pr-
|
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "0.0.0-pr-
|
|
90
|
-
"@nx/nx-linux-arm64-gnu": "0.0.0-pr-
|
|
91
|
-
"@nx/nx-linux-arm64-musl": "0.0.0-pr-
|
|
92
|
-
"@nx/nx-linux-x64-gnu": "0.0.0-pr-
|
|
93
|
-
"@nx/nx-linux-x64-musl": "0.0.0-pr-
|
|
94
|
-
"@nx/nx-win32-arm64-msvc": "0.0.0-pr-
|
|
95
|
-
"@nx/nx-win32-x64-msvc": "0.0.0-pr-
|
|
86
|
+
"@nx/nx-darwin-arm64": "0.0.0-pr-31972-e7c1663",
|
|
87
|
+
"@nx/nx-darwin-x64": "0.0.0-pr-31972-e7c1663",
|
|
88
|
+
"@nx/nx-freebsd-x64": "0.0.0-pr-31972-e7c1663",
|
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "0.0.0-pr-31972-e7c1663",
|
|
90
|
+
"@nx/nx-linux-arm64-gnu": "0.0.0-pr-31972-e7c1663",
|
|
91
|
+
"@nx/nx-linux-arm64-musl": "0.0.0-pr-31972-e7c1663",
|
|
92
|
+
"@nx/nx-linux-x64-gnu": "0.0.0-pr-31972-e7c1663",
|
|
93
|
+
"@nx/nx-linux-x64-musl": "0.0.0-pr-31972-e7c1663",
|
|
94
|
+
"@nx/nx-win32-arm64-msvc": "0.0.0-pr-31972-e7c1663",
|
|
95
|
+
"@nx/nx-win32-x64-msvc": "0.0.0-pr-31972-e7c1663"
|
|
96
96
|
},
|
|
97
97
|
"nx-migrations": {
|
|
98
98
|
"migrations": "./migrations.json",
|
package/src/native/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare class AppLifeCycle {
|
|
|
22
22
|
setTaskStatus(taskId: string, status: TaskStatus): void
|
|
23
23
|
registerForcedShutdownCallback(forcedShutdownCallback: () => any): void
|
|
24
24
|
__setCloudMessage(message: string): Promise<void>
|
|
25
|
+
setEstimatedTaskTimings(timings: Record<string, number>): void
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export declare class ChildProcess {
|
|
Binary file
|
|
@@ -41,6 +41,7 @@ export interface LifeCycle {
|
|
|
41
41
|
appendTaskOutput?(taskId: string, output: string, isPtyTask: boolean): void;
|
|
42
42
|
setTaskStatus?(taskId: string, status: NativeTaskStatus): void;
|
|
43
43
|
registerForcedShutdownCallback?(callback: () => void): void;
|
|
44
|
+
setEstimatedTaskTimings?(timings: Record<string, number>): void;
|
|
44
45
|
}
|
|
45
46
|
export declare class CompositeLifeCycle implements LifeCycle {
|
|
46
47
|
private readonly lifeCycles;
|
|
@@ -58,4 +59,5 @@ export declare class CompositeLifeCycle implements LifeCycle {
|
|
|
58
59
|
appendTaskOutput(taskId: string, output: string, isPtyTask: boolean): void;
|
|
59
60
|
setTaskStatus(taskId: string, status: NativeTaskStatus): void;
|
|
60
61
|
registerForcedShutdownCallback(callback: () => void): void;
|
|
62
|
+
setEstimatedTaskTimings(timings: Record<string, number>): void;
|
|
61
63
|
}
|
|
@@ -102,5 +102,12 @@ class CompositeLifeCycle {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
setEstimatedTaskTimings(timings) {
|
|
106
|
+
for (let l of this.lifeCycles) {
|
|
107
|
+
if (l.setEstimatedTaskTimings) {
|
|
108
|
+
l.setEstimatedTaskTimings(timings);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
105
112
|
}
|
|
106
113
|
exports.CompositeLifeCycle = CompositeLifeCycle;
|
|
@@ -66,6 +66,11 @@ class TaskOrchestrator {
|
|
|
66
66
|
}),
|
|
67
67
|
'init' in this.cache ? this.cache.init() : null,
|
|
68
68
|
]);
|
|
69
|
+
// Pass estimated timings to TUI after TasksSchedule is initialized
|
|
70
|
+
if (this.tuiEnabled) {
|
|
71
|
+
const estimatedTimings = this.tasksSchedule.getEstimatedTaskTimings();
|
|
72
|
+
this.options.lifeCycle.setEstimatedTaskTimings(estimatedTimings);
|
|
73
|
+
}
|
|
69
74
|
}
|
|
70
75
|
async run() {
|
|
71
76
|
await this.init();
|