Update file executable_install-program

This commit is contained in:
Brian Zalewski 2023-01-24 17:49:04 +00:00
parent 951ea60174
commit 7a0dbae3bb

View file

@ -49,14 +49,18 @@ const figures = isUnicodeSupported() ? figuresDefault : figuresFallback
function log(type, label, msg) {
let icon, message
let fittedLabel = label
while(fittedLabel.length < 14) {
fittedLabel = fittedLabel.length % 2 === 1 ? fittedLabel + ' ' : ' ' + fittedLabel
}
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)
} 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)
} 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)
} else if (type === 'warn') {
icon = `${chalk.yellowBright(figures.lozenge)} ${chalk.bold.black.bgYellowBright(' WARNING ')}`