nx 19.7.0-beta.1 → 19.7.0-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintrc.json +12 -1
- package/package.json +13 -13
- package/src/command-line/connect/connect-to-nx-cloud.js +7 -6
- package/src/command-line/graph/graph.d.ts +18 -1
- package/src/command-line/graph/graph.js +35 -18
- package/src/command-line/login/command-object.d.ts +2 -0
- package/src/command-line/login/command-object.js +16 -0
- package/src/command-line/login/login.d.ts +5 -0
- package/src/command-line/login/login.js +16 -0
- package/src/command-line/logout/command-object.d.ts +2 -0
- package/src/command-line/logout/command-object.js +12 -0
- package/src/command-line/logout/logout.d.ts +4 -0
- package/src/command-line/logout/logout.js +13 -0
- package/src/command-line/migrate/migrate.js +5 -36
- package/src/command-line/nx-commands.js +7 -3
- package/src/command-line/yargs-utils/shared-options.d.ts +2 -1
- package/src/command-line/yargs-utils/shared-options.js +11 -15
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.css +1 -1
- package/src/core/graph/styles.js +1 -1
- package/src/daemon/client/client.js +4 -2
- package/src/devkit-exports.d.ts +1 -0
- package/src/executors/run-commands/run-commands.impl.js +8 -3
- package/src/hasher/node-task-hasher-impl.d.ts +1 -1
- package/src/hasher/node-task-hasher-impl.js +34 -16
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/utilities/axios.js +1 -6
- package/src/plugins/js/package-json/create-package-json.d.ts +1 -0
- package/src/plugins/js/package-json/create-package-json.js +24 -0
- package/src/tasks-runner/default-tasks-runner.js +1 -1
- package/src/tasks-runner/init-tasks-runner.d.ts +2 -0
- package/src/tasks-runner/init-tasks-runner.js +1 -0
- package/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.d.ts +4 -6
- package/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +5 -0
- package/src/tasks-runner/run-command.js +1 -1
- package/src/tasks-runner/task-env.d.ts +3 -3
- package/src/tasks-runner/task-env.js +3 -3
- package/src/tasks-runner/task-orchestrator.d.ts +2 -1
- package/src/tasks-runner/task-orchestrator.js +5 -2
- package/src/utils/package-json.d.ts +3 -0
package/.eslintrc.json
CHANGED
@@ -100,7 +100,18 @@
|
|
100
100
|
"events", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
101
101
|
"process", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
102
102
|
"prettier", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
103
|
-
"util" // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
103
|
+
"util", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
104
|
+
// The native modules are optional and only one of them will ever be installed on a given machine
|
105
|
+
"@nx/nx-darwin-x64",
|
106
|
+
"@nx/nx-darwin-arm64",
|
107
|
+
"@nx/nx-linux-x64-gnu",
|
108
|
+
"@nx/nx-linux-x64-musl",
|
109
|
+
"@nx/nx-win32-x64-msvc",
|
110
|
+
"@nx/nx-linux-arm64-gnu",
|
111
|
+
"@nx/nx-linux-arm64-musl",
|
112
|
+
"@nx/nx-linux-arm-gnueabihf",
|
113
|
+
"@nx/nx-win32-arm64-msvc",
|
114
|
+
"@nx/nx-freebsd-x64"
|
104
115
|
]
|
105
116
|
}
|
106
117
|
]
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "19.7.0-beta.
|
3
|
+
"version": "19.7.0-beta.2",
|
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": {
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"ignore": "^5.0.4",
|
57
57
|
"jest-diff": "^29.4.1",
|
58
58
|
"jsonc-parser": "3.2.0",
|
59
|
-
"lines-and-columns": "
|
59
|
+
"lines-and-columns": "2.0.3",
|
60
60
|
"minimatch": "9.0.3",
|
61
61
|
"npm-run-path": "^4.0.1",
|
62
62
|
"open": "^8.4.0",
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"yargs-parser": "21.1.1",
|
72
72
|
"node-machine-id": "1.1.12",
|
73
73
|
"ora": "5.3.0",
|
74
|
-
"@nrwl/tao": "19.7.0-beta.
|
74
|
+
"@nrwl/tao": "19.7.0-beta.2"
|
75
75
|
},
|
76
76
|
"peerDependencies": {
|
77
77
|
"@swc-node/register": "^1.8.0",
|
@@ -86,16 +86,16 @@
|
|
86
86
|
}
|
87
87
|
},
|
88
88
|
"optionalDependencies": {
|
89
|
-
"@nx/nx-darwin-x64": "19.7.0-beta.
|
90
|
-
"@nx/nx-darwin-arm64": "19.7.0-beta.
|
91
|
-
"@nx/nx-linux-x64-gnu": "19.7.0-beta.
|
92
|
-
"@nx/nx-linux-x64-musl": "19.7.0-beta.
|
93
|
-
"@nx/nx-win32-x64-msvc": "19.7.0-beta.
|
94
|
-
"@nx/nx-linux-arm64-gnu": "19.7.0-beta.
|
95
|
-
"@nx/nx-linux-arm64-musl": "19.7.0-beta.
|
96
|
-
"@nx/nx-linux-arm-gnueabihf": "19.7.0-beta.
|
97
|
-
"@nx/nx-win32-arm64-msvc": "19.7.0-beta.
|
98
|
-
"@nx/nx-freebsd-x64": "19.7.0-beta.
|
89
|
+
"@nx/nx-darwin-x64": "19.7.0-beta.2",
|
90
|
+
"@nx/nx-darwin-arm64": "19.7.0-beta.2",
|
91
|
+
"@nx/nx-linux-x64-gnu": "19.7.0-beta.2",
|
92
|
+
"@nx/nx-linux-x64-musl": "19.7.0-beta.2",
|
93
|
+
"@nx/nx-win32-x64-msvc": "19.7.0-beta.2",
|
94
|
+
"@nx/nx-linux-arm64-gnu": "19.7.0-beta.2",
|
95
|
+
"@nx/nx-linux-arm64-musl": "19.7.0-beta.2",
|
96
|
+
"@nx/nx-linux-arm-gnueabihf": "19.7.0-beta.2",
|
97
|
+
"@nx/nx-win32-arm64-msvc": "19.7.0-beta.2",
|
98
|
+
"@nx/nx-freebsd-x64": "19.7.0-beta.2"
|
99
99
|
},
|
100
100
|
"nx-migrations": {
|
101
101
|
"migrations": "./migrations.json",
|
@@ -60,18 +60,19 @@ async function connectToNxCloudCommand(command) {
|
|
60
60
|
? 'nx-console'
|
61
61
|
: 'nx-connect';
|
62
62
|
if ((0, nx_cloud_utils_1.isNxCloudUsed)(nxJson)) {
|
63
|
-
const token = process.env.NX_CLOUD_ACCESS_TOKEN ||
|
63
|
+
const token = process.env.NX_CLOUD_ACCESS_TOKEN ||
|
64
|
+
nxJson.nxCloudAccessToken ||
|
65
|
+
nxJson.nxCloudId;
|
64
66
|
if (!token) {
|
65
|
-
throw new Error(`Unable to authenticate.
|
67
|
+
throw new Error(`Unable to authenticate. If you are connecting to Nx Cloud locally, set Nx Cloud ID in nx.json. If you are connecting in a CI context, either define accessToken in nx.json or set the NX_CLOUD_ACCESS_TOKEN env variable.`);
|
66
68
|
}
|
67
69
|
const connectCloudUrl = await (0, url_shorten_1.createNxCloudOnboardingURL)(installationSource, token);
|
68
70
|
output_1.output.log({
|
69
71
|
title: '✔ This workspace already has Nx Cloud set up',
|
70
72
|
bodyLines: [
|
71
|
-
'If you have not done so already, connect your workspace to your Nx Cloud account:',
|
72
|
-
|
73
|
-
|
74
|
-
${connectCloudUrl}`,
|
73
|
+
'If you have not done so already, connect your workspace to your Nx Cloud account with the following URL:',
|
74
|
+
'',
|
75
|
+
`${connectCloudUrl}`,
|
75
76
|
],
|
76
77
|
});
|
77
78
|
return false;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ProjectFileMap, ProjectGraphDependency, ProjectGraphProjectNode } from '../../config/project-graph';
|
1
|
+
import { ProjectFileMap, ProjectGraph, ProjectGraphDependency, ProjectGraphProjectNode } from '../../config/project-graph';
|
2
2
|
import { TaskGraph } from '../../config/task-graph';
|
3
3
|
export interface GraphError {
|
4
4
|
message: string;
|
@@ -48,3 +48,20 @@ export declare function generateGraph(args: {
|
|
48
48
|
exclude?: string[];
|
49
49
|
affected?: boolean;
|
50
50
|
}, affectedProjects: string[]): Promise<void>;
|
51
|
+
/**
|
52
|
+
* The data type that `nx graph --file graph.json` or `nx build --graph graph.json` contains
|
53
|
+
*/
|
54
|
+
export interface GraphJson {
|
55
|
+
/**
|
56
|
+
* A graph of tasks populated with `nx build --graph`
|
57
|
+
*/
|
58
|
+
tasks?: TaskGraph;
|
59
|
+
/**
|
60
|
+
* The plans for hashing a task in the task graph
|
61
|
+
*/
|
62
|
+
taskPlans?: Record<string, string[]>;
|
63
|
+
/**
|
64
|
+
* The project graph
|
65
|
+
*/
|
66
|
+
graph: ProjectGraph;
|
67
|
+
}
|
@@ -675,8 +675,10 @@ function expandInputs(inputs, project, allWorkspaceFiles, depGraphClientResponse
|
|
675
675
|
const externalInputs = [];
|
676
676
|
const otherInputs = [];
|
677
677
|
inputs.forEach((input) => {
|
678
|
-
|
679
|
-
|
678
|
+
// grouped workspace inputs look like workspace:[pattern,otherPattern]
|
679
|
+
if (input.startsWith('workspace:[')) {
|
680
|
+
const inputs = input.substring(11, input.length - 1).split(',');
|
681
|
+
workspaceRootInputs.push(...inputs);
|
680
682
|
return;
|
681
683
|
}
|
682
684
|
const maybeProjectName = input.split(':')[0];
|
@@ -696,22 +698,7 @@ function expandInputs(inputs, project, allWorkspaceFiles, depGraphClientResponse
|
|
696
698
|
return;
|
697
699
|
}
|
698
700
|
});
|
699
|
-
const workspaceRootsExpanded = workspaceRootInputs
|
700
|
-
const matches = [];
|
701
|
-
const withoutWorkspaceRoot = input.substring(16);
|
702
|
-
const matchingFile = allWorkspaceFiles.find((t) => t.file === withoutWorkspaceRoot);
|
703
|
-
if (matchingFile) {
|
704
|
-
matches.push(matchingFile.file);
|
705
|
-
}
|
706
|
-
else {
|
707
|
-
allWorkspaceFiles
|
708
|
-
.filter((f) => (0, minimatch_1.minimatch)(f.file, withoutWorkspaceRoot))
|
709
|
-
.forEach((f) => {
|
710
|
-
matches.push(f.file);
|
711
|
-
});
|
712
|
-
}
|
713
|
-
return matches;
|
714
|
-
});
|
701
|
+
const workspaceRootsExpanded = getExpandedWorkspaceRoots(workspaceRootInputs, allWorkspaceFiles);
|
715
702
|
const otherInputsExpanded = otherInputs.map((input) => {
|
716
703
|
if (input === 'TsConfig') {
|
717
704
|
return (0, path_1.relative)(workspace_root_1.workspaceRoot, (0, typescript_1.getRootTsConfigPath)());
|
@@ -744,6 +731,36 @@ function expandInputs(inputs, project, allWorkspaceFiles, depGraphClientResponse
|
|
744
731
|
external: externalInputs,
|
745
732
|
};
|
746
733
|
}
|
734
|
+
function getExpandedWorkspaceRoots(workspaceRootInputs, allWorkspaceFiles) {
|
735
|
+
const workspaceRootsExpanded = [];
|
736
|
+
const negativeWRPatterns = [];
|
737
|
+
const positiveWRPatterns = [];
|
738
|
+
for (const fileset of workspaceRootInputs) {
|
739
|
+
if (fileset.startsWith('!')) {
|
740
|
+
negativeWRPatterns.push(fileset.substring(17));
|
741
|
+
}
|
742
|
+
else {
|
743
|
+
positiveWRPatterns.push(fileset.substring(16));
|
744
|
+
}
|
745
|
+
}
|
746
|
+
for (const pattern of positiveWRPatterns) {
|
747
|
+
const matchingFile = allWorkspaceFiles.find((t) => t.file === pattern);
|
748
|
+
if (matchingFile &&
|
749
|
+
!negativeWRPatterns.some((p) => (0, minimatch_1.minimatch)(matchingFile.file, p))) {
|
750
|
+
workspaceRootsExpanded.push(matchingFile.file);
|
751
|
+
}
|
752
|
+
else {
|
753
|
+
allWorkspaceFiles
|
754
|
+
.filter((f) => (0, minimatch_1.minimatch)(f.file, pattern) &&
|
755
|
+
!negativeWRPatterns.some((p) => (0, minimatch_1.minimatch)(f.file, p)))
|
756
|
+
.forEach((f) => {
|
757
|
+
workspaceRootsExpanded.push(f.file);
|
758
|
+
});
|
759
|
+
}
|
760
|
+
}
|
761
|
+
workspaceRootsExpanded.sort();
|
762
|
+
return workspaceRootsExpanded;
|
763
|
+
}
|
747
764
|
async function createJsonOutput(prunedGraph, rawGraph, projects, targets) {
|
748
765
|
const response = {
|
749
766
|
graph: prunedGraph,
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.yargsLoginCommand = void 0;
|
4
|
+
const shared_options_1 = require("../../command-line/yargs-utils/shared-options");
|
5
|
+
exports.yargsLoginCommand = {
|
6
|
+
command: 'login [nxCloudUrl]',
|
7
|
+
describe: 'Login to Nx Cloud',
|
8
|
+
builder: (yargs) => (0, shared_options_1.withVerbose)(yargs.positional('nxCloudUrl', {
|
9
|
+
describe: 'The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to https://cloud.nx.app.',
|
10
|
+
type: 'string',
|
11
|
+
required: false,
|
12
|
+
})),
|
13
|
+
handler: async (args) => {
|
14
|
+
process.exit(await (await Promise.resolve().then(() => require('./login'))).loginHandler(args));
|
15
|
+
},
|
16
|
+
};
|
@@ -0,0 +1,16 @@
|
|
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 params_1 = require("../../utils/params");
|
7
|
+
function loginHandler(args) {
|
8
|
+
if (args.nxCloudUrl) {
|
9
|
+
process.env.NX_CLOUD_API = args.nxCloudUrl;
|
10
|
+
}
|
11
|
+
return (0, params_1.handleErrors)(args.verbose, async () => {
|
12
|
+
const nxCloudClient = (await (0, update_manager_1.verifyOrUpdateNxCloudClient)((0, get_cloud_options_1.getCloudOptions)()))
|
13
|
+
.nxCloudClient;
|
14
|
+
await nxCloudClient.commands.login();
|
15
|
+
});
|
16
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.yargsLogoutCommand = void 0;
|
4
|
+
const shared_options_1 = require("../../command-line/yargs-utils/shared-options");
|
5
|
+
exports.yargsLogoutCommand = {
|
6
|
+
command: 'logout',
|
7
|
+
describe: 'Logout from Nx Cloud',
|
8
|
+
builder: (yargs) => (0, shared_options_1.withVerbose)(yargs),
|
9
|
+
handler: async (args) => {
|
10
|
+
process.exit(await (await Promise.resolve().then(() => require('./logout'))).logoutHandler(args));
|
11
|
+
},
|
12
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.logoutHandler = logoutHandler;
|
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 params_1 = require("../../utils/params");
|
7
|
+
function logoutHandler(args) {
|
8
|
+
return (0, params_1.handleErrors)(args.verbose, async () => {
|
9
|
+
const nxCloudClient = (await (0, update_manager_1.verifyOrUpdateNxCloudClient)((0, get_cloud_options_1.getCloudOptions)()))
|
10
|
+
.nxCloudClient;
|
11
|
+
await nxCloudClient.commands.logout();
|
12
|
+
});
|
13
|
+
}
|
@@ -1079,55 +1079,24 @@ function getImplementationPath(collection, collectionPath, name) {
|
|
1079
1079
|
}
|
1080
1080
|
return { path: implPath, fnSymbol };
|
1081
1081
|
}
|
1082
|
-
// TODO (
|
1083
|
-
// ```
|
1084
|
-
// return !collection.generators[name] && collection.schematics[name]
|
1085
|
-
// ```
|
1082
|
+
// TODO (v21): Remove CLI determination of Angular Migration
|
1086
1083
|
function isAngularMigration(collection, collectionPath, name) {
|
1087
1084
|
const entry = collection.generators?.[name] || collection.schematics?.[name];
|
1088
|
-
// In the future we will determine this based on the location of the entry in the collection.
|
1089
|
-
// If the entry is under `schematics`, it will be assumed to be an angular cli migration.
|
1090
|
-
// If the entry is under `generators`, it will be assumed to be an nx migration.
|
1091
|
-
// For now, we will continue to obey the cli property, if it exists.
|
1092
|
-
// If it doesn't exist, we will check if the implementation references @angular/devkit.
|
1093
1085
|
const shouldBeNx = !!collection.generators?.[name];
|
1094
1086
|
const shouldBeNg = !!collection.schematics?.[name];
|
1095
|
-
|
1096
|
-
const { path: implementationPath } = getImplementationPath(collection, collectionPath, name);
|
1097
|
-
const implStringContents = (0, fs_1.readFileSync)(implementationPath, 'utf-8');
|
1098
|
-
// TODO (v17): Remove this check and the cli property access - it is only here for backwards compatibility.
|
1099
|
-
if (['@angular/material', '@angular/cdk'].includes(collection.name) ||
|
1100
|
-
[
|
1101
|
-
"import('@angular-devkit",
|
1102
|
-
'import("@angular-devkit',
|
1103
|
-
"require('@angular-devkit",
|
1104
|
-
'require("@angular-devkit',
|
1105
|
-
"from '@angular-devkit",
|
1106
|
-
'from "@angular-devkit',
|
1107
|
-
].some((s) => implStringContents.includes(s))) {
|
1108
|
-
useAngularDevkitToRunMigration = true;
|
1109
|
-
}
|
1110
|
-
if (useAngularDevkitToRunMigration && shouldBeNx) {
|
1087
|
+
if (entry.cli && entry.cli !== 'nx' && collection.generators?.[name]) {
|
1111
1088
|
output_1.output.warn({
|
1112
1089
|
title: `The migration '${collection.name}:${name}' appears to be an Angular CLI migration, but is located in the 'generators' section of migrations.json.`,
|
1113
1090
|
bodyLines: [
|
1114
|
-
'In Nx
|
1115
|
-
|
1116
|
-
],
|
1117
|
-
});
|
1118
|
-
}
|
1119
|
-
if (!useAngularDevkitToRunMigration && entry.cli === 'nx' && shouldBeNg) {
|
1120
|
-
output_1.output.warn({
|
1121
|
-
title: `The migration '${collection.name}:${name}' appears to be an Nx migration, but is located in the 'schematics' section of migrations.json.`,
|
1122
|
-
bodyLines: [
|
1123
|
-
'In Nx 17, migrations inside `generators` will be treated as nx devkit migrations.',
|
1091
|
+
'In Nx 21, migrations inside `generators` will be treated as Nx Devkit migrations and therefore may not run correctly if they are using Angular Devkit.',
|
1092
|
+
'If the migration should be run with Angular Devkit, please place the migration inside `schematics` instead.',
|
1124
1093
|
"Please open an issue on the plugin's repository if you believe this is an error.",
|
1125
1094
|
],
|
1126
1095
|
});
|
1127
1096
|
}
|
1128
1097
|
// Currently, if the cli property exists we listen to it. If its nx, its not an ng cli migration.
|
1129
1098
|
// If the property is not set, we will fall back to our intuition.
|
1130
|
-
return entry.cli ? entry.cli !== 'nx' :
|
1099
|
+
return entry.cli ? entry.cli !== 'nx' : !shouldBeNx && shouldBeNg;
|
1131
1100
|
}
|
1132
1101
|
const getNgCompatLayer = (() => {
|
1133
1102
|
let _ngCliAdapter;
|
@@ -24,8 +24,10 @@ const command_object_18 = require("./watch/command-object");
|
|
24
24
|
const command_object_19 = require("./reset/command-object");
|
25
25
|
const command_object_20 = require("./release/command-object");
|
26
26
|
const command_object_21 = require("./add/command-object");
|
27
|
+
const command_object_22 = require("./login/command-object");
|
28
|
+
const command_object_23 = require("./logout/command-object");
|
27
29
|
const command_objects_1 = require("./deprecated/command-objects");
|
28
|
-
const
|
30
|
+
const command_object_24 = require("./sync/command-object");
|
29
31
|
// Ensure that the output takes up the available width of the terminal.
|
30
32
|
yargs.wrap(yargs.terminalWidth());
|
31
33
|
exports.parserConfiguration = {
|
@@ -70,11 +72,13 @@ exports.commandsObject = yargs
|
|
70
72
|
.command(command_object_15.yargsRunCommand)
|
71
73
|
.command(command_object_16.yargsRunManyCommand)
|
72
74
|
.command(command_object_17.yargsShowCommand)
|
73
|
-
.command(
|
74
|
-
.command(
|
75
|
+
.command(command_object_24.yargsSyncCommand)
|
76
|
+
.command(command_object_24.yargsSyncCheckCommand)
|
75
77
|
.command(command_object_2.yargsViewLogsCommand)
|
76
78
|
.command(command_object_18.yargsWatchCommand)
|
77
79
|
.command(command_object_15.yargsNxInfixCommand)
|
80
|
+
.command(command_object_22.yargsLoginCommand)
|
81
|
+
.command(command_object_23.yargsLogoutCommand)
|
78
82
|
.scriptName('nx')
|
79
83
|
.help()
|
80
84
|
// NOTE: we handle --version in nx.ts, this just tells yargs that the option exists
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { Argv } from 'yargs';
|
1
|
+
import { Argv, ParserConfigurationOptions } from 'yargs';
|
2
2
|
interface ExcludeOptions {
|
3
3
|
exclude: string[];
|
4
4
|
}
|
5
|
+
export declare const defaultYargsParserConfiguration: Partial<ParserConfigurationOptions>;
|
5
6
|
export declare function withExcludeOption(yargs: Argv): Argv<ExcludeOptions>;
|
6
7
|
export interface RunOptions {
|
7
8
|
exclude: string;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.defaultYargsParserConfiguration = void 0;
|
3
4
|
exports.withExcludeOption = withExcludeOption;
|
4
5
|
exports.withRunOptions = withRunOptions;
|
5
6
|
exports.withTargetAndConfigurationOption = withTargetAndConfigurationOption;
|
@@ -12,6 +13,13 @@ exports.withOverrides = withOverrides;
|
|
12
13
|
exports.withOutputStyleOption = withOutputStyleOption;
|
13
14
|
exports.withRunOneOptions = withRunOneOptions;
|
14
15
|
exports.parseCSV = parseCSV;
|
16
|
+
exports.defaultYargsParserConfiguration = {
|
17
|
+
'strip-dashed': true,
|
18
|
+
'unknown-options-as-args': true,
|
19
|
+
'populate--': true,
|
20
|
+
'parse-numbers': false,
|
21
|
+
'parse-positional-numbers': false,
|
22
|
+
};
|
15
23
|
function withExcludeOption(yargs) {
|
16
24
|
return yargs.option('exclude', {
|
17
25
|
describe: 'Exclude certain projects from being processed',
|
@@ -128,11 +136,7 @@ function withBatch(yargs) {
|
|
128
136
|
}
|
129
137
|
function withAffectedOptions(yargs) {
|
130
138
|
return withExcludeOption(yargs)
|
131
|
-
.parserConfiguration(
|
132
|
-
'strip-dashed': true,
|
133
|
-
'unknown-options-as-args': true,
|
134
|
-
'populate--': true,
|
135
|
-
})
|
139
|
+
.parserConfiguration(exports.defaultYargsParserConfiguration)
|
136
140
|
.option('files', {
|
137
141
|
describe: 'Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces',
|
138
142
|
type: 'string',
|
@@ -169,11 +173,7 @@ function withAffectedOptions(yargs) {
|
|
169
173
|
}
|
170
174
|
function withRunManyOptions(yargs) {
|
171
175
|
return withRunOptions(yargs)
|
172
|
-
.parserConfiguration(
|
173
|
-
'strip-dashed': true,
|
174
|
-
'unknown-options-as-args': true,
|
175
|
-
'populate--': true,
|
176
|
-
})
|
176
|
+
.parserConfiguration(exports.defaultYargsParserConfiguration)
|
177
177
|
.option('projects', {
|
178
178
|
type: 'string',
|
179
179
|
alias: 'p',
|
@@ -225,11 +225,7 @@ function withOutputStyleOption(yargs, choices = [
|
|
225
225
|
function withRunOneOptions(yargs) {
|
226
226
|
const executorShouldShowHelp = !(process.argv[2] === 'run' && process.argv[3] === '--help');
|
227
227
|
const res = withRunOptions(withOutputStyleOption(withConfiguration(yargs), allOutputStyles))
|
228
|
-
.parserConfiguration(
|
229
|
-
'strip-dashed': true,
|
230
|
-
'unknown-options-as-args': true,
|
231
|
-
'populate--': true,
|
232
|
-
})
|
228
|
+
.parserConfiguration(exports.defaultYargsParserConfiguration)
|
233
229
|
.option('project', {
|
234
230
|
describe: 'Target project',
|
235
231
|
type: 'string',
|