@oclif/core 1.24.1 → 1.24.2

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.
@@ -678,7 +678,8 @@ async function toCached(c, plugin) {
678
678
  }
679
679
  }
680
680
  // v2 commands have args as an object, so we need to normalize it to an array for forwards compatibility
681
- const normalized = (Array.isArray(c.args) ? c.args ?? [] : Object.values(c.args ?? {}));
681
+ // @ts-ignore
682
+ const normalized = Array.isArray(c.args) ? c.args ?? [] : Object.entries(c.args ?? {}).map(([name, arg]) => ({ ...arg, name }));
682
683
  const argsPromise = normalized.map(async (a) => ({
683
684
  name: a.name,
684
685
  description: a.description,
@@ -707,7 +708,7 @@ async function toCached(c, plugin) {
707
708
  args,
708
709
  };
709
710
  // do not include these properties in manifest
710
- const ignoreCommandProperties = ['plugin', '_flags', '_enableJsonFlag', '_globalFlags'];
711
+ const ignoreCommandProperties = ['plugin', '_flags', '_enableJsonFlag', '_globalFlags', '_baseFlags'];
711
712
  const stdKeys = Object.keys(stdProperties);
712
713
  const keysToAdd = Object.keys(c).filter(property => ![...stdKeys, ...ignoreCommandProperties].includes(property));
713
714
  const additionalProperties = {};
package/lib/main.js CHANGED
@@ -71,6 +71,6 @@ async function run(argv = process.argv.slice(2), options) {
71
71
  // command id.
72
72
  if (config.pjson.oclif.default === '.' && id === '.' && argv[0] === '.')
73
73
  argvSlice = ['.', ...argvSlice];
74
- await config.runCommand(id, argvSlice, cmd);
74
+ return config.runCommand(id, argvSlice, cmd);
75
75
  }
76
76
  exports.run = run;
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": "1.24.1",
4
+ "version": "1.24.2",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {