@oclif/core 3.12.1 → 3.13.0

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.
@@ -200,6 +200,12 @@ export type OptionFlagProps = FlagProps & {
200
200
  helpValue?: string;
201
201
  options?: readonly string[];
202
202
  multiple?: boolean;
203
+ /**
204
+ * Parse one value per flag; allow `-m val1 -m val2`, disallow `-m val1 val2`.
205
+ * Set to true to use "multiple: true" flags together with args.
206
+ * Only respected if multiple is set to true.
207
+ */
208
+ multipleNonGreedy?: boolean;
203
209
  /**
204
210
  * Delimiter to separate the values for a multiple value flag.
205
211
  * Only respected if multiple is set to true. Default behavior is to
@@ -145,7 +145,7 @@ class Parser {
145
145
  continue;
146
146
  }
147
147
  }
148
- if (parsingFlags && this.currentFlag && this.currentFlag.multiple) {
148
+ if (parsingFlags && this.currentFlag && this.currentFlag.multiple && !this.currentFlag.multipleNonGreedy) {
149
149
  this.raw.push({ flag: this.currentFlag.name, input, type: 'flag' });
150
150
  continue;
151
151
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "3.12.1",
4
+ "version": "3.13.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {