nx 21.3.0-canary.20250708-ea5cd30 → 21.3.0-canary.20250711-be6d35b
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/native/nx.wasm32-wasi.wasm +0 -0
- package/src/plugins/package-json/create-nodes.js +4 -1
- package/src/tasks-runner/is-tui-enabled.js +8 -0
- package/src/tasks-runner/run-command.js +0 -2
- 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/tasks-runner/life-cycles/nx-cloud-ci-message-life-cycle.d.ts +0 -7
- package/src/tasks-runner/life-cycles/nx-cloud-ci-message-life-cycle.js +0 -49
- /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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "21.3.0-canary.
|
3
|
+
"version": "21.3.0-canary.20250711-be6d35b",
|
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-canary.
|
87
|
-
"@nx/nx-darwin-x64": "21.3.0-canary.
|
88
|
-
"@nx/nx-freebsd-x64": "21.3.0-canary.
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "21.3.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-gnu": "21.3.0-canary.
|
91
|
-
"@nx/nx-linux-arm64-musl": "21.3.0-canary.
|
92
|
-
"@nx/nx-linux-x64-gnu": "21.3.0-canary.
|
93
|
-
"@nx/nx-linux-x64-musl": "21.3.0-canary.
|
94
|
-
"@nx/nx-win32-arm64-msvc": "21.3.0-canary.
|
95
|
-
"@nx/nx-win32-x64-msvc": "21.3.0-canary.
|
86
|
+
"@nx/nx-darwin-arm64": "21.3.0-canary.20250711-be6d35b",
|
87
|
+
"@nx/nx-darwin-x64": "21.3.0-canary.20250711-be6d35b",
|
88
|
+
"@nx/nx-freebsd-x64": "21.3.0-canary.20250711-be6d35b",
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "21.3.0-canary.20250711-be6d35b",
|
90
|
+
"@nx/nx-linux-arm64-gnu": "21.3.0-canary.20250711-be6d35b",
|
91
|
+
"@nx/nx-linux-arm64-musl": "21.3.0-canary.20250711-be6d35b",
|
92
|
+
"@nx/nx-linux-x64-gnu": "21.3.0-canary.20250711-be6d35b",
|
93
|
+
"@nx/nx-linux-x64-musl": "21.3.0-canary.20250711-be6d35b",
|
94
|
+
"@nx/nx-win32-arm64-msvc": "21.3.0-canary.20250711-be6d35b",
|
95
|
+
"@nx/nx-win32-x64-msvc": "21.3.0-canary.20250711-be6d35b"
|
96
96
|
},
|
97
97
|
"nx-migrations": {
|
98
98
|
"migrations": "./migrations.json",
|
@@ -5,7 +5,7 @@ exports.getAffectedGraphNodes = getAffectedGraphNodes;
|
|
5
5
|
const file_utils_1 = require("../../project-graph/file-utils");
|
6
6
|
const run_command_1 = require("../../tasks-runner/run-command");
|
7
7
|
const output_1 = require("../../utils/output");
|
8
|
-
const connect_to_nx_cloud_1 = require("../connect/connect-to-nx-cloud");
|
8
|
+
const connect_to_nx_cloud_1 = require("../nx-cloud/connect/connect-to-nx-cloud");
|
9
9
|
const command_line_utils_1 = require("../../utils/command-line-utils");
|
10
10
|
const perf_hooks_1 = require("perf_hooks");
|
11
11
|
const project_graph_1 = require("../../project-graph/project-graph");
|
@@ -37,13 +37,8 @@ function withFormatOptions(yargs) {
|
|
37
37
|
coerce: shared_options_1.parseCSV,
|
38
38
|
})
|
39
39
|
.option('sort-root-tsconfig-paths', {
|
40
|
-
describe: `Ensure the workspace's tsconfig compilerOptions.paths are sorted. Warning: This will cause comments in the tsconfig to be lost.`,
|
40
|
+
describe: `Ensure the workspace's tsconfig compilerOptions.paths are sorted. Warning: This will cause comments in the tsconfig to be lost. The default value is "true" unless NX_FORMAT_SORT_TSCONFIG_PATHS is set to "false".`,
|
41
41
|
type: 'boolean',
|
42
|
-
/**
|
43
|
-
* TODO(v22): Stop sorting tsconfig paths by default, paths are now less common/important
|
44
|
-
* in Nx workspace setups, and the sorting causes comments to be lost.
|
45
|
-
*/
|
46
|
-
default: true,
|
47
42
|
})
|
48
43
|
.option('all', {
|
49
44
|
describe: 'Format all projects.',
|
@@ -51,5 +46,16 @@ function withFormatOptions(yargs) {
|
|
51
46
|
})
|
52
47
|
.conflicts({
|
53
48
|
all: 'projects',
|
49
|
+
})
|
50
|
+
.middleware((args) => {
|
51
|
+
/**
|
52
|
+
* TODO(v22): Stop sorting tsconfig paths by default, paths are now less common/important
|
53
|
+
* in Nx workspace setups, and the sorting causes comments to be lost.
|
54
|
+
*/
|
55
|
+
args.sortRootTsconfigPaths ??=
|
56
|
+
process.env.NX_FORMAT_SORT_TSCONFIG_PATHS !== 'false';
|
57
|
+
// If NX_FORMAT_SORT_TSCONFIG_PATHS=false and --sort-root-tsconfig-paths is passed, we want to set it to true favoring the arg
|
58
|
+
process.env.NX_FORMAT_SORT_TSCONFIG_PATHS =
|
59
|
+
args.sortRootTsconfigPaths.toString();
|
54
60
|
});
|
55
61
|
}
|
@@ -8,7 +8,7 @@ const path_1 = require("path");
|
|
8
8
|
const fileutils_1 = require("../../../utils/fileutils");
|
9
9
|
const output_1 = require("../../../utils/output");
|
10
10
|
const utils_1 = require("./utils");
|
11
|
-
const connect_to_nx_cloud_1 = require("../../connect/connect-to-nx-cloud");
|
11
|
+
const connect_to_nx_cloud_1 = require("../../nx-cloud/connect/connect-to-nx-cloud");
|
12
12
|
async function addNxToMonorepo(options) {
|
13
13
|
const repoRoot = process.cwd();
|
14
14
|
output_1.output.log({ title: '🐳 Nx initialization' });
|
@@ -9,7 +9,7 @@ const output_1 = require("../../../utils/output");
|
|
9
9
|
const package_manager_1 = require("../../../utils/package-manager");
|
10
10
|
const utils_1 = require("./utils");
|
11
11
|
const versions_1 = require("../../../utils/versions");
|
12
|
-
const connect_to_nx_cloud_1 = require("../../connect/connect-to-nx-cloud");
|
12
|
+
const connect_to_nx_cloud_1 = require("../../nx-cloud/connect/connect-to-nx-cloud");
|
13
13
|
async function addNxToNest(options, packageJson) {
|
14
14
|
const repoRoot = process.cwd();
|
15
15
|
output_1.output.log({ title: '🐳 Nx initialization' });
|
@@ -7,7 +7,7 @@ const fileutils_1 = require("../../../utils/fileutils");
|
|
7
7
|
const output_1 = require("../../../utils/output");
|
8
8
|
const package_manager_1 = require("../../../utils/package-manager");
|
9
9
|
const utils_1 = require("./utils");
|
10
|
-
const connect_to_nx_cloud_1 = require("../../connect/connect-to-nx-cloud");
|
10
|
+
const connect_to_nx_cloud_1 = require("../../nx-cloud/connect/connect-to-nx-cloud");
|
11
11
|
async function addNxToNpmRepo(options) {
|
12
12
|
const repoRoot = process.cwd();
|
13
13
|
output_1.output.log({ title: '🐳 Nx initialization' });
|
@@ -11,7 +11,7 @@ const utils_1 = require("../utils");
|
|
11
11
|
const integrated_workspace_1 = require("./integrated-workspace");
|
12
12
|
const legacy_angular_versions_1 = require("./legacy-angular-versions");
|
13
13
|
const standalone_workspace_1 = require("./standalone-workspace");
|
14
|
-
const connect_to_nx_cloud_1 = require("../../../connect/connect-to-nx-cloud");
|
14
|
+
const connect_to_nx_cloud_1 = require("../../../nx-cloud/connect/connect-to-nx-cloud");
|
15
15
|
const defaultCacheableOperations = [
|
16
16
|
'build',
|
17
17
|
'server',
|
@@ -10,7 +10,7 @@ const object_sort_1 = require("../../../../utils/object-sort");
|
|
10
10
|
const output_1 = require("../../../../utils/output");
|
11
11
|
const package_json_1 = require("../../../../utils/package-json");
|
12
12
|
const package_manager_1 = require("../../../../utils/package-manager");
|
13
|
-
const connect_to_nx_cloud_1 = require("../../../connect/connect-to-nx-cloud");
|
13
|
+
const connect_to_nx_cloud_1 = require("../../../nx-cloud/connect/connect-to-nx-cloud");
|
14
14
|
const utils_1 = require("../utils");
|
15
15
|
// map of Angular major versions to Nx versions to use for legacy `nx init` migrations,
|
16
16
|
// key is major Angular version and value is Nx version to use
|
@@ -22,7 +22,7 @@ const versions_1 = require("../../../utils/versions");
|
|
22
22
|
const fs_1 = require("fs");
|
23
23
|
const connect_to_nx_cloud_1 = require("../../../nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud");
|
24
24
|
const url_shorten_1 = require("../../../nx-cloud/utilities/url-shorten");
|
25
|
-
const connect_to_nx_cloud_2 = require("../../connect/connect-to-nx-cloud");
|
25
|
+
const connect_to_nx_cloud_2 = require("../../nx-cloud/connect/connect-to-nx-cloud");
|
26
26
|
const deduce_default_base_1 = require("./deduce-default-base");
|
27
27
|
const child_process_2 = require("../../../utils/child-process");
|
28
28
|
function createNxJsonFile(repoRoot, topologicalTargets, cacheableOperations, scriptOutputs) {
|
@@ -12,7 +12,7 @@ const output_1 = require("../../utils/output");
|
|
12
12
|
const package_manager_1 = require("../../utils/package-manager");
|
13
13
|
const versions_1 = require("../../utils/versions");
|
14
14
|
const workspace_context_1 = require("../../utils/workspace-context");
|
15
|
-
const connect_to_nx_cloud_1 = require("../connect/connect-to-nx-cloud");
|
15
|
+
const connect_to_nx_cloud_1 = require("../nx-cloud/connect/connect-to-nx-cloud");
|
16
16
|
const configure_plugins_1 = require("./configure-plugins");
|
17
17
|
const add_nx_to_monorepo_1 = require("./implementation/add-nx-to-monorepo");
|
18
18
|
const add_nx_to_npm_repo_1 = require("./implementation/add-nx-to-npm-repo");
|
@@ -24,7 +24,7 @@ const git_utils_1 = require("../../utils/git-utils");
|
|
24
24
|
const package_json_1 = require("../../utils/package-json");
|
25
25
|
const package_manager_1 = require("../../utils/package-manager");
|
26
26
|
const handle_errors_1 = require("../../utils/handle-errors");
|
27
|
-
const connect_to_nx_cloud_1 = require("../connect/connect-to-nx-cloud");
|
27
|
+
const connect_to_nx_cloud_1 = require("../nx-cloud/connect/connect-to-nx-cloud");
|
28
28
|
const output_1 = require("../../utils/output");
|
29
29
|
const fs_1 = require("fs");
|
30
30
|
const workspace_root_1 = require("../../utils/workspace-root");
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.yargsViewLogsCommand = exports.yargsConnectCommand = void 0;
|
4
|
-
const documentation_1 = require("
|
5
|
-
const versions_1 = require("
|
6
|
-
const shared_options_1 = require("
|
4
|
+
const documentation_1 = require("../../yargs-utils/documentation");
|
5
|
+
const versions_1 = require("../../../utils/versions");
|
6
|
+
const shared_options_1 = require("../../yargs-utils/shared-options");
|
7
7
|
exports.yargsConnectCommand = {
|
8
8
|
command: 'connect',
|
9
9
|
aliases: ['connect-to-nx-cloud'],
|
@@ -11,7 +11,7 @@ exports.yargsConnectCommand = {
|
|
11
11
|
builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)(withConnectOptions(yargs), 'connect-to-nx-cloud'),
|
12
12
|
handler: async (args) => {
|
13
13
|
await (await Promise.resolve().then(() => require('./connect-to-nx-cloud'))).connectToNxCloudCommand(args);
|
14
|
-
await (await Promise.resolve().then(() => require('
|
14
|
+
await (await Promise.resolve().then(() => require('../../../utils/ab-testing'))).recordStat({
|
15
15
|
command: 'connect',
|
16
16
|
nxVersion: versions_1.nxVersion,
|
17
17
|
useCloud: true,
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ConnectToNxCloudOptions } from '
|
2
|
-
import { NxJsonConfiguration } from '
|
3
|
-
import { NxArgs } from '
|
4
|
-
import { MessageKey } from '
|
1
|
+
import { ConnectToNxCloudOptions } from '../../../nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud';
|
2
|
+
import { NxJsonConfiguration } from '../../../config/nx-json';
|
3
|
+
import { NxArgs } from '../../../utils/command-line-utils';
|
4
|
+
import { MessageKey } from '../../../utils/ab-testing';
|
5
5
|
export declare function onlyDefaultRunnerIsUsed(nxJson: NxJsonConfiguration): boolean;
|
6
6
|
export declare function connectToNxCloudIfExplicitlyAsked(opts: NxArgs): Promise<void>;
|
7
7
|
export declare function connectWorkspaceToCloud(options: ConnectToNxCloudOptions, directory?: string): Promise<string>;
|
@@ -6,16 +6,16 @@ exports.connectWorkspaceToCloud = connectWorkspaceToCloud;
|
|
6
6
|
exports.connectToNxCloudCommand = connectToNxCloudCommand;
|
7
7
|
exports.connectExistingRepoToNxCloudPrompt = connectExistingRepoToNxCloudPrompt;
|
8
8
|
exports.connectToNxCloudWithPrompt = connectToNxCloudWithPrompt;
|
9
|
-
const output_1 = require("
|
10
|
-
const configuration_1 = require("
|
11
|
-
const tree_1 = require("
|
12
|
-
const connect_to_nx_cloud_1 = require("
|
13
|
-
const url_shorten_1 = require("
|
14
|
-
const nx_cloud_utils_1 = require("
|
15
|
-
const child_process_1 = require("
|
16
|
-
const ab_testing_1 = require("
|
17
|
-
const versions_1 = require("
|
18
|
-
const workspace_root_1 = require("
|
9
|
+
const output_1 = require("../../../utils/output");
|
10
|
+
const configuration_1 = require("../../../config/configuration");
|
11
|
+
const tree_1 = require("../../../generators/tree");
|
12
|
+
const connect_to_nx_cloud_1 = require("../../../nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud");
|
13
|
+
const url_shorten_1 = require("../../../nx-cloud/utilities/url-shorten");
|
14
|
+
const nx_cloud_utils_1 = require("../../../utils/nx-cloud-utils");
|
15
|
+
const child_process_1 = require("../../../utils/child-process");
|
16
|
+
const ab_testing_1 = require("../../../utils/ab-testing");
|
17
|
+
const versions_1 = require("../../../utils/versions");
|
18
|
+
const workspace_root_1 = require("../../../utils/workspace-root");
|
19
19
|
const chalk = require("chalk");
|
20
20
|
const ora = require("ora");
|
21
21
|
const open = require("open");
|
@@ -1,14 +1,14 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.viewLogs = viewLogs;
|
4
|
-
const package_manager_1 = require("
|
4
|
+
const package_manager_1 = require("../../../utils/package-manager");
|
5
5
|
const child_process_1 = require("child_process");
|
6
|
-
const nx_cloud_utils_1 = require("
|
7
|
-
const output_1 = require("
|
8
|
-
const nx_json_1 = require("
|
6
|
+
const nx_cloud_utils_1 = require("../../../utils/nx-cloud-utils");
|
7
|
+
const output_1 = require("../../../utils/output");
|
8
|
+
const nx_json_1 = require("../../../config/nx-json");
|
9
9
|
const connect_to_nx_cloud_1 = require("./connect-to-nx-cloud");
|
10
|
-
const connect_to_nx_cloud_2 = require("
|
11
|
-
const url_shorten_1 = require("
|
10
|
+
const connect_to_nx_cloud_2 = require("../../../nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud");
|
11
|
+
const url_shorten_1 = require("../../../nx-cloud/utilities/url-shorten");
|
12
12
|
async function viewLogs() {
|
13
13
|
const cloudUsed = (0, nx_cloud_utils_1.isNxCloudUsed)((0, nx_json_1.readNxJson)());
|
14
14
|
if (cloudUsed) {
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.yargsFixCiCommand = void 0;
|
4
|
+
const shared_options_1 = require("../../yargs-utils/shared-options");
|
5
|
+
exports.yargsFixCiCommand = {
|
6
|
+
command: 'fix-ci [options]',
|
7
|
+
describe: 'Fixes CI failures. This command is an alias for [`nx-cloud fix-ci`](/ci/reference/nx-cloud-cli#npx-nxcloud-fix-ci).',
|
8
|
+
builder: (yargs) => (0, shared_options_1.withVerbose)(yargs),
|
9
|
+
handler: async (args) => {
|
10
|
+
process.exit(await (await Promise.resolve().then(() => require('./fix-ci'))).fixCiHandler(args));
|
11
|
+
},
|
12
|
+
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.yargsLoginCommand = void 0;
|
4
|
-
const shared_options_1 = require("../../
|
4
|
+
const shared_options_1 = require("../../yargs-utils/shared-options");
|
5
5
|
exports.yargsLoginCommand = {
|
6
6
|
command: 'login [nxCloudUrl]',
|
7
7
|
describe: 'Login to Nx Cloud. This command is an alias for [`nx-cloud login`](/ci/reference/nx-cloud-cli#npx-nxcloud-login).',
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.loginHandler = loginHandler;
|
4
|
+
const utils_1 = require("../utils");
|
5
|
+
function loginHandler(args) {
|
6
|
+
if (args.nxCloudUrl) {
|
7
|
+
process.env.NX_CLOUD_API = args.nxCloudUrl;
|
8
|
+
}
|
9
|
+
return (0, utils_1.executeNxCloudCommand)('login', args.verbose);
|
10
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.yargsLogoutCommand = void 0;
|
4
|
-
const shared_options_1 = require("../../
|
4
|
+
const shared_options_1 = require("../../yargs-utils/shared-options");
|
5
5
|
exports.yargsLogoutCommand = {
|
6
6
|
command: 'logout',
|
7
7
|
describe: 'Logout from Nx Cloud. This command is an alias for [`nx-cloud logout`](/ci/reference/nx-cloud-cli#npx-nxcloud-logout).',
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.yargsRecordCommand = void 0;
|
4
|
+
const shared_options_1 = require("../../yargs-utils/shared-options");
|
5
|
+
exports.yargsRecordCommand = {
|
6
|
+
command: 'record [options]',
|
7
|
+
describe: 'Records a command execution for distributed task execution. This command is an alias for [`nx-cloud record`](/ci/reference/nx-cloud-cli#npx-nxcloud-record).',
|
8
|
+
builder: (yargs) => (0, shared_options_1.withVerbose)(yargs),
|
9
|
+
handler: async (args) => {
|
10
|
+
process.exit(await (await Promise.resolve().then(() => require('./record'))).recordHandler(args));
|
11
|
+
},
|
12
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.yargsStartCiRunCommand = void 0;
|
4
|
+
const shared_options_1 = require("../../yargs-utils/shared-options");
|
5
|
+
exports.yargsStartCiRunCommand = {
|
6
|
+
command: 'start-ci-run [options]',
|
7
|
+
describe: 'Starts a new CI run for distributed task execution. This command is an alias for [`nx-cloud start-ci-run`](/ci/reference/nx-cloud-cli#npx-nxcloud-start-ci-run).',
|
8
|
+
builder: (yargs) => (0, shared_options_1.withVerbose)(yargs),
|
9
|
+
handler: async (args) => {
|
10
|
+
process.exit(await (await Promise.resolve().then(() => require('./start-ci-run'))).startCiRunHandler(args));
|
11
|
+
},
|
12
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.startCiRunHandler = startCiRunHandler;
|
4
|
+
const utils_1 = require("../utils");
|
5
|
+
function startCiRunHandler(args) {
|
6
|
+
return (0, utils_1.executeNxCloudCommand)('start-ci-run', args.verbose);
|
7
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function executeNxCloudCommand(commandName: string, verbose?: boolean): Promise<number>;
|
@@ -1,16 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.executeNxCloudCommand = executeNxCloudCommand;
|
4
4
|
const update_manager_1 = require("../../nx-cloud/update-manager");
|
5
5
|
const get_cloud_options_1 = require("../../nx-cloud/utilities/get-cloud-options");
|
6
6
|
const handle_errors_1 = require("../../utils/handle-errors");
|
7
7
|
const resolution_helpers_1 = require("../../nx-cloud/resolution-helpers");
|
8
|
-
function
|
9
|
-
return (0, handle_errors_1.handleErrors)(
|
8
|
+
async function executeNxCloudCommand(commandName, verbose) {
|
9
|
+
return (0, handle_errors_1.handleErrors)(verbose, async () => {
|
10
10
|
const nxCloudClient = (await (0, update_manager_1.verifyOrUpdateNxCloudClient)((0, get_cloud_options_1.getCloudOptions)()))
|
11
11
|
.nxCloudClient;
|
12
12
|
const paths = (0, resolution_helpers_1.findAncestorNodeModules)(__dirname, []);
|
13
13
|
nxCloudClient.configureLightClientRequire()(paths);
|
14
|
-
await nxCloudClient.commands
|
14
|
+
await nxCloudClient.commands[commandName]();
|
15
15
|
});
|
16
16
|
}
|
@@ -5,7 +5,7 @@ const chalk = require("chalk");
|
|
5
5
|
const yargs = require("yargs");
|
6
6
|
const command_object_1 = require("./register/command-object");
|
7
7
|
const command_object_2 = require("./affected/command-object");
|
8
|
-
const command_object_3 = require("./connect/command-object");
|
8
|
+
const command_object_3 = require("./nx-cloud/connect/command-object");
|
9
9
|
const command_object_4 = require("./daemon/command-object");
|
10
10
|
const command_object_5 = require("./graph/command-object");
|
11
11
|
const command_object_6 = require("./exec/command-object");
|
@@ -25,10 +25,13 @@ const command_object_19 = require("./watch/command-object");
|
|
25
25
|
const command_object_20 = require("./reset/command-object");
|
26
26
|
const command_object_21 = require("./release/command-object");
|
27
27
|
const command_object_22 = require("./add/command-object");
|
28
|
-
const command_object_23 = require("./login/command-object");
|
29
|
-
const command_object_24 = require("./logout/command-object");
|
28
|
+
const command_object_23 = require("./nx-cloud/login/command-object");
|
29
|
+
const command_object_24 = require("./nx-cloud/logout/command-object");
|
30
|
+
const command_object_25 = require("./nx-cloud/record/command-object");
|
31
|
+
const command_object_26 = require("./nx-cloud/start-ci-run/command-object");
|
32
|
+
const command_object_27 = require("./nx-cloud/fix-ci/command-object");
|
30
33
|
const command_objects_1 = require("./deprecated/command-objects");
|
31
|
-
const
|
34
|
+
const command_object_28 = require("./sync/command-object");
|
32
35
|
const output_1 = require("../utils/output");
|
33
36
|
// Ensure that the output takes up the available width of the terminal.
|
34
37
|
yargs.wrap(yargs.terminalWidth());
|
@@ -75,13 +78,16 @@ exports.commandsObject = yargs
|
|
75
78
|
.command(command_object_16.yargsRunCommand)
|
76
79
|
.command(command_object_17.yargsRunManyCommand)
|
77
80
|
.command(command_object_18.yargsShowCommand)
|
78
|
-
.command(
|
79
|
-
.command(
|
81
|
+
.command(command_object_28.yargsSyncCommand)
|
82
|
+
.command(command_object_28.yargsSyncCheckCommand)
|
80
83
|
.command(command_object_3.yargsViewLogsCommand)
|
81
84
|
.command(command_object_19.yargsWatchCommand)
|
82
85
|
.command(command_object_16.yargsNxInfixCommand)
|
83
86
|
.command(command_object_23.yargsLoginCommand)
|
84
87
|
.command(command_object_24.yargsLogoutCommand)
|
88
|
+
.command(command_object_25.yargsRecordCommand)
|
89
|
+
.command(command_object_26.yargsStartCiRunCommand)
|
90
|
+
.command(command_object_27.yargsFixCiCommand)
|
85
91
|
.command(resolveConformanceCommandObject())
|
86
92
|
.command(resolveConformanceCheckCommandObject())
|
87
93
|
.scriptName('nx')
|
@@ -4,7 +4,7 @@ exports.runOne = runOne;
|
|
4
4
|
exports.parseRunOneOptions = parseRunOneOptions;
|
5
5
|
const run_command_1 = require("../../tasks-runner/run-command");
|
6
6
|
const command_line_utils_1 = require("../../utils/command-line-utils");
|
7
|
-
const connect_to_nx_cloud_1 = require("../connect/connect-to-nx-cloud");
|
7
|
+
const connect_to_nx_cloud_1 = require("../nx-cloud/connect/connect-to-nx-cloud");
|
8
8
|
const project_graph_1 = require("../../project-graph/project-graph");
|
9
9
|
const workspace_root_1 = require("../../utils/workspace-root");
|
10
10
|
const split_target_1 = require("../../utils/split-target");
|
@@ -5,7 +5,7 @@ exports.projectsToRun = projectsToRun;
|
|
5
5
|
const run_command_1 = require("../../tasks-runner/run-command");
|
6
6
|
const command_line_utils_1 = require("../../utils/command-line-utils");
|
7
7
|
const project_graph_utils_1 = require("../../utils/project-graph-utils");
|
8
|
-
const connect_to_nx_cloud_1 = require("../connect/connect-to-nx-cloud");
|
8
|
+
const connect_to_nx_cloud_1 = require("../nx-cloud/connect/connect-to-nx-cloud");
|
9
9
|
const perf_hooks_1 = require("perf_hooks");
|
10
10
|
const project_graph_1 = require("../../project-graph/project-graph");
|
11
11
|
const configuration_1 = require("../../config/configuration");
|
@@ -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) {
|