@oclif/core 4.7.2 → 4.8.1

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.
@@ -171,9 +171,22 @@ class CommandHelp extends formatter_1.HelpFormatter {
171
171
  if (noChar)
172
172
  left = left.replace(' ', '');
173
173
  let right = flag.summary || flag.description || '';
174
+ // Build metadata string (default, env, or both)
175
+ const metadata = [];
174
176
  const canBeCached = !(this.opts.respectNoCacheDefault === true && flag.noCacheDefault === true);
175
- if (flag.type === 'option' && flag.default && canBeCached) {
176
- right = `${(0, theme_1.colorize)(this.config?.theme?.flagDefaultValue, `[default: ${flag.default}]`)} ${right}`;
177
+ if (flag.type === 'option') {
178
+ if (flag.default && canBeCached) {
179
+ metadata.push(`default: ${flag.default}`);
180
+ }
181
+ if (flag.env) {
182
+ metadata.push(`env: ${flag.env}`);
183
+ }
184
+ }
185
+ else if (flag.type === 'boolean' && flag.env) {
186
+ metadata.push(`env: ${flag.env}`);
187
+ }
188
+ if (metadata.length > 0) {
189
+ right = `${(0, theme_1.colorize)(this.config?.theme?.flagDefaultValue, `[${metadata.join(', ')}]`)} ${right}`;
177
190
  }
178
191
  if (flag.required)
179
192
  right = `${(0, theme_1.colorize)(this.config?.theme?.flagRequired, '(required)')} ${right}`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "4.7.2",
4
+ "version": "4.8.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -15,7 +15,7 @@
15
15
  "indent-string": "^4.0.0",
16
16
  "is-wsl": "^2.2.0",
17
17
  "lilconfig": "^3.1.3",
18
- "minimatch": "^9.0.5",
18
+ "minimatch": "^10.2.1",
19
19
  "semver": "^7.7.3",
20
20
  "string-width": "^4.2.3",
21
21
  "supports-color": "^8",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@commitlint/config-conventional": "^19",
29
- "@eslint/compat": "^1.4.0",
29
+ "@eslint/compat": "^1.4.1",
30
30
  "@oclif/plugin-help": "^6",
31
31
  "@oclif/plugin-plugins": "^5",
32
32
  "@oclif/prettier-config": "^0.2.1",
@@ -56,9 +56,9 @@
56
56
  "husky": "^9.1.7",
57
57
  "lint-staged": "^15",
58
58
  "madge": "^6.1.0",
59
- "mocha": "^11.7.4",
59
+ "mocha": "^11.7.5",
60
60
  "nyc": "^15.1.0",
61
- "prettier": "^3.6.2",
61
+ "prettier": "^3.8.1",
62
62
  "shx": "^0.4.0",
63
63
  "sinon": "^18",
64
64
  "ts-node": "^10.9.2",