@oclif/core
Advanced tools
Comparing version 1.6.3 to 1.6.4
@@ -5,2 +5,9 @@ # Changelog | ||
### [1.6.4](https://github.com/oclif/core/compare/v1.6.3...v1.6.4) (2022-03-31) | ||
### Bug Fixes | ||
* dynamic help ([#395](https://github.com/oclif/core/issues/395)) ([8ecc8f4](https://github.com/oclif/core/commit/8ecc8f41ec62ef5b05bdb70a79dce09b5913d14b)) | ||
### [1.6.3](https://github.com/oclif/core/compare/v1.6.2...v1.6.3) (2022-03-23) | ||
@@ -7,0 +14,0 @@ |
@@ -27,3 +27,2 @@ import * as Interfaces from '../interfaces'; | ||
showHelp(argv: string[]): Promise<void>; | ||
private getDynamicCommand; | ||
showCommandHelp(command: Interfaces.Command): Promise<void>; | ||
@@ -30,0 +29,0 @@ protected showRootHelp(): Promise<void>; |
@@ -11,3 +11,2 @@ "use strict"; | ||
const formatter_1 = require("./formatter"); | ||
const plugin_1 = require("../config/plugin"); | ||
const config_1 = require("../config/config"); | ||
@@ -91,3 +90,3 @@ var command_2 = require("./command"); | ||
if (command.hasDynamicHelp) { | ||
const dynamicCommand = await (0, config_1.toCached)(await this.getDynamicCommand(command)); | ||
const dynamicCommand = await (0, config_1.toCached)(await command.load()); | ||
await this.showCommandHelp(dynamicCommand); | ||
@@ -115,12 +114,2 @@ } | ||
} | ||
async getDynamicCommand(command) { | ||
var _a; | ||
const plugin = new plugin_1.Plugin({ ignoreManifest: true, root: this.config.root, name: (_a = command.pluginAlias) !== null && _a !== void 0 ? _a : command.pluginName }); | ||
await plugin.load(); | ||
const cmd = await plugin.findCommand(command.id); | ||
if (!cmd) { | ||
throw new Error(`Command ${command.id} not found.`); | ||
} | ||
return cmd; | ||
} | ||
async showCommandHelp(command) { | ||
@@ -127,0 +116,0 @@ var _a, _b, _c, _d; |
{ | ||
"name": "@oclif/core", | ||
"description": "base library for oclif CLIs", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"author": "Salesforce", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/core/issues", |
301175
7562