mirror of
https://github.com/tiktok/sparo.git
synced 2024-11-14 19:35:12 -05:00
feat: remove useless help text service
This commit is contained in:
parent
598dee521c
commit
d851d9fc17
17 changed files with 0 additions and 100 deletions
|
@ -52,7 +52,4 @@ export class AutoConfigCommand implements ICommand<IAutoConfigCommandOptions> {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
public getHelp(): string {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -44,7 +44,4 @@ export class CICheckoutCommand implements ICommand<ICICheckoutCommandOptions> {
|
||||||
from
|
from
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
public getHelp(): string {
|
|
||||||
return 'sparse help';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,8 +75,4 @@ export class FetchCommand implements ICommand<IFetchCommandOptions> {
|
||||||
|
|
||||||
restoreSingleBranchCallback?.();
|
restoreSingleBranchCallback?.();
|
||||||
};
|
};
|
||||||
|
|
||||||
public getHelp(): string {
|
|
||||||
return `fetch help`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,4 @@ export class ListProfilesCommand implements ICommand<IListProfilesCommandOptions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
public getHelp(): string {
|
|
||||||
return 'list-profiles help';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,8 +105,4 @@ export class PullCommand implements ICommand<IPullCommandOptions> {
|
||||||
isProfileRestoreFromLocal
|
isProfileRestoreFromLocal
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
public getHelp(): string {
|
|
||||||
return `pull help`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
31
rush.json
31
rush.json
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue