@oclif/core 2.8.2 → 2.8.3-beta.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.
@@ -726,7 +726,7 @@ const defaultFlagToCached = async (flag, isWritingManifest = false) => {
726
726
  // if not specified, try the default function
727
727
  if (typeof flag.default === 'function') {
728
728
  try {
729
- return await flag.default({ options: {}, flags: {} }, isWritingManifest);
729
+ return await flag.default({ options: flag, flags: {} }, isWritingManifest);
730
730
  }
731
731
  catch { }
732
732
  }
@@ -747,7 +747,7 @@ const defaultArgToCached = async (arg, isWritingManifest = false) => {
747
747
  // if not specified, try the default function
748
748
  if (typeof arg.default === 'function') {
749
749
  try {
750
- return await arg.default({ options: arg, flags: {} }, isWritingManifest);
750
+ return await arg.default(isWritingManifest);
751
751
  }
752
752
  catch { }
753
753
  }
@@ -231,10 +231,7 @@ 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({
235
- options: flag,
236
- flags, ...this.context,
237
- }) : flag.default);
234
+ const defaultValue = (typeof flag.default === 'function' ? await flag.default({ options: flag, flags }) : flag.default);
238
235
  flags[k] = defaultValue;
239
236
  }
240
237
  }
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": "2.8.2",
4
+ "version": "2.8.3-beta.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {