@oclif/core 2.9.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/parser/parse.js +2 -1
- package/package.json +1 -1
package/lib/parser/parse.js
CHANGED
|
@@ -261,7 +261,8 @@ class Parser {
|
|
|
261
261
|
const valueReferenceForHelp = fwsArrayToObject(flagsWithAllValues.filter(fws => !fws.metadata?.setFromDefault));
|
|
262
262
|
return Promise.all(fws.map(async (fws) => fws.helpFunction ? ({ ...fws, metadata: { ...fws.metadata, defaultHelp: await fws.helpFunction?.(fws, valueReferenceForHelp, this.context) } }) : fws));
|
|
263
263
|
};
|
|
264
|
-
const fwsArrayToObject = (fwsArray) => Object.fromEntries(fwsArray.
|
|
264
|
+
const fwsArrayToObject = (fwsArray) => Object.fromEntries(fwsArray.filter(fws => fws.value !== undefined)
|
|
265
|
+
.map(fws => [fws.inputFlag.name, fws.value]));
|
|
265
266
|
const flagTokenMap = this.mapAndValidateFlags();
|
|
266
267
|
const flagsWithValues = await Promise.all(Object.entries(this.input.flags)
|
|
267
268
|
// we check them if they have a token, or might have env, default, or defaultHelp. Also include booleans so they get their default value
|