Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): add cloud and dte as flags #12947

Merged
merged 1 commit into from Nov 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 20 additions & 15 deletions packages/nx/src/command-line/nx-commands.ts
Expand Up @@ -403,8 +403,17 @@ function withPlainOption(yargs: yargs.Argv): yargs.Argv {
});
}

function withExcludeOption(yargs: yargs.Argv): yargs.Argv {
return yargs.option('exclude', {
describe: 'Exclude certain projects from being processed',
type: 'array',
coerce: parseCSV,
default: [],
});
}

function withRunOptions(yargs: yargs.Argv): yargs.Argv {
return yargs
return withExcludeOption(yargs)
.option('parallel', {
describe: 'Max number of parallel processes [default is 3]',
type: 'string',
Expand Down Expand Up @@ -449,11 +458,19 @@ function withRunOptions(yargs: yargs.Argv): yargs.Argv {
'Rerun the tasks even when the results are available in the cache',
type: 'boolean',
default: false,
})
.options('cloud', {
type: 'boolean',
hidden: true,
})
.options('dte', {
type: 'boolean',
hidden: true,
});
}

function withAffectedOptions(yargs: yargs.Argv): yargs.Argv {
return yargs
return withExcludeOption(yargs)
.parserConfiguration({
'strip-dashed': true,
'unknown-options-as-args': true,
Expand Down Expand Up @@ -501,12 +518,6 @@ function withAffectedOptions(yargs: yargs.Argv): yargs.Argv {
)
.group(['files', 'uncommitted', 'untracked'], 'or using:')
.implies('head', 'base')
.option('exclude', {
describe: 'Exclude certain projects from being processed',
type: 'array',
coerce: parseCSV,
default: [],
})
.conflicts({
files: ['uncommitted', 'untracked', 'base', 'head', 'all'],
untracked: ['uncommitted', 'files', 'base', 'head', 'all'],
Expand Down Expand Up @@ -547,12 +558,6 @@ function withRunManyOptions(yargs: yargs.Argv): yargs.Argv {
describe: '[deprecated] Run the target on all projects in the workspace',
type: 'boolean',
default: true,
})
.option('exclude', {
describe: 'Exclude certain projects from being processed',
type: 'array',
coerce: parseCSV,
default: [],
});
}

Expand Down Expand Up @@ -685,7 +690,7 @@ function withRunOneOptions(yargs: yargs.Argv) {
);

const res = withRunOptions(
withOutputStyleOption(yargs, [
withOutputStyleOption(withTargetOption(yargs, false), [
'dynamic',
'static',
'stream',
Expand Down