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 CHANGED
@@ -64,14 +64,14 @@ async function main() {
64
64
  if (!workspace) {
65
65
  handleNoWorkspace(GLOBAL_NX_VERSION);
66
66
  }
67
- if (!localNx && !isNxCloudCommand(process.argv[2])) {
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 if (localNx) {
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-31974-83b6608",
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-31974-83b6608",
87
- "@nx/nx-darwin-x64": "0.0.0-pr-31974-83b6608",
88
- "@nx/nx-freebsd-x64": "0.0.0-pr-31974-83b6608",
89
- "@nx/nx-linux-arm-gnueabihf": "0.0.0-pr-31974-83b6608",
90
- "@nx/nx-linux-arm64-gnu": "0.0.0-pr-31974-83b6608",
91
- "@nx/nx-linux-arm64-musl": "0.0.0-pr-31974-83b6608",
92
- "@nx/nx-linux-x64-gnu": "0.0.0-pr-31974-83b6608",
93
- "@nx/nx-linux-x64-musl": "0.0.0-pr-31974-83b6608",
94
- "@nx/nx-win32-arm64-msvc": "0.0.0-pr-31974-83b6608",
95
- "@nx/nx-win32-x64-msvc": "0.0.0-pr-31974-83b6608"
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",
@@ -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();
@@ -39,4 +39,5 @@ export declare class TasksSchedule {
39
39
  private processTaskForBatches;
40
40
  private canBatchTaskBeScheduled;
41
41
  private canBeScheduled;
42
+ getEstimatedTaskTimings(): Record<string, number>;
42
43
  }
@@ -201,5 +201,8 @@ class TasksSchedule {
201
201
  return this.taskGraph.tasks[taskId].parallelism === true;
202
202
  }
203
203
  }
204
+ getEstimatedTaskTimings() {
205
+ return this.estimatedTaskTimings;
206
+ }
204
207
  }
205
208
  exports.TasksSchedule = TasksSchedule;