@rushstack/ts-command-line 5.2.0 → 5.3.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 +40 -0
- package/CHANGELOG.md +15 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-esm/CommandLineHelper.js +19 -0
- package/lib-esm/CommandLineHelper.js.map +1 -0
- package/lib-esm/Constants.js +16 -0
- package/lib-esm/Constants.js.map +1 -0
- package/lib-esm/TypeUuidLite.js +28 -0
- package/lib-esm/TypeUuidLite.js.map +1 -0
- package/lib-esm/escapeSprintf.js +9 -0
- package/lib-esm/escapeSprintf.js.map +1 -0
- package/lib-esm/index.js +26 -0
- package/lib-esm/index.js.map +1 -0
- package/lib-esm/parameters/BaseClasses.js +163 -0
- package/lib-esm/parameters/BaseClasses.js.map +1 -0
- package/lib-esm/parameters/CommandLineChoiceListParameter.js +79 -0
- package/lib-esm/parameters/CommandLineChoiceListParameter.js.map +1 -0
- package/lib-esm/parameters/CommandLineChoiceParameter.js +90 -0
- package/lib-esm/parameters/CommandLineChoiceParameter.js.map +1 -0
- package/lib-esm/parameters/CommandLineDefinition.js +4 -0
- package/lib-esm/parameters/CommandLineDefinition.js.map +1 -0
- package/lib-esm/parameters/CommandLineFlagParameter.js +65 -0
- package/lib-esm/parameters/CommandLineFlagParameter.js.map +1 -0
- package/lib-esm/parameters/CommandLineIntegerListParameter.js +75 -0
- package/lib-esm/parameters/CommandLineIntegerListParameter.js.map +1 -0
- package/lib-esm/parameters/CommandLineIntegerParameter.js +79 -0
- package/lib-esm/parameters/CommandLineIntegerParameter.js.map +1 -0
- package/lib-esm/parameters/CommandLineRemainder.js +43 -0
- package/lib-esm/parameters/CommandLineRemainder.js.map +1 -0
- package/lib-esm/parameters/CommandLineStringListParameter.js +66 -0
- package/lib-esm/parameters/CommandLineStringListParameter.js.map +1 -0
- package/lib-esm/parameters/CommandLineStringParameter.js +78 -0
- package/lib-esm/parameters/CommandLineStringParameter.js.map +1 -0
- package/lib-esm/parameters/EnvironmentVariableParser.js +47 -0
- package/lib-esm/parameters/EnvironmentVariableParser.js.map +1 -0
- package/lib-esm/providers/AliasCommandLineAction.js +131 -0
- package/lib-esm/providers/AliasCommandLineAction.js.map +1 -0
- package/lib-esm/providers/CommandLineAction.js +76 -0
- package/lib-esm/providers/CommandLineAction.js.map +1 -0
- package/lib-esm/providers/CommandLineParameterProvider.js +671 -0
- package/lib-esm/providers/CommandLineParameterProvider.js.map +1 -0
- package/lib-esm/providers/CommandLineParser.js +262 -0
- package/lib-esm/providers/CommandLineParser.js.map +1 -0
- package/lib-esm/providers/CommandLineParserExitError.js +27 -0
- package/lib-esm/providers/CommandLineParserExitError.js.map +1 -0
- package/lib-esm/providers/DynamicCommandLineAction.js +13 -0
- package/lib-esm/providers/DynamicCommandLineAction.js.map +1 -0
- package/lib-esm/providers/DynamicCommandLineParser.js +9 -0
- package/lib-esm/providers/DynamicCommandLineParser.js.map +1 -0
- package/lib-esm/providers/ScopedCommandLineAction.js +197 -0
- package/lib-esm/providers/ScopedCommandLineAction.js.map +1 -0
- package/lib-esm/providers/TabCompletionAction.js +166 -0
- package/lib-esm/providers/TabCompletionAction.js.map +1 -0
- package/package.json +31 -7
- /package/{lib → lib-commonjs}/CommandLineHelper.js +0 -0
- /package/{lib → lib-commonjs}/CommandLineHelper.js.map +0 -0
- /package/{lib → lib-commonjs}/Constants.js +0 -0
- /package/{lib → lib-commonjs}/Constants.js.map +0 -0
- /package/{lib → lib-commonjs}/TypeUuidLite.js +0 -0
- /package/{lib → lib-commonjs}/TypeUuidLite.js.map +0 -0
- /package/{lib → lib-commonjs}/escapeSprintf.js +0 -0
- /package/{lib → lib-commonjs}/escapeSprintf.js.map +0 -0
- /package/{lib → lib-commonjs}/index.js +0 -0
- /package/{lib → lib-commonjs}/index.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/BaseClasses.js +0 -0
- /package/{lib → lib-commonjs}/parameters/BaseClasses.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineChoiceListParameter.js +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineChoiceListParameter.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineChoiceParameter.js +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineChoiceParameter.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineDefinition.js +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineDefinition.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineFlagParameter.js +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineFlagParameter.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineIntegerListParameter.js +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineIntegerListParameter.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineIntegerParameter.js +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineIntegerParameter.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineRemainder.js +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineRemainder.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineStringListParameter.js +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineStringListParameter.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineStringParameter.js +0 -0
- /package/{lib → lib-commonjs}/parameters/CommandLineStringParameter.js.map +0 -0
- /package/{lib → lib-commonjs}/parameters/EnvironmentVariableParser.js +0 -0
- /package/{lib → lib-commonjs}/parameters/EnvironmentVariableParser.js.map +0 -0
- /package/{lib → lib-commonjs}/providers/AliasCommandLineAction.js +0 -0
- /package/{lib → lib-commonjs}/providers/AliasCommandLineAction.js.map +0 -0
- /package/{lib → lib-commonjs}/providers/CommandLineAction.js +0 -0
- /package/{lib → lib-commonjs}/providers/CommandLineAction.js.map +0 -0
- /package/{lib → lib-commonjs}/providers/CommandLineParameterProvider.js +0 -0
- /package/{lib → lib-commonjs}/providers/CommandLineParameterProvider.js.map +0 -0
- /package/{lib → lib-commonjs}/providers/CommandLineParser.js +0 -0
- /package/{lib → lib-commonjs}/providers/CommandLineParser.js.map +0 -0
- /package/{lib → lib-commonjs}/providers/CommandLineParserExitError.js +0 -0
- /package/{lib → lib-commonjs}/providers/CommandLineParserExitError.js.map +0 -0
- /package/{lib → lib-commonjs}/providers/DynamicCommandLineAction.js +0 -0
- /package/{lib → lib-commonjs}/providers/DynamicCommandLineAction.js.map +0 -0
- /package/{lib → lib-commonjs}/providers/DynamicCommandLineParser.js +0 -0
- /package/{lib → lib-commonjs}/providers/DynamicCommandLineParser.js.map +0 -0
- /package/{lib → lib-commonjs}/providers/ScopedCommandLineAction.js +0 -0
- /package/{lib → lib-commonjs}/providers/ScopedCommandLineAction.js.map +0 -0
- /package/{lib → lib-commonjs}/providers/TabCompletionAction.js +0 -0
- /package/{lib → lib-commonjs}/providers/TabCompletionAction.js.map +0 -0
- /package/{lib → lib-dts}/CommandLineHelper.d.ts +0 -0
- /package/{lib → lib-dts}/CommandLineHelper.d.ts.map +0 -0
- /package/{lib → lib-dts}/Constants.d.ts +0 -0
- /package/{lib → lib-dts}/Constants.d.ts.map +0 -0
- /package/{lib → lib-dts}/TypeUuidLite.d.ts +0 -0
- /package/{lib → lib-dts}/TypeUuidLite.d.ts.map +0 -0
- /package/{lib → lib-dts}/escapeSprintf.d.ts +0 -0
- /package/{lib → lib-dts}/escapeSprintf.d.ts.map +0 -0
- /package/{lib → lib-dts}/index.d.ts +0 -0
- /package/{lib → lib-dts}/index.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/BaseClasses.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/BaseClasses.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineChoiceListParameter.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineChoiceListParameter.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineChoiceParameter.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineChoiceParameter.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineDefinition.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineDefinition.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineFlagParameter.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineFlagParameter.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineIntegerListParameter.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineIntegerListParameter.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineIntegerParameter.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineIntegerParameter.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineRemainder.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineRemainder.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineStringListParameter.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineStringListParameter.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineStringParameter.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/CommandLineStringParameter.d.ts.map +0 -0
- /package/{lib → lib-dts}/parameters/EnvironmentVariableParser.d.ts +0 -0
- /package/{lib → lib-dts}/parameters/EnvironmentVariableParser.d.ts.map +0 -0
- /package/{lib → lib-dts}/providers/AliasCommandLineAction.d.ts +0 -0
- /package/{lib → lib-dts}/providers/AliasCommandLineAction.d.ts.map +0 -0
- /package/{lib → lib-dts}/providers/CommandLineAction.d.ts +0 -0
- /package/{lib → lib-dts}/providers/CommandLineAction.d.ts.map +0 -0
- /package/{lib → lib-dts}/providers/CommandLineParameterProvider.d.ts +0 -0
- /package/{lib → lib-dts}/providers/CommandLineParameterProvider.d.ts.map +0 -0
- /package/{lib → lib-dts}/providers/CommandLineParser.d.ts +0 -0
- /package/{lib → lib-dts}/providers/CommandLineParser.d.ts.map +0 -0
- /package/{lib → lib-dts}/providers/CommandLineParserExitError.d.ts +0 -0
- /package/{lib → lib-dts}/providers/CommandLineParserExitError.d.ts.map +0 -0
- /package/{lib → lib-dts}/providers/DynamicCommandLineAction.d.ts +0 -0
- /package/{lib → lib-dts}/providers/DynamicCommandLineAction.d.ts.map +0 -0
- /package/{lib → lib-dts}/providers/DynamicCommandLineParser.d.ts +0 -0
- /package/{lib → lib-dts}/providers/DynamicCommandLineParser.d.ts.map +0 -0
- /package/{lib → lib-dts}/providers/ScopedCommandLineAction.d.ts +0 -0
- /package/{lib → lib-dts}/providers/ScopedCommandLineAction.d.ts.map +0 -0
- /package/{lib → lib-dts}/providers/TabCompletionAction.d.ts +0 -0
- /package/{lib → lib-dts}/providers/TabCompletionAction.d.ts.map +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
2
|
+
// See LICENSE in the project root for license information.
|
|
3
|
+
import * as argparse from 'argparse';
|
|
4
|
+
import { CommandLineAction } from './CommandLineAction';
|
|
5
|
+
import { CommandLineParameterKind } from '../parameters/BaseClasses';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a sub-command that is part of the CommandLineParser command line.
|
|
8
|
+
* The sub-command is an alias for another existing action.
|
|
9
|
+
*
|
|
10
|
+
* The alias name should be comprised of lower case words separated by hyphens
|
|
11
|
+
* or colons. The name should include an English verb (e.g. "deploy"). Use a
|
|
12
|
+
* hyphen to separate words (e.g. "upload-docs").
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export class AliasCommandLineAction extends CommandLineAction {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
const toolFilename = options.toolFilename;
|
|
19
|
+
const targetActionName = options.targetAction.actionName;
|
|
20
|
+
const defaultParametersString = (options.defaultParameters || []).join(' ');
|
|
21
|
+
const summary = `An alias for "${toolFilename} ${targetActionName}${defaultParametersString ? ` ${defaultParametersString}` : ''}".`;
|
|
22
|
+
super({
|
|
23
|
+
actionName: options.aliasName,
|
|
24
|
+
summary,
|
|
25
|
+
documentation: `${summary} For more information on the aliased command, use ` +
|
|
26
|
+
`"${toolFilename} ${targetActionName} --help".`
|
|
27
|
+
});
|
|
28
|
+
this._parameterKeyMap = new Map();
|
|
29
|
+
this.targetAction = options.targetAction;
|
|
30
|
+
this.defaultParameters = options.defaultParameters || [];
|
|
31
|
+
}
|
|
32
|
+
/** @internal */
|
|
33
|
+
_registerDefinedParameters(state) {
|
|
34
|
+
/* override */
|
|
35
|
+
// All parameters are going to be defined by the target action. Re-use the target action parameters
|
|
36
|
+
// for this action.
|
|
37
|
+
for (const parameter of this.targetAction.parameters) {
|
|
38
|
+
const { kind, longName, shortName } = parameter;
|
|
39
|
+
let aliasParameter;
|
|
40
|
+
const nameOptions = {
|
|
41
|
+
parameterLongName: longName,
|
|
42
|
+
parameterShortName: shortName
|
|
43
|
+
};
|
|
44
|
+
switch (kind) {
|
|
45
|
+
case CommandLineParameterKind.Choice:
|
|
46
|
+
aliasParameter = this.defineChoiceParameter({
|
|
47
|
+
...nameOptions,
|
|
48
|
+
...parameter,
|
|
49
|
+
alternatives: [...parameter.alternatives]
|
|
50
|
+
});
|
|
51
|
+
break;
|
|
52
|
+
case CommandLineParameterKind.ChoiceList:
|
|
53
|
+
aliasParameter = this.defineChoiceListParameter({
|
|
54
|
+
...nameOptions,
|
|
55
|
+
...parameter,
|
|
56
|
+
alternatives: [...parameter.alternatives]
|
|
57
|
+
});
|
|
58
|
+
break;
|
|
59
|
+
case CommandLineParameterKind.Flag:
|
|
60
|
+
aliasParameter = this.defineFlagParameter({ ...nameOptions, ...parameter });
|
|
61
|
+
break;
|
|
62
|
+
case CommandLineParameterKind.Integer:
|
|
63
|
+
aliasParameter = this.defineIntegerParameter({ ...nameOptions, ...parameter });
|
|
64
|
+
break;
|
|
65
|
+
case CommandLineParameterKind.IntegerList:
|
|
66
|
+
aliasParameter = this.defineIntegerListParameter({ ...nameOptions, ...parameter });
|
|
67
|
+
break;
|
|
68
|
+
case CommandLineParameterKind.String:
|
|
69
|
+
aliasParameter = this.defineStringParameter({ ...nameOptions, ...parameter });
|
|
70
|
+
break;
|
|
71
|
+
case CommandLineParameterKind.StringList:
|
|
72
|
+
aliasParameter = this.defineStringListParameter({ ...nameOptions, ...parameter });
|
|
73
|
+
break;
|
|
74
|
+
default:
|
|
75
|
+
throw new Error(`Unsupported parameter kind: ${kind}`);
|
|
76
|
+
}
|
|
77
|
+
// We know the parserKey is defined because the underlying _defineParameter method sets it,
|
|
78
|
+
// and all parameters that we have access to have already been defined.
|
|
79
|
+
this._parameterKeyMap.set(aliasParameter._parserKey, parameter._parserKey);
|
|
80
|
+
}
|
|
81
|
+
// We also need to register the remainder parameter if the target action has one. The parser
|
|
82
|
+
// key for this parameter is constant.
|
|
83
|
+
if (this.targetAction.remainder) {
|
|
84
|
+
this.defineCommandLineRemainder(this.targetAction.remainder);
|
|
85
|
+
this._parameterKeyMap.set(argparse.Const.REMAINDER, argparse.Const.REMAINDER);
|
|
86
|
+
}
|
|
87
|
+
// Finally, register the parameters with the parser. We need to make sure that the target action
|
|
88
|
+
// is registered, since we need to re-use its parameters, and ambiguous parameters are discovered
|
|
89
|
+
// during registration. This will no-op if the target action is already registered.
|
|
90
|
+
this.targetAction._registerDefinedParameters(state);
|
|
91
|
+
super._registerDefinedParameters(state);
|
|
92
|
+
// We need to re-map the ambiguous parameters after they are defined by calling
|
|
93
|
+
// super._registerDefinedParameters()
|
|
94
|
+
for (const [ambiguousParameterName, parserKey] of this._ambiguousParameterParserKeysByName) {
|
|
95
|
+
const targetParserKey = this.targetAction._ambiguousParameterParserKeysByName.get(ambiguousParameterName);
|
|
96
|
+
// If we have a mapping for the specified key, then use it. Otherwise, use the key as-is.
|
|
97
|
+
if (targetParserKey) {
|
|
98
|
+
this._parameterKeyMap.set(parserKey, targetParserKey);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* {@inheritdoc CommandLineParameterProvider._processParsedData}
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
_processParsedData(parserOptions, data) {
|
|
107
|
+
// Re-map the parsed data to the target action's parameters and execute the target action processor.
|
|
108
|
+
const targetData = {
|
|
109
|
+
action: this.targetAction.actionName,
|
|
110
|
+
aliasAction: data.action,
|
|
111
|
+
aliasDocumentation: this.documentation
|
|
112
|
+
};
|
|
113
|
+
for (const [key, value] of Object.entries(data)) {
|
|
114
|
+
// If we have a mapping for the specified key, then use it. Otherwise, use the key as-is.
|
|
115
|
+
// Skip over the action key though, since we've already re-mapped it to "aliasAction"
|
|
116
|
+
if (key === 'action') {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
const targetKey = this._parameterKeyMap.get(key);
|
|
120
|
+
targetData[targetKey !== null && targetKey !== void 0 ? targetKey : key] = value;
|
|
121
|
+
}
|
|
122
|
+
this.targetAction._processParsedData(parserOptions, targetData);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Executes the target action.
|
|
126
|
+
*/
|
|
127
|
+
async onExecuteAsync() {
|
|
128
|
+
await this.targetAction._executeAsync();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=AliasCommandLineAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AliasCommandLineAction.js","sourceRoot":"","sources":["../../src/providers/AliasCommandLineAction.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,wBAAwB,EAGzB,MAAM,2BAA2B,CAAC;AA+BnC;;;;;;;;;GASG;AACH,MAAM,OAAO,sBAAuB,SAAQ,iBAAiB;IAa3D,YAAmB,OAAuC;QACxD,MAAM,YAAY,GAAW,OAAO,C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AAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACrE,UAAU,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,GAAG,CAAC,GAAG,KAAK,CAAC;QACvC,CAAC;QACD,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACgB,KAAK,CAAC,cAAc;QACrC,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;IAC1C,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as argparse from 'argparse';\n\nimport { CommandLineAction } from './CommandLineAction';\nimport {\n CommandLineParameterKind,\n type CommandLineParameterBase,\n type CommandLineParameter\n} from '../parameters/BaseClasses';\nimport type { ICommandLineParserData, IRegisterDefinedParametersState } from './CommandLineParameterProvider';\nimport type { ICommandLineParserOptions } from './CommandLineParser';\n\n/**\n * Options for the AliasCommandLineAction constructor.\n * @public\n */\nexport interface IAliasCommandLineActionOptions {\n /**\n * The name of your tool when invoked from the command line. Used for generating help text.\n */\n toolFilename: string;\n\n /**\n * The name of the alias. For example, if the tool is called \"example\",\n * then the \"build\" alias might be invoked as: \"example build -q --some-other-option\"\n */\n aliasName: string;\n\n /**\n * A list of default parameters to pass to the target action.\n */\n defaultParameters?: string[];\n\n /**\n * The action that this alias invokes.\n */\n targetAction: CommandLineAction;\n}\n\n/**\n * Represents a sub-command that is part of the CommandLineParser command line.\n * The sub-command is an alias for another existing action.\n *\n * The alias name should be comprised of lower case words separated by hyphens\n * or colons. The name should include an English verb (e.g. \"deploy\"). Use a\n * hyphen to separate words (e.g. \"upload-docs\").\n *\n * @public\n */\nexport class AliasCommandLineAction extends CommandLineAction {\n /**\n * The action that this alias invokes.\n */\n public readonly targetAction: CommandLineAction;\n\n /**\n * A list of default arguments to pass to the target action.\n */\n public readonly defaultParameters: ReadonlyArray<string>;\n\n private _parameterKeyMap: Map<string, string> = new Map();\n\n public constructor(options: IAliasCommandLineActionOptions) {\n const toolFilename: string = options.toolFilename;\n const targetActionName: string = options.targetAction.actionName;\n const defaultParametersString: string = (options.defaultParameters || []).join(' ');\n const summary: string = `An alias for \"${toolFilename} ${targetActionName}${\n defaultParametersString ? ` ${defaultParametersString}` : ''\n }\".`;\n\n super({\n actionName: options.aliasName,\n summary,\n documentation:\n `${summary} For more information on the aliased command, use ` +\n `\"${toolFilename} ${targetActionName} --help\".`\n });\n\n this.targetAction = options.targetAction;\n this.defaultParameters = options.defaultParameters || [];\n }\n\n /** @internal */\n public _registerDefinedParameters(state: IRegisterDefinedParametersState): void {\n /* override */\n // All parameters are going to be defined by the target action. Re-use the target action parameters\n // for this action.\n for (const parameter of this.targetAction.parameters as CommandLineParameter[]) {\n const { kind, longName, shortName } = parameter;\n let aliasParameter: CommandLineParameterBase;\n const nameOptions: { parameterLongName: string; parameterShortName: string | undefined } = {\n parameterLongName: longName,\n parameterShortName: shortName\n };\n switch (kind) {\n case CommandLineParameterKind.Choice:\n aliasParameter = this.defineChoiceParameter({\n ...nameOptions,\n ...parameter,\n alternatives: [...parameter.alternatives]\n });\n break;\n case CommandLineParameterKind.ChoiceList:\n aliasParameter = this.defineChoiceListParameter({\n ...nameOptions,\n ...parameter,\n alternatives: [...parameter.alternatives]\n });\n break;\n case CommandLineParameterKind.Flag:\n aliasParameter = this.defineFlagParameter({ ...nameOptions, ...parameter });\n break;\n case CommandLineParameterKind.Integer:\n aliasParameter = this.defineIntegerParameter({ ...nameOptions, ...parameter });\n break;\n case CommandLineParameterKind.IntegerList:\n aliasParameter = this.defineIntegerListParameter({ ...nameOptions, ...parameter });\n break;\n case CommandLineParameterKind.String:\n aliasParameter = this.defineStringParameter({ ...nameOptions, ...parameter });\n break;\n case CommandLineParameterKind.StringList:\n aliasParameter = this.defineStringListParameter({ ...nameOptions, ...parameter });\n break;\n default:\n throw new Error(`Unsupported parameter kind: ${kind}`);\n }\n\n // We know the parserKey is defined because the underlying _defineParameter method sets it,\n // and all parameters that we have access to have already been defined.\n this._parameterKeyMap.set(aliasParameter._parserKey!, parameter._parserKey!);\n }\n\n // We also need to register the remainder parameter if the target action has one. The parser\n // key for this parameter is constant.\n if (this.targetAction.remainder) {\n this.defineCommandLineRemainder(this.targetAction.remainder);\n this._parameterKeyMap.set(argparse.Const.REMAINDER, argparse.Const.REMAINDER);\n }\n\n // Finally, register the parameters with the parser. We need to make sure that the target action\n // is registered, since we need to re-use its parameters, and ambiguous parameters are discovered\n // during registration. This will no-op if the target action is already registered.\n this.targetAction._registerDefinedParameters(state);\n super._registerDefinedParameters(state);\n\n // We need to re-map the ambiguous parameters after they are defined by calling\n // super._registerDefinedParameters()\n for (const [ambiguousParameterName, parserKey] of this._ambiguousParameterParserKeysByName) {\n const targetParserKey: string | undefined =\n this.targetAction._ambiguousParameterParserKeysByName.get(ambiguousParameterName);\n\n // If we have a mapping for the specified key, then use it. Otherwise, use the key as-is.\n if (targetParserKey) {\n this._parameterKeyMap.set(parserKey, targetParserKey);\n }\n }\n }\n\n /**\n * {@inheritdoc CommandLineParameterProvider._processParsedData}\n * @internal\n */\n public _processParsedData(parserOptions: ICommandLineParserOptions, data: ICommandLineParserData): void {\n // Re-map the parsed data to the target action's parameters and execute the target action processor.\n const targetData: ICommandLineParserData = {\n action: this.targetAction.actionName,\n aliasAction: data.action,\n aliasDocumentation: this.documentation\n };\n for (const [key, value] of Object.entries(data)) {\n // If we have a mapping for the specified key, then use it. Otherwise, use the key as-is.\n // Skip over the action key though, since we've already re-mapped it to \"aliasAction\"\n if (key === 'action') {\n continue;\n }\n const targetKey: string | undefined = this._parameterKeyMap.get(key);\n targetData[targetKey ?? key] = value;\n }\n this.targetAction._processParsedData(parserOptions, targetData);\n }\n\n /**\n * Executes the target action.\n */\n protected override async onExecuteAsync(): Promise<void> {\n await this.targetAction._executeAsync();\n }\n}\n"]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
2
|
+
// See LICENSE in the project root for license information.
|
|
3
|
+
import { CommandLineParameterProvider } from './CommandLineParameterProvider';
|
|
4
|
+
import { CommandLineParserExitError } from './CommandLineParserExitError';
|
|
5
|
+
import { escapeSprintf } from '../escapeSprintf';
|
|
6
|
+
/**
|
|
7
|
+
* Example: "do-something"
|
|
8
|
+
*/
|
|
9
|
+
const ACTION_NAME_REGEXP = /^[a-z][a-z0-9]*([-:][a-z0-9]+)*$/;
|
|
10
|
+
/**
|
|
11
|
+
* Represents a sub-command that is part of the CommandLineParser command line.
|
|
12
|
+
* Applications should create subclasses of CommandLineAction corresponding to
|
|
13
|
+
* each action that they want to expose.
|
|
14
|
+
*
|
|
15
|
+
* The action name should be comprised of lower case words separated by hyphens
|
|
16
|
+
* or colons. The name should include an English verb (e.g. "deploy"). Use a
|
|
17
|
+
* hyphen to separate words (e.g. "upload-docs"). A group of related commands
|
|
18
|
+
* can be prefixed with a colon (e.g. "docs:generate", "docs:deploy",
|
|
19
|
+
* "docs:serve", etc).
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export class CommandLineAction extends CommandLineParameterProvider {
|
|
24
|
+
constructor(options) {
|
|
25
|
+
super();
|
|
26
|
+
if (!ACTION_NAME_REGEXP.test(options.actionName)) {
|
|
27
|
+
throw new Error(`Invalid action name "${options.actionName}". ` +
|
|
28
|
+
`The name must be comprised of lower-case words optionally separated by hyphens or colons.`);
|
|
29
|
+
}
|
|
30
|
+
this.actionName = options.actionName;
|
|
31
|
+
this.summary = options.summary;
|
|
32
|
+
this.documentation = options.documentation;
|
|
33
|
+
this._argumentParser = undefined;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* This is called internally by CommandLineParser.addAction()
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
_buildParser(actionsSubParser) {
|
|
40
|
+
this._argumentParser = actionsSubParser.addParser(this.actionName, {
|
|
41
|
+
help: escapeSprintf(this.summary),
|
|
42
|
+
description: escapeSprintf(this.documentation)
|
|
43
|
+
});
|
|
44
|
+
// Monkey-patch the error handling for the action parser
|
|
45
|
+
this._argumentParser.exit = (status, message) => {
|
|
46
|
+
throw new CommandLineParserExitError(status, message);
|
|
47
|
+
};
|
|
48
|
+
const originalArgumentParserErrorFn = this._argumentParser.error.bind(this._argumentParser);
|
|
49
|
+
this._argumentParser.error = (err) => {
|
|
50
|
+
// Ensure the ParserExitError bubbles up to the top without any special processing
|
|
51
|
+
if (err instanceof CommandLineParserExitError) {
|
|
52
|
+
throw err;
|
|
53
|
+
}
|
|
54
|
+
originalArgumentParserErrorFn(err);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Invoked by CommandLineParser.onExecute().
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
async _executeAsync() {
|
|
62
|
+
await this.onExecuteAsync();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* {@inheritDoc CommandLineParameterProvider._getArgumentParser}
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
_getArgumentParser() {
|
|
69
|
+
if (!this._argumentParser) {
|
|
70
|
+
// We will improve this in the future
|
|
71
|
+
throw new Error('The CommandLineAction must be added to a CommandLineParser before it can be used');
|
|
72
|
+
}
|
|
73
|
+
return this._argumentParser;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=CommandLineAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandLineAction.js","sourceRoot":"","sources":["../../src/providers/CommandLineAction.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAI3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO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G,YAAY,0BAA0B,EAAE,CAAC;gBAC9C,MAAM,GAAG,CAAC;YACZ,CAAC;YACD,6BAA6B,CAAC,GAAG,CAAC,CAAC;QACrC,CAAC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,aAAa;QACxB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACa,kBAAkB;QAChC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YAC1B,qCAAqC;YACrC,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;QACtG,CAAC;QAED,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type * as argparse from 'argparse';\n\nimport { CommandLineParameterProvider } from './CommandLineParameterProvider';\nimport { CommandLineParserExitError } from './CommandLineParserExitError';\nimport { escapeSprintf } from '../escapeSprintf';\n\n/**\n * Options for the CommandLineAction constructor.\n * @public\n */\nexport interface ICommandLineActionOptions {\n /**\n * The name of the action. For example, if the tool is called \"example\",\n * then the \"build\" action might be invoked as: \"example build -q --some-other-option\"\n */\n actionName: string;\n\n /**\n * A quick summary that is shown on the main help page, which is displayed\n * by the command \"example --help\"\n */\n summary: string;\n\n /**\n * A detailed description that is shown on the action help page, which is displayed\n * by the command \"example build --help\", e.g. for actionName=\"build\".\n */\n documentation: string;\n}\n\n/**\n * Example: \"do-something\"\n */\nconst ACTION_NAME_REGEXP: RegExp = /^[a-z][a-z0-9]*([-:][a-z0-9]+)*$/;\n\n/**\n * Represents a sub-command that is part of the CommandLineParser command line.\n * Applications should create subclasses of CommandLineAction corresponding to\n * each action that they want to expose.\n *\n * The action name should be comprised of lower case words separated by hyphens\n * or colons. The name should include an English verb (e.g. \"deploy\"). Use a\n * hyphen to separate words (e.g. \"upload-docs\"). A group of related commands\n * can be prefixed with a colon (e.g. \"docs:generate\", \"docs:deploy\",\n * \"docs:serve\", etc).\n *\n * @public\n */\nexport abstract class CommandLineAction extends CommandLineParameterProvider {\n /** {@inheritDoc ICommandLineActionOptions.actionName} */\n public readonly actionName: string;\n\n /** {@inheritDoc ICommandLineActionOptions.summary} */\n public readonly summary: string;\n\n /** {@inheritDoc ICommandLineActionOptions.documentation} */\n public readonly documentation: string;\n\n private _argumentParser: argparse.ArgumentParser | undefined;\n\n public constructor(options: ICommandLineActionOptions) {\n super();\n\n if (!ACTION_NAME_REGEXP.test(options.actionName)) {\n throw new Error(\n `Invalid action name \"${options.actionName}\". ` +\n `The name must be comprised of lower-case words optionally separated by hyphens or colons.`\n );\n }\n\n this.actionName = options.actionName;\n this.summary = options.summary;\n this.documentation = options.documentation;\n\n this._argumentParser = undefined;\n }\n\n /**\n * This is called internally by CommandLineParser.addAction()\n * @internal\n */\n public _buildParser(actionsSubParser: argparse.SubParser): void {\n this._argumentParser = actionsSubParser.addParser(this.actionName, {\n help: escapeSprintf(this.summary),\n description: escapeSprintf(this.documentation)\n });\n\n // Monkey-patch the error handling for the action parser\n this._argumentParser.exit = (status: number, message: string) => {\n throw new CommandLineParserExitError(status, message);\n };\n const originalArgumentParserErrorFn: (err: Error | string) => void = this._argumentParser.error.bind(\n this._argumentParser\n );\n this._argumentParser.error = (err: Error | string) => {\n // Ensure the ParserExitError bubbles up to the top without any special processing\n if (err instanceof CommandLineParserExitError) {\n throw err;\n }\n originalArgumentParserErrorFn(err);\n };\n }\n\n /**\n * Invoked by CommandLineParser.onExecute().\n * @internal\n */\n public async _executeAsync(): Promise<void> {\n await this.onExecuteAsync();\n }\n\n /**\n * {@inheritDoc CommandLineParameterProvider._getArgumentParser}\n * @internal\n */\n public override _getArgumentParser(): argparse.ArgumentParser {\n if (!this._argumentParser) {\n // We will improve this in the future\n throw new Error('The CommandLineAction must be added to a CommandLineParser before it can be used');\n }\n\n return this._argumentParser;\n }\n\n /**\n * Your subclass should implement this hook to perform the operation.\n */\n protected abstract onExecuteAsync(): Promise<void>;\n}\n"]}
|