nx 21.3.0-beta.3 → 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 +11 -11
- package/src/command-line/affected/affected.js +1 -1
- package/src/command-line/format/command-object.js +12 -6
- package/src/command-line/init/implementation/add-nx-to-monorepo.js +1 -1
- package/src/command-line/init/implementation/add-nx-to-nest.js +1 -1
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +1 -1
- package/src/command-line/init/implementation/angular/index.js +1 -1
- package/src/command-line/init/implementation/angular/legacy-angular-versions.js +1 -1
- package/src/command-line/init/implementation/utils.js +1 -1
- package/src/command-line/init/init-v2.js +1 -1
- package/src/command-line/migrate/migrate.js +1 -1
- package/src/command-line/{connect → nx-cloud/connect}/command-object.js +4 -4
- package/src/command-line/{connect → nx-cloud/connect}/connect-to-nx-cloud.d.ts +4 -4
- package/src/command-line/{connect → nx-cloud/connect}/connect-to-nx-cloud.js +10 -10
- package/src/command-line/{connect → nx-cloud/connect}/view-logs.js +6 -6
- package/src/command-line/nx-cloud/fix-ci/command-object.d.ts +2 -0
- package/src/command-line/nx-cloud/fix-ci/command-object.js +12 -0
- package/src/command-line/nx-cloud/fix-ci/fix-ci.d.ts +4 -0
- package/src/command-line/nx-cloud/fix-ci/fix-ci.js +7 -0
- package/src/command-line/{login → nx-cloud/login}/command-object.js +1 -1
- package/src/command-line/nx-cloud/login/login.js +10 -0
- package/src/command-line/{logout → nx-cloud/logout}/command-object.js +1 -1
- package/src/command-line/nx-cloud/logout/logout.js +7 -0
- package/src/command-line/nx-cloud/record/command-object.d.ts +2 -0
- package/src/command-line/nx-cloud/record/command-object.js +12 -0
- package/src/command-line/nx-cloud/record/record.d.ts +4 -0
- package/src/command-line/nx-cloud/record/record.js +7 -0
- package/src/command-line/nx-cloud/start-ci-run/command-object.d.ts +2 -0
- package/src/command-line/nx-cloud/start-ci-run/command-object.js +12 -0
- package/src/command-line/nx-cloud/start-ci-run/start-ci-run.d.ts +4 -0
- package/src/command-line/nx-cloud/start-ci-run/start-ci-run.js +7 -0
- package/src/command-line/nx-cloud/utils.d.ts +1 -0
- package/src/command-line/{logout/logout.js → nx-cloud/utils.js} +4 -4
- package/src/command-line/nx-commands.js +12 -6
- package/src/command-line/run/run-one.js +1 -1
- package/src/command-line/run-many/run-many.js +1 -1
- 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/core/graph/styles.js +1 -1
- package/src/tasks-runner/is-tui-enabled.js +8 -0
- package/src/utils/command-line-utils.d.ts +1 -0
- package/src/utils/project-graph-utils.d.ts +6 -1
- package/src/utils/project-graph-utils.js +11 -6
- package/src/command-line/login/login.js +0 -19
- /package/src/command-line/{connect → nx-cloud/connect}/command-object.d.ts +0 -0
- /package/src/command-line/{connect → nx-cloud/connect}/view-logs.d.ts +0 -0
- /package/src/command-line/{login → nx-cloud/login}/command-object.d.ts +0 -0
- /package/src/command-line/{login → nx-cloud/login}/login.d.ts +0 -0
- /package/src/command-line/{logout → nx-cloud/logout}/command-object.d.ts +0 -0
- /package/src/command-line/{logout → nx-cloud/logout}/logout.d.ts +0 -0
package/src/core/graph/styles.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[869],{
|
1
|
+
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[869],{7910:()=>{}},s=>{var e;e=7910,s(s.s=e)}]);
|
@@ -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
|
}
|
@@ -1,7 +1,11 @@
|
|
1
1
|
import { ProjectGraph, ProjectGraphProjectNode } from '../config/project-graph';
|
2
|
+
import type { ProjectConfiguration } from '../config/workspace-json-project-json';
|
2
3
|
export declare function projectHasTarget(project: ProjectGraphProjectNode, target: string): boolean;
|
3
4
|
export declare function projectHasTargetAndConfiguration(project: ProjectGraphProjectNode, target: string, configuration: string): any;
|
4
|
-
export declare function getSourceDirOfDependentProjects(projectName: string, projectGraph?: ProjectGraph): [
|
5
|
+
export declare function getSourceDirOfDependentProjects(projectName: string, projectGraph?: ProjectGraph): [
|
6
|
+
projectDirs: string[],
|
7
|
+
warnings: string[]
|
8
|
+
];
|
5
9
|
/**
|
6
10
|
* Find all internal project dependencies.
|
7
11
|
* All the external (npm) dependencies will be filtered out unless includeExternalDependencies is set to true
|
@@ -11,3 +15,4 @@ export declare function getSourceDirOfDependentProjects(projectName: string, pro
|
|
11
15
|
* @returns {string[]}
|
12
16
|
*/
|
13
17
|
export declare function findAllProjectNodeDependencies(parentNodeName: string, projectGraph?: ProjectGraph, includeExternalDependencies?: boolean): string[];
|
18
|
+
export declare function getProjectSourceRoot(project: ProjectConfiguration): string | undefined;
|
@@ -4,6 +4,9 @@ exports.projectHasTarget = projectHasTarget;
|
|
4
4
|
exports.projectHasTargetAndConfiguration = projectHasTargetAndConfiguration;
|
5
5
|
exports.getSourceDirOfDependentProjects = getSourceDirOfDependentProjects;
|
6
6
|
exports.findAllProjectNodeDependencies = findAllProjectNodeDependencies;
|
7
|
+
exports.getProjectSourceRoot = getProjectSourceRoot;
|
8
|
+
const node_fs_1 = require("node:fs");
|
9
|
+
const node_path_1 = require("node:path");
|
7
10
|
const project_graph_1 = require("../project-graph/project-graph");
|
8
11
|
function projectHasTarget(project, target) {
|
9
12
|
return !!(project.data &&
|
@@ -21,12 +24,8 @@ function getSourceDirOfDependentProjects(projectName, projectGraph = (0, project
|
|
21
24
|
}
|
22
25
|
const nodeNames = findAllProjectNodeDependencies(projectName, projectGraph);
|
23
26
|
return nodeNames.reduce((result, nodeName) => {
|
24
|
-
|
25
|
-
|
26
|
-
}
|
27
|
-
else {
|
28
|
-
result[1].push(nodeName);
|
29
|
-
}
|
27
|
+
const sourceRoot = getProjectSourceRoot(projectGraph.nodes[nodeName].data);
|
28
|
+
result[0].push(sourceRoot);
|
30
29
|
return result;
|
31
30
|
}, [[], []]);
|
32
31
|
}
|
@@ -71,3 +70,9 @@ function collectDependentProjectNodesNames(nxDeps, dependencyNodeNames, parentNo
|
|
71
70
|
collectDependentProjectNodesNames(nxDeps, dependencyNodeNames, dependencyName, includeExternalDependencies);
|
72
71
|
}
|
73
72
|
}
|
73
|
+
function getProjectSourceRoot(project) {
|
74
|
+
return (project.sourceRoot ??
|
75
|
+
((0, node_fs_1.existsSync)(node_path_1.posix.join(project.root, 'src'))
|
76
|
+
? node_path_1.posix.join(project.root, 'src')
|
77
|
+
: project.root));
|
78
|
+
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.loginHandler = loginHandler;
|
4
|
-
const update_manager_1 = require("../../nx-cloud/update-manager");
|
5
|
-
const get_cloud_options_1 = require("../../nx-cloud/utilities/get-cloud-options");
|
6
|
-
const handle_errors_1 = require("../../utils/handle-errors");
|
7
|
-
const resolution_helpers_1 = require("../../nx-cloud/resolution-helpers");
|
8
|
-
function loginHandler(args) {
|
9
|
-
if (args.nxCloudUrl) {
|
10
|
-
process.env.NX_CLOUD_API = args.nxCloudUrl;
|
11
|
-
}
|
12
|
-
return (0, handle_errors_1.handleErrors)(args.verbose, async () => {
|
13
|
-
const nxCloudClient = (await (0, update_manager_1.verifyOrUpdateNxCloudClient)((0, get_cloud_options_1.getCloudOptions)()))
|
14
|
-
.nxCloudClient;
|
15
|
-
const paths = (0, resolution_helpers_1.findAncestorNodeModules)(__dirname, []);
|
16
|
-
nxCloudClient.configureLightClientRequire()(paths);
|
17
|
-
await nxCloudClient.commands.login();
|
18
|
-
});
|
19
|
-
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|