nx 21.3.0-beta.4 → 21.3.0-beta.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "21.3.0-beta.4",
3
+ "version": "21.3.0-beta.5",
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.0-beta.4",
87
- "@nx/nx-darwin-x64": "21.3.0-beta.4",
88
- "@nx/nx-freebsd-x64": "21.3.0-beta.4",
89
- "@nx/nx-linux-arm-gnueabihf": "21.3.0-beta.4",
90
- "@nx/nx-linux-arm64-gnu": "21.3.0-beta.4",
91
- "@nx/nx-linux-arm64-musl": "21.3.0-beta.4",
92
- "@nx/nx-linux-x64-gnu": "21.3.0-beta.4",
93
- "@nx/nx-linux-x64-musl": "21.3.0-beta.4",
94
- "@nx/nx-win32-arm64-msvc": "21.3.0-beta.4",
95
- "@nx/nx-win32-x64-msvc": "21.3.0-beta.4"
86
+ "@nx/nx-darwin-arm64": "21.3.0-beta.5",
87
+ "@nx/nx-darwin-x64": "21.3.0-beta.5",
88
+ "@nx/nx-freebsd-x64": "21.3.0-beta.5",
89
+ "@nx/nx-linux-arm-gnueabihf": "21.3.0-beta.5",
90
+ "@nx/nx-linux-arm64-gnu": "21.3.0-beta.5",
91
+ "@nx/nx-linux-arm64-musl": "21.3.0-beta.5",
92
+ "@nx/nx-linux-x64-gnu": "21.3.0-beta.5",
93
+ "@nx/nx-linux-x64-musl": "21.3.0-beta.5",
94
+ "@nx/nx-win32-arm64-msvc": "21.3.0-beta.5",
95
+ "@nx/nx-win32-x64-msvc": "21.3.0-beta.5"
96
96
  },
97
97
  "nx-migrations": {
98
98
  "migrations": "./migrations.json",
@@ -25,6 +25,7 @@ export interface RunOptions {
25
25
  }
26
26
  export interface TuiOptions {
27
27
  tuiAutoExit: boolean | number;
28
+ tui: boolean;
28
29
  }
29
30
  export declare function withTuiOptions<T>(yargs: Argv<T>): Argv<T & TuiOptions>;
30
31
  export declare function withRunOptions<T>(yargs: Argv<T>): Argv<T & RunOptions>;
@@ -38,6 +38,11 @@ function withTuiOptions(yargs) {
38
38
  describe: 'Whether or not to exit the TUI automatically after all tasks finish, and after how long. If set to `true`, the TUI will exit immediately. If set to `false` the TUI will not automatically exit. If set to a number, an interruptible countdown popup will be shown for that many seconds before the TUI exits.',
39
39
  type: 'string',
40
40
  coerce: (v) => coerceTuiAutoExit(v),
41
+ })
42
+ .option('tui', {
43
+ describe: 'Enable or disable the Nx Terminal UI.',
44
+ type: 'boolean',
45
+ conflicts: 'outputStyle',
41
46
  })
42
47
  .middleware((args) => {
43
48
  if (args.tuiAutoExit !== undefined) {
@@ -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
  }
@@ -29,6 +29,7 @@ export interface NxArgs {
29
29
  skipNxCache?: boolean;
30
30
  skipRemoteCache?: boolean;
31
31
  outputStyle?: string;
32
+ tui?: boolean;
32
33
  nxBail?: boolean;
33
34
  nxIgnoreCycles?: boolean;
34
35
  type?: string;