Skip to content

Commit

Permalink
fix(core): add cloud and dte as flags (#12947)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Nov 2, 2022
1 parent 4a4a149 commit 98b6393
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions packages/nx/src/command-line/nx-commands.ts
Expand Up @@ -404,8 +404,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 @@ -450,11 +459,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 @@ -502,12 +519,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 @@ -548,12 +559,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 @@ -686,7 +691,7 @@ function withRunOneOptions(yargs: yargs.Argv) {
);

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

1 comment on commit 98b6393

@vercel
Copy link

@vercel vercel bot commented on 98b6393 Nov 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx.dev
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app

Please sign in to comment.