balena-cli/patches/all/@oclif+plugin-help+3.2.15.patch

44 lines
2.0 KiB
Diff
Raw Normal View History

diff --git a/node_modules/@oclif/plugin-help/lib/command.js b/node_modules/@oclif/plugin-help/lib/command.js
2021-12-24 15:50:38 +00:00
index b3b9010..788e5c6 100644
--- a/node_modules/@oclif/plugin-help/lib/command.js
+++ b/node_modules/@oclif/plugin-help/lib/command.js
2021-12-24 15:50:38 +00:00
@@ -88,7 +88,7 @@ class CommandHelp {
return;
const body = list_1.renderList(args.map(a => {
2021-12-24 15:50:38 +00:00
var _a;
- const name = a.name.toUpperCase();
+ const name = a.required ? `<${a.name}>` : `[${a.name}]`;
let description = a.description || '';
2021-12-24 15:50:38 +00:00
// `a.default` is actually not always a string (typing bug), hence `toString()`
if (a.default || ((_a = a.default) === null || _a === void 0 ? void 0 : _a.toString()) === '0')
@@ -133,9 +133,7 @@ class CommandHelp {
if (!flag.helpValue && flag.options) {
value = flag.options.join('|');
}
- if (!value.includes('|'))
- value = underline(value);
- left += `=${value}`;
+ left += ` <${value}>`;
}
let right = flag.description || '';
2021-12-24 15:50:38 +00:00
// `flag.default` is not always a string (typing bug), hence `toString()`
diff --git a/node_modules/@oclif/plugin-help/lib/index.js b/node_modules/@oclif/plugin-help/lib/index.js
2021-12-24 15:50:38 +00:00
index 04d7861..c2fb591 100644
--- a/node_modules/@oclif/plugin-help/lib/index.js
+++ b/node_modules/@oclif/plugin-help/lib/index.js
2021-12-24 15:50:38 +00:00
@@ -98,11 +98,12 @@ class Help extends HelpBase {
console.log(title + '\n');
console.log(this.formatCommand(command));
console.log('');
- if (subTopics.length > 0) {
+ const SUPPRESS_SUBTOPICS = true;
+ if (subTopics.length > 0 && !SUPPRESS_SUBTOPICS) {
console.log(this.formatTopics(subTopics));
console.log('');
}
- if (subCommands.length > 0) {
+ if (subCommands.length > 0 && !SUPPRESS_SUBTOPICS) {
console.log(this.formatCommands(subCommands));
console.log('');
}