@oclif/core
Advanced tools
Comparing version 4.0.0-beta.13 to 4.0.0-beta.14
@@ -8,4 +8,5 @@ "use strict"; | ||
const ansis_1 = __importDefault(require("ansis")); | ||
const supports_color_1 = require("supports-color"); | ||
const theme_1 = require("../interfaces/theme"); | ||
function isStandardChalk(color) { | ||
function isStandardAnsi(color) { | ||
return theme_1.STANDARD_ANSI.includes(color); | ||
@@ -22,3 +23,7 @@ } | ||
return text; | ||
if (isStandardChalk(color)) | ||
if (!supports_color_1.stdout) | ||
return text; | ||
if (!supports_color_1.stderr) | ||
return text; | ||
if (isStandardAnsi(color)) | ||
return ansis_1.default[color](text); | ||
@@ -44,3 +49,3 @@ if (color.startsWith('#')) | ||
function isValid(color) { | ||
return color.startsWith('#') || color.startsWith('rgb') || isStandardChalk(color) ? color : undefined; | ||
return color.startsWith('#') || color.startsWith('rgb') || isStandardAnsi(color) ? color : undefined; | ||
} |
{ | ||
"name": "@oclif/core", | ||
"description": "base library for oclif CLIs", | ||
"version": "4.0.0-beta.13", | ||
"version": "4.0.0-beta.14", | ||
"author": "Salesforce", | ||
@@ -9,3 +9,3 @@ "bugs": "https://github.com/oclif/core/issues", | ||
"ansi-escapes": "^4.3.2", | ||
"ansis": "^3.0.1", | ||
"ansis": "^3.1.1", | ||
"clean-stack": "^3.0.1", | ||
@@ -22,3 +22,3 @@ "cli-spinners": "^2.9.2", | ||
"string-width": "^4.2.3", | ||
"supports-color": "^9.4.0", | ||
"supports-color": "^8", | ||
"widest-line": "^3.1.0", | ||
@@ -45,2 +45,3 @@ "wordwrap": "^1.0.0", | ||
"@types/sinon": "^17.0.3", | ||
"@types/supports-color": "^8.1.3", | ||
"@types/wordwrap": "^1.0.3", | ||
@@ -47,0 +48,0 @@ "@types/wrap-ansi": "^3.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
397359
10011
39
+ Addedsupports-color@8.1.1(transitive)
- Removedsupports-color@9.4.0(transitive)
Updatedansis@^3.1.1
Updatedsupports-color@^8