#!/usr/bin/env node
///
var BeautylogPlugins;
(function (BeautylogPlugins) {
var plugins = {};
BeautylogPlugins.init = function () {
plugins = {
lodash: require("lodash"),
smartenv: require("smartenv"),
q: require("q")
};
if (plugins.smartenv.getEnv().isNode) {
plugins = plugins.lodash.assign(plugins, {
colors: require("colors"),
clc: require("cli-color"),
figlet: require("figlet")
});
}
return plugins;
};
})(BeautylogPlugins || (BeautylogPlugins = {}));
///
var tableHelpers = {
makeRow: function (cellCounterArg, colorArg) {
if (cellCounterArg === void 0) { cellCounterArg = 2; }
if (colorArg === void 0) { colorArg = "cyan"; }
var rowArray = [];
for (var i = 0; i < (cellCounterArg); i++) {
rowArray.push(String(i + 1).cyan);
}
return rowArray;
}
};
var ConsoleTable = (function () {
function ConsoleTable(tableTypeArg, tableHeadArrayArg) {
if (tableHeadArrayArg === void 0) { tableHeadArrayArg = tableHelpers.makeRow(); }
switch (tableTypeArg) {
case "checks":
this.tableHead = ['Check Item:'.cyan, 'Status:'.cyan];
break;
case "custom":
this.tableHead = tableHeadArrayArg;
break;
default:
break;
}
this.rows = [];
this.type = tableTypeArg;
}
ConsoleTable.prototype.push = function (row) {
this.rows.push(row);
};
ConsoleTable.prototype.print = function () {
var table = new BeautylogNodeTable.cliTable({
head: this.tableHead
});
for (var row in this.rows) {
if (this.rows[row][1] == "success") {
this.rows[row][1] = ' '.bgGreen + ' ' + this.rows[row][1];
}
else if (this.rows[row][1] == "error") {
this.rows[row][1] = ' '.bgRed + ' ' + this.rows[row][1];
}
table.push(this.rows[row]);
}
;
console.log(table.toString());
};
return ConsoleTable;
})();
///
var BeautylogNode;
(function (BeautylogNode) {
function init() {
var beautylogNode = {
log: BeautylogNodeLog.init(),
code: BeautylogNodeCode.init(),
figlet: BeautylogNodeFiglet.figlet,
figletSync: BeautylogNodeFiglet.figletSync
};
/**
* logs an directory to console
* @param logText
* @returns {boolean}
*/
beautylogNode.dir = function (logText) {
return beautylogNode.log(logText, 'dir');
};
/**
* logs an error to console
* @param logText
* @returns {boolean}
*/
beautylogNode.error = function (logText) {
return beautylogNode.log(logText, 'error');
};
/**
* logs an info to console
* @param logText
* @returns {boolean}
*/
beautylogNode.info = function (logText) {
return beautylogNode.log(logText, 'info');
};
/**
* logs an 'OK!' message to console
* @param logText
* @returns {boolean}
*/
beautylogNode.ok = function (logText) {
return beautylogNode.log(logText, 'ok');
};
/**
* logs a success to console
* @param logText string to log as error
* @returns {boolean}
*/
beautylogNode.success = function (logText) {
return beautylogNode.log(logText, 'success');
};
/**
* logs a 'warn:' message to console
* @param logText string to log as error
* @returns {boolean}
*/
beautylogNode.warn = function (logText) {
return beautylogNode.log(logText, 'warn');
};
beautylogNode.table = BeautylogNodeTable.init();
return beautylogNode;
}
BeautylogNode.init = init;
})(BeautylogNode || (BeautylogNode = {}));
///
var BeautylogNodeLog;
(function (BeautylogNodeLog) {
BeautylogNodeLog.init = function () {
var localBl = {
dirPrefix: plugins.clc.bgXterm(39).xterm(231).bold(' DIR ') + ' ',
errorPrefix: ' Error: '.bgRed.white.bold + ' ',
infoPrefix: plugins.clc.bgXterm(198).xterm(231).bold(' INFO ') + ' ',
normalPrefix: ' Log: '.bgCyan.white.bold + ' ',
okPrefix: ' '.bgGreen + ' OK! '.bgBlack.green.bold + ' ',
successPrefix: ' Success: '.bgGreen.white.bold + ' ',
warnPrefix: ' '.bgYellow + ' Warn: '.bgBlack.yellow.bold + ' '
};
/**
*
* @param logText
* @param logType
* @returns {boolean}
*/
var logFunction = function (logText, logType) {
if (logText === void 0) { logText = 'empty log'; }
if (logType === void 0) { logType = 'normal'; }
try {
switch (logType) {
case 'dir':
logText = localBl.dirPrefix + plugins.clc.xterm(26)(logText);
break;
case 'error':
logText = localBl.errorPrefix + logText.red.bold;
break;
case 'info':
logText = localBl.infoPrefix + plugins.clc.xterm(198)(logText);
break;
case 'normal':
logText = localBl.normalPrefix + logText.cyan.bold;
break;
case 'ok':
logText = localBl.okPrefix + logText.bold;
break;
case 'success':
logText = localBl.successPrefix + logText.green.bold;
break;
case 'warn':
logText = localBl.warnPrefix + logText.bold;
break;
case 'log':
default:
logText.blue.bold;
console.log(('unknown logType for "' + logText + '"').red.bold);
break;
}
console.log(logText);
return true;
}
catch (error) {
console.log(localBl.errorPrefix + 'You seem to have tried logging something strange'.red.bold + error);
return false;
}
};
return logFunction;
};
})(BeautylogNodeLog || (BeautylogNodeLog = {}));
///
var BeautylogNodeCode;
(function (BeautylogNodeCode) {
BeautylogNodeCode.init = function () {
var codeFunction = function (codeString, options) {
var hlight = require("hlight");
var codeSnippet = {
source: codeString,
highlighted: "default"
};
if (typeof codeString != "string") {
console.log("beautylog.code() expects a string as first argument!");
return;
}
;
if (typeof options != "undefined") {
codeSnippet.highlighted = hlight(codeSnippet.source, options.language);
}
};
return codeFunction;
};
})(BeautylogNodeCode || (BeautylogNodeCode = {}));
///
var BeautylogNodeTable;
(function (BeautylogNodeTable) {
function init() {
BeautylogNodeTable.cliTable = require("cli-table2");
var beautylogOsTable = {};
beautylogOsTable.new = function (typeArg, tableHeadArrayArg) {
var newConsoleTable = new ConsoleTable(typeArg, tableHeadArrayArg);
return newConsoleTable;
};
return beautylogOsTable;
}
BeautylogNodeTable.init = init;
})(BeautylogNodeTable || (BeautylogNodeTable = {}));
///
var BeautylogNodeFiglet;
(function (BeautylogNodeFiglet) {
var defaultOptions = {
font: "Star Wars",
color: "green",
cb: function () { }
};
BeautylogNodeFiglet.figlet = function (textArg, optionsArg) {
var done = plugins.q.defer();
var mergeOptions = plugins.lodash.cloneDeep(defaultOptions);
var options = plugins.lodash.assign(mergeOptions, optionsArg);
plugins.figlet(textArg, {
font: options.font,
horizontalLayout: 'default',
verticalLayout: 'default'
}, function (err, data) {
if (err) {
console.log('Something went wrong...');
console.dir(err);
return;
}
console.log(data[options.color]);
options.cb();
done.resolve();
});
return done.promise;
};
BeautylogNodeFiglet.figletSync = function (textArg, optionsArg) {
var mergeOptions = plugins.lodash.cloneDeep(defaultOptions);
var options = plugins.lodash.assign(mergeOptions, optionsArg);
console.log(plugins.figlet.textSync(textArg, {
font: options.font,
horizontalLayout: 'default',
verticalLayout: 'default'
})[options.color]);
return true;
};
})(BeautylogNodeFiglet || (BeautylogNodeFiglet = {}));
///
var BeautylogBrowser;
(function (BeautylogBrowser) {
function init() {
var beautylogBrowser = {};
beautylogBrowser.log = function (message) {
console.log('%c Log: %c ' + message, "background:#42A5F5;color:#ffffff", "color:#42A5F5;");
};
beautylogBrowser.info = function (message) {
console.log('%c Info: %c ' + message, 'background:#EC407A;color:#ffffff;', 'color:#EC407A;');
};
beautylogBrowser.ok = function (message) {
console.log('%c OK: %c ' + message, "background:#000000;color:#8BC34A;", "color:#000000;");
};
beautylogBrowser.success = function (message) {
console.log('%c Success: %c ' + message, "background:#8BC34A;color:#ffffff;", "color:#8BC34A;");
};
beautylogBrowser.warn = function (message) {
console.log('%c Warn: %c ' + message, "background:#000000;color:#FB8C00;", "color:#000000;");
};
return beautylogBrowser;
}
BeautylogBrowser.init = init;
})(BeautylogBrowser || (BeautylogBrowser = {}));
///
///
///
///
///
///
///
///
///
///
///
var plugins = BeautylogPlugins.init();
var beautylog = (function () {
switch (plugins.smartenv.getEnv().runtimeEnv) {
case "node":
var beautylogOs = BeautylogNode.init();
return beautylogOs;
break;
case "browser":
var beautylogBrowser = BeautylogBrowser.init();
return beautylogBrowser;
break;
default:
console.log("something is strange about the platform in which you try to use beautylog");
break;
}
})();
module.exports = beautylog;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJlYXV0eWxvZy5wbHVnaW5zLnRzIiwiYmVhdXR5bG9nLmNsYXNzZXMudHMiLCJiZWF1dHlsb2cubm9kZS50cyIsImJlYXV0eWxvZy5ub2RlLmxvZy50cyIsImJlYXV0eWxvZy5ub2RlLmNvZGUudHMiLCJiZWF1dHlsb2cubm9kZS50YWJsZS50cyIsImJlYXV0eWxvZy5ub2RlLmZpZ2xldC50cyIsImJlYXV0eWxvZy5icm93c2VyLnRzI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gICAgICAgICAgZmlnbGV0OiByZXF1aXJlKFwiZmlnbGV0XCIpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcGx1Z2lucztcbiAgICB9O1xufSIsIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuL2luZGV4LnRzXCIgLz5cbnZhciB0YWJsZUhlbHBlcnMgPSB7XG4gICAgbWFrZVJvdzogZnVuY3Rpb24oY2VsbENvdW50ZXJBcmc6bnVtYmVyID0gMixjb2xvckFyZzpzdHJpbmcgPSBcImN5YW5cIil7XG4gICAgICAgIHZhciByb3dBcnJheSA9IFtdO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IChjZWxsQ291bnRlckFyZyk7IGkrKykge1xuICAgICAgICAgICAgcm93QXJyYXkucHVzaChTdHJpbmcoaSArIDEpLmN5YW4pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByb3dBcnJheTtcbiAgICB9XG59O1xuXG5jbGFzcyBDb25zb2xlVGFibGUge1xuICAgIHRhYmxlSGVhZDpzdHJpbmdbXTtcbiAgICByb3dzO1xuICAgIHR5cGU6c3RyaW5nO1xuICAgIGNvbnN0cnVjdG9yKHRhYmxlVHlwZUFyZzpzdHJpbmcsdGFibGVIZWFkQXJyYXlBcmc6c3RyaW5nW10gPSB0YWJsZUhlbHBlcnMubWFrZVJvdygpKSB7XG4gICAgICAgIHN3aXRjaCAodGFibGVUeXBlQXJnKSB7XG4gICAgICAgICAgICBjYXNlIFwiY2hlY2tzXCI6XG4gICAgICAgICAgICAgICAgdGhpcy50YWJsZUhlYWQgPSBbJ0NoZWNrIEl0ZW06Jy5jeWFuLCdTdGF0dXM6Jy5jeWFuXTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJjdXN0b21cIjpcbiAgICAgICAgICAgICAgICB0aGlzLnRhYmxlSGVhZCA9IHRhYmxlSGVhZEFycmF5QXJnO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnJvd3MgPSBbXTtcbiAgICAgICAgdGhpcy50eXBlID0gdGFibGVUeXBlQXJnO1xuICAgIH1cbiAgICBwdXNoKHJvdzpzdHJpbmdbXSl7XG4gICAgICAgIHRoaXMucm93cy5wdXNoKHJvdyk7XG4gICAgfVxuICAgIHByaW50KCkge1xuICAgICAgICB2YXIgdGFibGUgPSBuZXcgQmVhdXR5bG9nTm9kZVRhYmxlLmNsaVRhYmxlKHtcbiAgICAgICAgICAgIGhlYWQ6IHRoaXMudGFibGVIZWFkXG4gICAgICAgIH0pO1xuICAgICAgICBmb3IgKHZhciByb3cgaW4gdGhpcy5yb3dzKXtcbiAgICAgICAgICAgIGlmKHRoaXMucm93c1tyb3ddWzFdID09IFwic3VjY2Vzc1wiKXtcbiAgICAgICAgICAgICAgICB0aGlzLnJvd3Nbcm93XVsxXSA9ICcgJy5iZ0dyZWVuICsgJyAnICsgdGhpcy5yb3dzW3Jvd11bMV07XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucm93c1tyb3ddWzFdID09IFwiZXJyb3JcIikge1xuICAgICAgICAgICAgICAgIHRoaXMucm93c1tyb3ddWzFdID0gJyAnLmJnUmVkICsgJyAnICsgdGhpcy5yb3dzW3Jvd11bMV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0YWJsZS5wdXNoKHRoaXMucm93c1tyb3ddKTtcbiAgICAgICAgfTtcbiAgICAgICAgY29uc29sZS5sb2codGFibGUudG9TdHJpbmcoKSk7XG4gICAgfVxufVxuIiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vaW5kZXgudHNcIiAvPlxubW9kdWxlIEJlYXV0eWxvZ05vZGUge1xuICAgIGV4cG9ydCBmdW5jdGlvbiBpbml0KCkge1xuXG4gICAgICAgIHZhciBiZWF1dHlsb2dOb2RlOmFueSA9IHtcbiAgICAgICAgICAgIGxvZzpCZWF1dHlsb2dOb2RlTG9nLmluaXQoKSxcbiAgICAgICAgICAgIGNvZGU6QmVhdXR5bG9nTm9kZUNvZGUuaW5pdCgpLFxuICAgICAgICAgICAgZmlnbGV0OkJlYXV0eWxvZ05vZGVGaWdsZXQuZmlnbGV0LFxuICAgICAgICAgICAgZmlnbGV0U3luYzpCZWF1dHlsb2dOb2RlRmlnbGV0LmZpZ2xldFN5bmNcbiAgICAgICAgfTtcblxuICAgICAgICAvKipcbiAgICAgICAgICogbG9ncyBhbiBkaXJlY3RvcnkgdG8gY29uc29sZVxuICAgICAgICAgKiBAcGFyYW0gbG9nVGV4dFxuICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn1cbiAgICAgICAgICovXG4gICAgICAgIGJlYXV0eWxvZ05vZGUuZGlyID0gZnVuY3Rpb24obG9nVGV4dCkge1xuICAgICAgICAgICAgcmV0dXJuIGJlYXV0eWxvZ05vZGUubG9nKGxvZ1RleHQsICdkaXInKTtcbiAgICAgICAgfTtcblxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBsb2dzIGFuIGVycm9yIHRvIGNvbnNvbGVcbiAgICAgICAgICogQHBhcmFtIGxvZ1RleHRcbiAgICAgICAgICogQHJldHVybnMge2Jvb2xlYW59XG4gICAgICAgICAqL1xuICAgICAgICBiZWF1dHlsb2dOb2RlLmVycm9yID0gZnVuY3Rpb24obG9nVGV4dCkge1xuICAgICAgICAgICAgcmV0dXJuIGJlYXV0eWxvZ05vZGUubG9nKGxvZ1RleHQsICdlcnJvcicpO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBsb2dzIGFuIGluZm8gdG8gY29uc29sZVxuICAgICAgICAgKiBAcGFyYW0gbG9nVGV4dFxuICAgICAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn1cbiAgICAgICAgICovXG4gICAgICAgIGJlYXV0eWxvZ05vZGUuaW5mbyA9IGZ1bmN0a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gICAqIEBwYXJhbSBsb2dUeXBlXG4gICAgICAgICAqIEByZXR1cm5zIHtib29sZWFufVxuICAgICAgICAgKi9cbiAgICAgICAgdmFyIGxvZ0Z1bmN0aW9uID0gZnVuY3Rpb24obG9nVGV4dDpzdHJpbmcgPSAnZW1wdHkgbG9nJywgbG9nVHlwZTpzdHJpbmcgPSAnbm9ybWFsJykge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKGxvZ1R5cGUpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnZGlyJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZ1RleHQgPSBsb2NhbEJsLmRpclByZWZpeCArIHBsdWdpbnMuY2xjLnh0ZXJtKDI2KShsb2dUZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdlcnJvcic6XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dUZXh0ID0gbG9jYWxCbC5lcnJvclByZWZpeCArIGxvZ1RleHQucmVkLmJvbGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnaW5mbyc6XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dUZXh0ID0gbG9jYWxCbC5pbmZvUHJlZml4ICsgcGx1Z2lucy5jbGMueHRlcm0oMTk4KShsb2dUZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdub3JtYWwnOlxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nVGV4dCA9IGxvY2FsQmwubm9ybWFsUHJlZml4ICsgbG9nVGV4dC5jeWFuLmJvbGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnb2snOlxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nVGV4dCA9IGxvY2FsQmwub2tQcmVmaXggKyBsb2dUZXh0LmJvbGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnc3VjY2Vzcyc6XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dUZXh0ID0gbG9jYWxCbC5zdWNjZXNzUHJlZml4ICsgbG9nVGV4dC5ncmVlbi5ib2xkO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3dhcm4nOlxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nVGV4dCA9IGxvY2FsQmwud2FyblByZWZpeCArIGxvZ1RleHQuYm9sZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdsb2cnOlxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nVGV4dC5ibHVlLmJvbGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygoJ3Vua25vd24gbG9nVHlwZSBmb3IgXCInICsgbG9nVGV4dCArICdcIicpLnJlZC5ib2xkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhsb2dUZXh0KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGxvY2FsQmwuZXJyb3JQcmVmaXggKyAnWW91IHNlZW0gdG8gaGF2ZSB0cmllZCBsb2dnaW5nIHNvbWV0aGluZyBzdHJhbmdlJy5yZWQuYm9sZCArIGVycm9yKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9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