import * as chalk from 'chalk'; import {Rivendell} from './Rivendell'; export function formatBuildState(state: Rivendell.BuildState): string { switch (state) { case Rivendell.BuildState.NEW: return chalk.yellow('NEW'); case Rivendell.BuildState.QUEUED: return chalk.yellow('QUEUED'); case Rivendell.BuildState.RUNNING: return chalk.yellow('BUILDING'); case Rivendell.BuildState.FINISHED: return chalk.yellow('FINISHED'); default: { console.error(chalk.red(`Unrecognized BuildState ${state} `)); return chalk.red('UNKNOWN'); } } }