@rushstack/ts-command-line 4.23.7 → 5.0.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.
Files changed (79) hide show
  1. package/CHANGELOG.json +30 -0
  2. package/CHANGELOG.md +14 -1
  3. package/README.md +3 -3
  4. package/dist/ts-command-line.d.ts +34 -55
  5. package/dist/tsdoc-metadata.json +1 -1
  6. package/lib/index.d.ts +1 -1
  7. package/lib/index.d.ts.map +1 -1
  8. package/lib/index.js +2 -3
  9. package/lib/index.js.map +1 -1
  10. package/lib/parameters/BaseClasses.d.ts +5 -2
  11. package/lib/parameters/BaseClasses.d.ts.map +1 -1
  12. package/lib/parameters/BaseClasses.js +1 -1
  13. package/lib/parameters/BaseClasses.js.map +1 -1
  14. package/lib/parameters/CommandLineChoiceListParameter.d.ts +3 -3
  15. package/lib/parameters/CommandLineChoiceListParameter.d.ts.map +1 -1
  16. package/lib/parameters/CommandLineChoiceListParameter.js +3 -3
  17. package/lib/parameters/CommandLineChoiceListParameter.js.map +1 -1
  18. package/lib/parameters/CommandLineChoiceParameter.d.ts +4 -4
  19. package/lib/parameters/CommandLineChoiceParameter.d.ts.map +1 -1
  20. package/lib/parameters/CommandLineChoiceParameter.js +4 -4
  21. package/lib/parameters/CommandLineChoiceParameter.js.map +1 -1
  22. package/lib/parameters/CommandLineDefinition.d.ts +1 -3
  23. package/lib/parameters/CommandLineDefinition.d.ts.map +1 -1
  24. package/lib/parameters/CommandLineDefinition.js.map +1 -1
  25. package/lib/parameters/CommandLineFlagParameter.d.ts +3 -3
  26. package/lib/parameters/CommandLineFlagParameter.d.ts.map +1 -1
  27. package/lib/parameters/CommandLineFlagParameter.js +3 -3
  28. package/lib/parameters/CommandLineFlagParameter.js.map +1 -1
  29. package/lib/parameters/CommandLineIntegerListParameter.d.ts +3 -3
  30. package/lib/parameters/CommandLineIntegerListParameter.d.ts.map +1 -1
  31. package/lib/parameters/CommandLineIntegerListParameter.js +3 -3
  32. package/lib/parameters/CommandLineIntegerListParameter.js.map +1 -1
  33. package/lib/parameters/CommandLineIntegerParameter.d.ts +4 -4
  34. package/lib/parameters/CommandLineIntegerParameter.d.ts.map +1 -1
  35. package/lib/parameters/CommandLineIntegerParameter.js +4 -4
  36. package/lib/parameters/CommandLineIntegerParameter.js.map +1 -1
  37. package/lib/parameters/CommandLineRemainder.d.ts +2 -2
  38. package/lib/parameters/CommandLineRemainder.d.ts.map +1 -1
  39. package/lib/parameters/CommandLineRemainder.js +2 -2
  40. package/lib/parameters/CommandLineRemainder.js.map +1 -1
  41. package/lib/parameters/CommandLineStringListParameter.d.ts +3 -3
  42. package/lib/parameters/CommandLineStringListParameter.d.ts.map +1 -1
  43. package/lib/parameters/CommandLineStringListParameter.js +3 -3
  44. package/lib/parameters/CommandLineStringListParameter.js.map +1 -1
  45. package/lib/parameters/CommandLineStringParameter.d.ts +4 -4
  46. package/lib/parameters/CommandLineStringParameter.d.ts.map +1 -1
  47. package/lib/parameters/CommandLineStringParameter.js +4 -4
  48. package/lib/parameters/CommandLineStringParameter.js.map +1 -1
  49. package/lib/providers/AliasCommandLineAction.d.ts +1 -1
  50. package/lib/providers/AliasCommandLineAction.d.ts.map +1 -1
  51. package/lib/providers/AliasCommandLineAction.js +1 -1
  52. package/lib/providers/AliasCommandLineAction.js.map +1 -1
  53. package/lib/providers/CommandLineAction.d.ts +1 -4
  54. package/lib/providers/CommandLineAction.d.ts.map +1 -1
  55. package/lib/providers/CommandLineAction.js +2 -5
  56. package/lib/providers/CommandLineAction.js.map +1 -1
  57. package/lib/providers/CommandLineParameterProvider.d.ts +2 -6
  58. package/lib/providers/CommandLineParameterProvider.d.ts.map +1 -1
  59. package/lib/providers/CommandLineParameterProvider.js.map +1 -1
  60. package/lib/providers/CommandLineParser.d.ts +1 -9
  61. package/lib/providers/CommandLineParser.d.ts.map +1 -1
  62. package/lib/providers/CommandLineParser.js +3 -19
  63. package/lib/providers/CommandLineParser.js.map +1 -1
  64. package/lib/providers/CommandLineParserExitError.d.ts.map +1 -1
  65. package/lib/providers/CommandLineParserExitError.js +0 -2
  66. package/lib/providers/CommandLineParserExitError.js.map +1 -1
  67. package/lib/providers/DynamicCommandLineAction.d.ts +1 -1
  68. package/lib/providers/DynamicCommandLineAction.d.ts.map +1 -1
  69. package/lib/providers/DynamicCommandLineAction.js +1 -1
  70. package/lib/providers/DynamicCommandLineAction.js.map +1 -1
  71. package/lib/providers/ScopedCommandLineAction.d.ts +4 -11
  72. package/lib/providers/ScopedCommandLineAction.d.ts.map +1 -1
  73. package/lib/providers/ScopedCommandLineAction.js +2 -10
  74. package/lib/providers/ScopedCommandLineAction.js.map +1 -1
  75. package/lib/providers/TabCompletionAction.d.ts +1 -1
  76. package/lib/providers/TabCompletionAction.d.ts.map +1 -1
  77. package/lib/providers/TabCompletionAction.js +2 -2
  78. package/lib/providers/TabCompletionAction.js.map +1 -1
  79. package/package.json +6 -8
@@ -14,7 +14,7 @@ class CommandLineChoiceListParameter extends BaseClasses_1.CommandLineParameterB
14
14
  constructor(definition) {
15
15
  super(definition);
16
16
  this._values = [];
17
- /** {@inheritDoc CommandLineParameter.kind} */
17
+ /** {@inheritDoc CommandLineParameterBase.kind} */
18
18
  this.kind = BaseClasses_1.CommandLineParameterKind.ChoiceList;
19
19
  const { alternatives, completions } = definition;
20
20
  const alternativesSet = alternatives instanceof Set ? alternatives : new Set(alternatives);
@@ -25,7 +25,7 @@ class CommandLineChoiceListParameter extends BaseClasses_1.CommandLineParameterB
25
25
  this.completions = completions;
26
26
  }
27
27
  /**
28
- * {@inheritDoc CommandLineParameter._setValue}
28
+ * {@inheritDoc CommandLineParameterBase._setValue}
29
29
  * @internal
30
30
  */
31
31
  _setValue(data) {
@@ -69,7 +69,7 @@ class CommandLineChoiceListParameter extends BaseClasses_1.CommandLineParameterB
69
69
  get values() {
70
70
  return this._values;
71
71
  }
72
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
72
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
73
73
  appendToArgList(argList) {
74
74
  if (this.values.length > 0) {
75
75
  for (const value of this.values) {
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineChoiceListParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineChoiceListParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAAmF;AACnF,2EAAwE;AAExE;;;GAGG;AACH,MAAa,8BAEX,SAAQ,sCAAwB;IAYhC,gBAAgB;IAChB,YAAmB,UAAqD;QACtE,KAAK,CAAC,UAAU,CAAC,CAAC;QAVZ,YAAO,GAAc,EAAE,CAAC;QAKhC,8CAA8C;QAC9B,SAAI,GAAwC,sCAAwB,CAAC,UAAU,CAAC;QAK9F,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC;QAEjD,MAAM,eAAe,GAAiB,YAAY,YAAY,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;QACzG,IAAI,eAAe,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CACb,+FAA+F,CAChG,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED;;;OAGG;IACI,SAAS,CAAC,IAAa;QAC5B,qDAAqD;QACrD,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;YACD,KAAK,MAAM,SAAS,IAAI,IAAI,EAAE,CAAC;gBAC7B,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;oBAClC,IAAI,CAAC,iBAAiB,CA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;CACF;AA5FD,wEA4FC","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 { ICommandLineChoiceListDefinition } from './CommandLineDefinition';\nimport { CommandLineParameterBase, CommandLineParameterKind } from './BaseClasses';\nimport { EnvironmentVariableParser } from './EnvironmentVariableParser';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.defineChoiceListParameter}.\n * @public\n */\nexport class CommandLineChoiceListParameter<\n TChoice extends string = string\n> extends CommandLineParameterBase {\n /** {@inheritDoc ICommandLineChoiceListDefinition.alternatives} */\n public readonly alternatives: ReadonlySet<TChoice>;\n\n private _values: TChoice[] = [];\n\n /** {@inheritDoc ICommandLineChoiceListDefinition.completions} */\n public readonly completions: (() => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>) | undefined;\n\n /** {@inheritDoc CommandLineParameter.kind} */\n public readonly kind: CommandLineParameterKind.ChoiceList = CommandLineParameterKind.ChoiceList;\n\n /** @internal */\n public constructor(definition: ICommandLineChoiceListDefinition<TChoice>) {\n super(definition);\n const { alternatives, completions } = definition;\n\n const alternativesSet: Set<TChoice> = alternatives instanceof Set ? alternatives : new Set(alternatives);\n if (alternativesSet.size < 1) {\n throw new Error(\n `When defining a choice list parameter, the alternatives list must contain at least one value.`\n );\n }\n\n this.alternatives = alternativesSet;\n this.completions = completions;\n }\n\n /**\n * {@inheritDoc CommandLineParameter._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // If argparse passed us a value, confirm it is valid\n if (data !== null && data !== undefined) {\n if (!Array.isArray(data)) {\n this.reportInvalidData(data);\n }\n for (const arrayItem of data) {\n if (typeof arrayItem !== 'string') {\n this.reportInvalidData(data);\n }\n }\n this._values = data;\n return;\n }\n\n if (this.environmentVariable !== undefined) {\n const values: string[] | undefined = EnvironmentVariableParser.parseAsList(this.environmentVariable);\n if (values) {\n for (const value of values) {\n if (!this.alternatives.has(value as TChoice)) {\n const choices: string = '\"' + Array.from(this.alternatives).join('\", \"') + '\"';\n throw new Error(\n `Invalid value \"${value}\" for the environment variable` +\n ` ${this.environmentVariable}. Valid choices are: ${choices}`\n );\n }\n }\n\n this._values = values as TChoice[];\n return;\n }\n }\n\n // (No default value for choice lists)\n\n this._values = [];\n }\n\n /**\n * Returns the string arguments for a choice list parameter that was parsed from the command line.\n *\n * @remarks\n * The array will be empty if the command-line has not been parsed yet,\n * or if the parameter was omitted and has no default value.\n */\n public get values(): ReadonlyArray<TChoice> {\n return this._values;\n }\n\n /** {@inheritDoc CommandLineParameter.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.values.length > 0) {\n for (const value of this.values) {\n argList.push(this.longName);\n argList.push(value);\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"CommandLineChoiceListParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineChoiceListParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAAmF;AACnF,2EAAwE;AAExE;;;GAGG;AACH,MAAa,8BAEX,SAAQ,sCAAwB;IAYhC,gBAAgB;IAChB,YAAmB,UAAqD;QACtE,KAAK,CAAC,UAAU,CAAC,CAAC;QAVZ,YAAO,GAAc,EAAE,CAAC;QAKhC,kDAAkD;QAClC,SAAI,GAAwC,sCAAwB,CAAC,UAAU,CAAC;QAK9F,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC;QAEjD,MAAM,eAAe,GAAiB,YAAY,YAAY,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;QACzG,IAAI,eAAe,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CACb,+FAA+F,CAChG,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IA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ACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,uEAAuE;IAChE,eAAe,CAAC,OAAiB;QACtC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC5B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA5FD,wEA4FC","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 { ICommandLineChoiceListDefinition } from './CommandLineDefinition';\nimport { CommandLineParameterBase, CommandLineParameterKind } from './BaseClasses';\nimport { EnvironmentVariableParser } from './EnvironmentVariableParser';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.defineChoiceListParameter}.\n * @public\n */\nexport class CommandLineChoiceListParameter<\n TChoice extends string = string\n> extends CommandLineParameterBase {\n /** {@inheritDoc ICommandLineChoiceListDefinition.alternatives} */\n public readonly alternatives: ReadonlySet<TChoice>;\n\n private _values: TChoice[] = [];\n\n /** {@inheritDoc ICommandLineChoiceListDefinition.completions} */\n public readonly completions: (() => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>) | undefined;\n\n /** {@inheritDoc CommandLineParameterBase.kind} */\n public readonly kind: CommandLineParameterKind.ChoiceList = CommandLineParameterKind.ChoiceList;\n\n /** @internal */\n public constructor(definition: ICommandLineChoiceListDefinition<TChoice>) {\n super(definition);\n const { alternatives, completions } = definition;\n\n const alternativesSet: Set<TChoice> = alternatives instanceof Set ? alternatives : new Set(alternatives);\n if (alternativesSet.size < 1) {\n throw new Error(\n `When defining a choice list parameter, the alternatives list must contain at least one value.`\n );\n }\n\n this.alternatives = alternativesSet;\n this.completions = completions;\n }\n\n /**\n * {@inheritDoc CommandLineParameterBase._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // If argparse passed us a value, confirm it is valid\n if (data !== null && data !== undefined) {\n if (!Array.isArray(data)) {\n this.reportInvalidData(data);\n }\n for (const arrayItem of data) {\n if (typeof arrayItem !== 'string') {\n this.reportInvalidData(data);\n }\n }\n this._values = data;\n return;\n }\n\n if (this.environmentVariable !== undefined) {\n const values: string[] | undefined = EnvironmentVariableParser.parseAsList(this.environmentVariable);\n if (values) {\n for (const value of values) {\n if (!this.alternatives.has(value as TChoice)) {\n const choices: string = '\"' + Array.from(this.alternatives).join('\", \"') + '\"';\n throw new Error(\n `Invalid value \"${value}\" for the environment variable` +\n ` ${this.environmentVariable}. Valid choices are: ${choices}`\n );\n }\n }\n\n this._values = values as TChoice[];\n return;\n }\n }\n\n // (No default value for choice lists)\n\n this._values = [];\n }\n\n /**\n * Returns the string arguments for a choice list parameter that was parsed from the command line.\n *\n * @remarks\n * The array will be empty if the command-line has not been parsed yet,\n * or if the parameter was omitted and has no default value.\n */\n public get values(): ReadonlyArray<TChoice> {\n return this._values;\n }\n\n /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.values.length > 0) {\n for (const value of this.values) {\n argList.push(this.longName);\n argList.push(value);\n }\n }\n }\n}\n"]}
@@ -19,17 +19,17 @@ export declare class CommandLineChoiceParameter<TChoice extends string = string>
19
19
  private _value;
20
20
  /** {@inheritDoc ICommandLineChoiceDefinition.completions} */
21
21
  readonly completions: (() => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>) | undefined;
22
- /** {@inheritDoc CommandLineParameter.kind} */
22
+ /** {@inheritDoc CommandLineParameterBase.kind} */
23
23
  readonly kind: CommandLineParameterKind.Choice;
24
24
  /** @internal */
25
25
  constructor(definition: ICommandLineChoiceDefinition<TChoice>);
26
26
  /**
27
- * {@inheritDoc CommandLineParameter._setValue}
27
+ * {@inheritDoc CommandLineParameterBase._setValue}
28
28
  * @internal
29
29
  */
30
30
  _setValue(data: unknown): void;
31
31
  /**
32
- * {@inheritDoc CommandLineParameter._getSupplementaryNotes}
32
+ * {@inheritDoc CommandLineParameterBase._getSupplementaryNotes}
33
33
  * @internal
34
34
  */
35
35
  _getSupplementaryNotes(supplementaryNotes: string[]): void;
@@ -41,7 +41,7 @@ export declare class CommandLineChoiceParameter<TChoice extends string = string>
41
41
  * or if the parameter was omitted and has no default value.
42
42
  */
43
43
  get value(): TChoice | undefined;
44
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
44
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
45
45
  appendToArgList(argList: string[]): void;
46
46
  }
47
47
  //# sourceMappingURL=CommandLineChoiceParameter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineChoiceParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineChoiceParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEnF;;;GAGG;AACH,MAAM,WAAW,mCAAmC,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAClF,SAAQ,0BAA0B,CAAC,OAAO,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,qBAAa,0BAA0B,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,wBAAwB;IACvG,8DAA8D;IAC9D,SAAgB,YAAY,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAEnD,8DAA8D;IAC9D,SAAgB,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IAElD,OAAO,CAAC,MAAM,CAAkC;IAEhD,6DAA6D;IAC7D,SAAgB,WAAW,EAAE,CAAC,MAAM,OAAO,CAAC,aAAa,CAAC,OAAO,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AAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAExG,kDAAkD;IAClD,SAAgB,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAoC;IAEzF,gBAAgB;gBACG,UAAU,EAAE,4BAA4B,CAAC,OAAO,CAAC;IAuBpE;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAmCrC;;;OAGG;IACI,sBAAsB,CAAC,kBAAkB,EAAE,MAAM,EAAE,GAAG,IAAI;IAQjE;;;;;;OAMG;IACH,IAAW,KAAK,IAAI,OAAO,GAAG,SAAS,CAEtC;IAED,uEAAuE;IAChE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAMhD"}
@@ -13,7 +13,7 @@ class CommandLineChoiceParameter extends BaseClasses_1.CommandLineParameterBase
13
13
  constructor(definition) {
14
14
  super(definition);
15
15
  this._value = undefined;
16
- /** {@inheritDoc CommandLineParameter.kind} */
16
+ /** {@inheritDoc CommandLineParameterBase.kind} */
17
17
  this.kind = -BaseClasses_1.CommandLineParameterKind.Choice;
18
18
  const { alternatives, defaultValue, completions } = definition;
19
19
  const alternativesSet = alternatives instanceof Set ? alternatives : new Set(alternatives);
@@ -30,7 +30,7 @@ class CommandLineChoiceParameter extends BaseClasses_1.CommandLineParameterBase
30
30
  this.completions = completions;
31
31
  }
32
32
  /**
33
- * {@inheritDoc CommandLineParameter._setValue}
33
+ * {@inheritDoc CommandLineParameterBase._setValue}
34
34
  * @internal
35
35
  */
36
36
  _setValue(data) {
@@ -62,7 +62,7 @@ class CommandLineChoiceParameter extends BaseClasses_1.CommandLineParameterBase
62
62
  this._value = undefined;
63
63
  }
64
64
  /**
65
- * {@inheritDoc CommandLineParameter._getSupplementaryNotes}
65
+ * {@inheritDoc CommandLineParameterBase._getSupplementaryNotes}
66
66
  * @internal
67
67
  */
68
68
  _getSupplementaryNotes(supplementaryNotes) {
@@ -82,7 +82,7 @@ class CommandLineChoiceParameter extends BaseClasses_1.CommandLineParameterBase
82
82
  get value() {
83
83
  return this._value;
84
84
  }
85
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
85
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
86
86
  appendToArgList(argList) {
87
87
  if (this.value !== undefined) {
88
88
  argList.push(this.longName);
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineChoiceParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineChoiceParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAAmF;AAWnF;;;GAGG;AACH,MAAa,0BAA4D,SAAQ,sCAAwB;IAevG,gBAAgB;IAChB,YAAmB,UAAiD;QAClE,KAAK,CAAC,UAAU,CAAC,CAAC;QAVZ,WAAM,GAAwB,SAAS,CAAC;QAKhD,8CAA8C;QAC9B,SAAI,GAAoC,CAAC,sCAAwB,CAAC,MAAM,CAAC;QAKvF,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC;QAE/D,MAAM,eAAe,GAAiB,YAAY,YAAY,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;QACzG,IAAI,eAAe,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CACb,0FAA0F,CAC3F,CAAC;QACJ,CAAC;QACD,IAAI,YAAY,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,KAAK,CACb,gCAAgC,YAAY,GAAG;gBAC7C,yCAAyC,YAAY,CAAC,QAAQ,EAAE,EAAE,CACrE,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC;QACpC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY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,CAAC,kBAA4B;QACxD,UAAU;QACV,KAAK,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;QACjD,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YACpC,kBAAkB,CAAC,IAAI,CAAC,yBAAyB,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC;QAC1E,CAAC;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,CAAC;YAC7B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF;AA5GD,gEA4GC","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 { ICommandLineChoiceDefinition } from './CommandLineDefinition';\nimport { CommandLineParameterBase, CommandLineParameterKind } from './BaseClasses';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.(defineChoiceParameter:2)}.\n * @public\n */\nexport interface IRequiredCommandLineChoiceParameter<TChoice extends string = string>\n extends CommandLineChoiceParameter<TChoice> {\n readonly value: TChoice;\n}\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.(defineChoiceParameter:1)}.\n * @public\n */\nexport class CommandLineChoiceParameter<TChoice extends string = string> extends CommandLineParameterBase {\n /** {@inheritDoc ICommandLineChoiceDefinition.alternatives} */\n public readonly alternatives: ReadonlySet<TChoice>;\n\n /** {@inheritDoc ICommandLineStringDefinition.defaultValue} */\n public readonly defaultValue: TChoice | undefined;\n\n private _value: TChoice | undefined = undefined;\n\n /** {@inheritDoc ICommandLineChoiceDefinition.completions} */\n public readonly completions: (() => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>) | undefined;\n\n /** {@inheritDoc CommandLineParameter.kind} */\n public readonly kind: CommandLineParameterKind.Choice = -CommandLineParameterKind.Choice;\n\n /** @internal */\n public constructor(definition: ICommandLineChoiceDefinition<TChoice>) {\n super(definition);\n const { alternatives, defaultValue, completions } = definition;\n\n const alternativesSet: Set<TChoice> = alternatives instanceof Set ? alternatives : new Set(alternatives);\n if (alternativesSet.size < 1) {\n throw new Error(\n `When defining a choice parameter, the alternatives list must contain at least one value.`\n );\n }\n if (defaultValue && !alternativesSet.has(defaultValue)) {\n throw new Error(\n `The specified default value \"${defaultValue}\"` +\n ` is not one of the available options: ${alternatives.toString()}`\n );\n }\n\n this.alternatives = alternativesSet;\n this.defaultValue = defaultValue;\n this.validateDefaultValue(!!this.defaultValue);\n this.completions = completions;\n }\n\n /**\n * {@inheritDoc CommandLineParameter._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // abstract\n if (data !== null && data !== undefined) {\n if (typeof data !== 'string') {\n this.reportInvalidData(data);\n }\n this._value = data as TChoice;\n return;\n }\n\n if (this.environmentVariable !== undefined) {\n // Try reading the environment variable\n const environmentValue: string | undefined = process.env[this.environmentVariable];\n if (environmentValue !== undefined && environmentValue !== '') {\n if (!this.alternatives.has(environmentValue as TChoice)) {\n const choices: string = '\"' + Array.from(this.alternatives).join('\", \"') + '\"';\n throw new Error(\n `Invalid value \"${environmentValue}\" for the environment variable` +\n ` ${this.environmentVariable}. Valid choices are: ${choices}`\n );\n }\n\n this._value = environmentValue as TChoice;\n return;\n }\n }\n\n if (this.defaultValue !== undefined) {\n this._value = this.defaultValue;\n return;\n }\n\n this._value = undefined;\n }\n\n /**\n * {@inheritDoc CommandLineParameter._getSupplementaryNotes}\n * @internal\n */\n public _getSupplementaryNotes(supplementaryNotes: string[]): void {\n // virtual\n super._getSupplementaryNotes(supplementaryNotes);\n if (this.defaultValue !== undefined) {\n supplementaryNotes.push(`The default value is \"${this.defaultValue}\".`);\n }\n }\n\n /**\n * Returns the argument value for a choice parameter that was parsed from the command line.\n *\n * @remarks\n * The return value will be `undefined` if the command-line has not been parsed yet,\n * or if the parameter was omitted and has no default value.\n */\n public get value(): TChoice | undefined {\n return this._value;\n }\n\n /** {@inheritDoc CommandLineParameter.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.value !== undefined) {\n argList.push(this.longName);\n argList.push(this.value);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"CommandLineChoiceParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineChoiceParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAAmF;AAWnF;;;GAGG;AACH,MAAa,0BAA4D,SAAQ,sCAAwB;IAevG,gBAAgB;IAChB,YAAmB,UAAiD;QAClE,KAAK,CAAC,UAAU,CAAC,CAAC;QAVZ,WAAM,GAAwB,SAAS,CAAC;QAKhD,kDAAkD;QAClC,SAAI,GAAoC,CAAC,sCAAwB,CAAC,MAAM,CAAC;QAKvF,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC;QAE/D,MAAM,eAAe,GAAiB,YAAY,YAAY,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;QACzG,IAAI,eAAe,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CACb,0FAA0F,CAC3F,CAAC;QACJ,CAAC;QACD,IAAI,YAAY,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,KAAK,CACb,gCAAgC,YAAY,GAAG;gBAC7C,yCAAyC,YAAY,CAAC,QAAQ,EAAE,EAAE,CACrE,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC;QACpC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,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AAG,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,CAAC;YACpC,kBAAkB,CAAC,IAAI,CAAC,yBAAyB,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,uEAAuE;IAChE,eAAe,CAAC,OAAiB;QACtC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF;AA5GD,gEA4GC","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 { ICommandLineChoiceDefinition } from './CommandLineDefinition';\nimport { CommandLineParameterBase, CommandLineParameterKind } from './BaseClasses';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.(defineChoiceParameter:2)}.\n * @public\n */\nexport interface IRequiredCommandLineChoiceParameter<TChoice extends string = string>\n extends CommandLineChoiceParameter<TChoice> {\n readonly value: TChoice;\n}\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.(defineChoiceParameter:1)}.\n * @public\n */\nexport class CommandLineChoiceParameter<TChoice extends string = string> extends CommandLineParameterBase {\n /** {@inheritDoc ICommandLineChoiceDefinition.alternatives} */\n public readonly alternatives: ReadonlySet<TChoice>;\n\n /** {@inheritDoc ICommandLineStringDefinition.defaultValue} */\n public readonly defaultValue: TChoice | undefined;\n\n private _value: TChoice | undefined = undefined;\n\n /** {@inheritDoc ICommandLineChoiceDefinition.completions} */\n public readonly completions: (() => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>) | undefined;\n\n /** {@inheritDoc CommandLineParameterBase.kind} */\n public readonly kind: CommandLineParameterKind.Choice = -CommandLineParameterKind.Choice;\n\n /** @internal */\n public constructor(definition: ICommandLineChoiceDefinition<TChoice>) {\n super(definition);\n const { alternatives, defaultValue, completions } = definition;\n\n const alternativesSet: Set<TChoice> = alternatives instanceof Set ? alternatives : new Set(alternatives);\n if (alternativesSet.size < 1) {\n throw new Error(\n `When defining a choice parameter, the alternatives list must contain at least one value.`\n );\n }\n if (defaultValue && !alternativesSet.has(defaultValue)) {\n throw new Error(\n `The specified default value \"${defaultValue}\"` +\n ` is not one of the available options: ${alternatives.toString()}`\n );\n }\n\n this.alternatives = alternativesSet;\n this.defaultValue = defaultValue;\n this.validateDefaultValue(!!this.defaultValue);\n this.completions = completions;\n }\n\n /**\n * {@inheritDoc CommandLineParameterBase._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // abstract\n if (data !== null && data !== undefined) {\n if (typeof data !== 'string') {\n this.reportInvalidData(data);\n }\n this._value = data as TChoice;\n return;\n }\n\n if (this.environmentVariable !== undefined) {\n // Try reading the environment variable\n const environmentValue: string | undefined = process.env[this.environmentVariable];\n if (environmentValue !== undefined && environmentValue !== '') {\n if (!this.alternatives.has(environmentValue as TChoice)) {\n const choices: string = '\"' + Array.from(this.alternatives).join('\", \"') + '\"';\n throw new Error(\n `Invalid value \"${environmentValue}\" for the environment variable` +\n ` ${this.environmentVariable}. Valid choices are: ${choices}`\n );\n }\n\n this._value = environmentValue as TChoice;\n return;\n }\n }\n\n if (this.defaultValue !== undefined) {\n this._value = this.defaultValue;\n return;\n }\n\n this._value = undefined;\n }\n\n /**\n * {@inheritDoc CommandLineParameterBase._getSupplementaryNotes}\n * @internal\n */\n public _getSupplementaryNotes(supplementaryNotes: string[]): void {\n // virtual\n super._getSupplementaryNotes(supplementaryNotes);\n if (this.defaultValue !== undefined) {\n supplementaryNotes.push(`The default value is \"${this.defaultValue}\".`);\n }\n }\n\n /**\n * Returns the argument value for a choice parameter that was parsed from the command line.\n *\n * @remarks\n * The return value will be `undefined` if the command-line has not been parsed yet,\n * or if the parameter was omitted and has no default value.\n */\n public get value(): TChoice | undefined {\n return this._value;\n }\n\n /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.value !== undefined) {\n argList.push(this.longName);\n argList.push(this.value);\n }\n }\n}\n"]}
@@ -113,10 +113,8 @@ export interface IBaseCommandLineDefinitionWithArgument extends IBaseCommandLine
113
113
  * @remarks
114
114
  * This option is only used when `ICommandLineParserOptions.enableTabCompletionAction`
115
115
  * is enabled.
116
- *
117
- * In a future release, this will be renamed to `getCompletionsAsync`
118
116
  */
119
- completions?: () => Promise<ReadonlyArray<string> | ReadonlySet<string>>;
117
+ getCompletionsAsync?: () => Promise<ReadonlyArray<string> | ReadonlySet<string>>;
120
118
  }
121
119
  /**
122
120
  * For use with {@link CommandLineParameterProvider.(defineChoiceParameter:1)} and
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineDefinition.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineDefinition.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,uBAAuB,CAAC;IAEzD;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;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WAAW,gCAAiC,SAAQ,sCAAsC;CAAG;AAEnG;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineDefinition.js","sourceRoot":"","sources":["../../src/parameters/CommandLineDefinition.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D","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 { SCOPING_PARAMETER_GROUP } from '../Constants';\n\n/**\n * For use with CommandLineParser, this interface represents a generic command-line parameter\n *\n * @public\n */\nexport interface IBaseCommandLineDefinition {\n /**\n * The long name of the flag including double dashes, e.g. \"--do-something\"\n */\n parameterLongName: string;\n\n /**\n * An optional short name for the flag including the dash, e.g. \"-d\"\n */\n parameterShortName?: string;\n\n /**\n * An optional parameter group name, shown when invoking the tool with \"--help\"\n */\n parameterGroup?: string | typeof SCOPING_PARAMETER_GROUP;\n\n /**\n * An optional parameter scope name, used to add a scope-prefixed parameter synonym,\n * e.g. \"--scope:do-something\". Scopes provide additional flexibility for parameters\n * in conflict resolution since when a scope is specified, parameters that have\n * conflicting long names will be defined using only the scope-prefixed name.\n */\n parameterScope?: string;\n\n /**\n * Documentation for the parameter that will be shown when invoking the tool with \"--help\"\n */\n description: string;\n\n /**\n * If true, then an error occurs if the parameter was not included on the command-line.\n */\n required?: boolean;\n\n /**\n * The name of an environment variable that the parameter value will be read from,\n * if it was omitted from the command-line. An error will be reported if the\n * environment value cannot be parsed.\n *\n * @remarks\n * The environment variable name must consist only of upper-case letters, numbers,\n * and underscores. It may not start with a number. To disable this validation, set\n * `{@link IBaseCommandLineDefinition.allowNonStandardEnvironmentVariableNames}`\n * to `true`.\n *\n * Syntax notes for environment variable values:\n *\n * - Choice Parameter: The value must match one of the defined choices,\n * otherwise a validation error is reported.\n * An empty string causes the environment variable to be ignored.\n *\n * - Flag Parameter: The value must be `1` for true, or `0` for false,\n * otherwise a validation error is reported.\n * An empty string causes the environment variable to be ignored.\n *\n * - Integer Parameter: The value must be an integer number,\n * otherwise a validation error is reported.\n * An empty string causes the environment variable to be ignored.\n *\n * - String Parameter: Any value is accepted, including an empty string.\n *\n * - String List Parameter: If the string starts with `[` (ignoring whitespace)\n * then it will be parsed as a JSON array, whose elements must be strings,\n * numbers, or boolean values.\n * If the string does not start with `[`, then it behaves like an\n * ordinary String Parameter: Any value is accepted, including an empty string.\n */\n environmentVariable?: string;\n\n /**\n * Allows for the use of environment variable names that do not conform to the standard\n * described by the Shell and Utilities volume of IEEE Std 1003.1-2001. This disables\n * the validation that is performed on the provided\n * {@link IBaseCommandLineDefinition.environmentVariable} value by default.\n *\n * @remarks\n * if this is set to `true`, environment variable discovery will vary based on the\n * platform in use. For example, Windows environment variable names are case-insensitive,\n * while on Linux, environment variable names are case-sensitive. It is recommended that\n * this option be used only when necessary based on environmental constraints.\n */\n allowNonStandardEnvironmentVariableNames?: boolean;\n\n /**\n * Specifies additional names for this parameter that are accepted but not displayed\n * in the command line help.\n *\n * @remarks\n * This option can be used in cases where a command-line parameter may have been renamed,\n * but the developer doesn't want to break backwards compatibility with systems that may\n * still be using the old name. Only the `parameterLongName` syntax is currently allowed.\n */\n undocumentedSynonyms?: string[];\n}\n\n/**\n * The common base interface for parameter types that accept an argument.\n *\n * @remarks\n * An argument is an accompanying command-line token, such as \"123\" in the\n * example \"--max-count 123\".\n * @public\n */\nexport interface IBaseCommandLineDefinitionWithArgument extends IBaseCommandLineDefinition {\n /**\n * The name of the argument, which will be shown in the command-line help.\n *\n * @remarks\n * For example, if the parameter name is '--count\" and the argument name is \"NUMBER\",\n * then the command-line help would display \"--count NUMBER\". The argument name must\n * be comprised of upper-case letters, numbers, and underscores. It should be kept short.\n */\n argumentName: string;\n\n /**\n * An optional callback that provides a list of custom choices for tab completion.\n * @remarks\n * This option is only used when `ICommandLineParserOptions.enableTabCompletionAction`\n * is enabled.\n *\n * In a future release, this will be renamed to `getCompletionsAsync`\n */\n completions?: () => Promise<ReadonlyArray<string> | ReadonlySet<string>>;\n}\n\n/**\n * For use with {@link CommandLineParameterProvider.(defineChoiceParameter:1)} and\n * {@link CommandLineParameterProvider.(defineChoiceParameter:2)}, this interface\n * defines a command line parameter which is constrained to a list of possible\n * options.\n *\n * @public\n */\nexport interface ICommandLineChoiceDefinition<TChoice extends string = string>\n extends IBaseCommandLineDefinition {\n /**\n * A list of strings (which contain no spaces), of possible options which can be selected\n */\n alternatives: ReadonlyArray<TChoice> | ReadonlySet<TChoice>;\n\n /**\n * {@inheritDoc ICommandLineStringDefinition.defaultValue}\n */\n defaultValue?: TChoice;\n\n /**\n * An optional callback that provides a list of custom choices for tab completion.\n * @remarks\n * This option is only used when `ICommandLineParserOptions.enableTabCompletionAction`\n * is enabled.\n */\n completions?: () => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>;\n}\n\n/**\n * For use with {@link CommandLineParameterProvider.defineChoiceListParameter},\n * this interface defines a command line parameter which is constrained to a list of possible\n * options. The parameter can be specified multiple times to build a list.\n *\n * @public\n */\nexport interface ICommandLineChoiceListDefinition<TChoice extends string = string>\n extends IBaseCommandLineDefinition {\n /**\n * A list of strings (which contain no spaces), of possible options which can be selected\n */\n alternatives: ReadonlyArray<TChoice> | ReadonlySet<TChoice>;\n\n /**\n * An optional callback that provides a list of custom choices for tab completion.\n * @remarks\n * This option is only used when `ICommandLineParserOptions.enableTabCompletionAction`\n * is enabled.\n */\n completions?: () => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>;\n}\n\n/**\n * For use with {@link CommandLineParameterProvider.defineFlagParameter},\n * this interface defines a command line parameter that is a boolean flag.\n *\n * @public\n */\nexport interface ICommandLineFlagDefinition extends IBaseCommandLineDefinition {}\n\n/**\n * For use with {@link CommandLineParameterProvider.(defineIntegerParameter:1)},\n * {@link CommandLineParameterProvider.(defineIntegerParameter:2)}, this interface\n * defines a command line parameter whose argument is an integer value.\n *\n * @public\n */\nexport interface ICommandLineIntegerDefinition extends IBaseCommandLineDefinitionWithArgument {\n /**\n * {@inheritDoc ICommandLineStringDefinition.defaultValue}\n */\n defaultValue?: number;\n}\n\n/**\n * For use with {@link CommandLineParameterProvider.defineIntegerListParameter},\n * this interface defines a command line parameter whose argument is an integer value. The\n * parameter can be specified multiple times to build a list.\n *\n * @public\n */\nexport interface ICommandLineIntegerListDefinition extends IBaseCommandLineDefinitionWithArgument {}\n\n/**\n * For use with {@link CommandLineParameterProvider.(defineStringParameter:1)} and\n * {@link CommandLineParameterProvider.(defineStringParameter:2)}, this interface\n * defines a command line parameter whose argument is a string value.\n *\n * @public\n */\nexport interface ICommandLineStringDefinition extends IBaseCommandLineDefinitionWithArgument {\n /**\n * The default value which will be used if the parameter is omitted from the command line.\n *\n * @remarks\n * If a default value is specified, then {@link IBaseCommandLineDefinition.required}\n * must not be true. Instead, a custom error message should be used to report cases\n * where a default value was not available.\n */\n defaultValue?: string;\n}\n\n/**\n * For use with {@link CommandLineParameterProvider.defineStringListParameter},\n * this interface defines a command line parameter whose argument is a single text string.\n * The parameter can be specified multiple times to build a list.\n *\n * @public\n */\nexport interface ICommandLineStringListDefinition extends IBaseCommandLineDefinitionWithArgument {}\n\n/**\n * For use with {@link CommandLineParameterProvider.defineCommandLineRemainder},\n * this interface defines a rule that captures any remaining command line arguments after the recognized portion.\n *\n * @public\n */\nexport interface ICommandLineRemainderDefinition {\n /**\n * Documentation for how the remaining arguments will be used. This will be shown when invoking\n * the tool with \"--help\".\n */\n description: string;\n}\n"]}
1
+ {"version":3,"file":"CommandLineDefinition.js","sourceRoot":"","sources":["../../src/parameters/CommandLineDefinition.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D","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 { SCOPING_PARAMETER_GROUP } from '../Constants';\n\n/**\n * For use with CommandLineParser, this interface represents a generic command-line parameter\n *\n * @public\n */\nexport interface IBaseCommandLineDefinition {\n /**\n * The long name of the flag including double dashes, e.g. \"--do-something\"\n */\n parameterLongName: string;\n\n /**\n * An optional short name for the flag including the dash, e.g. \"-d\"\n */\n parameterShortName?: string;\n\n /**\n * An optional parameter group name, shown when invoking the tool with \"--help\"\n */\n parameterGroup?: string | typeof SCOPING_PARAMETER_GROUP;\n\n /**\n * An optional parameter scope name, used to add a scope-prefixed parameter synonym,\n * e.g. \"--scope:do-something\". Scopes provide additional flexibility for parameters\n * in conflict resolution since when a scope is specified, parameters that have\n * conflicting long names will be defined using only the scope-prefixed name.\n */\n parameterScope?: string;\n\n /**\n * Documentation for the parameter that will be shown when invoking the tool with \"--help\"\n */\n description: string;\n\n /**\n * If true, then an error occurs if the parameter was not included on the command-line.\n */\n required?: boolean;\n\n /**\n * The name of an environment variable that the parameter value will be read from,\n * if it was omitted from the command-line. An error will be reported if the\n * environment value cannot be parsed.\n *\n * @remarks\n * The environment variable name must consist only of upper-case letters, numbers,\n * and underscores. It may not start with a number. To disable this validation, set\n * `{@link IBaseCommandLineDefinition.allowNonStandardEnvironmentVariableNames}`\n * to `true`.\n *\n * Syntax notes for environment variable values:\n *\n * - Choice Parameter: The value must match one of the defined choices,\n * otherwise a validation error is reported.\n * An empty string causes the environment variable to be ignored.\n *\n * - Flag Parameter: The value must be `1` for true, or `0` for false,\n * otherwise a validation error is reported.\n * An empty string causes the environment variable to be ignored.\n *\n * - Integer Parameter: The value must be an integer number,\n * otherwise a validation error is reported.\n * An empty string causes the environment variable to be ignored.\n *\n * - String Parameter: Any value is accepted, including an empty string.\n *\n * - String List Parameter: If the string starts with `[` (ignoring whitespace)\n * then it will be parsed as a JSON array, whose elements must be strings,\n * numbers, or boolean values.\n * If the string does not start with `[`, then it behaves like an\n * ordinary String Parameter: Any value is accepted, including an empty string.\n */\n environmentVariable?: string;\n\n /**\n * Allows for the use of environment variable names that do not conform to the standard\n * described by the Shell and Utilities volume of IEEE Std 1003.1-2001. This disables\n * the validation that is performed on the provided\n * {@link IBaseCommandLineDefinition.environmentVariable} value by default.\n *\n * @remarks\n * if this is set to `true`, environment variable discovery will vary based on the\n * platform in use. For example, Windows environment variable names are case-insensitive,\n * while on Linux, environment variable names are case-sensitive. It is recommended that\n * this option be used only when necessary based on environmental constraints.\n */\n allowNonStandardEnvironmentVariableNames?: boolean;\n\n /**\n * Specifies additional names for this parameter that are accepted but not displayed\n * in the command line help.\n *\n * @remarks\n * This option can be used in cases where a command-line parameter may have been renamed,\n * but the developer doesn't want to break backwards compatibility with systems that may\n * still be using the old name. Only the `parameterLongName` syntax is currently allowed.\n */\n undocumentedSynonyms?: string[];\n}\n\n/**\n * The common base interface for parameter types that accept an argument.\n *\n * @remarks\n * An argument is an accompanying command-line token, such as \"123\" in the\n * example \"--max-count 123\".\n * @public\n */\nexport interface IBaseCommandLineDefinitionWithArgument extends IBaseCommandLineDefinition {\n /**\n * The name of the argument, which will be shown in the command-line help.\n *\n * @remarks\n * For example, if the parameter name is '--count\" and the argument name is \"NUMBER\",\n * then the command-line help would display \"--count NUMBER\". The argument name must\n * be comprised of upper-case letters, numbers, and underscores. It should be kept short.\n */\n argumentName: string;\n\n /**\n * An optional callback that provides a list of custom choices for tab completion.\n * @remarks\n * This option is only used when `ICommandLineParserOptions.enableTabCompletionAction`\n * is enabled.\n */\n getCompletionsAsync?: () => Promise<ReadonlyArray<string> | ReadonlySet<string>>;\n}\n\n/**\n * For use with {@link CommandLineParameterProvider.(defineChoiceParameter:1)} and\n * {@link CommandLineParameterProvider.(defineChoiceParameter:2)}, this interface\n * defines a command line parameter which is constrained to a list of possible\n * options.\n *\n * @public\n */\nexport interface ICommandLineChoiceDefinition<TChoice extends string = string>\n extends IBaseCommandLineDefinition {\n /**\n * A list of strings (which contain no spaces), of possible options which can be selected\n */\n alternatives: ReadonlyArray<TChoice> | ReadonlySet<TChoice>;\n\n /**\n * {@inheritDoc ICommandLineStringDefinition.defaultValue}\n */\n defaultValue?: TChoice;\n\n /**\n * An optional callback that provides a list of custom choices for tab completion.\n * @remarks\n * This option is only used when `ICommandLineParserOptions.enableTabCompletionAction`\n * is enabled.\n */\n completions?: () => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>;\n}\n\n/**\n * For use with {@link CommandLineParameterProvider.defineChoiceListParameter},\n * this interface defines a command line parameter which is constrained to a list of possible\n * options. The parameter can be specified multiple times to build a list.\n *\n * @public\n */\nexport interface ICommandLineChoiceListDefinition<TChoice extends string = string>\n extends IBaseCommandLineDefinition {\n /**\n * A list of strings (which contain no spaces), of possible options which can be selected\n */\n alternatives: ReadonlyArray<TChoice> | ReadonlySet<TChoice>;\n\n /**\n * An optional callback that provides a list of custom choices for tab completion.\n * @remarks\n * This option is only used when `ICommandLineParserOptions.enableTabCompletionAction`\n * is enabled.\n */\n completions?: () => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>;\n}\n\n/**\n * For use with {@link CommandLineParameterProvider.defineFlagParameter},\n * this interface defines a command line parameter that is a boolean flag.\n *\n * @public\n */\nexport interface ICommandLineFlagDefinition extends IBaseCommandLineDefinition {}\n\n/**\n * For use with {@link CommandLineParameterProvider.(defineIntegerParameter:1)},\n * {@link CommandLineParameterProvider.(defineIntegerParameter:2)}, this interface\n * defines a command line parameter whose argument is an integer value.\n *\n * @public\n */\nexport interface ICommandLineIntegerDefinition extends IBaseCommandLineDefinitionWithArgument {\n /**\n * {@inheritDoc ICommandLineStringDefinition.defaultValue}\n */\n defaultValue?: number;\n}\n\n/**\n * For use with {@link CommandLineParameterProvider.defineIntegerListParameter},\n * this interface defines a command line parameter whose argument is an integer value. The\n * parameter can be specified multiple times to build a list.\n *\n * @public\n */\nexport interface ICommandLineIntegerListDefinition extends IBaseCommandLineDefinitionWithArgument {}\n\n/**\n * For use with {@link CommandLineParameterProvider.(defineStringParameter:1)} and\n * {@link CommandLineParameterProvider.(defineStringParameter:2)}, this interface\n * defines a command line parameter whose argument is a string value.\n *\n * @public\n */\nexport interface ICommandLineStringDefinition extends IBaseCommandLineDefinitionWithArgument {\n /**\n * The default value which will be used if the parameter is omitted from the command line.\n *\n * @remarks\n * If a default value is specified, then {@link IBaseCommandLineDefinition.required}\n * must not be true. Instead, a custom error message should be used to report cases\n * where a default value was not available.\n */\n defaultValue?: string;\n}\n\n/**\n * For use with {@link CommandLineParameterProvider.defineStringListParameter},\n * this interface defines a command line parameter whose argument is a single text string.\n * The parameter can be specified multiple times to build a list.\n *\n * @public\n */\nexport interface ICommandLineStringListDefinition extends IBaseCommandLineDefinitionWithArgument {}\n\n/**\n * For use with {@link CommandLineParameterProvider.defineCommandLineRemainder},\n * this interface defines a rule that captures any remaining command line arguments after the recognized portion.\n *\n * @public\n */\nexport interface ICommandLineRemainderDefinition {\n /**\n * Documentation for how the remaining arguments will be used. This will be shown when invoking\n * the tool with \"--help\".\n */\n description: string;\n}\n"]}
@@ -6,12 +6,12 @@ import { CommandLineParameterBase, CommandLineParameterKind } from './BaseClasse
6
6
  */
7
7
  export declare class CommandLineFlagParameter extends CommandLineParameterBase {
8
8
  private _value;
9
- /** {@inheritDoc CommandLineParameter.kind} */
9
+ /** {@inheritDoc CommandLineParameterBase.kind} */
10
10
  readonly kind: CommandLineParameterKind.Flag;
11
11
  /** @internal */
12
12
  constructor(definition: ICommandLineFlagDefinition);
13
13
  /**
14
- * {@inheritDoc CommandLineParameter._setValue}
14
+ * {@inheritDoc CommandLineParameterBase._setValue}
15
15
  * @internal
16
16
  */
17
17
  _setValue(data: unknown): void;
@@ -23,7 +23,7 @@ export declare class CommandLineFlagParameter extends CommandLineParameterBase {
23
23
  * or if the flag was not used.
24
24
  */
25
25
  get value(): boolean;
26
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
26
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
27
27
  appendToArgList(argList: string[]): void;
28
28
  }
29
29
  //# sourceMappingURL=CommandLineFlagParameter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineFlagParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineFlagParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEnF;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,wBAAwB;IACpE,OAAO,CAAC,MAAM,CAAkB;IAEhC,8CAA8C;IAC9C,SAAgB,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAiC;IAEpF,gBAAgB;gBACG,UAAU,EAAE,0BAA0B;IAIzD;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAkCrC;;;;;;OAMG;IACH,IAAW,KAAK,IAAI,OAAO,CAE1B;IAED,mEAAmE;IAC5D,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAKhD"}
1
+ {"version":3,"file":"CommandLineFlagParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineFlagParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEnF;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,wBAAwB;IACpE,OAAO,CAAC,MAAM,CAAkB;IAEhC,kDAAkD;IAClD,SAAgB,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAiC;IAEpF,gBAAgB;gBACG,UAAU,EAAE,0BAA0B;IAIzD;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAkCrC;;;;;;OAMG;IACH,IAAW,KAAK,IAAI,OAAO,CAE1B;IAED,uEAAuE;IAChE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAKhD"}
@@ -13,11 +13,11 @@ class CommandLineFlagParameter extends BaseClasses_1.CommandLineParameterBase {
13
13
  constructor(definition) {
14
14
  super(definition);
15
15
  this._value = false;
16
- /** {@inheritDoc CommandLineParameter.kind} */
16
+ /** {@inheritDoc CommandLineParameterBase.kind} */
17
17
  this.kind = BaseClasses_1.CommandLineParameterKind.Flag;
18
18
  }
19
19
  /**
20
- * {@inheritDoc CommandLineParameter._setValue}
20
+ * {@inheritDoc CommandLineParameterBase._setValue}
21
21
  * @internal
22
22
  */
23
23
  _setValue(data) {
@@ -58,7 +58,7 @@ class CommandLineFlagParameter extends BaseClasses_1.CommandLineParameterBase {
58
58
  get value() {
59
59
  return this._value;
60
60
  }
61
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
61
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
62
62
  appendToArgList(argList) {
63
63
  if (this.value) {
64
64
  argList.push(this.longName);
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineFlagParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineFlagParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAAmF;AAEnF;;;GAGG;AACH,MAAa,wBAAyB,SAAQ,sCAAwB;IAMpE,gBAAgB;IAChB,YAAmB,UAAsC;QACvD,KAAK,CAAC,UAAU,CAAC,CAAC;QAPZ,WAAM,GAAY,KAAK,CAAC;QAEhC,8CAA8C;QAC9B,SAAI,GAAkC,sCAAwB,CAAC,IAAI,CAAC;IAKpF,CAAC;IAED;;;OAGG;IACI,SAAS,CAAC,IAAa;QAC5B,WAAW;QACX,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxC,IAAI,OAAO,IAAI,KAAK,SAAS,EAAE,CAAC;gBAC9B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;YAED,yFAAyF;YACzF,uGAAuG;YACvG,qFAAqF;YACrF,IAAI,IAAI,EAAE,CAAC;gBACT,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;gBACnB,OAAO;YACT,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE,CAAC;YAC3C,uCAAuC;YACvC,MAAM,gBAAgB,GAAuB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YACnF,IAAI,gBAAgB,KAAK,SAAS,IAAI,gBAAgB,KAAK,EAAE,EAAE,CAAC;gBAC9D,IAAI,gBAAgB,KAAK,GAAG,IAAI,gBAAgB,KAAK,GAAG,EAAE,CAAC;oBACzD,MAAM,IAAI,KAAK,CACb,kBAAkB,gBAAgB,gCAAgC;wBAChE,IAAI,IAAI,CAAC,mBAAmB,8BAA8B,CAC7D,CAAC;gBACJ,CAAC;gBACD,IAAI,CAAC,MAAM,GAAG,gBAAgB,KAAK,GAAG,CAAC;gBACvC,OAAO;YACT,CAAC;QACH,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,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,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;CACF;AAlED,4DAkEC","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 { ICommandLineFlagDefinition } from './CommandLineDefinition';\nimport { CommandLineParameterBase, CommandLineParameterKind } from './BaseClasses';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.defineFlagParameter}.\n * @public\n */\nexport class CommandLineFlagParameter extends CommandLineParameterBase {\n private _value: boolean = false;\n\n /** {@inheritDoc CommandLineParameter.kind} */\n public readonly kind: CommandLineParameterKind.Flag = CommandLineParameterKind.Flag;\n\n /** @internal */\n public constructor(definition: ICommandLineFlagDefinition) {\n super(definition);\n }\n\n /**\n * {@inheritDoc CommandLineParameter._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // abstract\n if (data !== null && data !== undefined) {\n if (typeof data !== 'boolean') {\n this.reportInvalidData(data);\n }\n\n // If the flag is omitted, then argparse sets the data to \"false\" instead of \"undefined\".\n // This design prevents a syntax such as \"--flag=false\", probably because argparse prefers \"--no-flag\".\n // If we switch to a new CLI parser, we should try to add support for \"--flag=false\".\n if (data) {\n this._value = data;\n return;\n }\n }\n\n if (this.environmentVariable !== undefined) {\n // Try reading the environment variable\n const environmentValue: string | undefined = process.env[this.environmentVariable];\n if (environmentValue !== undefined && environmentValue !== '') {\n if (environmentValue !== '0' && environmentValue !== '1') {\n throw new Error(\n `Invalid value \"${environmentValue}\" for the environment variable` +\n ` ${this.environmentVariable}. Valid choices are 0 or 1.`\n );\n }\n this._value = environmentValue === '1';\n return;\n }\n }\n\n this._value = false;\n }\n\n /**\n * Returns a boolean indicating whether the parameter was included in the command line.\n *\n * @remarks\n * The return value will be false if the command-line has not been parsed yet,\n * or if the flag was not used.\n */\n public get value(): boolean {\n return this._value;\n }\n\n /** {@inheritDoc CommandLineParameter.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.value) {\n argList.push(this.longName);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"CommandLineFlagParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineFlagParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAAmF;AAEnF;;;GAGG;AACH,MAAa,wBAAyB,SAAQ,sCAAwB;IAMpE,gBAAgB;IAChB,YAAmB,UAAsC;QACvD,KAAK,CAAC,UAAU,CAAC,CAAC;QAPZ,WAAM,GAAY,KAAK,CAAC;QAEhC,kDAAkD;QAClC,SAAI,GAAkC,sCAAwB,CAAC,IAAI,CAAC;IAK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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 { ICommandLineFlagDefinition } from './CommandLineDefinition';\nimport { CommandLineParameterBase, CommandLineParameterKind } from './BaseClasses';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.defineFlagParameter}.\n * @public\n */\nexport class CommandLineFlagParameter extends CommandLineParameterBase {\n private _value: boolean = false;\n\n /** {@inheritDoc CommandLineParameterBase.kind} */\n public readonly kind: CommandLineParameterKind.Flag = CommandLineParameterKind.Flag;\n\n /** @internal */\n public constructor(definition: ICommandLineFlagDefinition) {\n super(definition);\n }\n\n /**\n * {@inheritDoc CommandLineParameterBase._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // abstract\n if (data !== null && data !== undefined) {\n if (typeof data !== 'boolean') {\n this.reportInvalidData(data);\n }\n\n // If the flag is omitted, then argparse sets the data to \"false\" instead of \"undefined\".\n // This design prevents a syntax such as \"--flag=false\", probably because argparse prefers \"--no-flag\".\n // If we switch to a new CLI parser, we should try to add support for \"--flag=false\".\n if (data) {\n this._value = data;\n return;\n }\n }\n\n if (this.environmentVariable !== undefined) {\n // Try reading the environment variable\n const environmentValue: string | undefined = process.env[this.environmentVariable];\n if (environmentValue !== undefined && environmentValue !== '') {\n if (environmentValue !== '0' && environmentValue !== '1') {\n throw new Error(\n `Invalid value \"${environmentValue}\" for the environment variable` +\n ` ${this.environmentVariable}. Valid choices are 0 or 1.`\n );\n }\n this._value = environmentValue === '1';\n return;\n }\n }\n\n this._value = false;\n }\n\n /**\n * Returns a boolean indicating whether the parameter was included in the command line.\n *\n * @remarks\n * The return value will be false if the command-line has not been parsed yet,\n * or if the flag was not used.\n */\n public get value(): boolean {\n return this._value;\n }\n\n /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.value) {\n argList.push(this.longName);\n }\n }\n}\n"]}
@@ -6,12 +6,12 @@ import { CommandLineParameterWithArgument, CommandLineParameterKind } from './Ba
6
6
  */
7
7
  export declare class CommandLineIntegerListParameter extends CommandLineParameterWithArgument {
8
8
  private _values;
9
- /** {@inheritDoc CommandLineParameter.kind} */
9
+ /** {@inheritDoc CommandLineParameterBase.kind} */
10
10
  readonly kind: CommandLineParameterKind.IntegerList;
11
11
  /** @internal */
12
12
  constructor(definition: ICommandLineIntegerListDefinition);
13
13
  /**
14
- * {@inheritDoc CommandLineParameter._setValue}
14
+ * {@inheritDoc CommandLineParameterBase._setValue}
15
15
  * @internal
16
16
  */
17
17
  _setValue(data: unknown): void;
@@ -23,7 +23,7 @@ export declare class CommandLineIntegerListParameter extends CommandLineParamete
23
23
  * or if the parameter was omitted and has no default value.
24
24
  */
25
25
  get values(): ReadonlyArray<number>;
26
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
26
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
27
27
  appendToArgList(argList: string[]): void;
28
28
  }
29
29
  //# sourceMappingURL=CommandLineIntegerListParameter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineIntegerListParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineIntegerListParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAG3F;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,gCAAgC;IACnF,OAAO,CAAC,OAAO,CAAgB;IAE/B,8CAA8C;IAC9C,SAAgB,IAAI,EAAE,wBAAwB,CAAC,WAAW,CAAwC;IAElG,gBAAgB;gBACG,UAAU,EAAE,iCAAiC;IAIhE;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAwCrC;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,CAEzC;IAED,mEAAmE;IAC5D,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAQhD"}
1
+ {"version":3,"file":"CommandLineIntegerListParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineIntegerListParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAG3F;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,gCAAgC;IACnF,OAAO,CAAC,OAAO,CAAgB;IAE/B,kDAAkD;IAClD,SAAgB,IAAI,EAAE,wBAAwB,CAAC,WAAW,CAAwC;IAElG,gBAAgB;gBACG,UAAU,EAAE,iCAAiC;IAIhE;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAwCrC;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,CAEzC;IAED,uEAAuE;IAChE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAQhD"}
@@ -14,11 +14,11 @@ class CommandLineIntegerListParameter extends BaseClasses_1.CommandLineParameter
14
14
  constructor(definition) {
15
15
  super(definition);
16
16
  this._values = [];
17
- /** {@inheritDoc CommandLineParameter.kind} */
17
+ /** {@inheritDoc CommandLineParameterBase.kind} */
18
18
  this.kind = BaseClasses_1.CommandLineParameterKind.IntegerList;
19
19
  }
20
20
  /**
21
- * {@inheritDoc CommandLineParameter._setValue}
21
+ * {@inheritDoc CommandLineParameterBase._setValue}
22
22
  * @internal
23
23
  */
24
24
  _setValue(data) {
@@ -65,7 +65,7 @@ class CommandLineIntegerListParameter extends BaseClasses_1.CommandLineParameter
65
65
  get values() {
66
66
  return this._values;
67
67
  }
68
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
68
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
69
69
  appendToArgList(argList) {
70
70
  if (this.values.length > 0) {
71
71
  for (const value of this.values) {
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineIntegerListParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineIntegerListParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAA2F;AAC3F,2EAAwE;AAExE;;;GAGG;AACH,MAAa,+BAAgC,SAAQ,8CAAgC;IAMnF,gBAAgB;IAChB,YAAmB,UAA6C;QAC9D,KAAK,CAAC,UAAU,CAAC,CAAC;QAPZ,YAAO,GAAa,EAAE,CAAC;QAE/B,8CAA8C;QAC9B,SAAI,GAAyC,sCAAwB,CAAC,WAAW,CAAC;IAKlG,CAAC;IAED;;;OAGG;IACI,SAAS,CAAC,IAAa;QAC5B,qDAAqD;QACrD,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;YACD,KAAK,MAAM,SAAS,IAAI,IAAI,EAAE,CAAC;gBAC7B,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;oBAClC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBAC/B,CAAC;YACH,CAAC;YACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,OAAO;QACT,CAAC;QAED,mEAAmE;QACnE,IAAI,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE,CAAC;YAC3C,MAAM,MAAM,GAAyB,qDAAyB,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YACrG,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,YAAY,GAAa,EAAE,CAAC;gBAClC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;oBAC3B,MAAM,MAAM,GAAW,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;oBAC3C,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;wBAC7C,MAAM,IAAI,KAAK,CACb,kBAAkB,KAAK,gCAAgC;4BACrD,IAAI,IAAI,CAAC,mBAAmB,iCAAiC,CAChE,CAAC;oBACJ,CAAC;oBACD,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC5B,CAAC;gBACD,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC;gBAC5B,OAAO;YACT,CAAC;QACH,CAAC;QAED,uCAAuC;QAEvC,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,CAAC;YAC3B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC5B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA3ED,0EA2EC","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 { ICommandLineIntegerListDefinition } from './CommandLineDefinition';\nimport { CommandLineParameterWithArgument, CommandLineParameterKind } from './BaseClasses';\nimport { EnvironmentVariableParser } from './EnvironmentVariableParser';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.defineIntegerListParameter}.\n * @public\n */\nexport class CommandLineIntegerListParameter extends CommandLineParameterWithArgument {\n private _values: number[] = [];\n\n /** {@inheritDoc CommandLineParameter.kind} */\n public readonly kind: CommandLineParameterKind.IntegerList = CommandLineParameterKind.IntegerList;\n\n /** @internal */\n public constructor(definition: ICommandLineIntegerListDefinition) {\n super(definition);\n }\n\n /**\n * {@inheritDoc CommandLineParameter._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // If argparse passed us a value, confirm it is valid\n if (data !== null && data !== undefined) {\n if (!Array.isArray(data)) {\n this.reportInvalidData(data);\n }\n for (const arrayItem of data) {\n if (typeof arrayItem !== 'number') {\n this.reportInvalidData(data);\n }\n }\n this._values = data;\n return;\n }\n\n // If an environment variable exists, attempt to parse it as a list\n if (this.environmentVariable !== undefined) {\n const values: string[] | undefined = EnvironmentVariableParser.parseAsList(this.environmentVariable);\n if (values) {\n const parsedValues: number[] = [];\n for (const value of values) {\n const parsed: number = parseInt(value, 10);\n if (isNaN(parsed) || value.indexOf('.') >= 0) {\n throw new Error(\n `Invalid value \"${value}\" for the environment variable` +\n ` ${this.environmentVariable}. It must be an integer value.`\n );\n }\n parsedValues.push(parsed);\n }\n this._values = parsedValues;\n return;\n }\n }\n\n // (No default value for integer lists)\n\n this._values = [];\n }\n\n /**\n * Returns the integer arguments for an integer list parameter that was parsed from the command line.\n *\n * @remarks\n * The array will be empty if the command-line has not been parsed yet,\n * or if the parameter was omitted and has no default value.\n */\n public get values(): ReadonlyArray<number> {\n return this._values;\n }\n\n /** {@inheritDoc CommandLineParameter.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.values.length > 0) {\n for (const value of this.values) {\n argList.push(this.longName);\n argList.push(value.toString());\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"CommandLineIntegerListParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineIntegerListParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAA2F;AAC3F,2EAAwE;AAExE;;;GAGG;AACH,MAAa,+BAAgC,SAAQ,8CAAgC;IAMnF,gBAAgB;IAChB,YAAmB,UAA6C;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M,CAAC,CAAC;gBAC5B,CAAC;gBACD,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC;gBAC5B,OAAO;YACT,CAAC;QACH,CAAC;QAED,uCAAuC;QAEvC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,uEAAuE;IAChE,eAAe,CAAC,OAAiB;QACtC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC5B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA3ED,0EA2EC","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 { ICommandLineIntegerListDefinition } from './CommandLineDefinition';\nimport { CommandLineParameterWithArgument, CommandLineParameterKind } from './BaseClasses';\nimport { EnvironmentVariableParser } from './EnvironmentVariableParser';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.defineIntegerListParameter}.\n * @public\n */\nexport class CommandLineIntegerListParameter extends CommandLineParameterWithArgument {\n private _values: number[] = [];\n\n /** {@inheritDoc CommandLineParameterBase.kind} */\n public readonly kind: CommandLineParameterKind.IntegerList = CommandLineParameterKind.IntegerList;\n\n /** @internal */\n public constructor(definition: ICommandLineIntegerListDefinition) {\n super(definition);\n }\n\n /**\n * {@inheritDoc CommandLineParameterBase._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // If argparse passed us a value, confirm it is valid\n if (data !== null && data !== undefined) {\n if (!Array.isArray(data)) {\n this.reportInvalidData(data);\n }\n for (const arrayItem of data) {\n if (typeof arrayItem !== 'number') {\n this.reportInvalidData(data);\n }\n }\n this._values = data;\n return;\n }\n\n // If an environment variable exists, attempt to parse it as a list\n if (this.environmentVariable !== undefined) {\n const values: string[] | undefined = EnvironmentVariableParser.parseAsList(this.environmentVariable);\n if (values) {\n const parsedValues: number[] = [];\n for (const value of values) {\n const parsed: number = parseInt(value, 10);\n if (isNaN(parsed) || value.indexOf('.') >= 0) {\n throw new Error(\n `Invalid value \"${value}\" for the environment variable` +\n ` ${this.environmentVariable}. It must be an integer value.`\n );\n }\n parsedValues.push(parsed);\n }\n this._values = parsedValues;\n return;\n }\n }\n\n // (No default value for integer lists)\n\n this._values = [];\n }\n\n /**\n * Returns the integer arguments for an integer list parameter that was parsed from the command line.\n *\n * @remarks\n * The array will be empty if the command-line has not been parsed yet,\n * or if the parameter was omitted and has no default value.\n */\n public get values(): ReadonlyArray<number> {\n return this._values;\n }\n\n /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.values.length > 0) {\n for (const value of this.values) {\n argList.push(this.longName);\n argList.push(value.toString());\n }\n }\n }\n}\n"]}
@@ -15,17 +15,17 @@ export declare class CommandLineIntegerParameter extends CommandLineParameterWit
15
15
  /** {@inheritDoc ICommandLineStringDefinition.defaultValue} */
16
16
  readonly defaultValue: number | undefined;
17
17
  private _value;
18
- /** {@inheritDoc CommandLineParameter.kind} */
18
+ /** {@inheritDoc CommandLineParameterBase.kind} */
19
19
  readonly kind: CommandLineParameterKind.Integer;
20
20
  /** @internal */
21
21
  constructor(definition: ICommandLineIntegerDefinition);
22
22
  /**
23
- * {@inheritDoc CommandLineParameter._setValue}
23
+ * {@inheritDoc CommandLineParameterBase._setValue}
24
24
  * @internal
25
25
  */
26
26
  _setValue(data: unknown): void;
27
27
  /**
28
- * {@inheritDoc CommandLineParameter._getSupplementaryNotes}
28
+ * {@inheritDoc CommandLineParameterBase._getSupplementaryNotes}
29
29
  * @internal
30
30
  */
31
31
  _getSupplementaryNotes(supplementaryNotes: string[]): void;
@@ -37,7 +37,7 @@ export declare class CommandLineIntegerParameter extends CommandLineParameterWit
37
37
  * or if the parameter was omitted and has no default value.
38
38
  */
39
39
  get value(): number | undefined;
40
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
40
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
41
41
  appendToArgList(argList: string[]): void;
42
42
  }
43
43
  //# sourceMappingURL=CommandLineIntegerParameter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineIntegerParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineIntegerParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAE3F;;;GAGG;AACH,MAAM,WAAW,oCAAqC,SAAQ,2BAA2B;IACvF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,qBAAa,2BAA4B,SAAQ,gCAAgC;IAC/E,8DAA8D;IAC9D,SAAgB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjD,OAAO,CAAC,MAAM,CAAiC;IAE/C,8CAA8C;IAC9C,SAAgB,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAoC;IAE1F,gBAAgB;gBACG,UAAU,EAAE,6BAA6B;IAM5D;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAkCrC;;;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"}
1
+ {"version":3,"file":"CommandLineIntegerParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineIntegerParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAE3F;;;GAGG;AACH,MAAM,WAAW,oCAAqC,SAAQ,2BAA2B;IACvF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,qBAAa,2BAA4B,SAAQ,gCAAgC;IAC/E,8DAA8D;IAC9D,SAAgB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjD,OAAO,CAAC,MAAM,CAAiC;IAE/C,kDAAkD;IAClD,SAAgB,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAoC;IAE1F,gBAAgB;gBACG,UAAU,EAAE,6BAA6B;IAM5D;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAkCrC;;;OAGG;IACI,sBAAsB,CAAC,kBAAkB,EAAE,MAAM,EAAE,GAAG,IAAI;IAQjE;;;;;;OAMG;IACH,IAAW,KAAK,IAAI,MAAM,GAAG,SAAS,CAErC;IAED,uEAAuE;IAChE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAMhD"}
@@ -13,13 +13,13 @@ class CommandLineIntegerParameter extends BaseClasses_1.CommandLineParameterWith
13
13
  constructor(definition) {
14
14
  super(definition);
15
15
  this._value = undefined;
16
- /** {@inheritDoc CommandLineParameter.kind} */
16
+ /** {@inheritDoc CommandLineParameterBase.kind} */
17
17
  this.kind = BaseClasses_1.CommandLineParameterKind.Integer;
18
18
  this.defaultValue = definition.defaultValue;
19
19
  this.validateDefaultValue(!!this.defaultValue);
20
20
  }
21
21
  /**
22
- * {@inheritDoc CommandLineParameter._setValue}
22
+ * {@inheritDoc CommandLineParameterBase._setValue}
23
23
  * @internal
24
24
  */
25
25
  _setValue(data) {
@@ -51,7 +51,7 @@ class CommandLineIntegerParameter extends BaseClasses_1.CommandLineParameterWith
51
51
  this._value = undefined;
52
52
  }
53
53
  /**
54
- * {@inheritDoc CommandLineParameter._getSupplementaryNotes}
54
+ * {@inheritDoc CommandLineParameterBase._getSupplementaryNotes}
55
55
  * @internal
56
56
  */
57
57
  _getSupplementaryNotes(supplementaryNotes) {
@@ -71,7 +71,7 @@ class CommandLineIntegerParameter extends BaseClasses_1.CommandLineParameterWith
71
71
  get value() {
72
72
  return this._value;
73
73
  }
74
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
74
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
75
75
  appendToArgList(argList) {
76
76
  if (this.value !== undefined) {
77
77
  argList.push(this.longName);
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineIntegerParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineIntegerParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAA2F;AAU3F;;;GAGG;AACH,MAAa,2BAA4B,SAAQ,8CAAgC;IAS/E,gBAAgB;IAChB,YAAmB,UAAyC;QAC1D,KAAK,CAAC,UAAU,CAAC,CAAC;QAPZ,WAAM,GAAuB,SAAS,CAAC;QAE/C,8CAA8C;QAC9B,SAAI,GAAqC,sCAAwB,CAAC,OAAO,CAAC;QAKxF,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QAC5C,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC;IAED;;;OAGG;IACI,SAAS,CAAC,IAAa;QAC5B,WAAW;QACX,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC7B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;YACD,IAAI,CAAC,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CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF;AApFD,kEAoFC","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 { ICommandLineIntegerDefinition } from './CommandLineDefinition';\nimport { CommandLineParameterWithArgument, CommandLineParameterKind } from './BaseClasses';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.(defineIntegerParameter:2)}.\n * @public\n */\nexport interface IRequiredCommandLineIntegerParameter extends CommandLineIntegerParameter {\n readonly value: number;\n}\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.(defineIntegerParameter:1)}.\n * @public\n */\nexport class CommandLineIntegerParameter extends CommandLineParameterWithArgument {\n /** {@inheritDoc ICommandLineStringDefinition.defaultValue} */\n public readonly defaultValue: number | undefined;\n\n private _value: number | undefined = undefined;\n\n /** {@inheritDoc CommandLineParameter.kind} */\n public readonly kind: CommandLineParameterKind.Integer = CommandLineParameterKind.Integer;\n\n /** @internal */\n public constructor(definition: ICommandLineIntegerDefinition) {\n super(definition);\n this.defaultValue = definition.defaultValue;\n this.validateDefaultValue(!!this.defaultValue);\n }\n\n /**\n * {@inheritDoc CommandLineParameter._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // abstract\n if (data !== null && data !== undefined) {\n if (typeof data !== 'number') {\n this.reportInvalidData(data);\n }\n this._value = data;\n return;\n }\n\n if (this.environmentVariable !== undefined) {\n // Try reading the environment variable\n const environmentValue: string | undefined = process.env[this.environmentVariable];\n if (environmentValue !== undefined && environmentValue !== '') {\n const parsed: number = parseInt(environmentValue, 10);\n if (isNaN(parsed) || environmentValue.indexOf('.') >= 0) {\n throw new Error(\n `Invalid value \"${environmentValue}\" for the environment variable` +\n ` ${this.environmentVariable}. It must be an integer value.`\n );\n }\n this._value = parsed;\n return;\n }\n }\n\n if (this.defaultValue !== undefined) {\n this._value = this.defaultValue;\n return;\n }\n\n this._value = undefined;\n }\n\n /**\n * {@inheritDoc CommandLineParameter._getSupplementaryNotes}\n * @internal\n */\n public _getSupplementaryNotes(supplementaryNotes: string[]): void {\n // virtual\n super._getSupplementaryNotes(supplementaryNotes);\n if (this.defaultValue !== undefined) {\n supplementaryNotes.push(`The default value is ${this.defaultValue}.`);\n }\n }\n\n /**\n * Returns the argument value for an integer parameter that was parsed from the command line.\n *\n * @remarks\n * The return value will be undefined if the command-line has not been parsed yet,\n * or if the parameter was omitted and has no default value.\n */\n public get value(): number | undefined {\n return this._value;\n }\n\n /** {@inheritDoc CommandLineParameter.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.value !== undefined) {\n argList.push(this.longName);\n argList.push(this.value.toString());\n }\n }\n}\n"]}
1
+ {"version":3,"file":"CommandLineIntegerParameter.js","sourceRoot":"","sources":["../../src/parameters/CommandLineIntegerParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,+CAA2F;AAU3F;;;GAGG;AACH,MAAa,2BAA4B,SAAQ,8CAAgC;IAS/E,gBAAgB;IAChB,YAAmB,UAAyC;QAC1D,KAAK,CAAC,UAAU,CAAC,CAAC;QAPZ,WAAM,GAAuB,SAAS,CAAC;QAE/C,kDAAkD;QAClC,SAAI,GAAqC,sCAAwB,CAAC,OAAO,CAAC;QAKxF,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QAC5C,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC;IAED;;;OAGG;IACI,SAAS,CAAC,IAAa;QAC5B,WAAW;QACX,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxC,IAAI,OAAO,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AW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,uEAAuE;IAChE,eAAe,CAAC,OAAiB;QACtC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF;AApFD,kEAoFC","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 { ICommandLineIntegerDefinition } from './CommandLineDefinition';\nimport { CommandLineParameterWithArgument, CommandLineParameterKind } from './BaseClasses';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.(defineIntegerParameter:2)}.\n * @public\n */\nexport interface IRequiredCommandLineIntegerParameter extends CommandLineIntegerParameter {\n readonly value: number;\n}\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.(defineIntegerParameter:1)}.\n * @public\n */\nexport class CommandLineIntegerParameter extends CommandLineParameterWithArgument {\n /** {@inheritDoc ICommandLineStringDefinition.defaultValue} */\n public readonly defaultValue: number | undefined;\n\n private _value: number | undefined = undefined;\n\n /** {@inheritDoc CommandLineParameterBase.kind} */\n public readonly kind: CommandLineParameterKind.Integer = CommandLineParameterKind.Integer;\n\n /** @internal */\n public constructor(definition: ICommandLineIntegerDefinition) {\n super(definition);\n this.defaultValue = definition.defaultValue;\n this.validateDefaultValue(!!this.defaultValue);\n }\n\n /**\n * {@inheritDoc CommandLineParameterBase._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // abstract\n if (data !== null && data !== undefined) {\n if (typeof data !== 'number') {\n this.reportInvalidData(data);\n }\n this._value = data;\n return;\n }\n\n if (this.environmentVariable !== undefined) {\n // Try reading the environment variable\n const environmentValue: string | undefined = process.env[this.environmentVariable];\n if (environmentValue !== undefined && environmentValue !== '') {\n const parsed: number = parseInt(environmentValue, 10);\n if (isNaN(parsed) || environmentValue.indexOf('.') >= 0) {\n throw new Error(\n `Invalid value \"${environmentValue}\" for the environment variable` +\n ` ${this.environmentVariable}. It must be an integer value.`\n );\n }\n this._value = parsed;\n return;\n }\n }\n\n if (this.defaultValue !== undefined) {\n this._value = this.defaultValue;\n return;\n }\n\n this._value = undefined;\n }\n\n /**\n * {@inheritDoc CommandLineParameterBase._getSupplementaryNotes}\n * @internal\n */\n public _getSupplementaryNotes(supplementaryNotes: string[]): void {\n // virtual\n super._getSupplementaryNotes(supplementaryNotes);\n if (this.defaultValue !== undefined) {\n supplementaryNotes.push(`The default value is ${this.defaultValue}.`);\n }\n }\n\n /**\n * Returns the argument value for an integer parameter that was parsed from the command line.\n *\n * @remarks\n * The return value will be undefined if the command-line has not been parsed yet,\n * or if the parameter was omitted and has no default value.\n */\n public get value(): number | undefined {\n return this._value;\n }\n\n /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.value !== undefined) {\n argList.push(this.longName);\n argList.push(this.value.toString());\n }\n }\n}\n"]}
@@ -18,11 +18,11 @@ export declare class CommandLineRemainder {
18
18
  */
19
19
  get values(): ReadonlyArray<string>;
20
20
  /**
21
- * {@inheritDoc CommandLineParameter._setValue}
21
+ * {@inheritDoc CommandLineParameterBase._setValue}
22
22
  * @internal
23
23
  */
24
24
  _setValue(data: unknown): void;
25
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
25
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
26
26
  appendToArgList(argList: string[]): void;
27
27
  }
28
28
  //# sourceMappingURL=CommandLineRemainder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineRemainder.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineRemainder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E;;;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;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IASrC,mEAAmE;IAC5D,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAOhD"}
1
+ {"version":3,"file":"CommandLineRemainder.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineRemainder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E;;;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;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IASrC,uEAAuE;IAChE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAOhD"}
@@ -24,7 +24,7 @@ class CommandLineRemainder {
24
24
  return this._values;
25
25
  }
26
26
  /**
27
- * {@inheritDoc CommandLineParameter._setValue}
27
+ * {@inheritDoc CommandLineParameterBase._setValue}
28
28
  * @internal
29
29
  */
30
30
  _setValue(data) {
@@ -34,7 +34,7 @@ class CommandLineRemainder {
34
34
  }
35
35
  this._values.push(...data);
36
36
  }
37
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
37
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
38
38
  appendToArgList(argList) {
39
39
  if (this.values.length > 0) {
40
40
  for (const value of this.values) {
@@ -1 +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;IACI,SAAS,CAAC,IAAa;QAC5B,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,CAAC;YACtE,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QACnF,CAAC;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,CAAC;YAC3B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA3CD,oDA2CC","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 { ICommandLineRemainderDefinition } from './CommandLineDefinition';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.defineCommandLineRemainder}.\n * @public\n */\nexport class CommandLineRemainder {\n private _values: string[] = [];\n\n /** {@inheritDoc IBaseCommandLineDefinition.description} */\n public readonly description: string;\n\n /** @internal */\n public constructor(definition: ICommandLineRemainderDefinition) {\n this.description = definition.description;\n }\n\n /**\n * Returns any remaining command line arguments after the recognized portion\n * that was parsed from the command line.\n *\n * @remarks\n * The array will be empty if the command-line has not been parsed yet.\n */\n public get values(): ReadonlyArray<string> {\n return this._values;\n }\n\n /**\n * {@inheritDoc CommandLineParameter._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // abstract\n if (!Array.isArray(data) || !data.every((x) => typeof x === 'string')) {\n throw new Error(`Unexpected data object for remainder: ` + JSON.stringify(data));\n }\n\n this._values.push(...data);\n }\n\n /** {@inheritDoc CommandLineParameter.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.values.length > 0) {\n for (const value of this.values) {\n argList.push(value);\n }\n }\n }\n}\n"]}
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;IACI,SAAS,CAAC,IAAa;QAC5B,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,CAAC;YACtE,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QACnF,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,uEAAuE;IAChE,eAAe,CAAC,OAAiB;QACtC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA3CD,oDA2CC","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 { ICommandLineRemainderDefinition } from './CommandLineDefinition';\n\n/**\n * The data type returned by {@link CommandLineParameterProvider.defineCommandLineRemainder}.\n * @public\n */\nexport class CommandLineRemainder {\n private _values: string[] = [];\n\n /** {@inheritDoc IBaseCommandLineDefinition.description} */\n public readonly description: string;\n\n /** @internal */\n public constructor(definition: ICommandLineRemainderDefinition) {\n this.description = definition.description;\n }\n\n /**\n * Returns any remaining command line arguments after the recognized portion\n * that was parsed from the command line.\n *\n * @remarks\n * The array will be empty if the command-line has not been parsed yet.\n */\n public get values(): ReadonlyArray<string> {\n return this._values;\n }\n\n /**\n * {@inheritDoc CommandLineParameterBase._setValue}\n * @internal\n */\n public _setValue(data: unknown): void {\n // abstract\n if (!Array.isArray(data) || !data.every((x) => typeof x === 'string')) {\n throw new Error(`Unexpected data object for remainder: ` + JSON.stringify(data));\n }\n\n this._values.push(...data);\n }\n\n /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */\n public appendToArgList(argList: string[]): void {\n if (this.values.length > 0) {\n for (const value of this.values) {\n argList.push(value);\n }\n }\n }\n}\n"]}
@@ -6,12 +6,12 @@ import { CommandLineParameterWithArgument, CommandLineParameterKind } from './Ba
6
6
  */
7
7
  export declare class CommandLineStringListParameter extends CommandLineParameterWithArgument {
8
8
  private _values;
9
- /** {@inheritDoc CommandLineParameter.kind} */
9
+ /** {@inheritDoc CommandLineParameterBase.kind} */
10
10
  readonly kind: CommandLineParameterKind.StringList;
11
11
  /** @internal */
12
12
  constructor(definition: ICommandLineStringListDefinition);
13
13
  /**
14
- * {@inheritDoc CommandLineParameter._setValue}
14
+ * {@inheritDoc CommandLineParameterBase._setValue}
15
15
  * @internal
16
16
  */
17
17
  _setValue(data: unknown): void;
@@ -23,7 +23,7 @@ export declare class CommandLineStringListParameter extends CommandLineParameter
23
23
  * or if the parameter was omitted and has no default value.
24
24
  */
25
25
  get values(): ReadonlyArray<string>;
26
- /** {@inheritDoc CommandLineParameter.appendToArgList} @override */
26
+ /** {@inheritDoc CommandLineParameterBase.appendToArgList} @override */
27
27
  appendToArgList(argList: string[]): void;
28
28
  }
29
29
  //# sourceMappingURL=CommandLineStringListParameter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLineStringListParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineStringListParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAG3F;;;GAGG;AACH,qBAAa,8BAA+B,SAAQ,gCAAgC;IAClF,OAAO,CAAC,OAAO,CAAgB;IAE/B,8CAA8C;IAC9C,SAAgB,IAAI,EAAE,wBAAwB,CAAC,UAAU,CAAuC;IAEhG,gBAAgB;gBACG,UAAU,EAAE,gCAAgC;IAI/D;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IA6BrC;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,CAEzC;IAED,mEAAmE;IAC5D,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAQhD"}
1
+ {"version":3,"file":"CommandLineStringListParameter.d.ts","sourceRoot":"","sources":["../../src/parameters/CommandLineStringListParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAG3F;;;GAGG;AACH,qBAAa,8BAA+B,SAAQ,gCAAgC;IAClF,OAAO,CAAC,OAAO,CAAgB;IAE/B,kDAAkD;IAClD,SAAgB,IAAI,EAAE,wBAAwB,CAAC,UAAU,CAAuC;IAEhG,gBAAgB;gBACG,UAAU,EAAE,gCAAgC;IAI/D;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IA6BrC;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,CAEzC;IAED,uEAAuE;IAChE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAQhD"}