@oclif/core
Advanced tools
Comparing version 4.0.9 to 4.0.10
@@ -30,3 +30,2 @@ "use strict"; | ||
exports.Command = void 0; | ||
const ansis_1 = __importDefault(require("ansis")); | ||
const node_url_1 = require("node:url"); | ||
@@ -175,3 +174,3 @@ const node_util_1 = require("node:util"); | ||
try { | ||
ux_1.ux.action.stop(ansis_1.default.bold.red('!')); | ||
ux_1.ux.action.stop(ux_1.ux.colorize('bold', ux_1.ux.colorize('red', '!'))); | ||
} | ||
@@ -178,0 +177,0 @@ catch { } |
@@ -8,3 +8,2 @@ "use strict"; | ||
exports.addOclifExitCode = addOclifExitCode; | ||
const ansis_1 = __importDefault(require("ansis")); | ||
const clean_stack_1 = __importDefault(require("clean-stack")); | ||
@@ -16,2 +15,3 @@ const indent_string_1 = __importDefault(require("indent-string")); | ||
const settings_1 = require("../../settings"); | ||
const theme_1 = require("../../ux/theme"); | ||
/** | ||
@@ -41,3 +41,3 @@ * properties specific to internal oclif error handling | ||
try { | ||
return ansis_1.default.red(process.platform === 'win32' ? '»' : '›'); | ||
return (0, theme_1.colorize)('red', process.platform === 'win32' ? '»' : '›'); | ||
} | ||
@@ -74,3 +74,3 @@ catch { } | ||
try { | ||
return ansis_1.default.yellow(process.platform === 'win32' ? '»' : '›'); | ||
return (0, theme_1.colorize)('yellow', process.platform === 'win32' ? '»' : '›'); | ||
} | ||
@@ -77,0 +77,0 @@ catch { } |
@@ -158,3 +158,3 @@ "use strict"; | ||
if (!value.includes('|')) | ||
value = ansis_1.default.underline(value); | ||
value = (0, theme_1.colorize)('underline', value); | ||
label += `=${value}`; | ||
@@ -161,0 +161,0 @@ } |
@@ -157,3 +157,3 @@ "use strict"; | ||
const output = [ | ||
(0, theme_1.colorize)(this.config?.theme?.sectionHeader, ansis_1.default.bold(header)), | ||
(0, theme_1.colorize)(this.config?.theme?.sectionHeader, (0, theme_1.colorize)('bold', header)), | ||
(0, theme_1.colorize)(this.config?.theme?.sectionDescription, this.indent(Array.isArray(newBody) ? this.renderList(newBody, { indentation: 2, stripAnsi: this.opts.stripAnsi }) : newBody)), | ||
@@ -160,0 +160,0 @@ ].join('\n'); |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports.FailedFlagValidationError = exports.ArgInvalidOptionError = exports.FlagInvalidOptionError = exports.NonExistentFlagsError = exports.UnexpectedArgsError = exports.RequiredArgsError = exports.InvalidArgsSpecError = exports.CLIParseError = exports.CLIError = void 0; | ||
const ansis_1 = __importDefault(require("ansis")); | ||
const cache_1 = __importDefault(require("../cache")); | ||
@@ -13,2 +12,3 @@ const errors_1 = require("../errors"); | ||
const list_1 = __importDefault(require("../ux/list")); | ||
const theme_1 = require("../ux/theme"); | ||
var errors_2 = require("../errors"); | ||
@@ -102,3 +102,3 @@ Object.defineProperty(exports, "CLIError", { enumerable: true, get: function () { return errors_2.CLIError; } }); | ||
const errString = deduped.length === 1 ? 'error' : 'errors'; | ||
const message = `The following ${errString} occurred:\n ${ansis_1.default.dim(deduped.join('\n '))}`; | ||
const message = `The following ${errString} occurred:\n ${(0, theme_1.colorize)('dim', deduped.join('\n '))}`; | ||
super({ exit: cache_1.default.getInstance().get('exitCodes')?.failedFlagValidation ?? exit, message, parse }); | ||
@@ -105,0 +105,0 @@ } |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.flagUsage = flagUsage; | ||
exports.flagUsages = flagUsages; | ||
const ansis_1 = __importDefault(require("ansis")); | ||
const util_1 = require("../util/util"); | ||
const ux_1 = require("../ux"); | ||
function flagUsage(flag, options = {}) { | ||
@@ -25,3 +22,3 @@ const label = []; | ||
description = `(required) ${description}`; | ||
description = description ? ansis_1.default.dim(description) : undefined; | ||
description = description ? (0, ux_1.colorize)('dim', description) : undefined; | ||
return [` ${label.join(',').trim()}${usage}`, description]; | ||
@@ -28,0 +25,0 @@ } |
{ | ||
"name": "@oclif/core", | ||
"description": "base library for oclif CLIs", | ||
"version": "4.0.9", | ||
"version": "4.0.10", | ||
"author": "Salesforce", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/core/issues", |
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
398704
10058