@rushstack/ts-command-line 4.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +1329 -0
- package/CHANGELOG.md +704 -0
- package/LICENSE +24 -0
- package/README.md +251 -0
- package/dist/ts-command-line.d.ts +878 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/lib/CommandLineHelper.d.ts +14 -0
- package/lib/CommandLineHelper.d.ts.map +1 -0
- package/lib/CommandLineHelper.js +22 -0
- package/lib/CommandLineHelper.js.map +1 -0
- package/lib/Constants.d.ts +12 -0
- package/lib/Constants.d.ts.map +1 -0
- package/lib/Constants.js +5 -0
- package/lib/Constants.js.map +1 -0
- package/lib/index.d.ts +23 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +42 -0
- package/lib/index.js.map +1 -0
- package/lib/parameters/BaseClasses.d.ts +100 -0
- package/lib/parameters/BaseClasses.d.ts.map +1 -0
- package/lib/parameters/BaseClasses.js +148 -0
- package/lib/parameters/BaseClasses.js.map +1 -0
- package/lib/parameters/CommandLineChoiceListParameter.d.ts +33 -0
- package/lib/parameters/CommandLineChoiceListParameter.d.ts.map +1 -0
- package/lib/parameters/CommandLineChoiceListParameter.js +84 -0
- package/lib/parameters/CommandLineChoiceListParameter.js.map +1 -0
- package/lib/parameters/CommandLineChoiceParameter.d.ts +40 -0
- package/lib/parameters/CommandLineChoiceParameter.d.ts.map +1 -0
- package/lib/parameters/CommandLineChoiceParameter.js +95 -0
- package/lib/parameters/CommandLineChoiceParameter.js.map +1 -0
- package/lib/parameters/CommandLineDefinition.d.ts +207 -0
- package/lib/parameters/CommandLineDefinition.d.ts.map +1 -0
- package/lib/parameters/CommandLineDefinition.js +5 -0
- package/lib/parameters/CommandLineDefinition.js.map +1 -0
- package/lib/parameters/CommandLineFlagParameter.d.ts +29 -0
- package/lib/parameters/CommandLineFlagParameter.d.ts.map +1 -0
- package/lib/parameters/CommandLineFlagParameter.js +72 -0
- package/lib/parameters/CommandLineFlagParameter.js.map +1 -0
- package/lib/parameters/CommandLineIntegerListParameter.d.ts +29 -0
- package/lib/parameters/CommandLineIntegerListParameter.d.ts.map +1 -0
- package/lib/parameters/CommandLineIntegerListParameter.js +82 -0
- package/lib/parameters/CommandLineIntegerListParameter.js.map +1 -0
- package/lib/parameters/CommandLineIntegerParameter.d.ts +36 -0
- package/lib/parameters/CommandLineIntegerParameter.d.ts.map +1 -0
- package/lib/parameters/CommandLineIntegerParameter.js +86 -0
- package/lib/parameters/CommandLineIntegerParameter.js.map +1 -0
- package/lib/parameters/CommandLineRemainder.d.ts +28 -0
- package/lib/parameters/CommandLineRemainder.d.ts.map +1 -0
- package/lib/parameters/CommandLineRemainder.js +48 -0
- package/lib/parameters/CommandLineRemainder.js.map +1 -0
- package/lib/parameters/CommandLineStringListParameter.d.ts +29 -0
- package/lib/parameters/CommandLineStringListParameter.d.ts.map +1 -0
- package/lib/parameters/CommandLineStringListParameter.js +73 -0
- package/lib/parameters/CommandLineStringListParameter.js.map +1 -0
- package/lib/parameters/CommandLineStringParameter.d.ts +36 -0
- package/lib/parameters/CommandLineStringParameter.d.ts.map +1 -0
- package/lib/parameters/CommandLineStringParameter.js +85 -0
- package/lib/parameters/CommandLineStringParameter.js.map +1 -0
- package/lib/parameters/EnvironmentVariableParser.d.ts +10 -0
- package/lib/parameters/EnvironmentVariableParser.d.ts.map +1 -0
- package/lib/parameters/EnvironmentVariableParser.js +51 -0
- package/lib/parameters/EnvironmentVariableParser.js.map +1 -0
- package/lib/providers/CommandLineAction.d.ts +76 -0
- package/lib/providers/CommandLineAction.d.ts.map +1 -0
- package/lib/providers/CommandLineAction.js +73 -0
- package/lib/providers/CommandLineAction.js.map +1 -0
- package/lib/providers/CommandLineParameterProvider.d.ts +202 -0
- package/lib/providers/CommandLineParameterProvider.d.ts.map +1 -0
- package/lib/providers/CommandLineParameterProvider.js +374 -0
- package/lib/providers/CommandLineParameterProvider.js.map +1 -0
- package/lib/providers/CommandLineParser.d.ts +100 -0
- package/lib/providers/CommandLineParser.d.ts.map +1 -0
- package/lib/providers/CommandLineParser.js +204 -0
- package/lib/providers/CommandLineParser.js.map +1 -0
- package/lib/providers/CommandLineParserExitError.d.ts +10 -0
- package/lib/providers/CommandLineParserExitError.d.ts.map +1 -0
- package/lib/providers/CommandLineParserExitError.js +53 -0
- package/lib/providers/CommandLineParserExitError.js.map +1 -0
- package/lib/providers/DynamicCommandLineAction.d.ts +9 -0
- package/lib/providers/DynamicCommandLineAction.d.ts.map +1 -0
- package/lib/providers/DynamicCommandLineAction.js +21 -0
- package/lib/providers/DynamicCommandLineAction.js.map +1 -0
- package/lib/providers/DynamicCommandLineParser.d.ts +8 -0
- package/lib/providers/DynamicCommandLineParser.d.ts.map +1 -0
- package/lib/providers/DynamicCommandLineParser.js +16 -0
- package/lib/providers/DynamicCommandLineParser.js.map +1 -0
- package/lib/providers/TabCompletionAction.d.ts +18 -0
- package/lib/providers/TabCompletionAction.d.ts.map +1 -0
- package/lib/providers/TabCompletionAction.js +211 -0
- package/lib/providers/TabCompletionAction.js.map +1 -0
- package/package.json +28 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ICommandLineIntegerDefinition } from './CommandLineDefinition';
|
|
2
|
+
import { CommandLineParameterWithArgument, CommandLineParameterKind } from './BaseClasses';
|
|
3
|
+
/**
|
|
4
|
+
* The data type returned by {@link CommandLineParameterProvider.defineIntegerParameter}.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class CommandLineIntegerParameter extends CommandLineParameterWithArgument {
|
|
8
|
+
/** {@inheritDoc ICommandLineStringDefinition.defaultValue} */
|
|
9
|
+
readonly defaultValue: number | undefined;
|
|
10
|
+
private _value;
|
|
11
|
+
/** @internal */
|
|
12
|
+
constructor(definition: ICommandLineIntegerDefinition);
|
|
13
|
+
/** {@inheritDoc CommandLineParameter.kind} */
|
|
14
|
+
get kind(): CommandLineParameterKind;
|
|
15
|
+
/**
|
|
16
|
+
* {@inheritDoc CommandLineParameter._setValue}
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
_setValue(data: any): void;
|
|
20
|
+
/**
|
|
21
|
+
* {@inheritDoc CommandLineParameter._getSupplementaryNotes}
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
_getSupplementaryNotes(supplementaryNotes: string[]): void;
|
|
25
|
+
/**
|
|
26
|
+
* Returns the argument value for an integer parameter that was parsed from the command line.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* The return value will be undefined if the command-line has not been parsed yet,
|
|
30
|
+
* or if the parameter was omitted and has no default value.
|
|
31
|
+
*/
|
|
32
|
+
get value(): number | undefined;
|
|
33
|
+
/** {@inheritDoc CommandLineParameter.appendToArgList} @override */
|
|
34
|
+
appendToArgList(argList: string[]): void;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=CommandLineIntegerParameter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandLineIntegerParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineIntegerParameter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAE3F;;;GAGG;AACH,qBAAa,2BAA4B,SAAQ,gCAAgC;IAC/E,8DAA8D;IAC9D,SAAgB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjD,OAAO,CAAC,MAAM,CAAiC;IAE/C,gBAAgB;gBACG,UAAU,EAAE,6BAA6B;IAM5D,8CAA8C;IAC9C,IAAW,IAAI,IAAI,wBAAwB,CAE1C;IAED;;;OAGG;IAEI,SAAS,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI;IAkCjC;;;OAGG;IACI,sBAAsB,CAAC,kBAAkB,EAAE,MAAM,EAAE,GAAG,IAAI;IAQjE;;;;;;OAMG;IACH,IAAW,KAAK,IAAI,MAAM,GAAG,SAAS,CAErC;IAED,mEAAmE;IAC5D,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAMhD"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.CommandLineIntegerParameter = void 0;
|
|
6
|
+
const BaseClasses_1 = require("./BaseClasses");
|
|
7
|
+
/**
|
|
8
|
+
* The data type returned by {@link CommandLineParameterProvider.defineIntegerParameter}.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
class CommandLineIntegerParameter extends BaseClasses_1.CommandLineParameterWithArgument {
|
|
12
|
+
/** @internal */
|
|
13
|
+
constructor(definition) {
|
|
14
|
+
super(definition);
|
|
15
|
+
this._value = undefined;
|
|
16
|
+
this.defaultValue = definition.defaultValue;
|
|
17
|
+
this.validateDefaultValue(!!this.defaultValue);
|
|
18
|
+
}
|
|
19
|
+
/** {@inheritDoc CommandLineParameter.kind} */
|
|
20
|
+
get kind() {
|
|
21
|
+
return BaseClasses_1.CommandLineParameterKind.Integer;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* {@inheritDoc CommandLineParameter._setValue}
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
+
_setValue(data) {
|
|
29
|
+
// abstract
|
|
30
|
+
if (data !== null && data !== undefined) {
|
|
31
|
+
if (typeof data !== 'number') {
|
|
32
|
+
this.reportInvalidData(data);
|
|
33
|
+
}
|
|
34
|
+
this._value = data;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (this.environmentVariable !== undefined) {
|
|
38
|
+
// Try reading the environment variable
|
|
39
|
+
const environmentValue = process.env[this.environmentVariable];
|
|
40
|
+
if (environmentValue !== undefined && environmentValue !== '') {
|
|
41
|
+
const parsed = parseInt(environmentValue, 10);
|
|
42
|
+
if (isNaN(parsed) || environmentValue.indexOf('.') >= 0) {
|
|
43
|
+
throw new Error(`Invalid value "${environmentValue}" for the environment variable` +
|
|
44
|
+
` ${this.environmentVariable}. It must be an integer value.`);
|
|
45
|
+
}
|
|
46
|
+
this._value = parsed;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (this.defaultValue !== undefined) {
|
|
51
|
+
this._value = this.defaultValue;
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this._value = undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* {@inheritDoc CommandLineParameter._getSupplementaryNotes}
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
_getSupplementaryNotes(supplementaryNotes) {
|
|
61
|
+
// virtual
|
|
62
|
+
super._getSupplementaryNotes(supplementaryNotes);
|
|
63
|
+
if (this.defaultValue !== undefined) {
|
|
64
|
+
supplementaryNotes.push(`The default value is ${this.defaultValue}.`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Returns the argument value for an integer parameter that was parsed from the command line.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* The return value will be undefined if the command-line has not been parsed yet,
|
|
72
|
+
* or if the parameter was omitted and has no default value.
|
|
73
|
+
*/
|
|
74
|
+
get value() {
|
|
75
|
+
return this._value;
|
|
76
|
+
}
|
|
77
|
+
/** {@inheritDoc CommandLineParameter.appendToArgList} @override */
|
|
78
|
+
appendToArgList(argList) {
|
|
79
|
+
if (this.value !== undefined) {
|
|
80
|
+
argList.push(this.longName);
|
|
81
|
+
argList.push(this.value.toString());
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.CommandLineIntegerParameter = CommandLineIntegerParameter;
|
|
86
|
+
//# sourceMappingURL=CommandLineIntegerParameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandLineIntegerParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineIntegerParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAA2F;AAE3F;;;GAGG;AACH,MAAa,2BAA4B,SAAQ,8CAAgC;IAM/E,gBAAgB;IAChB,YAAmB,UAAyC;QAC1D,KAAK,CAAC,UAAU,CAAC,CAAC;QAJZ,WAAM,GAAuB,SAAS,CAAC;QAK7C,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QAC5C,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC;IAED,8CAA8C;IAC9C,IAAW,IAAI;QACb,OAAO,sCAAwB,CAAC,OAAO,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,8DAA8D;IACvD,SAAS,CAAC,IAAS;QACxB,WAAW;QACX,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;YACvC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;gBAC5B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;aAC9B;YACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,OAAO;SACR;QAED,IAAI,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE;YAC1C,uCAAuC;YACvC,MAAM,gBAAgB,GAAuB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YACnF,IAAI,gBAAgB,KAAK,SAAS,IAAI,gBAAgB,KAAK,EAAE,EAAE;gBAC7D,MAAM,MAAM,GAAW,QAAQ,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;gBACtD,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBACvD,MAAM,IAAI,KAAK,CACb,kBAAkB,gBAAgB,gCAAgC;wBAChE,IAAI,IAAI,CAAC,mBAAmB,iCAAiC,CAChE,CAAC;iBACH;gBACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;gBACrB,OAAO;aACR;SACF;QAED,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;YACnC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC;YAChC,OAAO;SACR;QAED,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,sBAAsB,CAAC,kBAA4B;QACxD,UAAU;QACV,KAAK,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;QACjD,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;YACnC,kBAAkB,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;SACvE;IACH,CAAC;IAED;;;;;;OAMG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,mEAAmE;IAC5D,eAAe,CAAC,OAAiB;QACtC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;SACrC;IACH,CAAC;CACF;AAvFD,kEAuFC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { ICommandLineIntegerDefinition } from './CommandLineDefinition';\r\nimport { CommandLineParameterWithArgument, CommandLineParameterKind } from './BaseClasses';\r\n\r\n/**\r\n * The data type returned by {@link CommandLineParameterProvider.defineIntegerParameter}.\r\n * @public\r\n */\r\nexport class CommandLineIntegerParameter extends CommandLineParameterWithArgument {\r\n /** {@inheritDoc ICommandLineStringDefinition.defaultValue} */\r\n public readonly defaultValue: number | undefined;\r\n\r\n private _value: number | undefined = undefined;\r\n\r\n /** @internal */\r\n public constructor(definition: ICommandLineIntegerDefinition) {\r\n super(definition);\r\n this.defaultValue = definition.defaultValue;\r\n this.validateDefaultValue(!!this.defaultValue);\r\n }\r\n\r\n /** {@inheritDoc CommandLineParameter.kind} */\r\n public get kind(): CommandLineParameterKind {\r\n return CommandLineParameterKind.Integer;\r\n }\r\n\r\n /**\r\n * {@inheritDoc CommandLineParameter._setValue}\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n public _setValue(data: any): void {\r\n // abstract\r\n if (data !== null && data !== undefined) {\r\n if (typeof data !== 'number') {\r\n this.reportInvalidData(data);\r\n }\r\n this._value = data;\r\n return;\r\n }\r\n\r\n if (this.environmentVariable !== undefined) {\r\n // Try reading the environment variable\r\n const environmentValue: string | undefined = process.env[this.environmentVariable];\r\n if (environmentValue !== undefined && environmentValue !== '') {\r\n const parsed: number = parseInt(environmentValue, 10);\r\n if (isNaN(parsed) || environmentValue.indexOf('.') >= 0) {\r\n throw new Error(\r\n `Invalid value \"${environmentValue}\" for the environment variable` +\r\n ` ${this.environmentVariable}. It must be an integer value.`\r\n );\r\n }\r\n this._value = parsed;\r\n return;\r\n }\r\n }\r\n\r\n if (this.defaultValue !== undefined) {\r\n this._value = this.defaultValue;\r\n return;\r\n }\r\n\r\n this._value = undefined;\r\n }\r\n\r\n /**\r\n * {@inheritDoc CommandLineParameter._getSupplementaryNotes}\r\n * @internal\r\n */\r\n public _getSupplementaryNotes(supplementaryNotes: string[]): void {\r\n // virtual\r\n super._getSupplementaryNotes(supplementaryNotes);\r\n if (this.defaultValue !== undefined) {\r\n supplementaryNotes.push(`The default value is ${this.defaultValue}.`);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the argument value for an integer parameter that was parsed from the command line.\r\n *\r\n * @remarks\r\n * The return value will be undefined if the command-line has not been parsed yet,\r\n * or if the parameter was omitted and has no default value.\r\n */\r\n public get value(): number | undefined {\r\n return this._value;\r\n }\r\n\r\n /** {@inheritDoc CommandLineParameter.appendToArgList} @override */\r\n public appendToArgList(argList: string[]): void {\r\n if (this.value !== undefined) {\r\n argList.push(this.longName);\r\n argList.push(this.value.toString());\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ICommandLineRemainderDefinition } from './CommandLineDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* The data type returned by {@link CommandLineParameterProvider.defineCommandLineRemainder}.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class CommandLineRemainder {
|
|
7
|
+
private _values;
|
|
8
|
+
/** {@inheritDoc IBaseCommandLineDefinition.description} */
|
|
9
|
+
readonly description: string;
|
|
10
|
+
/** @internal */
|
|
11
|
+
constructor(definition: ICommandLineRemainderDefinition);
|
|
12
|
+
/**
|
|
13
|
+
* Returns any remaining command line arguments after the recognized portion
|
|
14
|
+
* that was parsed from the command line.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* The array will be empty if the command-line has not been parsed yet.
|
|
18
|
+
*/
|
|
19
|
+
get values(): ReadonlyArray<string>;
|
|
20
|
+
/**
|
|
21
|
+
* {@inheritDoc CommandLineParameter._setValue}
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
_setValue(data: any): void;
|
|
25
|
+
/** {@inheritDoc CommandLineParameter.appendToArgList} @override */
|
|
26
|
+
appendToArgList(argList: string[]): void;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=CommandLineRemainder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandLineRemainder.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineRemainder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,OAAO,CAAgB;IAE/B,2DAA2D;IAC3D,SAAgB,WAAW,EAAE,MAAM,CAAC;IAEpC,gBAAgB;gBACG,UAAU,EAAE,+BAA+B;IAI9D;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,CAEzC;IAED;;;OAGG;IAEI,SAAS,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI;IASjC,mEAAmE;IAC5D,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAOhD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.CommandLineRemainder = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* The data type returned by {@link CommandLineParameterProvider.defineCommandLineRemainder}.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
class CommandLineRemainder {
|
|
11
|
+
/** @internal */
|
|
12
|
+
constructor(definition) {
|
|
13
|
+
this._values = [];
|
|
14
|
+
this.description = definition.description;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns any remaining command line arguments after the recognized portion
|
|
18
|
+
* that was parsed from the command line.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* The array will be empty if the command-line has not been parsed yet.
|
|
22
|
+
*/
|
|
23
|
+
get values() {
|
|
24
|
+
return this._values;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* {@inheritDoc CommandLineParameter._setValue}
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
_setValue(data) {
|
|
32
|
+
// abstract
|
|
33
|
+
if (!Array.isArray(data) || !data.every((x) => typeof x === 'string')) {
|
|
34
|
+
throw new Error(`Unexpected data object for remainder: ` + JSON.stringify(data));
|
|
35
|
+
}
|
|
36
|
+
this._values.push(...data);
|
|
37
|
+
}
|
|
38
|
+
/** {@inheritDoc CommandLineParameter.appendToArgList} @override */
|
|
39
|
+
appendToArgList(argList) {
|
|
40
|
+
if (this.values.length > 0) {
|
|
41
|
+
for (const value of this.values) {
|
|
42
|
+
argList.push(value);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.CommandLineRemainder = CommandLineRemainder;
|
|
48
|
+
//# sourceMappingURL=CommandLineRemainder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandLineRemainder.js","sourceRoot":"","sources":["../../src/parameters/CommandLineRemainder.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D;;;GAGG;AACH,MAAa,oBAAoB;IAM/B,gBAAgB;IAChB,YAAmB,UAA2C;QANtD,YAAO,GAAa,EAAE,CAAC;QAO7B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;IAC5C,CAAC;IAED;;;;;;OAMG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;;OAGG;IACH,8DAA8D;IACvD,SAAS,CAAC,IAAS;QACxB,WAAW;QACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,EAAE;YACrE,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;SAClF;QAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,mEAAmE;IAC5D,eAAe,CAAC,OAAiB;QACtC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YAC1B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE;gBAC/B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACrB;SACF;IACH,CAAC;CACF;AA5CD,oDA4CC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { ICommandLineRemainderDefinition } from './CommandLineDefinition';\r\n\r\n/**\r\n * The data type returned by {@link CommandLineParameterProvider.defineCommandLineRemainder}.\r\n * @public\r\n */\r\nexport class CommandLineRemainder {\r\n private _values: string[] = [];\r\n\r\n /** {@inheritDoc IBaseCommandLineDefinition.description} */\r\n public readonly description: string;\r\n\r\n /** @internal */\r\n public constructor(definition: ICommandLineRemainderDefinition) {\r\n this.description = definition.description;\r\n }\r\n\r\n /**\r\n * Returns any remaining command line arguments after the recognized portion\r\n * that was parsed from the command line.\r\n *\r\n * @remarks\r\n * The array will be empty if the command-line has not been parsed yet.\r\n */\r\n public get values(): ReadonlyArray<string> {\r\n return this._values;\r\n }\r\n\r\n /**\r\n * {@inheritDoc CommandLineParameter._setValue}\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n public _setValue(data: any): void {\r\n // abstract\r\n if (!Array.isArray(data) || !data.every((x) => typeof x === 'string')) {\r\n throw new Error(`Unexpected data object for remainder: ` + JSON.stringify(data));\r\n }\r\n\r\n this._values.push(...data);\r\n }\r\n\r\n /** {@inheritDoc CommandLineParameter.appendToArgList} @override */\r\n public appendToArgList(argList: string[]): void {\r\n if (this.values.length > 0) {\r\n for (const value of this.values) {\r\n argList.push(value);\r\n }\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ICommandLineStringListDefinition } from './CommandLineDefinition';
|
|
2
|
+
import { CommandLineParameterWithArgument, CommandLineParameterKind } from './BaseClasses';
|
|
3
|
+
/**
|
|
4
|
+
* The data type returned by {@link CommandLineParameterProvider.defineStringListParameter}.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class CommandLineStringListParameter extends CommandLineParameterWithArgument {
|
|
8
|
+
private _values;
|
|
9
|
+
/** @internal */
|
|
10
|
+
constructor(definition: ICommandLineStringListDefinition);
|
|
11
|
+
/** {@inheritDoc CommandLineParameter.kind} */
|
|
12
|
+
get kind(): CommandLineParameterKind;
|
|
13
|
+
/**
|
|
14
|
+
* {@inheritDoc CommandLineParameter._setValue}
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
_setValue(data: any): void;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the string arguments for a string list parameter that was parsed from the command line.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* The array will be empty if the command-line has not been parsed yet,
|
|
23
|
+
* or if the parameter was omitted and has no default value.
|
|
24
|
+
*/
|
|
25
|
+
get values(): ReadonlyArray<string>;
|
|
26
|
+
/** {@inheritDoc CommandLineParameter.appendToArgList} @override */
|
|
27
|
+
appendToArgList(argList: string[]): void;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=CommandLineStringListParameter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandLineStringListParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineStringListParameter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAG3F;;;GAGG;AACH,qBAAa,8BAA+B,SAAQ,gCAAgC;IAClF,OAAO,CAAC,OAAO,CAAgB;IAE/B,gBAAgB;gBACG,UAAU,EAAE,gCAAgC;IAI/D,8CAA8C;IAC9C,IAAW,IAAI,IAAI,wBAAwB,CAE1C;IAED;;;OAGG;IAEI,SAAS,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI;IA6BjC;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,CAEzC;IAED,mEAAmE;IAC5D,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAQhD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.CommandLineStringListParameter = void 0;
|
|
6
|
+
const BaseClasses_1 = require("./BaseClasses");
|
|
7
|
+
const EnvironmentVariableParser_1 = require("./EnvironmentVariableParser");
|
|
8
|
+
/**
|
|
9
|
+
* The data type returned by {@link CommandLineParameterProvider.defineStringListParameter}.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
class CommandLineStringListParameter extends BaseClasses_1.CommandLineParameterWithArgument {
|
|
13
|
+
/** @internal */
|
|
14
|
+
constructor(definition) {
|
|
15
|
+
super(definition);
|
|
16
|
+
this._values = [];
|
|
17
|
+
}
|
|
18
|
+
/** {@inheritDoc CommandLineParameter.kind} */
|
|
19
|
+
get kind() {
|
|
20
|
+
return BaseClasses_1.CommandLineParameterKind.StringList;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* {@inheritDoc CommandLineParameter._setValue}
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
_setValue(data) {
|
|
28
|
+
// If argparse passed us a value, confirm it is valid
|
|
29
|
+
if (data !== null && data !== undefined) {
|
|
30
|
+
if (!Array.isArray(data)) {
|
|
31
|
+
this.reportInvalidData(data);
|
|
32
|
+
}
|
|
33
|
+
for (const arrayItem of data) {
|
|
34
|
+
if (typeof arrayItem !== 'string') {
|
|
35
|
+
this.reportInvalidData(data);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
this._values = data;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
// If an environment variable exists, attempt to parse it as a list
|
|
42
|
+
if (this.environmentVariable !== undefined) {
|
|
43
|
+
const values = EnvironmentVariableParser_1.EnvironmentVariableParser.parseAsList(this.environmentVariable);
|
|
44
|
+
if (values) {
|
|
45
|
+
this._values = values;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// (No default value for string lists)
|
|
50
|
+
this._values = [];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Returns the string arguments for a string list parameter that was parsed from the command line.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* The array will be empty if the command-line has not been parsed yet,
|
|
57
|
+
* or if the parameter was omitted and has no default value.
|
|
58
|
+
*/
|
|
59
|
+
get values() {
|
|
60
|
+
return this._values;
|
|
61
|
+
}
|
|
62
|
+
/** {@inheritDoc CommandLineParameter.appendToArgList} @override */
|
|
63
|
+
appendToArgList(argList) {
|
|
64
|
+
if (this.values.length > 0) {
|
|
65
|
+
for (const value of this.values) {
|
|
66
|
+
argList.push(this.longName);
|
|
67
|
+
argList.push(value);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.CommandLineStringListParameter = CommandLineStringListParameter;
|
|
73
|
+
//# sourceMappingURL=CommandLineStringListParameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandLineStringListParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineStringListParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAA2F;AAC3F,2EAAwE;AAExE;;;GAGG;AACH,MAAa,8BAA+B,SAAQ,8CAAgC;IAGlF,gBAAgB;IAChB,YAAmB,UAA4C;QAC7D,KAAK,CAAC,UAAU,CAAC,CAAC;QAJZ,YAAO,GAAa,EAAE,CAAC;IAK/B,CAAC;IAED,8CAA8C;IAC9C,IAAW,IAAI;QACb,OAAO,sCAAwB,CAAC,UAAU,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,8DAA8D;IACvD,SAAS,CAAC,IAAS;QACxB,qDAAqD;QACrD,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;YACvC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACxB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;aAC9B;YACD,KAAK,MAAM,SAAS,IAAI,IAAI,EAAE;gBAC5B,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;oBACjC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;iBAC9B;aACF;YACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,OAAO;SACR;QAED,mEAAmE;QACnE,IAAI,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE;YAC1C,MAAM,MAAM,GAAyB,qDAAyB,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YACrG,IAAI,MAAM,EAAE;gBACV,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;gBACtB,OAAO;aACR;SACF;QAED,sCAAsC;QAEtC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,mEAAmE;IAC5D,eAAe,CAAC,OAAiB;QACtC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YAC1B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE;gBAC/B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC5B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACrB;SACF;IACH,CAAC;CACF;AAnED,wEAmEC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { ICommandLineStringListDefinition } from './CommandLineDefinition';\r\nimport { CommandLineParameterWithArgument, CommandLineParameterKind } from './BaseClasses';\r\nimport { EnvironmentVariableParser } from './EnvironmentVariableParser';\r\n\r\n/**\r\n * The data type returned by {@link CommandLineParameterProvider.defineStringListParameter}.\r\n * @public\r\n */\r\nexport class CommandLineStringListParameter extends CommandLineParameterWithArgument {\r\n private _values: string[] = [];\r\n\r\n /** @internal */\r\n public constructor(definition: ICommandLineStringListDefinition) {\r\n super(definition);\r\n }\r\n\r\n /** {@inheritDoc CommandLineParameter.kind} */\r\n public get kind(): CommandLineParameterKind {\r\n return CommandLineParameterKind.StringList;\r\n }\r\n\r\n /**\r\n * {@inheritDoc CommandLineParameter._setValue}\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n public _setValue(data: any): void {\r\n // If argparse passed us a value, confirm it is valid\r\n if (data !== null && data !== undefined) {\r\n if (!Array.isArray(data)) {\r\n this.reportInvalidData(data);\r\n }\r\n for (const arrayItem of data) {\r\n if (typeof arrayItem !== 'string') {\r\n this.reportInvalidData(data);\r\n }\r\n }\r\n this._values = data;\r\n return;\r\n }\r\n\r\n // If an environment variable exists, attempt to parse it as a list\r\n if (this.environmentVariable !== undefined) {\r\n const values: string[] | undefined = EnvironmentVariableParser.parseAsList(this.environmentVariable);\r\n if (values) {\r\n this._values = values;\r\n return;\r\n }\r\n }\r\n\r\n // (No default value for string lists)\r\n\r\n this._values = [];\r\n }\r\n\r\n /**\r\n * Returns the string arguments for a string list parameter that was parsed from the command line.\r\n *\r\n * @remarks\r\n * The array will be empty if the command-line has not been parsed yet,\r\n * or if the parameter was omitted and has no default value.\r\n */\r\n public get values(): ReadonlyArray<string> {\r\n return this._values;\r\n }\r\n\r\n /** {@inheritDoc CommandLineParameter.appendToArgList} @override */\r\n public appendToArgList(argList: string[]): void {\r\n if (this.values.length > 0) {\r\n for (const value of this.values) {\r\n argList.push(this.longName);\r\n argList.push(value);\r\n }\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ICommandLineStringDefinition } from './CommandLineDefinition';
|
|
2
|
+
import { CommandLineParameterWithArgument, CommandLineParameterKind } from './BaseClasses';
|
|
3
|
+
/**
|
|
4
|
+
* The data type returned by {@link CommandLineParameterProvider.defineStringParameter}.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class CommandLineStringParameter extends CommandLineParameterWithArgument {
|
|
8
|
+
/** {@inheritDoc ICommandLineStringDefinition.defaultValue} */
|
|
9
|
+
readonly defaultValue: string | undefined;
|
|
10
|
+
private _value;
|
|
11
|
+
/** @internal */
|
|
12
|
+
constructor(definition: ICommandLineStringDefinition);
|
|
13
|
+
/** {@inheritDoc CommandLineParameter.kind} */
|
|
14
|
+
get kind(): CommandLineParameterKind;
|
|
15
|
+
/**
|
|
16
|
+
* {@inheritDoc CommandLineParameter._setValue}
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
_setValue(data: any): void;
|
|
20
|
+
/**
|
|
21
|
+
* {@inheritDoc CommandLineParameter._getSupplementaryNotes}
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
_getSupplementaryNotes(supplementaryNotes: string[]): void;
|
|
25
|
+
/**
|
|
26
|
+
* Returns the argument value for a string parameter that was parsed from the command line.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* The return value will be undefined if the command-line has not been parsed yet,
|
|
30
|
+
* or if the parameter was omitted and has no default value.
|
|
31
|
+
*/
|
|
32
|
+
get value(): string | undefined;
|
|
33
|
+
/** {@inheritDoc CommandLineParameter.appendToArgList} @override */
|
|
34
|
+
appendToArgList(argList: string[]): void;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=CommandLineStringParameter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandLineStringParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineStringParameter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAE3F;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,gCAAgC;IAC9E,8DAA8D;IAC9D,SAAgB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjD,OAAO,CAAC,MAAM,CAAiC;IAE/C,gBAAgB;gBACG,UAAU,EAAE,4BAA4B;IAO3D,8CAA8C;IAC9C,IAAW,IAAI,IAAI,wBAAwB,CAE1C;IAED;;;OAGG;IAEI,SAAS,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI;IA6BjC;;;OAGG;IACI,sBAAsB,CAAC,kBAAkB,EAAE,MAAM,EAAE,GAAG,IAAI;IAUjE;;;;;;OAMG;IACH,IAAW,KAAK,IAAI,MAAM,GAAG,SAAS,CAErC;IAED,mEAAmE;IAC5D,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAMhD"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.CommandLineStringParameter = void 0;
|
|
6
|
+
const BaseClasses_1 = require("./BaseClasses");
|
|
7
|
+
/**
|
|
8
|
+
* The data type returned by {@link CommandLineParameterProvider.defineStringParameter}.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
class CommandLineStringParameter extends BaseClasses_1.CommandLineParameterWithArgument {
|
|
12
|
+
/** @internal */
|
|
13
|
+
constructor(definition) {
|
|
14
|
+
super(definition);
|
|
15
|
+
this._value = undefined;
|
|
16
|
+
this.defaultValue = definition.defaultValue;
|
|
17
|
+
this.validateDefaultValue(!!this.defaultValue);
|
|
18
|
+
}
|
|
19
|
+
/** {@inheritDoc CommandLineParameter.kind} */
|
|
20
|
+
get kind() {
|
|
21
|
+
return BaseClasses_1.CommandLineParameterKind.String;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* {@inheritDoc CommandLineParameter._setValue}
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
+
_setValue(data) {
|
|
29
|
+
// abstract
|
|
30
|
+
if (data !== null && data !== undefined) {
|
|
31
|
+
if (typeof data !== 'string') {
|
|
32
|
+
this.reportInvalidData(data);
|
|
33
|
+
}
|
|
34
|
+
this._value = data;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (this.environmentVariable !== undefined) {
|
|
38
|
+
// Try reading the environment variable
|
|
39
|
+
const environmentValue = process.env[this.environmentVariable];
|
|
40
|
+
if (environmentValue !== undefined) {
|
|
41
|
+
// NOTE: If the environment variable is defined as an empty string,
|
|
42
|
+
// here we will accept the empty string as our value. (For number/flag we don't do that.)
|
|
43
|
+
this._value = environmentValue;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (this.defaultValue !== undefined) {
|
|
48
|
+
this._value = this.defaultValue;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this._value = undefined;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* {@inheritDoc CommandLineParameter._getSupplementaryNotes}
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
_getSupplementaryNotes(supplementaryNotes) {
|
|
58
|
+
// virtual
|
|
59
|
+
super._getSupplementaryNotes(supplementaryNotes);
|
|
60
|
+
if (this.defaultValue !== undefined) {
|
|
61
|
+
if (this.defaultValue.length < 160) {
|
|
62
|
+
supplementaryNotes.push(`The default value is ${JSON.stringify(this.defaultValue)}.`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Returns the argument value for a string parameter that was parsed from the command line.
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* The return value will be undefined if the command-line has not been parsed yet,
|
|
71
|
+
* or if the parameter was omitted and has no default value.
|
|
72
|
+
*/
|
|
73
|
+
get value() {
|
|
74
|
+
return this._value;
|
|
75
|
+
}
|
|
76
|
+
/** {@inheritDoc CommandLineParameter.appendToArgList} @override */
|
|
77
|
+
appendToArgList(argList) {
|
|
78
|
+
if (this.value !== undefined) {
|
|
79
|
+
argList.push(this.longName);
|
|
80
|
+
argList.push(this.value);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.CommandLineStringParameter = CommandLineStringParameter;
|
|
85
|
+
//# sourceMappingURL=CommandLineStringParameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandLineStringParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineStringParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAA2F;AAE3F;;;GAGG;AACH,MAAa,0BAA2B,SAAQ,8CAAgC;IAM9E,gBAAgB;IAChB,YAAmB,UAAwC;QACzD,KAAK,CAAC,UAAU,CAAC,CAAC;QAJZ,WAAM,GAAuB,SAAS,CAAC;QAM7C,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QAC5C,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC;IAED,8CAA8C;IAC9C,IAAW,IAAI;QACb,OAAO,sCAAwB,CAAC,MAAM,CAAC;IACzC,CAAC;IAED;;;OAGG;IACH,8DAA8D;IACvD,SAAS,CAAC,IAAS;QACxB,WAAW;QACX,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;YACvC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;gBAC5B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;aAC9B;YACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,OAAO;SACR;QAED,IAAI,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE;YAC1C,uCAAuC;YACvC,MAAM,gBAAgB,GAAuB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YACnF,IAAI,gBAAgB,KAAK,SAAS,EAAE;gBAClC,mEAAmE;gBACnE,0FAA0F;gBAC1F,IAAI,CAAC,MAAM,GAAG,gBAAgB,CAAC;gBAC/B,OAAO;aACR;SACF;QAED,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;YACnC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC;YAChC,OAAO;SACR;QAED,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,sBAAsB,CAAC,kBAA4B;QACxD,UAAU;QACV,KAAK,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;QACjD,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;YACnC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,GAAG,EAAE;gBAClC,kBAAkB,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;aACvF;SACF;IACH,CAAC;IAED;;;;;;OAMG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,mEAAmE;IAC5D,eAAe,CAAC,OAAiB;QACtC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC1B;IACH,CAAC;CACF;AArFD,gEAqFC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { ICommandLineStringDefinition } from './CommandLineDefinition';\r\nimport { CommandLineParameterWithArgument, CommandLineParameterKind } from './BaseClasses';\r\n\r\n/**\r\n * The data type returned by {@link CommandLineParameterProvider.defineStringParameter}.\r\n * @public\r\n */\r\nexport class CommandLineStringParameter extends CommandLineParameterWithArgument {\r\n /** {@inheritDoc ICommandLineStringDefinition.defaultValue} */\r\n public readonly defaultValue: string | undefined;\r\n\r\n private _value: string | undefined = undefined;\r\n\r\n /** @internal */\r\n public constructor(definition: ICommandLineStringDefinition) {\r\n super(definition);\r\n\r\n this.defaultValue = definition.defaultValue;\r\n this.validateDefaultValue(!!this.defaultValue);\r\n }\r\n\r\n /** {@inheritDoc CommandLineParameter.kind} */\r\n public get kind(): CommandLineParameterKind {\r\n return CommandLineParameterKind.String;\r\n }\r\n\r\n /**\r\n * {@inheritDoc CommandLineParameter._setValue}\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n public _setValue(data: any): void {\r\n // abstract\r\n if (data !== null && data !== undefined) {\r\n if (typeof data !== 'string') {\r\n this.reportInvalidData(data);\r\n }\r\n this._value = data;\r\n return;\r\n }\r\n\r\n if (this.environmentVariable !== undefined) {\r\n // Try reading the environment variable\r\n const environmentValue: string | undefined = process.env[this.environmentVariable];\r\n if (environmentValue !== undefined) {\r\n // NOTE: If the environment variable is defined as an empty string,\r\n // here we will accept the empty string as our value. (For number/flag we don't do that.)\r\n this._value = environmentValue;\r\n return;\r\n }\r\n }\r\n\r\n if (this.defaultValue !== undefined) {\r\n this._value = this.defaultValue;\r\n return;\r\n }\r\n\r\n this._value = undefined;\r\n }\r\n\r\n /**\r\n * {@inheritDoc CommandLineParameter._getSupplementaryNotes}\r\n * @internal\r\n */\r\n public _getSupplementaryNotes(supplementaryNotes: string[]): void {\r\n // virtual\r\n super._getSupplementaryNotes(supplementaryNotes);\r\n if (this.defaultValue !== undefined) {\r\n if (this.defaultValue.length < 160) {\r\n supplementaryNotes.push(`The default value is ${JSON.stringify(this.defaultValue)}.`);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Returns the argument value for a string parameter that was parsed from the command line.\r\n *\r\n * @remarks\r\n * The return value will be undefined if the command-line has not been parsed yet,\r\n * or if the parameter was omitted and has no default value.\r\n */\r\n public get value(): string | undefined {\r\n return this._value;\r\n }\r\n\r\n /** {@inheritDoc CommandLineParameter.appendToArgList} @override */\r\n public appendToArgList(argList: string[]): void {\r\n if (this.value !== undefined) {\r\n argList.push(this.longName);\r\n argList.push(this.value);\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Some parameter types can receive their values from an environment variable instead of
|
|
3
|
+
* a command line argument. This class provides some utility methods for parsing environment
|
|
4
|
+
* variable values.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class EnvironmentVariableParser {
|
|
8
|
+
static parseAsList(envVarName: string): string[] | undefined;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=EnvironmentVariableParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentVariableParser.d.ts","sourceRoot":"","sources":["../../src/parameters/EnvironmentVariableParser.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,qBAAa,yBAAyB;WACtB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;CA2CpE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.EnvironmentVariableParser = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Some parameter types can receive their values from an environment variable instead of
|
|
8
|
+
* a command line argument. This class provides some utility methods for parsing environment
|
|
9
|
+
* variable values.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
class EnvironmentVariableParser {
|
|
13
|
+
static parseAsList(envVarName) {
|
|
14
|
+
const environmentValue = process.env[envVarName];
|
|
15
|
+
if (environmentValue !== undefined) {
|
|
16
|
+
// NOTE: If the environment variable is defined as an empty string,
|
|
17
|
+
// here we will accept the empty string as our value. (For number/flag we don't do that.)
|
|
18
|
+
if (environmentValue.trimLeft()[0] === '[') {
|
|
19
|
+
// Specifying multiple items in an environment variable is a somewhat rare case. But environment
|
|
20
|
+
// variables are actually a pretty reliable way for a tool to avoid shell escaping problems
|
|
21
|
+
// when spawning another tool. For this case, we need a reliable way to pass an array of strings
|
|
22
|
+
// that could contain any character. For example, if we simply used ";" as the list delimiter,
|
|
23
|
+
// then what to do if a string contains that character? We'd need to design an escaping mechanism.
|
|
24
|
+
// Since JSON is simple and standard and can escape every possible string, it's a better option
|
|
25
|
+
// than a custom delimiter.
|
|
26
|
+
try {
|
|
27
|
+
const parsedJson = JSON.parse(environmentValue);
|
|
28
|
+
if (!Array.isArray(parsedJson) ||
|
|
29
|
+
!parsedJson.every((x) => typeof x === 'string' || typeof x === 'boolean' || typeof x === 'number')) {
|
|
30
|
+
throw new Error(`The ${environmentValue} environment variable value must be a JSON ` +
|
|
31
|
+
` array containing only strings, numbers, and booleans.`);
|
|
32
|
+
}
|
|
33
|
+
return parsedJson.map((x) => x.toString());
|
|
34
|
+
}
|
|
35
|
+
catch (ex) {
|
|
36
|
+
throw new Error(`The ${environmentValue} environment variable value looks like a JSON array` +
|
|
37
|
+
` but failed to parse: ` +
|
|
38
|
+
ex.message);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
// As a shorthand, a single value may be specified without JSON encoding, as long as it does not
|
|
43
|
+
// start with the "[" character.
|
|
44
|
+
return [environmentValue];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.EnvironmentVariableParser = EnvironmentVariableParser;
|
|
51
|
+
//# sourceMappingURL=EnvironmentVariableParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentVariableParser.js","sourceRoot":"","sources":["../../src/parameters/EnvironmentVariableParser.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D;;;;;GAKG;AACH,MAAa,yBAAyB;IAC7B,MAAM,CAAC,WAAW,CAAC,UAAkB;QAC1C,MAAM,gBAAgB,GAAuB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAErE,IAAI,gBAAgB,KAAK,SAAS,EAAE;YAClC,mEAAmE;YACnE,0FAA0F;YAE1F,IAAI,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;gBAC1C,iGAAiG;gBACjG,2FAA2F;gBAC3F,iGAAiG;gBACjG,+FAA+F;gBAC/F,mGAAmG;gBACnG,+FAA+F;gBAC/F,2BAA2B;gBAC3B,IAAI;oBACF,MAAM,UAAU,GAAY,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;oBACzD,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;wBAC1B,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,EAClG;wBACA,MAAM,IAAI,KAAK,CACb,OAAO,gBAAgB,6CAA6C;4BAClE,wDAAwD,CAC3D,CAAC;qBACH;oBACD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;iBAC5C;gBAAC,OAAO,EAAE,EAAE;oBACX,MAAM,IAAI,KAAK,CACb,OAAO,gBAAgB,qDAAqD;wBAC1E,wBAAwB;wBACvB,EAAY,CAAC,OAAO,CACxB,CAAC;iBACH;aACF;iBAAM;gBACL,gGAAgG;gBAChG,gCAAgC;gBAChC,OAAO,CAAC,gBAAgB,CAAC,CAAC;aAC3B;SACF;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AA5CD,8DA4CC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\n/**\r\n * Some parameter types can receive their values from an environment variable instead of\r\n * a command line argument. This class provides some utility methods for parsing environment\r\n * variable values.\r\n * @internal\r\n */\r\nexport class EnvironmentVariableParser {\r\n public static parseAsList(envVarName: string): string[] | undefined {\r\n const environmentValue: string | undefined = process.env[envVarName];\r\n\r\n if (environmentValue !== undefined) {\r\n // NOTE: If the environment variable is defined as an empty string,\r\n // here we will accept the empty string as our value. (For number/flag we don't do that.)\r\n\r\n if (environmentValue.trimLeft()[0] === '[') {\r\n // Specifying multiple items in an environment variable is a somewhat rare case. But environment\r\n // variables are actually a pretty reliable way for a tool to avoid shell escaping problems\r\n // when spawning another tool. For this case, we need a reliable way to pass an array of strings\r\n // that could contain any character. For example, if we simply used \";\" as the list delimiter,\r\n // then what to do if a string contains that character? We'd need to design an escaping mechanism.\r\n // Since JSON is simple and standard and can escape every possible string, it's a better option\r\n // than a custom delimiter.\r\n try {\r\n const parsedJson: unknown = JSON.parse(environmentValue);\r\n if (\r\n !Array.isArray(parsedJson) ||\r\n !parsedJson.every((x) => typeof x === 'string' || typeof x === 'boolean' || typeof x === 'number')\r\n ) {\r\n throw new Error(\r\n `The ${environmentValue} environment variable value must be a JSON ` +\r\n ` array containing only strings, numbers, and booleans.`\r\n );\r\n }\r\n return parsedJson.map((x) => x.toString());\r\n } catch (ex) {\r\n throw new Error(\r\n `The ${environmentValue} environment variable value looks like a JSON array` +\r\n ` but failed to parse: ` +\r\n (ex as Error).message\r\n );\r\n }\r\n } else {\r\n // As a shorthand, a single value may be specified without JSON encoding, as long as it does not\r\n // start with the \"[\" character.\r\n return [environmentValue];\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as argparse from 'argparse';
|
|
2
|
+
import { CommandLineParameterProvider, ICommandLineParserData } from './CommandLineParameterProvider';
|
|
3
|
+
/**
|
|
4
|
+
* Options for the CommandLineAction constructor.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface ICommandLineActionOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The name of the action. For example, if the tool is called "example",
|
|
10
|
+
* then the "build" action might be invoked as: "example build -q --some-other-option"
|
|
11
|
+
*/
|
|
12
|
+
actionName: string;
|
|
13
|
+
/**
|
|
14
|
+
* A quick summary that is shown on the main help page, which is displayed
|
|
15
|
+
* by the command "example --help"
|
|
16
|
+
*/
|
|
17
|
+
summary: string;
|
|
18
|
+
/**
|
|
19
|
+
* A detailed description that is shown on the action help page, which is displayed
|
|
20
|
+
* by the command "example build --help", e.g. for actionName="build".
|
|
21
|
+
*/
|
|
22
|
+
documentation: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Represents a sub-command that is part of the CommandLineParser command line.
|
|
26
|
+
* Applications should create subclasses of CommandLineAction corresponding to
|
|
27
|
+
* each action that they want to expose.
|
|
28
|
+
*
|
|
29
|
+
* The action name should be comprised of lower case words separated by hyphens
|
|
30
|
+
* or colons. The name should include an English verb (e.g. "deploy"). Use a
|
|
31
|
+
* hyphen to separate words (e.g. "upload-docs"). A group of related commands
|
|
32
|
+
* can be prefixed with a colon (e.g. "docs:generate", "docs:deploy",
|
|
33
|
+
* "docs:serve", etc).
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export declare abstract class CommandLineAction extends CommandLineParameterProvider {
|
|
38
|
+
private static _actionNameRegExp;
|
|
39
|
+
/** {@inheritDoc ICommandLineActionOptions.actionName} */
|
|
40
|
+
readonly actionName: string;
|
|
41
|
+
/** {@inheritDoc ICommandLineActionOptions.summary} */
|
|
42
|
+
readonly summary: string;
|
|
43
|
+
/** {@inheritDoc ICommandLineActionOptions.documentation} */
|
|
44
|
+
readonly documentation: string;
|
|
45
|
+
private _argumentParser;
|
|
46
|
+
constructor(options: ICommandLineActionOptions);
|
|
47
|
+
/**
|
|
48
|
+
* This is called internally by CommandLineParser.addAction()
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
_buildParser(actionsSubParser: argparse.SubParser): void;
|
|
52
|
+
/**
|
|
53
|
+
* This is called internally by CommandLineParser.execute()
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
_processParsedData(data: ICommandLineParserData): void;
|
|
57
|
+
/**
|
|
58
|
+
* Invoked by CommandLineParser.onExecute().
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
_execute(): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* {@inheritDoc CommandLineParameterProvider._getArgumentParser}
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
protected _getArgumentParser(): argparse.ArgumentParser;
|
|
67
|
+
/**
|
|
68
|
+
* {@inheritDoc CommandLineParameterProvider.onDefineParameters}
|
|
69
|
+
*/
|
|
70
|
+
protected abstract onDefineParameters(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Your subclass should implement this hook to perform the operation.
|
|
73
|
+
*/
|
|
74
|
+
protected abstract onExecute(): Promise<void>;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=CommandLineAction.d.ts.map
|