Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Delete the global.consola set by consola self
delete global.consola
}
let consola = global.consola // eslint-disable-line import/no-mutable-exports
if (!consola) {
consola = _consola.create({
level: env.debug ? 5 : 3,
types: {
..._consola._types,
...{
cluster: {
level: 4,
color: 'blue',
icon: chalk.magenta(figures.radioOn)
},
master: {
level: 2,
color: 'blue',
icon: chalk.cyan(figures.info)
},
debug: {
level: 5,
color: 'grey'
},
trace: {
level: 6,
color: 'white'
}
}
}
function getCheckbox(checked) {
return checked ? chalk.green(figures.radioOn) : figures.radioOff;
}
function getCheckbox(checked) {
return checked ? chalk.green(figures.radioOn) : figures.radioOff;
}
function getCheckbox(checked) {
return checked ? chalk.green(figures.radioOn) : figures.radioOff;
}
getCheckboxFigure(checked) {
return checked ? chalk.green(figures.radioOn) : figures.radioOff;
}
renderStatus: function () {
const l = this.messages.length
return [
this.loading ? figures.radioOn : figures.radioOff
, this.error ? chalk.red(this.error) : null
, chalk.gray(['no messages', '1 message'][l] || `${l} messages`)
, chalk.gray(this.number)
].filter((s) => !!s).join(' ')
},
let choices = this._question.choices.reduce((result, choice) => {
let choiceName = choice.name || choice;
result[`${choice.checked === true ? figures.radioOn : figures.radioOff} ${choiceName}`] = choice;
return result;
}, {});
let choices = this._question.choices.reduce((result, choice) => {
result[`${choice.checked === true ? figures.radioOn : figures.radioOff} ${choice.name}`] = choice;
return result;
}, {});
onKey(key: Key) {
if (key.name === 'space') {
onChange(value)
}
},
}
ctx.register(args)
return () => {
ctx.unregister(args)
}
})
return (
{checked ? figures.radioOn : figures.radioOff} {label.padEnd(20)}
{props.description ? props.description.padEnd(20) : ''}
)
}
checkedCharacter={checkedCharacter}
uncheckedCharacter={uncheckedCharacter}
disabled={item.disabled}
/>
{item.content}
);
})}
);
}
}
List.defaultProps = {
cursorCharacter: figures.pointer,
checkedCharacter: figures.radioOn,
uncheckedCharacter: figures.radioOff
};
module.exports = List;