@oclif/core 4.0.26 → 4.0.27
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/lib/help/command.js +2 -1
- package/lib/interfaces/help.d.ts +4 -0
- package/package.json +1 -1
package/lib/help/command.js
CHANGED
|
@@ -169,7 +169,8 @@ class CommandHelp extends formatter_1.HelpFormatter {
|
|
|
169
169
|
if (noChar)
|
|
170
170
|
left = left.replace(' ', '');
|
|
171
171
|
let right = flag.summary || flag.description || '';
|
|
172
|
-
|
|
172
|
+
const canBeCached = !(this.opts.respectNoCacheDefault === true && flag.noCacheDefault === true);
|
|
173
|
+
if (flag.type === 'option' && flag.default && canBeCached) {
|
|
173
174
|
right = `${(0, theme_1.colorize)(this.config?.theme?.flagDefaultValue, `[default: ${flag.default}]`)} ${right}`;
|
|
174
175
|
}
|
|
175
176
|
if (flag.required)
|
package/lib/interfaces/help.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ export interface HelpOptions {
|
|
|
24
24
|
*/
|
|
25
25
|
hideCommandSummaryInDescription?: boolean;
|
|
26
26
|
maxWidth: number;
|
|
27
|
+
/**
|
|
28
|
+
* Respect the `noCacheDefault` property on flags. Defaults to false.
|
|
29
|
+
*/
|
|
30
|
+
respectNoCacheDefault?: boolean;
|
|
27
31
|
/**
|
|
28
32
|
* Only show the help for the specified sections. Defaults to all sections.
|
|
29
33
|
*/
|