cd-messenger
Version:
console log logger gulp notification browser node message
1,688 lines (1,423 loc) • 71.9 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define("messenger", [], factory);
else if(typeof exports === 'object')
exports["messenger"] = factory();
else
root["messenger"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 31);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
} ())
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch(e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch(e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
/*
The MIT License (MIT)
Original Library
- Copyright (c) Marak Squires
Additional functionality
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var colors = {};
module['exports'] = colors;
colors.themes = {};
var ansiStyles = colors.styles = __webpack_require__(19);
var defineProps = Object.defineProperties;
colors.supportsColor = __webpack_require__(20);
if (typeof colors.enabled === "undefined") {
colors.enabled = colors.supportsColor;
}
colors.stripColors = colors.strip = function(str){
return ("" + str).replace(/\x1B\[\d+m/g, '');
};
var stylize = colors.stylize = function stylize (str, style) {
return ansiStyles[style].open + str + ansiStyles[style].close;
}
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
var escapeStringRegexp = function (str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
return str.replace(matchOperatorsRe, '\\$&');
}
function build(_styles) {
var builder = function builder() {
return applyStyle.apply(builder, arguments);
};
builder._styles = _styles;
// __proto__ is used because we must return a function, but there is
// no way to create a function with a different prototype.
builder.__proto__ = proto;
return builder;
}
var styles = (function () {
var ret = {};
ansiStyles.grey = ansiStyles.gray;
Object.keys(ansiStyles).forEach(function (key) {
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
ret[key] = {
get: function () {
return build(this._styles.concat(key));
}
};
});
return ret;
})();
var proto = defineProps(function colors() {}, styles);
function applyStyle() {
var args = arguments;
var argsLen = args.length;
var str = argsLen !== 0 && String(arguments[0]);
if (argsLen > 1) {
for (var a = 1; a < argsLen; a++) {
str += ' ' + args[a];
}
}
if (!colors.enabled || !str) {
return str;
}
var nestedStyles = this._styles;
var i = nestedStyles.length;
while (i--) {
var code = ansiStyles[nestedStyles[i]];
str = code.open + str.replace(code.closeRe, code.open) + code.close;
}
return str;
}
function applyTheme (theme) {
for (var style in theme) {
(function(style){
colors[style] = function(str){
return colors[theme[style]](str);
};
})(style)
}
}
colors.setTheme = function (theme) {
if (typeof theme === 'string') {
try {
colors.themes[theme] = !(function webpackMissingModule() { var e = new Error("Cannot find module \".\""); e.code = 'MODULE_NOT_FOUND'; throw e; }());
applyTheme(colors.themes[theme]);
return colors.themes[theme];
} catch (err) {
console.log(err);
return err;
}
} else {
applyTheme(theme);
}
};
function init() {
var ret = {};
Object.keys(styles).forEach(function (name) {
ret[name] = {
get: function () {
return build([name]);
}
};
});
return ret;
}
var sequencer = function sequencer (map, str) {
var exploded = str.split(""), i = 0;
exploded = exploded.map(map);
return exploded.join("");
};
// custom formatter methods
colors.trap = __webpack_require__(13);
colors.zalgo = __webpack_require__(14);
// maps
colors.maps = {};
colors.maps.america = __webpack_require__(15);
colors.maps.zebra = __webpack_require__(18);
colors.maps.rainbow = __webpack_require__(16);
colors.maps.random = __webpack_require__(17)
for (var map in colors.maps) {
(function(map){
colors[map] = function (str) {
return sequencer(colors.maps[map], str);
}
})(map)
}
defineProps(colors, init());
/***/ }),
/* 2 */
/***/ (function(module, exports) {
module.exports = {
"name": "cd-messenger",
"version": "2.7.13-0",
"description": "console log logger gulp notification browser node message",
"main": "index.js",
"reveal": true,
"scripts": {
"all": "npm run eslint",
"build:dev": "node -r babel-register node_modules/.bin/webpack --hide-modules --config=webpack.config.babel.js && bash ./scripts/copy.sh",
"build:prod": "NODE_ENV=production node -r babel-register node_modules/.bin/webpack --hide-modules --config=webpack.config.babel.js && bash ./scripts/copy.sh",
"build:watch_temp": "node -r babel-register node_modules/.bin/webpack --hide-modules -w --config=webpack.config.babel.js",
"build:watch": "echo \"\n\n ==> NOTE: Running this causes an infinite loop, review cd-datetime-picker project for solution (gulp?)\n\n\"",
"build": "npm run clean && npm run build:dev && npm run build:prod",
"clean": "./node_modules/.bin/rimraf lib && ./node_modules/.bin/rimraf examples/lib",
"eslint": "eslint \"./**/*.js\"",
"lint": "npm run eslint",
"publish": "npm run build && bash ./scripts/delete-sourcemaps.sh",
"test:node": "node examples/node-test",
"test:watch": "./node_modules/.bin/mocha --compilers js:babel-core/register -w",
"test": "./node_modules/.bin/mocha --compilers js:babel-core/register"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mikeerickson/cd-messenger.git"
},
"keywords": [
"console",
"log",
"logger",
"gulp",
"notification",
"debug",
"error",
"info",
"warning",
"dump",
"browser"
],
"author": "Mike Erickson <codedungeon@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/mikeerickson/cd-messenger/issues"
},
"homepage": "https://github.com/mikeerickson/cd-messenger#readme",
"devDependencies": {
"@slightlytyler/webpack-shell-plugin": "0.4.5",
"babel-core": "6.22.1",
"babel-loader": "6.2.10",
"babel-preset-babili": "0.0.10",
"babel-preset-es2015-native-modules": "6.9.4",
"babel-preset-es2015-without-strict": "0.0.4",
"babili-webpack-plugin": "0.0.9",
"bump-version": "0.5.0",
"chai": "3.5.0",
"eslint": "3.14.1",
"eslint-loader": "1.6.1",
"html-webpack-plugin": "2.28.0",
"json-loader": "0.5.4",
"lodash": "4.17.4",
"mocha": "3.2.0",
"mocha-sinon": "1.1.6",
"progress-bar-webpack-plugin": "1.9.3",
"rimraf": "2.5.4",
"sinon": "1.17.7",
"webpack": "2.2.0",
"webpack-build-notifier": "0.1.13"
},
"dependencies": {
"chalk": "1.1.3",
"chalkline": "0.0.5",
"cli-table": "0.3.1",
"pretty-web-logger": "1.0.7"
}
};
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function () {
return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
};
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(module) {
function assembleStyles () {
var styles = {
modifiers: {
reset: [0, 0],
bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
colors: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
gray: [90, 39]
},
bgColors: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49]
}
};
// fix humans
styles.colors.grey = styles.colors.gray;
Object.keys(styles).forEach(function (groupName) {
var group = styles[groupName];
Object.keys(group).forEach(function (styleName) {
var style = group[styleName];
styles[styleName] = group[styleName] = {
open: '\u001b[' + style[0] + 'm',
close: '\u001b[' + style[1] + 'm'
};
});
Object.defineProperty(styles, groupName, {
value: group,
enumerable: false
});
});
return styles;
}
Object.defineProperty(module, 'exports', {
enumerable: true,
get: assembleStyles
});
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(30)(module)))
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {
var escapeStringRegexp = __webpack_require__(6);
var ansiStyles = __webpack_require__(4);
var stripAnsi = __webpack_require__(24);
var hasAnsi = __webpack_require__(22);
var supportsColor = __webpack_require__(25);
var defineProps = Object.defineProperties;
var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM);
function Chalk(options) {
// detect mode if not set manually
this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
}
// use bright blue on Windows as the normal blue color is illegible
if (isSimpleWindowsTerm) {
ansiStyles.blue.open = '\u001b[94m';
}
var styles = (function () {
var ret = {};
Object.keys(ansiStyles).forEach(function (key) {
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
ret[key] = {
get: function () {
return build.call(this, this._styles.concat(key));
}
};
});
return ret;
})();
var proto = defineProps(function chalk() {}, styles);
function build(_styles) {
var builder = function () {
return applyStyle.apply(builder, arguments);
};
builder._styles = _styles;
builder.enabled = this.enabled;
// __proto__ is used because we must return a function, but there is
// no way to create a function with a different prototype.
/* eslint-disable no-proto */
builder.__proto__ = proto;
return builder;
}
function applyStyle() {
// support varags, but simply cast to string in case there's only one arg
var args = arguments;
var argsLen = args.length;
var str = argsLen !== 0 && String(arguments[0]);
if (argsLen > 1) {
// don't slice `arguments`, it prevents v8 optimizations
for (var a = 1; a < argsLen; a++) {
str += ' ' + args[a];
}
}
if (!this.enabled || !str) {
return str;
}
var nestedStyles = this._styles;
var i = nestedStyles.length;
// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
// see https://github.com/chalk/chalk/issues/58
// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
var originalDim = ansiStyles.dim.open;
if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {
ansiStyles.dim.open = '';
}
while (i--) {
var code = ansiStyles[nestedStyles[i]];
// Replace any instances already present with a re-opening code
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
str = code.open + str.replace(code.closeRe, code.open) + code.close;
}
// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
ansiStyles.dim.open = originalDim;
return str;
}
function init() {
var ret = {};
Object.keys(styles).forEach(function (name) {
ret[name] = {
get: function () {
return build.call(this, [name]);
}
};
});
return ret;
}
defineProps(Chalk.prototype, init());
module.exports = new Chalk();
module.exports.styles = ansiStyles;
module.exports.hasColor = hasAnsi;
module.exports.stripColor = stripAnsi;
module.exports.supportsColor = supportsColor;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
module.exports = function (str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
return str.replace(matchOperatorsRe, '\\$&');
};
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
var _createClass=function(){function a(b,c){for(var e,d=0;d<c.length;d++)e=c[d],e.enumerable=e.enumerable||!1,e.configurable=!0,'value'in e&&(e.writable=!0),Object.defineProperty(b,e.key,e)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}var logger=__webpack_require__(23);function showColorMessage(a){var e=1<arguments.length&&arguments[1]!==void 0?arguments[1]:'white',f='background: '+e+'; color: white; display: block;';'yellow'===e&&(f='background: '+e+'; color: black; display: block;');for(var c=arguments.length,b=Array(2<c?c-2:0),d=2;d<c;d++)b[d-2]=arguments[d];0<b.length?console.log('%c%s',f,a,b):console.log('%c%s',f,a)}var MessengerBrowser=function(){function a(){var p=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,a),this.options={logger:!1},this.pkgInfo=p}return _createClass(a,[{key:'setOptions',value:function setOptions(){var p=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.options=Object.assign(this.options,p)}},{key:'version',value:function version(){return this.pkgInfo.version}},{key:'name',value:function name(){return this.pkgInfo.name}},{key:'log',value:function log(p){for(var t,u,r=arguments.length,q=Array(1<r?r-1:0),s=1;s<r;s++)q[s-1]=arguments[s];this.options.logger?logger.log.apply(logger,[p].concat(q)):(t=console).log.apply(t,[p].concat(q)),(u=console).log.apply(u,[p].concat(q))}},{key:'info',value:function info(p){for(var r=arguments.length,q=Array(1<r?r-1:0),s=1;s<r;s++)q[s-1]=arguments[s];this.options.logger?logger.info.apply(logger,[p].concat(q)):showColorMessage.apply(void 0,[p,'blue'].concat(q))}},{key:'note',value:function note(p){for(var r=arguments.length,q=Array(1<r?r-1:0),s=1;s<r;s++)q[s-1]=arguments[s];this.options.logger?logger.info.apply(logger,[p].concat(q)):showColorMessage.apply(void 0,[p,'orange'].concat(q))}},{key:'success',value:function success(p){for(var r=arguments.length,q=Array(1<r?r-1:0),s=1;s<r;s++)q[s-1]=arguments[s];this.options.logger?logger.info.apply(logger,[p].concat(q)):showColorMessage.apply(void 0,[p,'green'].concat(q))}},{key:'error',value:function error(p){for(var r=arguments.length,q=Array(1<r?r-1:0),s=1;s<r;s++)q[s-1]=arguments[s];this.options.logger?logger.error.apply(logger,[p].concat(q)):showColorMessage.apply(void 0,[p,'red'].concat(q))}},{key:'warning',value:function warning(p){for(var r=arguments.length,q=Array(1<r?r-1:0),s=1;s<r;s++)q[s-1]=arguments[s];this.options.logger?logger.warning.apply(logger,[p].concat(q)):showColorMessage.apply(void 0,[p,'yellow'].concat(q))}},{key:'table',value:function table(p){console.table(p)}},{key:'dir',value:function dir(){var q;(q=console).dir.apply(q,p)}},{key:'line',value:function line(){var p=0<arguments.length&&void 0!==arguments[0]?arguments[0]:'',q=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'white',r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:80;p=0<p.length?p.substring(0,1):'\u2584',console.log('%c%s','color: '+q+'; display: block',p.repeat(r))}}]),a}();module.exports=MessengerBrowser;
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
var chalk=__webpack_require__(5),cl=__webpack_require__(9),Table=__webpack_require__(10),pkgInfo=__webpack_require__(2),messenger={version:function version(){return pkgInfo.version},name:function name(){return pkgInfo.name},log:function log(){for(var d,b=arguments.length,a=Array(b),c=0;c<b;c++)a[c]=arguments[c];return(d=console).log.apply(d,a),a},info:function info(){for(var b=arguments.length,a=Array(b),c=0;c<b;c++)a[c]=arguments[c];return console.log(chalk.cyan.apply(chalk,a)),a},note:function note(a){for(var f,c=arguments.length,b=Array(1<c?c-1:0),d=1;d<c;d++)b[d-1]=arguments[d];return(f=console).log.apply(f,[a].concat(b)),b},success:function success(){for(var b=arguments.length,a=Array(b),c=0;c<b;c++)a[c]=arguments[c];return console.log(chalk.green.apply(chalk,a)),a},warning:function warning(){for(var b=arguments.length,a=Array(b),c=0;c<b;c++)a[c]=arguments[c];return console.log(chalk.yellow.apply(chalk,a)),a},error:function error(){for(var b=arguments.length,a=Array(b),c=0;c<b;c++)a[c]=arguments[c];return console.log(chalk.red.apply(chalk,a)),a},table:function table(a){var b;0<a.length&&(Array.isArray(a[0])?(header=a[0],a.splice(0,1)):header=Object.keys(a[0]),header=header.map(function(d){return chalk.cyan.bold(d)}),b=new Table({head:header}),a.map(function(d){var f=Object.keys(d).map(function(g){return d[g]});b.push(f)}),console.log(b.toString()))},line:function line(color){if(0<color.length)try{eval('cl.'+color+'()')}catch(a){console.error(chalk.bgRed.bold('Invalid Color: '+color))}},dir:function dir(a){return console.dir(a),a}};module.exports=messenger;
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {
// TODO: expose more of `chalk` and condense this file more
// directly copy/pasted and manipulated from `chalk`'s index.js file
var escapeStringRegexp = __webpack_require__(6);
var defineProps = Object.defineProperties;
var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM);
var ansiStyles = __webpack_require__(4);
var util = __webpack_require__(28);
var chalk = __webpack_require__(5);
var block = "\u2588";
var columns = 80;
if (process.stdout.isTTY && process.stdout.columns)
columns = process.stdout.columns;
var str = new Array(columns + 1).join(block);
var styles = (function () {
var ret = {};
Object.keys(ansiStyles).forEach(function (key) {
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
ret[key] = {
get: function () {
return build.call(this, this._styles.concat(key));
}
};
});
return ret;
})();
var proto = defineProps(function chalk() {}, styles);
function Chalkline(options) {
this.enabled = !options || options.enabled === undefined ? chalk.supportsColor : options.enabled;
}
function init() {
var chalkline = {};
Object.keys(chalk.styles).forEach(function(name) {
chalkline[name] = {
get: function () {
return build.call(this, [name]);
}
};
});
return chalkline;
}
function applyStyle() {
// support varags, but simply cast to string in case there's only one arg
var args = arguments;
var argsLen = args.length;
var str = argsLen !== 0 && String(arguments[0]);
if (argsLen > 1) {
// don't slice `arguments`, it prevents v8 optimizations
for (var a = 1; a < argsLen; a++) {
str += ' ' + args[a];
}
}
if (!this.enabled || !str) {
return str;
}
var nestedStyles = this._styles;
var i = nestedStyles.length;
// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
// see https://github.com/chalk/chalk/issues/58
// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
var originalDim = ansiStyles.dim.open;
if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {
ansiStyles.dim.open = '';
}
while (i--) {
var code = ansiStyles[nestedStyles[i]];
// Replace any instances already present with a re-opening code
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
str = code.open + str.replace(code.closeRe, code.open) + code.close;
}
// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
ansiStyles.dim.open = originalDim;
return str;
}
function build(_styles) {
// This is where the magic happens by using `.call(builder, str)`
// instead of calling `applyStyle.apply(builder, arguments)`
// like `chalk` does, we simply pass it the argument of str
// maybe we can rewrite this a better way! PR's welcome
var builder = function () {
return console.log(applyStyle.call(builder, str));
};
builder._styles = _styles;
builder.enabled = this.enabled;
// __proto__ is used because we must return a function, but there is
// no way to create a function with a different prototype.
/* eslint-disable no-proto */
builder.__proto__ = proto;
return builder;
}
defineProps(Chalkline.prototype, init());
module.exports = new Chalkline();
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Module dependencies.
*/
var colors = __webpack_require__(21)
, utils = __webpack_require__(11)
, repeat = utils.repeat
, truncate = utils.truncate
, pad = utils.pad;
/**
* Table constructor
*
* @param {Object} options
* @api public
*/
function Table (options){
this.options = utils.options({
chars: {
'top': '─'
, 'top-mid': '┬'
, 'top-left': '┌'
, 'top-right': '┐'
, 'bottom': '─'
, 'bottom-mid': '┴'
, 'bottom-left': '└'
, 'bottom-right': '┘'
, 'left': '│'
, 'left-mid': '├'
, 'mid': '─'
, 'mid-mid': '┼'
, 'right': '│'
, 'right-mid': '┤'
, 'middle': '│'
}
, truncate: '…'
, colWidths: []
, colAligns: []
, style: {
'padding-left': 1
, 'padding-right': 1
, head: ['red']
, border: ['grey']
, compact : false
}
, head: []
}, options);
};
/**
* Inherit from Array.
*/
Table.prototype.__proto__ = Array.prototype;
/**
* Width getter
*
* @return {Number} width
* @api public
*/
Table.prototype.__defineGetter__('width', function (){
var str = this.toString().split("\n");
if (str.length) return str[0].length;
return 0;
});
/**
* Render to a string.
*
* @return {String} table representation
* @api public
*/
Table.prototype.render
Table.prototype.toString = function (){
var ret = ''
, options = this.options
, style = options.style
, head = options.head
, chars = options.chars
, truncater = options.truncate
, colWidths = options.colWidths || new Array(this.head.length)
, totalWidth = 0;
if (!head.length && !this.length) return '';
if (!colWidths.length){
var all_rows = this.slice(0);
if (head.length) { all_rows = all_rows.concat([head]) };
all_rows.forEach(function(cells){
// horizontal (arrays)
if (typeof cells === 'object' && cells.length) {
extractColumnWidths(cells);
// vertical (objects)
} else {
var header_cell = Object.keys(cells)[0]
, value_cell = cells[header_cell];
colWidths[0] = Math.max(colWidths[0] || 0, get_width(header_cell) || 0);
// cross (objects w/ array values)
if (typeof value_cell === 'object' && value_cell.length) {
extractColumnWidths(value_cell, 1);
} else {
colWidths[1] = Math.max(colWidths[1] || 0, get_width(value_cell) || 0);
}
}
});
};
totalWidth = (colWidths.length == 1 ? colWidths[0] : colWidths.reduce(
function (a, b){
return a + b
})) + colWidths.length + 1;
function extractColumnWidths(arr, offset) {
var offset = offset || 0;
arr.forEach(function(cell, i){
colWidths[i + offset] = Math.max(colWidths[i + offset] || 0, get_width(cell) || 0);
});
};
function get_width(obj) {
return typeof obj == 'object' && obj.width != undefined
? obj.width
: ((typeof obj == 'object' ? utils.strlen(obj.text) : utils.strlen(obj)) + (style['padding-left'] || 0) + (style['padding-right'] || 0))
}
// draws a line
function line (line, left, right, intersection){
var width = 0
, line =
left
+ repeat(line, totalWidth - 2)
+ right;
colWidths.forEach(function (w, i){
if (i == colWidths.length - 1) return;
width += w + 1;
line = line.substr(0, width) + intersection + line.substr(width + 1);
});
return applyStyles(options.style.border, line);
};
// draws the top line
function lineTop (){
var l = line(chars.top
, chars['top-left'] || chars.top
, chars['top-right'] || chars.top
, chars['top-mid']);
if (l)
ret += l + "\n";
};
function generateRow (items, style) {
var cells = []
, max_height = 0;
// prepare vertical and cross table data
if (!Array.isArray(items) && typeof items === "object") {
var key = Object.keys(items)[0]
, value = items[key]
, first_cell_head = true;
if (Array.isArray(value)) {
items = value;
items.unshift(key);
} else {
items = [key, value];
}
}
// transform array of item strings into structure of cells
items.forEach(function (item, i) {
var contents = item.toString().split("\n").reduce(function (memo, l) {
memo.push(string(l, i));
return memo;
}, [])
var height = contents.length;
if (height > max_height) { max_height = height };
cells.push({ contents: contents , height: height });
});
// transform vertical cells into horizontal lines
var lines = new Array(max_height);
cells.forEach(function (cell, i) {
cell.contents.forEach(function (line, j) {
if (!lines[j]) { lines[j] = [] };
if (style || (first_cell_head && i === 0 && options.style.head)) {
line = applyStyles(options.style.head, line)
}
lines[j].push(line);
});
// populate empty lines in cell
for (var j = cell.height, l = max_height; j < l; j++) {
if (!lines[j]) { lines[j] = [] };
lines[j].push(string('', i));
}
});
var ret = "";
lines.forEach(function (line, index) {
if (ret.length > 0) {
ret += "\n" + applyStyles(options.style.border, chars.left);
}
ret += line.join(applyStyles(options.style.border, chars.middle)) + applyStyles(options.style.border, chars.right);
});
return applyStyles(options.style.border, chars.left) + ret;
};
function applyStyles(styles, subject) {
if (!subject)
return '';
styles.forEach(function(style) {
subject = colors[style](subject);
});
return subject;
};
// renders a string, by padding it or truncating it
function string (str, index){
var str = String(typeof str == 'object' && str.text ? str.text : str)
, length = utils.strlen(str)
, width = colWidths[index]
- (style['padding-left'] || 0)
- (style['padding-right'] || 0)
, align = options.colAligns[index] || 'left';
return repeat(' ', style['padding-left'] || 0)
+ (length == width ? str :
(length < width
? pad(str, ( width + (str.length - length) ), ' ', align == 'left' ? 'right' :
(align == 'middle' ? 'both' : 'left'))
: (truncater ? truncate(str, width, truncater) : str))
)
+ repeat(' ', style['padding-right'] || 0);
};
if (head.length){
lineTop();
ret += generateRow(head, style.head) + "\n"
}
if (this.length)
this.forEach(function (cells, i){
if (!head.length && i == 0)
lineTop();
else {
if (!style.compact || i<(!!head.length) ?1:0 || cells.length == 0){
var l = line(chars.mid
, chars['left-mid']
, chars['right-mid']
, chars['mid-mid']);
if (l)
ret += l + "\n"
}
}
if (cells.hasOwnProperty("length") && !cells.length) {
return
} else {
ret += generateRow(cells) + "\n";
};
});
var l = line(chars.bottom
, chars['bottom-left'] || chars.bottom
, chars['bottom-right'] || chars.bottom
, chars['bottom-mid']);
if (l)
ret += l;
else
// trim the last '\n' if we didn't add the bottom decoration
ret = ret.slice(0, -1);
return ret;
};
/**
* Module exports.
*/
module.exports = Table;
module.exports.version = '0.0.1';
/***/ }),
/* 11 */
/***/ (function(module, exports) {
/**
* Repeats a string.
*
* @param {String} char(s)
* @param {Number} number of times
* @return {String} repeated string
*/
exports.repeat = function (str, times){
return Array(times + 1).join(str);
};
/**
* Pads a string
*
* @api public
*/
exports.pad = function (str, len, pad, dir) {
if (len + 1 >= str.length)
switch (dir){
case 'left':
str = Array(len + 1 - str.length).join(pad) + str;
break;
case 'both':
var right = Math.ceil((padlen = len - str.length) / 2);
var left = padlen - right;
str = Array(left + 1).join(pad) + str + Array(right + 1).join(pad);
break;
default:
str = str + Array(len + 1 - str.length).join(pad);
};
return str;
};
/**
* Truncates a string
*
* @api public
*/
exports.truncate = function (str, length, chr){
chr = chr || '…';
return str.length >= length ? str.substr(0, length - chr.length) + chr : str;
};
/**
* Copies and merges options with defaults.
*
* @param {Object} defaults
* @param {Object} supplied options
* @return {Object} new (merged) object
*/
function options(defaults, opts) {
for (var p in opts) {
if (opts[p] && opts[p].constructor && opts[p].constructor === Object) {
defaults[p] = defaults[p] || {};
options(defaults[p], opts[p]);
} else {
defaults[p] = opts[p];
}
}
return defaults;
};
exports.options = options;
//
// For consideration of terminal "color" programs like colors.js,
// which can add ANSI escape color codes to strings,
// we destyle the ANSI color escape codes for padding calculations.
//
// see: http://en.wikipedia.org/wiki/ANSI_escape_code
//
exports.strlen = function(str){
var code = /\u001b\[(?:\d*;){0,5}\d*m/g;
var stripped = ("" + str).replace(code,'');
var split = stripped.split("\n");
return split.reduce(function (memo, s) { return (s.length > memo) ? s.length : memo }, 0);
}
/***/ }),
/* 12 */
/***/ (function(module, exports) {
function webpackEmptyContext(req) {
throw new Error("Cannot find module '" + req + "'.");
}
webpackEmptyContext.keys = function() { return []; };
webpackEmptyContext.resolve = webpackEmptyContext;
module.exports = webpackEmptyContext;
webpackEmptyContext.id = 12;
/***/ }),
/* 13 */
/***/ (function(module, exports) {
module['exports'] = function runTheTrap (text, options) {
var result = "";
text = text || "Run the trap, drop the bass";
text = text.split('');
var trap = {
a: ["\u0040", "\u0104", "\u023a", "\u0245", "\u0394", "\u039b", "\u0414"],
b: ["\u00df", "\u0181", "\u0243", "\u026e", "\u03b2", "\u0e3f"],
c: ["\u00a9", "\u023b", "\u03fe"],
d: ["\u00d0", "\u018a", "\u0500" , "\u0501" ,"\u0502", "\u0503"],
e: ["\u00cb", "\u0115", "\u018e", "\u0258", "\u03a3", "\u03be", "\u04bc", "\u0a6c"],
f: ["\u04fa"],
g: ["\u0262"],
h: ["\u0126", "\u0195", "\u04a2", "\u04ba", "\u04c7", "\u050a"],
i: ["\u0f0f"],
j: ["\u0134"],
k: ["\u0138", "\u04a0", "\u04c3", "\u051e"],
l: ["\u0139"],
m: ["\u028d", "\u04cd", "\u04ce", "\u0520", "\u0521", "\u0d69"],
n: ["\u00d1", "\u014b", "\u019d", "\u0376", "\u03a0", "\u048a"],
o: ["\u00d8", "\u00f5", "\u00f8", "\u01fe", "\u0298", "\u047a", "\u05dd", "\u06dd", "\u0e4f"],
p: ["\u01f7", "\u048e"],
q: ["\u09cd"],
r: ["\u00ae", "\u01a6", "\u0210", "\u024c", "\u0280", "\u042f"],
s: ["\u00a7", "\u03de", "\u03df", "\u03e8"],
t: ["\u0141", "\u0166", "\u0373"],
u: ["\u01b1", "\u054d"],
v: ["\u05d8"],
w: ["\u0428", "\u0460", "\u047c", "\u0d70"],
x: ["\u04b2", "\u04fe", "\u04fc", "\u04fd"],
y: ["\u00a5", "\u04b0", "\u04cb"],
z: ["\u01b5", "\u0240"]
}
text.forEach(function(c){
c = c.toLowerCase();
var chars = trap[c] || [" "];
var rand = Math.floor(Math.random() * chars.length);
if (typeof trap[c] !== "undefined") {
result += trap[c][rand];
} else {
result += c;
}
});
return result;
}
/***/ }),
/* 14 */
/***/ (function(module, exports) {
// please no
module['exports'] = function zalgo(text, options) {
text = text || " he is here ";
var soul = {
"up" : [
'̍', '̎', '̄', '̅',
'̿', '̑', '̆', '̐',
'͒', '͗', '͑', '̇',
'̈', '̊', '͂', '̓',
'̈', '͊', '͋', '͌',
'̃', '̂', '̌', '͐',
'̀', '́', '̋', '̏',
'̒', '̓', '̔', '̽',
'̉', 'ͣ', 'ͤ', 'ͥ',
'ͦ', 'ͧ', 'ͨ', 'ͩ',
'ͪ', 'ͫ', 'ͬ', 'ͭ',
'ͮ', 'ͯ', '̾', '͛',
'͆', '̚'
],
"down" : [
'̖', '̗', '̘', '̙',
'̜', '̝', '̞', '̟',
'̠', '̤', '̥', '̦',
'̩', '̪', '̫', '̬',
'̭', '̮', '̯', '̰',
'̱', '̲', '̳', '̹',
'̺', '̻', '̼', 'ͅ',
'͇', '͈', '͉', '͍',
'͎', '͓', '͔', '͕',
'͖', '͙', '͚', '̣'
],
"mid" : [
'̕', '̛', '̀', '́',
'͘', '̡', '̢', '̧',
'̨', '̴', '̵', '̶',
'͜', '͝', '͞',
'͟', '͠', '͢', '̸',
'̷', '͡', ' ҉'
]
},
all = [].concat(soul.up, soul.down, soul.mid),
zalgo = {};
function randomNumber(range) {
var r = Math.floor(Math.random() * range);
return r;
}
function is_char(character) {
var bool = false;
all.filter(function (i) {
bool = (i === character);
});
return bool;
}
function heComes(text, options) {
var result = '', counts, l;
options = options || {};
options["up"] = options["up"] || true;
options["mid"] = options["mid"] || true;
options["down"] = options["down"] || true;
options["size"] = options["size"] || "maxi";
text = text.split('');
for (l in text) {
if (is_char(l)) {
continue;
}
result = result + text[l];
counts = {"up" : 0, "down" : 0, "mid" : 0};
switch (options.size) {
case 'mini':
counts.up = randomNumber(8);
counts.min = randomNumber(2);
counts.down = randomNumber(8);
break;
case 'maxi':
counts.up = randomNumber(16) + 3;
counts.min = randomNumber(4) + 1;
counts.down = randomNumber(64) + 3;
break;
default:
counts.up = randomNumber(8) + 1;
counts.mid = randomNumber(6) / 2;
counts.down = randomNumber(8) + 1;
break;
}
var arr = ["up", "mid", "down"];
for (var d in arr) {
var index = arr[d];
for (var i = 0 ; i <= counts[index]; i++) {
if (options[index]) {
result = result + soul[index][randomNumber(soul[index].length)];
}
}
}
}
return result;
}
// don't summon him
return heComes(text);
}
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
var colors = __webpack_require__(1);
module['exports'] = (function() {
return function (letter, i, exploded) {
if(letter === " ") return letter;
switch(i%3) {
case 0: return colors.red(letter);
case 1: return colors.white(letter)
case 2: return colors.blue(letter)
}
}
})();
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
var colors = __webpack_require__(1);
module['exports'] = (function () {
var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
return function (letter, i, exploded) {
if (letter === " ") {
return letter;
} else {
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
}
};
})();
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
var colors = __webpack_require__(1);
module['exports'] = (function () {
var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
return function(letter, i, exploded) {
return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter);
};
})();
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
var colors = __webpack_require__(1);
module['exports'] = function (letter, i, exploded) {
return i % 2 === 0 ? letter : colors.inverse(letter);
};
/***/ }),
/* 19 */
/***/ (function(module, exports) {
/*
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var styles = {};
module['exports'] = styles;
var codes = {
reset: [0, 0],
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29],
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
gray: [90, 39],
grey: [90, 39],
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
// legacy styles for colors pre v1.0.0
blackBG: [40, 49],
redBG: [41, 49],
greenBG: [42, 49],
yellowBG: [43, 49],
blueBG: [44, 49],
magentaBG: [45, 49],
cyanBG: [46, 49],
whiteBG: [47, 49]
};
Object.keys(codes).forEach(function (key) {
var val = codes[key];
var style = styles[key] = [];
style.open = '\u001b[' + val[0] + 'm';
style.close = '\u001b[' + val[1] + 'm';
});
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/*
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var argv = process.argv;
module.exports = (function () {
if (argv.indexOf('--no-color') !== -1 ||
argv.indexOf('--color=false') !== -1) {
return false;
}
if (argv.indexOf('--color') !== -1 ||
argv.indexOf('--color=true') !== -1 ||
argv.indexOf('--color=always') !== -1) {
return true;
}
if (process.stdout && !process.stdout.isTTY) {
return false;
}
if (process.platform === 'win32') {
return true;
}
if ('COLORTERM' in process.env) {
return true;
}
if (process.env.TERM === 'dumb') {
return false;
}
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
return true;
}
return false;
})();
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
//
// Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype
//
// var colors = require('colors/safe);
// colors.red("foo")
//
//
var colors = __webpack_require__(1);
module['exports'] = colors;
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ansiRegex = __webpack_require__(3);
var re = new RegExp(ansiRegex().source); // remove the `g` flag
module.exports = re.test.bind(re);
/***/ }),
/*