Update file executable_install-program
This commit is contained in:
parent
951ea60174
commit
7a0dbae3bb
1 changed files with 7 additions and 3 deletions
|
@ -49,14 +49,18 @@ const figures = isUnicodeSupported() ? figuresDefault : figuresFallback
|
||||||
|
|
||||||
function log(type, label, msg) {
|
function log(type, label, msg) {
|
||||||
let icon, message
|
let icon, message
|
||||||
|
let fittedLabel = label
|
||||||
|
while(fittedLabel.length < 14) {
|
||||||
|
fittedLabel = fittedLabel.length % 2 === 1 ? fittedLabel + ' ' : ' ' + fittedLabel
|
||||||
|
}
|
||||||
if (type === 'info') {
|
if (type === 'info') {
|
||||||
icon = `${chalk.cyanBright(figures.pointer)} ${chalk.bold.white.bgCyan(' ' + label.padStart(label.length / 2 + 4, ' ').padEnd(label.length / 2 + 4, ' ') + ' ')}`
|
icon = `${chalk.cyanBright(figures.pointer)} ${chalk.bold.white.bgCyan(' ' + fittedLabel + ' ')}`
|
||||||
message = wrapMessage(msg)
|
message = wrapMessage(msg)
|
||||||
} else if (type === 'star') {
|
} else if (type === 'star') {
|
||||||
icon = `${chalk.yellow(figures.star)} ${chalk.bold.black.bgYellow(' ' + label.padStart(label.length / 2 + 4, ' ').padEnd(label.length / 2 + 4, ' ') + ' ')}`
|
icon = `${chalk.yellow(figures.star)} ${chalk.bold.black.bgYellow(' ' + fittedLabel + ' ')}`
|
||||||
message = wrapMessage(msg)
|
message = wrapMessage(msg)
|
||||||
} else if (type === 'success') {
|
} else if (type === 'success') {
|
||||||
icon = `${chalk.greenBright(figures.play)} ${chalk.bold.white.bgGreenBright(' ' + label.padStart(label.length / 2 + 4, ' ').padEnd(label.length / 2 + 4, ' ') + ' ')}`
|
icon = `${chalk.greenBright(figures.play)} ${chalk.bold.white.bgGreenBright(' ' + fittedLabel + ' ')}`
|
||||||
message = wrapMessage(msg)
|
message = wrapMessage(msg)
|
||||||
} else if (type === 'warn') {
|
} else if (type === 'warn') {
|
||||||
icon = `${chalk.yellowBright(figures.lozenge)} ${chalk.bold.black.bgYellowBright(' WARNING ')}`
|
icon = `${chalk.yellowBright(figures.lozenge)} ${chalk.bold.black.bgYellowBright(' WARNING ')}`
|
||||||
|
|
Loading…
Reference in a new issue