CliService
Class
CliService
Hierarchy
CliService
Index
Constructors
Properties
Methods
- collectAliases
- execute
- getCommand
- getCommands
- getConfig
- getPrograms
- queParser
- registerProgram
- registerPrograms
- resolve
- resolveToken
- validate
Constructors
constructor
new CliService(commandManager: CommandManager, config?: CliConfigType): CliService
Defined in Library/Cli/CliService.ts:23
Parameters:
Name | Type | Default value |
---|---|---|
commandManager | CommandManager | - |
Default value config | CliConfigType | {} |
Returns: CliService
Properties
Private
commandManager
commandManager: CommandManager
Defined in Library/Cli/CliService.ts:23
Private
commands
commands: object
Defined in Library/Cli/CliService.ts:21
Lookup index linking to commands in programs.
Type declaration
Private
config
config: CliConfigType
Defined in Library/Cli/CliService.ts:14
Private
programs
programs: object
Defined in Library/Cli/CliService.ts:16
Type declaration
Methods
Private
collectAliases
collectAliases(__namedParameters: object
): object
Defined in Library/Cli/CliService.ts:72
Parameters:
__namedParameters: object
Name | Type |
---|---|
config | object |
Returns: object
execute
execute(argv: string
[]): Promise
<void
>
Defined in Library/Cli/CliService.ts:42
Parameters:
Name | Type |
---|---|
argv | string [] |
Returns: Promise
<void
>
getCommand
getCommand(command: string
): CliCommandType
Defined in Library/Cli/CliService.ts:110
Parameters:
Name | Type |
---|---|
command | string |
Returns: CliCommandType
getCommands
getCommands(): object
Defined in Library/Cli/CliService.ts:106
Returns: object
getConfig
getConfig(): CliConfigType
Defined in Library/Cli/CliService.ts:114
Returns: CliConfigType
getPrograms
getPrograms(): object
Defined in Library/Cli/CliService.ts:102
Returns: object
Private
queParser
queParser(commandLine: string
): ParsedCommandType
Defined in Library/Cli/CliService.ts:143
Parameters:
Name | Type |
---|---|
commandLine | string |
Returns: ParsedCommandType
Private
registerProgram
registerProgram(program: string
, __namedParameters: object
): void
Defined in Library/Cli/CliService.ts:127
Parameters:
program: string
__namedParameters: object
Name | Type |
---|---|
commands | object [] |
examples | string [] |
Returns: void
Private
registerPrograms
registerPrograms(programs: Array
< CliProgramType | CliCommandType>): void
Defined in Library/Cli/CliService.ts:118
Parameters:
Name | Type |
---|---|
programs | Array < CliProgramType | CliCommandType> |
Returns: void
Private
resolve
resolve(argv: string
[]): Promise
<Output>
Defined in Library/Cli/CliService.ts:48
Parameters:
Name | Type |
---|---|
argv | string [] |
Returns: Promise
<Output>
resolveToken
resolveToken(args: object
): string
Defined in Library/Cli/CliService.ts:34
Parameters:
args: object
Name | Type |
---|---|
_ | string [] |
Returns: string
Private
validate
validate(provided: object
, requested: object
[]): object
Defined in Library/Cli/CliService.ts:86
Parameters:
Name | Type |
---|---|
provided | object |
requested | object [] |
Returns: object