1 | import { IConfig } from './config';
|
2 | import { IPlugin } from './plugin';
|
3 | export interface ICachedCommand {
|
4 | _base: string;
|
5 | id: string;
|
6 | hidden: boolean;
|
7 | aliases: string[];
|
8 | description?: string;
|
9 | usage?: string;
|
10 | pluginName?: string;
|
11 | help?: string;
|
12 | flags: {
|
13 | [name: string]: ICachedFlag;
|
14 | };
|
15 | args: ICachedArg[];
|
16 | load(): Promise<ICommand>;
|
17 | }
|
18 | export interface IConvertToCachedOptions {
|
19 | id?: string;
|
20 | plugin?: IPlugin;
|
21 | }
|
22 | export interface ICommand extends ICachedCommand {
|
23 | run(argv: string[], opts?: ICommandOptions): Promise<void>;
|
24 | convertToCached(opts?: IConvertToCachedOptions): ICachedCommand;
|
25 | }
|
26 | export interface ICommandOptions {
|
27 | root?: string;
|
28 | config?: IConfig;
|
29 | }
|
30 | export interface ICachedArg {
|
31 | name: string;
|
32 | description?: string;
|
33 | required?: boolean;
|
34 | hidden?: boolean;
|
35 | }
|
36 | export interface ICachedBooleanFlag {
|
37 | type: 'boolean';
|
38 | name: string;
|
39 | required?: boolean;
|
40 | char?: string;
|
41 | hidden?: boolean;
|
42 | description?: string;
|
43 | }
|
44 | export interface ICachedOptionFlag {
|
45 | type: 'option';
|
46 | name: string;
|
47 | required?: boolean;
|
48 | char?: string;
|
49 | hidden?: boolean;
|
50 | description?: string;
|
51 | }
|
52 | export declare type ICachedFlag = ICachedBooleanFlag | ICachedOptionFlag;
|