Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function formatUpdateMessage(update?: IUpdateCheck) {
if (update) {
const message = `Update available ${chalk.dim(update.version)}${chalk.reset(
" → "
)}${chalk.green(update.latest)} \nRun ${chalk.cyan(
"npm i " + (isInstalledGlobally ? "-g " : "") + update.name
)} to update`;
const boxenOpts: boxen.Options = {
align: "center",
borderColor: "yellow",
borderStyle: boxen.BorderStyle.Round,
margin: 1,
padding: 1
};
return boxen.default(message, boxenOpts);
}
}