@clerc/plugin-completions 1.0.0-beta.27 → 1.0.0-beta.28
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.js +3 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -568,7 +568,7 @@ function addStoreApi(cli, { groups }) {
|
|
|
568
568
|
|
|
569
569
|
//#endregion
|
|
570
570
|
//#region ../plugin-help/src/index.ts
|
|
571
|
-
const helpPlugin = ({ command = true, flag = true, showHelpWhenNoCommandSpecified = true, notes, examples,
|
|
571
|
+
const helpPlugin = ({ command = true, flag = true, showHelpWhenNoCommandSpecified = true, notes, examples, header, footer, formatters, groups = {} } = {}) => definePlugin({ setup: (cli) => {
|
|
572
572
|
addStoreApi(cli, { groups });
|
|
573
573
|
const mergedFormatters = {
|
|
574
574
|
...defaultFormatters,
|
|
@@ -587,8 +587,9 @@ const helpPlugin = ({ command = true, flag = true, showHelpWhenNoCommandSpecifie
|
|
|
587
587
|
const effectiveNotes = notes ?? generalHelpNotes;
|
|
588
588
|
const getEffectiveExamples = () => examples ?? getGeneralHelpExamples();
|
|
589
589
|
function printHelp(s) {
|
|
590
|
-
if (
|
|
590
|
+
if (header) console.log(header);
|
|
591
591
|
console.log(s);
|
|
592
|
+
if (footer) console.log(footer);
|
|
592
593
|
}
|
|
593
594
|
const renderer = new HelpRenderer(mergedFormatters, cli, cli._globalFlags, () => groups, getEffectiveExamples, effectiveNotes);
|
|
594
595
|
function tryPrintSubcommandsHelp(commandName) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clerc/plugin-completions",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.28",
|
|
4
4
|
"author": "Ray <i@mk1.io> (https://github.com/so1ve)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Clerc plugin completions",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@bomb.sh/tab": "^0.0.10"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@clerc/core": "1.0.0-beta.
|
|
55
|
-
"@clerc/utils": "1.0.0-beta.
|
|
54
|
+
"@clerc/core": "1.0.0-beta.28",
|
|
55
|
+
"@clerc/utils": "1.0.0-beta.28"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@clerc/core": "*"
|