@clerc/plugin-help 0.42.2 → 0.44.0
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/dist/index.d.ts +12 -4
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -48,13 +48,21 @@ interface HelpPluginOptions {
|
|
|
48
48
|
* @default true
|
|
49
49
|
*/
|
|
50
50
|
showHelpWhenNoCommand?: boolean;
|
|
51
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Global notes.
|
|
53
|
+
*/
|
|
52
54
|
notes?: string[];
|
|
53
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Global examples.
|
|
57
|
+
*/
|
|
54
58
|
examples?: [string, string][];
|
|
55
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Banner.
|
|
61
|
+
*/
|
|
56
62
|
banner?: string;
|
|
57
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Renderers.
|
|
65
|
+
*/
|
|
58
66
|
renderers?: Renderers;
|
|
59
67
|
}
|
|
60
68
|
declare const helpPlugin: ({ command, flag, showHelpWhenNoCommand, notes, examples, banner, renderers, }?: HelpPluginOptions) => _clerc_core.Plugin<_clerc_core.Clerc<{}, {}>, _clerc_core.Clerc<{}, {}>>;
|
package/dist/index.js
CHANGED
|
@@ -331,7 +331,7 @@ const helpPlugin = ({
|
|
|
331
331
|
default: false
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
|
-
cli.
|
|
334
|
+
cli.interceptor((ctx, next) => {
|
|
335
335
|
const shouldShowHelp = ctx.flags.help;
|
|
336
336
|
if (!ctx.hasRootOrAlias && ctx.raw._.length === 0 && showHelpWhenNoCommand && !shouldShowHelp) {
|
|
337
337
|
let str = `${t("core.noCommandGiven")}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clerc/plugin-help",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"author": "Ray <i@mk1.io> (https://github.com/so1ve)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Clerc plugin help",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@types/text-table": "^0.2.
|
|
51
|
+
"@types/text-table": "^0.2.3",
|
|
52
52
|
"string-width": "^6.1.0",
|
|
53
53
|
"text-table": "^0.2.0",
|
|
54
54
|
"yoctocolors": "^1.0.0",
|
|
55
|
-
"@clerc/utils": "0.
|
|
55
|
+
"@clerc/utils": "0.44.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@clerc/core": "*"
|