generators/aws-containers/lib/cloudFormation.js
function _formatStatus(status) {
    let statusColorFn = chalk.grey;
    if (_.endsWith(status, 'IN_PROGRESS')) {
        statusColorFn = chalk.yellow;
    } else if (_.endsWith(status, 'FAILED') || _.startsWith(status, 'DELETE')) {
        statusColorFn = chalk.red;
    } else if (_.endsWith(status, 'COMPLETE')) {
        statusColorFn = chalk.greenBright;
    }

    const sanitizedStatus = _.replace(status, '_', ' ');
    const paddedStatus = _.padEnd(sanitizedStatus, STACK_EVENT_STATUS_DISPLAY_LENGTH);
    return statusColorFn(paddedStatus);
}
function _formatStatus(status) {
    let statusColorFn = chalk.grey;
    if (_.endsWith(status, 'IN_PROGRESS')) {
        statusColorFn = chalk.yellow;
    } else if (_.endsWith(status, 'FAILED') || _.startsWith(status, 'DELETE')) {
        statusColorFn = chalk.red;
    } else if (_.endsWith(status, 'COMPLETE')) {
        statusColorFn = chalk.greenBright;
    }

    const sanitizedStatus = _.replace(status, '_', ' ');
    const paddedStatus = _.padEnd(sanitizedStatus, STACK_EVENT_STATUS_DISPLAY_LENGTH);
    return statusColorFn(paddedStatus);
}
function _formatStatus ( status ) { let statusColorFn = chalk . grey ; if ( _ . endsWith ( status , 'IN_PROGRESS' ) ) { statusColorFn = chalk . yellow ; } else if ( _ . endsWith ( status , 'FAILED' ) || _ . startsWith ( status , 'DELETE' ) ) { statusColorFn = chalk . red ; } else if ( _ . endsWith ( status , 'COMPLETE' ) ) { statusColorFn = chalk . greenBright ; } const sanitizedStatus = _ . replace ( status , '_' , ' ' ) ; const paddedStatus = _ . padEnd ( sanitizedStatus , STACK_EVENT_STATUS_DISPLAY_LENGTH ) ; return statusColorFn ( paddedStatus ) ; }
returns a formatted status string ready to be displayed
@param status
@returns {*} a string
@private
returns a formatted status string ready to be displayed