nx 21.3.0-beta.4 → 21.3.0-beta.6
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 +12 -12
- package/src/command-line/yargs-utils/shared-options.d.ts +1 -0
- package/src/command-line/yargs-utils/shared-options.js +5 -0
- package/src/core/graph/main.js +1 -1
- package/src/native/index.d.ts +2 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/is-tui-enabled.js +8 -0
- package/src/tasks-runner/run-command.js +1 -1
- package/src/utils/command-line-utils.d.ts +1 -0
package/src/native/index.d.ts
CHANGED
@@ -8,7 +8,7 @@ export declare class ExternalObject<T> {
|
|
8
8
|
}
|
9
9
|
}
|
10
10
|
export declare class AppLifeCycle {
|
11
|
-
constructor(tasks: Array<Task>, initiatingTasks: Array<string>, runMode: RunMode, pinnedTasks: Array<string>, tuiCliArgs: TuiCliArgs, tuiConfig: TuiConfig, titleText: string, workspaceRoot: string)
|
11
|
+
constructor(tasks: Array<Task>, initiatingTasks: Array<string>, runMode: RunMode, pinnedTasks: Array<string>, tuiCliArgs: TuiCliArgs, tuiConfig: TuiConfig, titleText: string, workspaceRoot: string, taskGraph: TaskGraph)
|
12
12
|
startCommand(threadCount?: number | undefined | null): void
|
13
13
|
scheduleTask(task: Task): void
|
14
14
|
startTasks(tasks: Array<Task>, metadata: object): void
|
@@ -322,6 +322,7 @@ export interface TaskGraph {
|
|
322
322
|
roots: Array<string>
|
323
323
|
tasks: Record<string, Task>
|
324
324
|
dependencies: Record<string, Array<string>>
|
325
|
+
continuousDependencies: Record<string, Array<string>>
|
325
326
|
}
|
326
327
|
|
327
328
|
export interface TaskResult {
|
Binary file
|
@@ -4,6 +4,7 @@ exports.isTuiEnabled = isTuiEnabled;
|
|
4
4
|
exports.shouldUseTui = shouldUseTui;
|
5
5
|
const native_1 = require("../native");
|
6
6
|
const is_ci_1 = require("../utils/is-ci");
|
7
|
+
const logger_1 = require("../utils/logger");
|
7
8
|
let tuiEnabled = undefined;
|
8
9
|
/**
|
9
10
|
* @returns If tui is enabled
|
@@ -25,6 +26,13 @@ function shouldUseTui(nxJson, nxArgs, skipCapabilityCheck = process.env.NX_TUI_S
|
|
25
26
|
// If the current terminal/environment is not capable of displaying the TUI, we don't run it
|
26
27
|
const isWindows = process.platform === 'win32';
|
27
28
|
const isCapable = skipCapabilityCheck || (process.stderr.isTTY && isUnicodeSupported());
|
29
|
+
if (typeof nxArgs.tui === 'boolean') {
|
30
|
+
if (nxArgs.tui && !isCapable) {
|
31
|
+
logger_1.logger.warn('Nx Terminal UI was not enabled as it is not supported in this environment.');
|
32
|
+
return false;
|
33
|
+
}
|
34
|
+
return nxArgs.tui;
|
35
|
+
}
|
28
36
|
if (!isCapable) {
|
29
37
|
return false;
|
30
38
|
}
|
@@ -128,7 +128,7 @@ async function getTerminalOutputLifeCycle(initiatingProject, initiatingTasks, pr
|
|
128
128
|
const lifeCycles = [tsLifeCycle];
|
129
129
|
// Only run the TUI if there are tasks to run
|
130
130
|
if (tasks.length > 0) {
|
131
|
-
appLifeCycle = new AppLifeCycle(tasks, initiatingTasks.map((t) => t.id), isRunOne ? 0 /* RunMode.RunOne */ : 1 /* RunMode.RunMany */, pinnedTasks, nxArgs ?? {}, nxJson.tui ?? {}, titleText, workspace_root_1.workspaceRoot);
|
131
|
+
appLifeCycle = new AppLifeCycle(tasks, initiatingTasks.map((t) => t.id), isRunOne ? 0 /* RunMode.RunOne */ : 1 /* RunMode.RunMany */, pinnedTasks, nxArgs ?? {}, nxJson.tui ?? {}, titleText, workspace_root_1.workspaceRoot, taskGraph);
|
132
132
|
lifeCycles.unshift(appLifeCycle);
|
133
133
|
/**
|
134
134
|
* Patch stdout.write and stderr.write methods to pass Nx Cloud client logs to the TUI via the lifecycle
|