dist/cli.js
function show() {
    var parsed = ensureConfig();
    function showRollbacks() {
        var rollbacks = mu.getRollbacks();
        var keys = Object.keys(rollbacks);
        var padBtm = [0, 0, 1, 0];
        var ui = pargv.ui(105);
        var i = keys.length;
        var hdrNo = { text: " ", width: 5 };
        var hdrId = { text: "" + chalk.underline.gray('ID'), width: 20 };
        var hdrTs = { text: "" + chalk.underline.gray('Timestamp'), width: 30 };
        var hdrCt = { text: "" + chalk.underline.gray('Count'), width: 10 };
        var hdrTpl = { text: "" + chalk.underline.gray('Templates'), width: 35, padding: padBtm };
        ui.div(hdrNo, hdrId, hdrTs, hdrCt, hdrTpl);
        while (i--) {
            var key = keys[i];
            var rb = rollbacks[key];
            var no = { text: i + 1 + ")", width: 5 };
            var id = { text: "" + chalk.cyan(rb.id), width: 20 };
            var ts = { text: "" + chalk.yellow(rb.timestamp), width: 30 };
            var ct = { text: "" + chalk.green(rb.count + ''), width: 10 };
            var tpl = { text: "" + chalk.magenta(rb.templates.join(', ')), width: 35 };
            ui.div(no, id, ts, ct, tpl);
        }
        ui.show();
    }
    switch (parsed.name) {
        case 'r':
            showRollbacks();
            break;
        case 'rollbacks':
            showRollbacks();
            break;
        default:
            break;
    }
}
function show() {
    var parsed = ensureConfig();
    function showRollbacks() {
        var rollbacks = mu.getRollbacks();
        var keys = Object.keys(rollbacks);
        var padBtm = [0, 0, 1, 0];
        var ui = pargv.ui(105);
        var i = keys.length;
        var hdrNo = { text: " ", width: 5 };
        var hdrId = { text: "" + chalk.underline.gray('ID'), width: 20 };
        var hdrTs = { text: "" + chalk.underline.gray('Timestamp'), width: 30 };
        var hdrCt = { text: "" + chalk.underline.gray('Count'), width: 10 };
        var hdrTpl = { text: "" + chalk.underline.gray('Templates'), width: 35, padding: padBtm };
        ui.div(hdrNo, hdrId, hdrTs, hdrCt, hdrTpl);
        while (i--) {
            var key = keys[i];
            var rb = rollbacks[key];
            var no = { text: i + 1 + ")", width: 5 };
            var id = { text: "" + chalk.cyan(rb.id), width: 20 };
            var ts = { text: "" + chalk.yellow(rb.timestamp), width: 30 };
            var ct = { text: "" + chalk.green(rb.count + ''), width: 10 };
            var tpl = { text: "" + chalk.magenta(rb.templates.join(', ')), width: 35 };
            ui.div(no, id, ts, ct, tpl);
        }
        ui.show();
    }
    switch (parsed.name) {
        case 'r':
            showRollbacks();
            break;
        case 'rollbacks':
            showRollbacks();
            break;
        default:
            break;
    }
}
function show ( ) { var parsed = ensureConfig ( ) ; function showRollbacks ( ) { var rollbacks = mu . getRollbacks ( ) ; var keys = Object . keys ( rollbacks ) ; var padBtm = [ 0 , 0 , 1 , 0 ] ; var ui = pargv . ui ( 105 ) ; var i = keys . length ; var hdrNo = { text : " " , width : 5 } ; var hdrId = { text : "" + chalk . underline . gray ( 'ID' ) , width : 20 } ; var hdrTs = { text : "" + chalk . underline . gray ( 'Timestamp' ) , width : 30 } ; var hdrCt = { text : "" + chalk . underline . gray ( 'Count' ) , width : 10 } ; var hdrTpl = { text : "" + chalk . underline . gray ( 'Templates' ) , width : 35 , padding : padBtm } ; ui . div ( hdrNo , hdrId , hdrTs , hdrCt , hdrTpl ) ; while ( i -- ) { var key = keys [ i ] ; var rb = rollbacks [ key ] ; var no = { text : i + 1 + ")" , width : 5 } ; var id = { text : "" + chalk . cyan ( rb . id ) , width : 20 } ; var ts = { text : "" + chalk . yellow ( rb . timestamp ) , width : 30 } ; var ct = { text : "" + chalk . green ( rb . count + '' ) , width : 10 } ; var tpl = { text : "" + chalk . magenta ( rb . templates . join ( ', ' ) ) , width : 35 } ; ui . div ( no , id , ts , ct , tpl ) ; } ui . show ( ) ; } switch ( parsed . name ) { case 'r' : showRollbacks ( ) ; break ; case 'rollbacks' : showRollbacks ( ) ; break ; default : break ; } }
Handler for show
Handler for show