This repository has been archived by the owner on Nov 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
IYargsParms.ts
94 lines (92 loc) · 2.98 KB
/
IYargsParms.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/
import { Argv } from "yargs";
import { ICommandDefinition } from "../../doc/ICommandDefinition";
import { GroupCommandYargs } from "../GroupCommandYargs";
import { ICommandResponseParms } from "../../doc/response/parms/ICommandResponseParms";
import { IProfileManagerFactory } from "../../../../profiles";
import { IHelpGeneratorFactory } from "../../help/doc/IHelpGeneratorFactory";
/**
* Imperative Yargs parameters - used to define imperative commands to Yargs and provides guidance/parameters for
* how response objects should be handled when yargs invokes the handlers.
* @export
* @interface IYargsParms
*/
export interface IYargsParms {
/**
* The instance of Yargs to define the commands.
* @type {Argv}
* @memberof IYargsParms
*/
yargsInstance: Argv;
/**
* The command definition document.
* @type {ICommandDefinition}
* @memberof IYargsParms
*/
commandDefinition: ICommandDefinition;
/**
* The command response parameters normally scraped from the Imperative configuration document.
*
* @type {ICommandResponseParms}
* @memberof IYargsParms
*/
commandResponseParms: ICommandResponseParms;
/**
* The help generator factory to be used in this CLI help generation
* @type {AbstractHelpGeneratorFactory}
* @memberof IYargsParms
*/
helpGeneratorFactory: IHelpGeneratorFactory;
/**
* The profile manager factory to use in this CLI profile management.
* @type {AbstractProfileManagerFactory<any>}
* @memberof IYargsParms
*/
profileManagerFactory: IProfileManagerFactory<any>;
/**
* Optionally override the experimental command help text block.
* Used to propagate the user's configuration down to different yargs/cmd services.
* @type {string}
* @memberof IYargsParms
*/
experimentalCommandDescription: string;
/**
* Root command name of the CLI.
* @type {string}
* @memberof IYargsParms
*/
rootCommandName: string;
/**
* The command line.
* @type {string}
* @memberof IYargsParms
*/
commandLine: string;
/**
* Environmental variable name prefix used to construct configuration environmental variables.
* @type {string}
* @memberof IYargsParms
*/
envVariablePrefix: string;
/**
* The Yargs Parent object - only has meaning for nested/group commands.
* @type {GroupCommandYargs}
* @memberof IYargsParms
*/
yargsParent?: GroupCommandYargs;
/**
* The phrase used to indicate the user wants to enter the value of an argument in a hidden text prompt
* @type {string}
* @memberof IYargsParms
*/
promptPhrase: string;
}