1 | import * as Config from '@oclif/config';
|
2 | export { getHelpClass } from './util';
|
3 | export interface HelpOptions {
|
4 | all?: boolean;
|
5 | maxWidth: number;
|
6 | stripAnsi?: boolean;
|
7 | }
|
8 | export declare abstract class HelpBase {
|
9 | constructor(config: Config.IConfig, opts?: Partial<HelpOptions>);
|
10 | protected config: Config.IConfig;
|
11 | protected opts: HelpOptions;
|
12 | /**
|
13 | * Show help, used in multi-command CLIs
|
14 | * @param args passed into your command, useful for determining which type of help to display
|
15 | */
|
16 | abstract showHelp(argv: string[]): void;
|
17 | /**
|
18 | * Show help for an individual command
|
19 | * @param command
|
20 | * @param topics
|
21 | */
|
22 | abstract showCommandHelp(command: Config.Command, topics: Config.Topic[]): void;
|
23 | }
|
24 | export default class Help extends HelpBase {
|
25 | render: (input: string) => string;
|
26 | private get _topics();
|
27 | protected get sortedCommands(): Config.Command.Plugin[];
|
28 | protected get sortedTopics(): Config.Topic[];
|
29 | constructor(config: Config.IConfig, opts?: Partial<HelpOptions>);
|
30 | showHelp(argv: string[]): void;
|
31 | showCommandHelp(command: Config.Command): void;
|
32 | protected showRootHelp(): void;
|
33 | protected showTopicHelp(topic: Config.Topic): void;
|
34 | protected formatRoot(): string;
|
35 | protected formatCommand(command: Config.Command): string;
|
36 | protected formatCommands(commands: Config.Command[]): string;
|
37 | protected formatTopic(topic: Config.Topic): string;
|
38 | protected formatTopics(topics: Config.Topic[]): string;
|
39 | /**
|
40 | * @deprecated used for readme generation
|
41 | * @param {object} command The command to generate readme help for
|
42 | * @return {string} the readme help string for the given command
|
43 | */
|
44 | protected command(command: Config.Command): string;
|
45 | }
|