@oclif/core 1.6.1 → 1.6.4
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/CHANGELOG.md +21 -0
- package/lib/help/index.d.ts +0 -1
- package/lib/help/index.js +1 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.6.4](https://github.com/oclif/core/compare/v1.6.3...v1.6.4) (2022-03-31)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* dynamic help ([#395](https://github.com/oclif/core/issues/395)) ([8ecc8f4](https://github.com/oclif/core/commit/8ecc8f41ec62ef5b05bdb70a79dce09b5913d14b))
|
|
11
|
+
|
|
12
|
+
### [1.6.3](https://github.com/oclif/core/compare/v1.6.2...v1.6.3) (2022-03-23)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* use plugin alias if available ([245d841](https://github.com/oclif/core/commit/245d84197a64e55b17524c22cbc17ec025a07c08))
|
|
18
|
+
|
|
19
|
+
### [1.6.2](https://github.com/oclif/core/compare/v1.6.1...v1.6.2) (2022-03-23)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* load correct plugin when using dynamic help ([#394](https://github.com/oclif/core/issues/394)) ([15c1fbe](https://github.com/oclif/core/commit/15c1fbe1e870b6da1372a5786a9ffb09746ce8f6))
|
|
25
|
+
|
|
5
26
|
### [1.6.1](https://github.com/oclif/core/compare/v1.6.0...v1.6.1) (2022-03-17)
|
|
6
27
|
|
|
7
28
|
|
package/lib/help/index.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ export declare class Help extends HelpBase {
|
|
|
24
24
|
protected get sortedTopics(): Interfaces.Topic[];
|
|
25
25
|
constructor(config: Interfaces.Config, opts?: Partial<Interfaces.HelpOptions>);
|
|
26
26
|
showHelp(argv: string[]): Promise<void>;
|
|
27
|
-
private getDynamicCommand;
|
|
28
27
|
showCommandHelp(command: Interfaces.Command): Promise<void>;
|
|
29
28
|
protected showRootHelp(): Promise<void>;
|
|
30
29
|
protected showTopicHelp(topic: Interfaces.Topic): Promise<void>;
|
package/lib/help/index.js
CHANGED
|
@@ -8,7 +8,6 @@ const root_1 = require("./root");
|
|
|
8
8
|
const util_1 = require("../util");
|
|
9
9
|
const util_2 = require("./util");
|
|
10
10
|
const formatter_1 = require("./formatter");
|
|
11
|
-
const plugin_1 = require("../config/plugin");
|
|
12
11
|
const config_1 = require("../config/config");
|
|
13
12
|
var command_2 = require("./command");
|
|
14
13
|
Object.defineProperty(exports, "CommandHelp", { enumerable: true, get: function () { return command_2.CommandHelp; } });
|
|
@@ -87,7 +86,7 @@ class Help extends HelpBase {
|
|
|
87
86
|
const command = this.config.findCommand(subject);
|
|
88
87
|
if (command) {
|
|
89
88
|
if (command.hasDynamicHelp) {
|
|
90
|
-
const dynamicCommand = await (0, config_1.toCached)(await
|
|
89
|
+
const dynamicCommand = await (0, config_1.toCached)(await command.load());
|
|
91
90
|
await this.showCommandHelp(dynamicCommand);
|
|
92
91
|
}
|
|
93
92
|
else {
|
|
@@ -110,15 +109,6 @@ class Help extends HelpBase {
|
|
|
110
109
|
}
|
|
111
110
|
(0, errors_1.error)(`Command ${subject} not found.`);
|
|
112
111
|
}
|
|
113
|
-
async getDynamicCommand(cmdName) {
|
|
114
|
-
const plugin = new plugin_1.Plugin({ ignoreManifest: true, root: this.config.root });
|
|
115
|
-
await plugin.load();
|
|
116
|
-
const cmd = await plugin.findCommand(cmdName);
|
|
117
|
-
if (!cmd) {
|
|
118
|
-
throw new Error(`Command ${cmdName} not found.`);
|
|
119
|
-
}
|
|
120
|
-
return cmd;
|
|
121
|
-
}
|
|
122
112
|
async showCommandHelp(command) {
|
|
123
113
|
var _a, _b, _c, _d;
|
|
124
114
|
const name = command.id;
|