@oclif/core 2.8.3-beta.1 → 2.8.3
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/config/config.d.ts
CHANGED
package/lib/config/config.js
CHANGED
|
@@ -100,6 +100,7 @@ class Config {
|
|
|
100
100
|
this.windows = this.platform === 'win32';
|
|
101
101
|
this.bin = this.pjson.oclif.bin || this.name;
|
|
102
102
|
this.binAliases = this.pjson.oclif.binAliases;
|
|
103
|
+
this.nsisCustomization = this.pjson.oclif.nsisCustomization;
|
|
103
104
|
this.dirname = this.pjson.oclif.dirname || this.name;
|
|
104
105
|
this.flexibleTaxonomy = this.pjson.oclif.flexibleTaxonomy || false;
|
|
105
106
|
// currently, only colons or spaces are valid separators
|
|
@@ -726,7 +727,7 @@ const defaultFlagToCached = async (flag, isWritingManifest = false) => {
|
|
|
726
727
|
// if not specified, try the default function
|
|
727
728
|
if (typeof flag.default === 'function') {
|
|
728
729
|
try {
|
|
729
|
-
return await flag.default({ options:
|
|
730
|
+
return await flag.default({ options: {}, flags: {} }, isWritingManifest);
|
|
730
731
|
}
|
|
731
732
|
catch { }
|
|
732
733
|
}
|
|
@@ -747,7 +748,7 @@ const defaultArgToCached = async (arg, isWritingManifest = false) => {
|
|
|
747
748
|
// if not specified, try the default function
|
|
748
749
|
if (typeof arg.default === 'function') {
|
|
749
750
|
try {
|
|
750
|
-
return await arg.default(isWritingManifest);
|
|
751
|
+
return await arg.default({ options: arg, flags: {} }, isWritingManifest);
|
|
751
752
|
}
|
|
752
753
|
catch { }
|
|
753
754
|
}
|
package/lib/parser/parse.js
CHANGED
|
@@ -231,7 +231,10 @@ class Parser {
|
|
|
231
231
|
}
|
|
232
232
|
if (!(k in flags) && flag.default !== undefined) {
|
|
233
233
|
this.metaData.flags[k] = { ...this.metaData.flags[k], setFromDefault: true };
|
|
234
|
-
const defaultValue = (typeof flag.default === 'function' ? await flag.default({
|
|
234
|
+
const defaultValue = (typeof flag.default === 'function' ? await flag.default({
|
|
235
|
+
options: flag,
|
|
236
|
+
flags, ...this.context,
|
|
237
|
+
}) : flag.default);
|
|
235
238
|
flags[k] = defaultValue;
|
|
236
239
|
}
|
|
237
240
|
}
|