Skip to content

Commit dab367a

Browse files
chore: remove COMMAND_HELP_FILE_NAME from static-config
The COMMAND_HELP_FILE_NAME had been used in the past to show the name of the file where the help of all commands is located. Since several years such file does not exist, so remove the variable and its usage in the code.
1 parent 5bb46d1 commit dab367a

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

lib/common/definitions/config.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ declare module Config {
2121
HTML_CLI_HELPERS_DIR: string;
2222
pathToPackageJson: string;
2323
APP_RESOURCES_DIR_NAME: string;
24-
COMMAND_HELP_FILE_NAME: string;
2524
RESOURCE_DIR_PATH: string;
2625
PATH_TO_BOOTSTRAP: string;
2726
QR_SIZE: number;

lib/common/services/commands-service.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ export class CommandsService implements ICommandsService {
2222
constructor(private $analyticsSettingsService: IAnalyticsSettingsService,
2323
private $commandsServiceProvider: ICommandsServiceProvider,
2424
private $errors: IErrors,
25-
private $fs: IFileSystem,
2625
private $hooksService: IHooksService,
2726
private $injector: IInjector,
2827
private $logger: ILogger,
2928
private $options: IOptions,
30-
private $resources: IResourceLoader,
3129
private $staticConfig: Config.IStaticConfig,
3230
private $helpService: IHelpService,
3331
private $extensibilityService: IExtensibilityService,
@@ -88,12 +86,6 @@ export class CommandsService implements ICommandsService {
8886
await this.$hooksService.executeAfterHooks(commandName);
8987
}
9088

91-
const commandHelp = this.getCommandHelp();
92-
if (!command.disableCommandHelpSuggestion && commandHelp && commandHelp[commandName]) {
93-
const suggestionText: string = commandHelp[commandName];
94-
this.$logger.printMarkdown(~suggestionText.indexOf('%s') ? require('util').format(suggestionText, commandArguments) : suggestionText);
95-
}
96-
9789
this.commands.pop();
9890
return true;
9991
}
@@ -372,15 +364,6 @@ export class CommandsService implements ICommandsService {
372364
return true;
373365
}
374366

375-
private getCommandHelp(): any {
376-
let commandHelp: any = null;
377-
if (this.$fs.exists(this.$resources.resolvePath(this.$staticConfig.COMMAND_HELP_FILE_NAME))) {
378-
commandHelp = this.$resources.readJson(this.$staticConfig.COMMAND_HELP_FILE_NAME);
379-
}
380-
381-
return commandHelp;
382-
}
383-
384367
private beautifyCommandName(commandName: string): string {
385368
if (commandName.indexOf("*") > 0) {
386369
return commandName.substr(0, commandName.indexOf("|"));

lib/common/static-config-base.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export abstract class StaticConfigBase implements Config.IStaticConfig {
99
public TRACK_FEATURE_USAGE_SETTING_NAME: string = null;
1010
public ERROR_REPORT_SETTING_NAME: string = null;
1111
public APP_RESOURCES_DIR_NAME = "App_Resources";
12-
public COMMAND_HELP_FILE_NAME = 'command-help.json';
1312
public QR_SIZE = 5;
1413
public RESOURCE_DIR_PATH = __dirname;
1514
public SYS_REQUIREMENTS_LINK: string;

0 commit comments

Comments
 (0)