feat: remove useless help text service

This commit is contained in:
Cheng Liu 2024-08-07 20:17:13 -07:00
parent 598dee521c
commit d851d9fc17
No known key found for this signature in database
GPG key ID: EEC8452F7DB85CD6
17 changed files with 0 additions and 100 deletions

View file

@ -52,7 +52,4 @@ export class AutoConfigCommand implements ICommand<IAutoConfigCommandOptions> {
throw e; throw e;
} }
}; };
public getHelp(): string {
return '';
}
} }

View file

@ -17,5 +17,4 @@ export interface ICommand<O extends {}> {
builder: (yargs: Argv<O>) => void; builder: (yargs: Argv<O>) => void;
handler: (args: ArgumentsCamelCase<O>, terminalService: TerminalService) => Promise<void>; handler: (args: ArgumentsCamelCase<O>, terminalService: TerminalService) => Promise<void>;
getHelp: () => string;
} }

View file

@ -258,10 +258,6 @@ export class CheckoutCommand implements ICommand<ICheckoutCommandOptions> {
} }
}; };
public getHelp(): string {
return '';
}
private _ensureBranchInLocal(branch: string): boolean { private _ensureBranchInLocal(branch: string): boolean {
// fetch from remote // fetch from remote
const remote: string = this._gitService.getBranchRemote(branch); const remote: string = this._gitService.getBranchRemote(branch);

View file

@ -44,7 +44,4 @@ export class CICheckoutCommand implements ICommand<ICICheckoutCommandOptions> {
from from
}); });
}; };
public getHelp(): string {
return 'sparse help';
}
} }

View file

@ -71,8 +71,4 @@ export class CICloneCommand implements ICommand<ICloneCommandOptions> {
terminal.writeLine(`Remember to run "cd ${directory}"`); terminal.writeLine(`Remember to run "cd ${directory}"`);
}; };
public getHelp(): string {
return `clone help`;
}
} }

View file

@ -154,8 +154,4 @@ export class CloneCommand implements ICommand<ICloneCommandOptions> {
terminal.writeLine(' ' + Colorize.cyan('sparo init-profile --profile <profile_name>')); terminal.writeLine(' ' + Colorize.cyan('sparo init-profile --profile <profile_name>'));
} }
}; };
public getHelp(): string {
return `clone help`;
}
} }

View file

@ -75,8 +75,4 @@ export class FetchCommand implements ICommand<IFetchCommandOptions> {
restoreSingleBranchCallback?.(); restoreSingleBranchCallback?.();
}; };
public getHelp(): string {
return `fetch help`;
}
} }

View file

@ -27,8 +27,4 @@ export class GitCheckoutCommand implements ICommand<{}> {
terminal.writeDebugLine(`proxy args in git-checkout command: ${JSON.stringify(rawArgs)}`); terminal.writeDebugLine(`proxy args in git-checkout command: ${JSON.stringify(rawArgs)}`);
gitService.executeGitCommand({ args: rawArgs }); gitService.executeGitCommand({ args: rawArgs });
}; };
public getHelp(): string {
return `git-checkout help`;
}
} }

View file

@ -27,8 +27,4 @@ export class GitCloneCommand implements ICommand<{}> {
terminal.writeDebugLine(`proxy args in git-clone command: ${JSON.stringify(rawArgs)}`); terminal.writeDebugLine(`proxy args in git-clone command: ${JSON.stringify(rawArgs)}`);
gitService.executeGitCommand({ args: rawArgs }); gitService.executeGitCommand({ args: rawArgs });
}; };
public getHelp(): string {
return `git-clone help`;
}
} }

View file

@ -28,8 +28,4 @@ export class GitFetchCommand implements ICommand<{}> {
terminal.writeDebugLine(`proxy args in git-fetch command: ${JSON.stringify(rawArgs)}`); terminal.writeDebugLine(`proxy args in git-fetch command: ${JSON.stringify(rawArgs)}`);
gitService.executeGitCommand({ args: rawArgs }); gitService.executeGitCommand({ args: rawArgs });
}; };
public getHelp(): string {
return `git-fetch help`;
}
} }

View file

@ -27,7 +27,4 @@ export class GitPullCommand implements ICommand<{}> {
terminal.writeDebugLine(`proxy args in git-pull command: ${JSON.stringify(rawArgs)}`); terminal.writeDebugLine(`proxy args in git-pull command: ${JSON.stringify(rawArgs)}`);
gitService.executeGitCommand({ args: rawArgs }); gitService.executeGitCommand({ args: rawArgs });
}; };
public getHelp(): string {
return `git-pull help`;
}
} }

View file

@ -66,8 +66,4 @@ export class InitProfileCommand implements ICommand<IInitProjectCommandOptions>
this._terminalService.terminal.writeLine(); this._terminalService.terminal.writeLine();
this._terminalService.terminal.writeLine(' ' + Colorize.cyan(destinationPath)); this._terminalService.terminal.writeLine(' ' + Colorize.cyan(destinationPath));
}; };
public getHelp(): string {
return 'init-profile help';
}
} }

View file

@ -85,7 +85,4 @@ export class ListProfilesCommand implements ICommand<IListProfilesCommandOptions
} }
} }
}; };
public getHelp(): string {
return 'list-profiles help';
}
} }

View file

@ -105,8 +105,4 @@ export class PullCommand implements ICommand<IPullCommandOptions> {
isProfileRestoreFromLocal isProfileRestoreFromLocal
}); });
}; };
public getHelp(): string {
return `pull help`;
}
} }

View file

@ -1,7 +1,6 @@
import { inject } from 'inversify'; import { inject } from 'inversify';
import type { Argv } from 'yargs'; import type { Argv } from 'yargs';
import type { ICommand } from '../cli/commands/base'; import type { ICommand } from '../cli/commands/base';
import { HelpTextService } from './HelpTextService';
import { TerminalService } from './TerminalService'; import { TerminalService } from './TerminalService';
import { Service } from '../decorator'; import { Service } from '../decorator';
import { ArgvService } from './ArgvService'; import { ArgvService } from './ArgvService';
@ -63,7 +62,6 @@ export class CommandService {
} }
} }
); );
this._helpTextService.set(commandName, getHelp());
} }
public setHasInternalError(): void { public setHasInternalError(): void {

View file

@ -1,18 +0,0 @@
import { inject } from 'inversify';
import { Service } from '../decorator';
import { TerminalService } from './TerminalService';
export interface IHelpTextParams {
terminalService: TerminalService;
}
@Service()
export class HelpTextService {
@inject(TerminalService) private _terminalService!: TerminalService;
public helpTextMap: Map<string, string> = new Map<string, string>();
public set(name: string, text: string): void {
this._terminalService.terminal.writeVerboseLine(`set help text "${name}" to "${text}"`);
this.helpTextMap.set(name, text);
}
}

View file

@ -270,37 +270,6 @@
"postRushx": [] "postRushx": []
}, },
/**
* Installation variants allow you to maintain a parallel set of configuration files that can be
* used to build the entire monorepo with an alternate set of dependencies. For example, suppose
* you upgrade all your projects to use a new release of an important framework, but during a transition period
* you intend to maintain compatibility with the old release. In this situation, you probably want your
* CI validation to build the entire repo twice: once with the old release, and once with the new release.
*
* Rush "installation variants" correspond to sets of config files located under this folder:
*
* common/config/rush/variants/<variant_name>
*
* The variant folder can contain an alternate common-versions.json file. Its "preferredVersions" field can be used
* to select older versions of dependencies (within a loose SemVer range specified in your package.json files).
* To install a variant, run "rush install --variant <variant_name>".
*
* For more details and instructions, see this article: https://rushjs.io/pages/advanced/installation_variants/
*/
"variants": [
// {
// /**
// * The folder name for this variant.
// */
// "variantName": "old-sdk",
//
// /**
// * An informative description
// */
// "description": "Build this repo using the previous release of the SDK"
// }
],
/** /**
* Rush can collect anonymous telemetry about everyday developer activity such as * Rush can collect anonymous telemetry about everyday developer activity such as
* success/failure of installs, builds, and other operations. You can use this to identify * success/failure of installs, builds, and other operations. You can use this to identify