Skip to content

Commit d19eb19

Browse files
committed
Rename "actionVerb" to "actionName"
1 parent 15361a5 commit d19eb19

24 files changed

+51
-51
lines changed

apps/api-documenter/src/cli/BaseAction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export abstract class BaseAction extends CommandLineAction {
3333
argumentName: 'FOLDER2',
3434
description: `Specifies the output folder where the documentation will be written.`
3535
+ ` ANY EXISTING CONTENTS WILL BE DELETED!`
36-
+ ` If omitted, the default is "./${this.actionVerb}"`
36+
+ ` If omitted, the default is "./${this.actionName}"`
3737
});
3838
}
3939

@@ -45,7 +45,7 @@ export abstract class BaseAction extends CommandLineAction {
4545
throw new Error('The input folder does not exist: ' + this.inputFolder);
4646
}
4747

48-
this.outputFolder = this._outputFolderParameter.value || `./${this.actionVerb}`;
48+
this.outputFolder = this._outputFolderParameter.value || `./${this.actionName}`;
4949
if (!fsx.existsSync(this.outputFolder)) {
5050
throw new Error('The output folder does not exist: ' + this.outputFolder);
5151
}

apps/api-documenter/src/cli/MarkdownAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { MarkdownDocumenter } from '../markdown/MarkdownDocumenter';
99
export class MarkdownAction extends BaseAction {
1010
constructor(parser: ApiDocumenterCommandLine) {
1111
super({
12-
actionVerb: 'markdown',
12+
actionName: 'markdown',
1313
summary: 'Generate documentation as Markdown files (*.md)',
1414
documentation: 'Generates API documentation as a collection of files in'
1515
+ ' Markdown format, suitable for example for publishing on a GitHub site.'

apps/api-documenter/src/cli/YamlAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class YamlAction extends BaseAction {
1717

1818
constructor(parser: ApiDocumenterCommandLine) {
1919
super({
20-
actionVerb: 'yaml',
20+
actionName: 'yaml',
2121
summary: 'Generate documentation as universal reference YAML files (*.yml)',
2222
documentation: 'Generates API documentation as a collection of files conforming'
2323
+ ' to the universal reference YAML format, which is used by the docs.microsoft.com'

apps/api-extractor/src/cli/RunAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class RunAction extends CommandLineAction {
2727

2828
constructor(parser: ApiExtractorCommandLine) {
2929
super({
30-
actionVerb: 'run',
30+
actionName: 'run',
3131
summary: 'Invoke API Extractor on a project',
3232
documentation: 'Invoke API Extractor on a project'
3333
});

apps/rush-lib/src/cli/actions/BaseRushAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export abstract class BaseRushAction extends CommandLineAction {
6161
}
6262
}
6363

64-
console.log(`Starting "rush ${this.actionVerb}"${os.EOL}`);
64+
console.log(`Starting "rush ${this.actionName}"${os.EOL}`);
6565
return this.run();
6666
}
6767

apps/rush-lib/src/cli/actions/ChangeAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default class ChangeAction extends BaseRushAction {
7070
''
7171
];
7272
super({
73-
actionVerb: 'change',
73+
actionName: 'change',
7474
summary: 'Records changes made to projects, indicating how the package version number should be bumped ' +
7575
'for the next publish.',
7676
documentation: documentation.join(os.EOL),

apps/rush-lib/src/cli/actions/CheckAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { BaseRushAction } from './BaseRushAction';
1212
export default class CheckAction extends BaseRushAction {
1313
constructor(parser: RushCommandLineParser) {
1414
super({
15-
actionVerb: 'check',
15+
actionName: 'check',
1616
summary: 'Checks each project\'s package.json files and ensures that all dependencies are of the same ' +
1717
'version throughout the repository.',
1818
documentation: 'Checks each project\'s package.json files and ensures that all dependencies are of the ' +

apps/rush-lib/src/cli/actions/CustomCommandFactory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ export class CustomCommandFactory {
2727

2828
// always create a build and a rebuild command
2929
customActions.set('build', new CustomRushAction(parser, {
30-
actionVerb: 'build',
30+
actionName: 'build',
3131
summary: '(EXPERIMENTAL) Build all projects that haven\'t been built, or have changed since they were last '
3232
+ 'built.',
3333
documentation: documentationForBuild
3434
}, true));
3535

3636
customActions.set('rebuild', new CustomRushAction(parser, {
37-
actionVerb: 'rebuild',
37+
actionName: 'rebuild',
3838
summary: 'Clean and rebuild the entire set of projects',
3939
documentation: documentationForBuild
4040
}, true));
@@ -46,7 +46,7 @@ export class CustomCommandFactory {
4646
throw new Error(`Cannot define two custom actions with the same name: "${command.name}"`);
4747
}
4848
customActions.set(command.name, new CustomRushAction(parser, {
49-
actionVerb: command.name,
49+
actionName: command.name,
5050
summary: command.summary,
5151
documentation: command.documentation || command.summary
5252
},

apps/rush-lib/src/cli/actions/CustomRushAction.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,18 @@ export class CustomRushAction extends BaseRushAction {
9696
}
9797
});
9898

99-
const changedProjectsOnly: boolean = this.actionVerb === 'build' && this._changedProjectsOnly.value;
99+
const changedProjectsOnly: boolean = this.actionName === 'build' && this._changedProjectsOnly.value;
100100

101101
const tasks: TaskSelector = new TaskSelector(
102102
{
103103
rushConfiguration: this.parser.rushConfiguration,
104104
toFlags: this._toFlag.values,
105105
fromFlags: this._fromFlag.values,
106-
commandToRun: this.actionVerb,
106+
commandToRun: this.actionName,
107107
customFlags,
108108
isQuietMode,
109109
parallelism,
110-
isIncrementalBuildAllowed: this.actionVerb === 'build',
110+
isIncrementalBuildAllowed: this.actionName === 'build',
111111
changedProjectsOnly,
112112
ignoreMissingScript: this._ignoreMissingScript
113113
}
@@ -116,12 +116,12 @@ export class CustomRushAction extends BaseRushAction {
116116
return tasks.execute().then(
117117
() => {
118118
stopwatch.stop();
119-
console.log(colors.green(`rush ${this.actionVerb} (${stopwatch.toString()})`));
119+
console.log(colors.green(`rush ${this.actionName} (${stopwatch.toString()})`));
120120
this._doAfterTask(stopwatch, true);
121121
},
122122
() => {
123123
stopwatch.stop();
124-
console.log(colors.red(`rush ${this.actionVerb} - Errors! (${stopwatch.toString()})`));
124+
console.log(colors.red(`rush ${this.actionName} - Errors! (${stopwatch.toString()})`));
125125
this._doAfterTask(stopwatch, false);
126126
this.parser.exitWithError();
127127
});
@@ -155,7 +155,7 @@ export class CustomRushAction extends BaseRushAction {
155155
parameterShortName: '-v',
156156
description: 'Display the logs during the build, rather than just displaying the build status summary'
157157
});
158-
if (this.actionVerb === 'build') {
158+
if (this.actionName === 'build') {
159159
this._changedProjectsOnly = this.defineFlagParameter({
160160
parameterLongName: '--changed-projects-only',
161161
parameterShortName: '-o',
@@ -188,13 +188,13 @@ export class CustomRushAction extends BaseRushAction {
188188
}
189189

190190
private _isParallelized(): boolean {
191-
return this.actionVerb === 'build'
192-
|| this.actionVerb === 'rebuild'
191+
return this.actionName === 'build'
192+
|| this.actionName === 'rebuild'
193193
|| this._parallelized;
194194
}
195195

196196
private _doBeforeTask(): void {
197-
if (this.actionVerb !== 'build' && this.actionVerb !== 'rebuild') {
197+
if (this.actionName !== 'build' && this.actionName !== 'rebuild') {
198198
// Only collects information for built-in tasks like build or rebuild.
199199
return;
200200
}
@@ -203,7 +203,7 @@ export class CustomRushAction extends BaseRushAction {
203203
}
204204

205205
private _doAfterTask(stopwatch: Stopwatch, success: boolean): void {
206-
if (this.actionVerb !== 'build' && this.actionVerb !== 'rebuild') {
206+
if (this.actionName !== 'build' && this.actionName !== 'rebuild') {
207207
// Only collects information for built-in tasks like build or rebuild.
208208
return;
209209
}
@@ -220,14 +220,14 @@ export class CustomRushAction extends BaseRushAction {
220220

221221
this.customOptions.forEach((customOption: ICustomOptionInstance, longName: string) => {
222222
if (customOption.parameterValue!.value) {
223-
extraData[`${this.actionVerb}_${longName}`] =
223+
extraData[`${this.actionName}_${longName}`] =
224224
customOption.parameterValue!.value!.toString();
225225
}
226226
});
227227

228228
if (this.parser.telemetry) {
229229
this.parser.telemetry.log({
230-
name: this.actionVerb,
230+
name: this.actionName,
231231
duration: stopwatch.duration,
232232
result: success ? 'Succeeded' : 'Failed',
233233
extraData

apps/rush-lib/src/cli/actions/GenerateAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default class GenerateAction extends BaseInstallAction {
2828

2929
constructor(parser: RushCommandLineParser) {
3030
super({
31-
actionVerb: 'generate',
31+
actionName: 'generate',
3232
summary: 'Generate a new shrinkwrap file containing the latest semver-compatible versions.',
3333
documentation: 'Run the "rush generate" command only if: (1) you are setting up a new repo, or'
3434
+ ' (2) you want to upgrade to the latest versions of your dependencies, or (3)'

0 commit comments

Comments
 (0)