diff --git a/node_modules/cli-table3/CHANGELOG.md b/node_modules/cli-table3/CHANGELOG.md index 62eb485bdf93d..3f6ba35f8393e 100644 --- a/node_modules/cli-table3/CHANGELOG.md +++ b/node_modules/cli-table3/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## v0.5.1 (2018-07-19) + +#### :rocket: Enhancement +* [#21](https://github.com/cli-table/cli-table3/pull/21) Import type definition from `@types/cli-table2` ([@Turbo87](https://github.com/Turbo87)) + +#### Committers: 1 +- Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) + + ## v0.5.0 (2018-06-11) #### :boom: Breaking Change @@ -18,10 +27,9 @@ * [#3](https://github.com/cli-table/cli-table3/pull/3) Add `yarn.lock` file. ([@Turbo87](https://github.com/Turbo87)) * [#1](https://github.com/cli-table/cli-table3/pull/1) Skip broken test. ([@Turbo87](https://github.com/Turbo87)) -#### Committers: 3 +#### Committers: 2 - Daniel Ruf ([DanielRuf](https://github.com/DanielRuf)) - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) -- [dependabot[bot]](https://github.com/apps/dependabot) ## v0.4.0 (2018-06-10) diff --git a/node_modules/cli-table3/index.d.ts b/node_modules/cli-table3/index.d.ts new file mode 100644 index 0000000000000..bdf17e270ea84 --- /dev/null +++ b/node_modules/cli-table3/index.d.ts @@ -0,0 +1,95 @@ +declare namespace CliTable3 { + type CharName = + "top" | + "top-mid" | + "top-left" | + "top-right" | + "bottom" | + "bottom-mid" | + "bottom-left" | + "bottom-right" | + "left" | + "left-mid" | + "mid" | + "mid-mid" | + "right" | + "right-mid" | + "middle"; + + type HorizontalAlignment = "left" | "center" | "right"; + type VerticalAlignment = "top" | "center" | "bottom"; + + interface TableOptions { + truncate: string; + colWidths: Array; + rowHeights: Array; + colAligns: HorizontalAlignment[]; + rowAligns: VerticalAlignment[]; + head: string[]; + wordWrap: boolean; + } + + interface TableInstanceOptions extends TableOptions { + chars: Record; + style: { + "padding-left": number; + "padding-right": number; + head: string[]; + border: string[]; + compact: boolean; + }; + } + + interface TableConstructorOptions extends Partial { + chars?: Partial>; + style?: Partial; + } + + type CellValue = boolean | number | string | null | undefined; + + interface CellOptions { + content: CellValue; + chars?: Partial>; + truncate?: string; + colSpan?: number; + rowSpan?: number; + hAlign?: HorizontalAlignment; + vAlign?: VerticalAlignment; + style?: { + "padding-left"?: number; + "padding-right"?: number; + head?: string[]; + border?: string[]; + }; + } + + interface GenericTable extends Array { + options: TableInstanceOptions; + readonly width: number; + } + + type Table = HorizontalTable | VerticalTable | CrossTable; + type Cell = CellValue | CellOptions; + + type HorizontalTable = GenericTable; + type HorizontalTableRow = Cell[]; + + type VerticalTable = GenericTable; + interface VerticalTableRow { + [name: string]: Cell; + } + + type CrossTable = GenericTable; + interface CrossTableRow { + [name: string]: Cell[]; + } +} + +interface CliTable3 { + new (options?: CliTable3.TableConstructorOptions): CliTable3.Table; + readonly prototype: CliTable3.Table; +} + +declare const CliTable3: CliTable3; + +export = CliTable3; diff --git a/node_modules/cli-table3/package.json b/node_modules/cli-table3/package.json index d0545c93f7df6..6ee81dc3f1b78 100644 --- a/node_modules/cli-table3/package.json +++ b/node_modules/cli-table3/package.json @@ -1,28 +1,29 @@ { - "_from": "cli-table3", - "_id": "cli-table3@0.5.0", + "_from": "cli-table3@0.5.1", + "_id": "cli-table3@0.5.1", "_inBundle": false, - "_integrity": "sha512-c7YHpUyO1SaKaO7kYtxd5NZ8FjAmSK3LpKkuzdwn+2CwpFxBpdoQLm+OAnnCfoEl7onKhN9PKQi1lsHuAIUqGQ==", + "_integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", "_location": "/cli-table3", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "cli-table3", + "raw": "cli-table3@0.5.1", "name": "cli-table3", "escapedName": "cli-table3", - "rawSpec": "", + "rawSpec": "0.5.1", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "0.5.1" }, "_requiredBy": [ "#USER", - "/" + "/", + "/npm-audit-report" ], - "_resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.0.tgz", - "_shasum": "adb2f025715f4466e67629783c8d73e9030eb4bd", - "_spec": "cli-table3", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "_shasum": "0252372d94dfc40dbd8df06005f48f31f656f202", + "_spec": "cli-table3@0.5.1", + "_where": "/Users/aeschright/code/cli", "author": { "name": "James Talmage" }, @@ -54,8 +55,8 @@ "eslint-plugin-prettier": "^2.6.0", "jest": "^23.1.0", "jest-runner-eslint": "^0.6.0", - "lerna-changelog": "^0.7.0", - "prettier": "1.13.5" + "lerna-changelog": "^0.8.0", + "prettier": "1.13.7" }, "directories": { "test": "test" @@ -65,6 +66,7 @@ }, "files": [ "src/", + "index.d.ts", "index.js" ], "homepage": "https://github.com/cli-table/cli-table3", @@ -124,5 +126,6 @@ "test": "jest --color", "test:watch": "jest --color --watchAll --notify" }, - "version": "0.5.0" + "types": "index.d.ts", + "version": "0.5.1" } diff --git a/node_modules/colors/LICENSE b/node_modules/colors/LICENSE index 3de4e33b48242..17880ff02972b 100644 --- a/node_modules/colors/LICENSE +++ b/node_modules/colors/LICENSE @@ -1,3 +1,5 @@ +MIT License + Original Library - Copyright (c) Marak Squires @@ -20,4 +22,4 @@ 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. \ No newline at end of file +THE SOFTWARE. diff --git a/node_modules/colors/README.md b/node_modules/colors/README.md index 0326aab340af4..4bebb6c92b073 100644 --- a/node_modules/colors/README.md +++ b/node_modules/colors/README.md @@ -1,4 +1,10 @@ -# colors.js [![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js) +# colors.js +[![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js) +[![version](https://img.shields.io/npm/v/colors.svg)](https://www.npmjs.org/package/colors) +[![dependencies](https://david-dm.org/Marak/colors.js.svg)](https://david-dm.org/Marak/colors.js) +[![devDependencies](https://david-dm.org/Marak/colors.js/dev-status.svg)](https://david-dm.org/Marak/colors.js#info=devDependencies) + +Please check out the [roadmap](ROADMAP.md) for upcoming features and releases. Please open Issues to provide feedback, and check the `develop` branch for the latest bleeding-edge updates. ## get color and style in your node.js console @@ -163,7 +169,7 @@ console.log(colors.warn("this is a warning")); ``` -You can also combine them: +### Combining Colors ```javascript var colors = require('colors'); diff --git a/node_modules/colors/examples/normal-usage.js b/node_modules/colors/examples/normal-usage.js index 2818741e1f977..cc8d05ff4f23a 100644 --- a/node_modules/colors/examples/normal-usage.js +++ b/node_modules/colors/examples/normal-usage.js @@ -1,34 +1,36 @@ var colors = require('../lib/index'); -console.log("First some yellow text".yellow); +console.log('First some yellow text'.yellow); -console.log("Underline that text".yellow.underline); +console.log('Underline that text'.yellow.underline); -console.log("Make it bold and red".red.bold); +console.log('Make it bold and red'.red.bold); -console.log(("Double Raindows All Day Long").rainbow) +console.log(('Double Raindows All Day Long').rainbow); -console.log("Drop the bass".trap) +console.log('Drop the bass'.trap); -console.log("DROP THE RAINBOW BASS".trap.rainbow) +console.log('DROP THE RAINBOW BASS'.trap.rainbow); +// styles not widely supported +console.log('Chains are also cool.'.bold.italic.underline.red); -console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported - -console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse + ' styles! '.yellow.bold); // styles not widely supported -console.log("Zebras are so fun!".zebra); +// styles not widely supported +console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse + + ' styles! '.yellow.bold); +console.log('Zebras are so fun!'.zebra); // // Remark: .strikethrough may not work with Mac OS Terminal App // -console.log("This is " + "not".strikethrough + " fun."); +console.log('This is ' + 'not'.strikethrough + ' fun.'); -console.log('Background color attack!'.black.bgWhite) -console.log('Use random styles on everything!'.random) -console.log('America, Heck Yeah!'.america) +console.log('Background color attack!'.black.bgWhite); +console.log('Use random styles on everything!'.random); +console.log('America, Heck Yeah!'.america); -console.log('Setting themes is useful') +console.log('Setting themes is useful'); // // Custom themes @@ -45,30 +47,35 @@ colors.setTheme({ help: 'cyan', warn: 'yellow', debug: 'blue', - error: 'red' + error: 'red', }); // outputs red text -console.log("this is an error".error); +console.log('this is an error'.error); // outputs yellow text -console.log("this is a warning".warn); +console.log('this is a warning'.warn); // outputs grey text -console.log("this is an input".input); +console.log('this is an input'.input); console.log('Generic logging theme as file'.green.bold.underline); // Load a theme from file -colors.setTheme(__dirname + '/../themes/generic-logging.js'); +try { + colors.setTheme(require(__dirname + '/../themes/generic-logging.js')); +} catch (err) { + console.log(err); +} // outputs red text -console.log("this is an error".error); +console.log('this is an error'.error); // outputs yellow text -console.log("this is a warning".warn); +console.log('this is a warning'.warn); // outputs grey text -console.log("this is an input".input); +console.log('this is an input'.input); + +// console.log("Don't summon".zalgo) -//console.log("Don't summon".zalgo) \ No newline at end of file diff --git a/node_modules/colors/examples/safe-string.js b/node_modules/colors/examples/safe-string.js index 111b363a4a7a4..98994873520ff 100644 --- a/node_modules/colors/examples/safe-string.js +++ b/node_modules/colors/examples/safe-string.js @@ -1,41 +1,43 @@ var colors = require('../safe'); -console.log(colors.yellow("First some yellow text")); +console.log(colors.yellow('First some yellow text')); -console.log(colors.yellow.underline("Underline that text")); +console.log(colors.yellow.underline('Underline that text')); -console.log(colors.red.bold("Make it bold and red")); +console.log(colors.red.bold('Make it bold and red')); -console.log(colors.rainbow("Double Raindows All Day Long")) +console.log(colors.rainbow('Double Raindows All Day Long')); -console.log(colors.trap("Drop the bass")) +console.log(colors.trap('Drop the bass')); -console.log(colors.rainbow(colors.trap("DROP THE RAINBOW BASS"))); +console.log(colors.rainbow(colors.trap('DROP THE RAINBOW BASS'))); -console.log(colors.bold.italic.underline.red('Chains are also cool.')); // styles not widely supported +// styles not widely supported +console.log(colors.bold.italic.underline.red('Chains are also cool.')); +// styles not widely supported +console.log(colors.green('So ') + colors.underline('are') + ' ' + + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); -console.log(colors.green('So ') + colors.underline('are') + ' ' + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); // styles not widely supported +console.log(colors.zebra('Zebras are so fun!')); -console.log(colors.zebra("Zebras are so fun!")); - -console.log("This is " + colors.strikethrough("not") + " fun."); +console.log('This is ' + colors.strikethrough('not') + ' fun.'); console.log(colors.black.bgWhite('Background color attack!')); -console.log(colors.random('Use random styles on everything!')) +console.log(colors.random('Use random styles on everything!')); console.log(colors.america('America, Heck Yeah!')); -console.log('Setting themes is useful') +console.log('Setting themes is useful'); // // Custom themes // -//console.log('Generic logging theme as JSON'.green.bold.underline); +// console.log('Generic logging theme as JSON'.green.bold.underline); // Load theme with JSON literal colors.setTheme({ silly: 'rainbow', - input: 'grey', + input: 'blue', verbose: 'cyan', prompt: 'grey', info: 'green', @@ -43,34 +45,33 @@ colors.setTheme({ help: 'cyan', warn: 'yellow', debug: 'blue', - error: 'red' + error: 'red', }); // outputs red text -console.log(colors.error("this is an error")); +console.log(colors.error('this is an error')); // outputs yellow text -console.log(colors.warn("this is a warning")); +console.log(colors.warn('this is a warning')); -// outputs grey text -console.log(colors.input("this is an input")); +// outputs blue text +console.log(colors.input('this is an input')); // console.log('Generic logging theme as file'.green.bold.underline); // Load a theme from file -colors.setTheme(__dirname + '/../themes/generic-logging.js'); +colors.setTheme(require(__dirname + '/../themes/generic-logging.js')); // outputs red text -console.log(colors.error("this is an error")); +console.log(colors.error('this is an error')); // outputs yellow text -console.log(colors.warn("this is a warning")); +console.log(colors.warn('this is a warning')); // outputs grey text -console.log(colors.input("this is an input")); +console.log(colors.input('this is an input')); // console.log(colors.zalgo("Don't summon him")) - diff --git a/node_modules/colors/index.d.ts b/node_modules/colors/index.d.ts new file mode 100644 index 0000000000000..baa70686535a7 --- /dev/null +++ b/node_modules/colors/index.d.ts @@ -0,0 +1,136 @@ +// Type definitions for Colors.js 1.2 +// Project: https://github.com/Marak/colors.js +// Definitions by: Bart van der Schoor , Staffan Eketorp +// Definitions: https://github.com/Marak/colors.js + +export interface Color { + (text: string): string; + + strip: Color; + stripColors: Color; + + black: Color; + red: Color; + green: Color; + yellow: Color; + blue: Color; + magenta: Color; + cyan: Color; + white: Color; + gray: Color; + grey: Color; + + bgBlack: Color; + bgRed: Color; + bgGreen: Color; + bgYellow: Color; + bgBlue: Color; + bgMagenta: Color; + bgCyan: Color; + bgWhite: Color; + + reset: Color; + bold: Color; + dim: Color; + italic: Color; + underline: Color; + inverse: Color; + hidden: Color; + strikethrough: Color; + + rainbow: Color; + zebra: Color; + america: Color; + trap: Color; + random: Color; + zalgo: Color; +} + +export function enable(): void; +export function disable(): void; +export function setTheme(theme: any): void; + +export let enabled: boolean; + +export const strip: Color; +export const stripColors: Color; + +export const black: Color; +export const red: Color; +export const green: Color; +export const yellow: Color; +export const blue: Color; +export const magenta: Color; +export const cyan: Color; +export const white: Color; +export const gray: Color; +export const grey: Color; + +export const bgBlack: Color; +export const bgRed: Color; +export const bgGreen: Color; +export const bgYellow: Color; +export const bgBlue: Color; +export const bgMagenta: Color; +export const bgCyan: Color; +export const bgWhite: Color; + +export const reset: Color; +export const bold: Color; +export const dim: Color; +export const italic: Color; +export const underline: Color; +export const inverse: Color; +export const hidden: Color; +export const strikethrough: Color; + +export const rainbow: Color; +export const zebra: Color; +export const america: Color; +export const trap: Color; +export const random: Color; +export const zalgo: Color; + +declare global { + interface String { + strip: string; + stripColors: string; + + black: string; + red: string; + green: string; + yellow: string; + blue: string; + magenta: string; + cyan: string; + white: string; + gray: string; + grey: string; + + bgBlack: string; + bgRed: string; + bgGreen: string; + bgYellow: string; + bgBlue: string; + bgMagenta: string; + bgCyan: string; + bgWhite: string; + + reset: string; + // @ts-ignore + bold: string; + dim: string; + italic: string; + underline: string; + inverse: string; + hidden: string; + strikethrough: string; + + rainbow: string; + zebra: string; + america: string; + trap: string; + random: string; + zalgo: string; + } +} diff --git a/node_modules/colors/lib/colors.js b/node_modules/colors/lib/colors.js index 790ffd43ef515..7ca90fa903616 100644 --- a/node_modules/colors/lib/colors.js +++ b/node_modules/colors/lib/colors.js @@ -2,7 +2,7 @@ The MIT License (MIT) -Original Library +Original Library - Copyright (c) Marak Squires Additional functionality @@ -33,35 +33,45 @@ module['exports'] = colors; colors.themes = {}; +var util = require('util'); var ansiStyles = colors.styles = require('./styles'); var defineProps = Object.defineProperties; +var newLineRegex = new RegExp(/[\r\n]+/g); -colors.supportsColor = require('./system/supports-colors'); +colors.supportsColor = require('./system/supports-colors').supportsColor; -if (typeof colors.enabled === "undefined") { - colors.enabled = colors.supportsColor; +if (typeof colors.enabled === 'undefined') { + colors.enabled = colors.supportsColor() !== false; } -colors.stripColors = colors.strip = function(str){ - return ("" + str).replace(/\x1B\[\d+m/g, ''); +colors.enable = function() { + colors.enabled = true; }; +colors.disable = function() { + colors.enabled = false; +}; + +colors.stripColors = colors.strip = function(str) { + return ('' + str).replace(/\x1B\[\d+m/g, ''); +}; -var stylize = colors.stylize = function stylize (str, style) { +// eslint-disable-next-line no-unused-vars +var stylize = colors.stylize = function stylize(str, style) { if (!colors.enabled) { return str+''; } return ansiStyles[style].open + str + ansiStyles[style].close; -} +}; var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; -var escapeStringRegexp = function (str) { +var escapeStringRegexp = function(str) { if (typeof str !== 'string') { throw new TypeError('Expected a string'); } - return str.replace(matchOperatorsRe, '\\$&'); -} + return str.replace(matchOperatorsRe, '\\$&'); +}; function build(_styles) { var builder = function builder() { @@ -74,15 +84,16 @@ function build(_styles) { return builder; } -var styles = (function () { +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'); + Object.keys(ansiStyles).forEach(function(key) { + ansiStyles[key].closeRe = + new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); ret[key] = { - get: function () { + get: function() { return build(this._styles.concat(key)); - } + }, }; }); return ret; @@ -91,78 +102,81 @@ var styles = (function () { 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]; + var args = Array.prototype.slice.call(arguments); + + var str = args.map(function(arg) { + if (arg !== undefined && arg.constructor === String) { + return arg; + } else { + return util.inspect(arg); } - } + }).join(' '); if (!colors.enabled || !str) { return str; } + var newLinesPresent = str.indexOf('\n') != -1; + 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; + if (newLinesPresent) { + str = str.replace(newLineRegex, function(match) { + return code.close + match + code.open; + }); + } } return str; } -function applyTheme (theme) { +colors.setTheme = function(theme) { + if (typeof theme === 'string') { + console.log('colors.setTheme now only accepts an object, not a string. ' + + 'If you are trying to set a theme from a file, it is now your (the ' + + 'caller\'s) responsibility to require the file. The old syntax ' + + 'looked like colors.setTheme(__dirname + ' + + '\'/../themes/generic-logging.js\'); The new syntax looks like '+ + 'colors.setTheme(require(__dirname + ' + + '\'/../themes/generic-logging.js\'));'); + return; + } for (var style in theme) { - (function(style){ - colors[style] = function(str){ - if (typeof theme[style] === 'object'){ + (function(style) { + colors[style] = function(str) { + if (typeof theme[style] === 'object') { var out = str; - for (var i in theme[style]){ + for (var i in theme[style]) { out = colors[theme[style][i]](out); } return out; } return colors[theme[style]](str); }; - })(style) - } -} - -colors.setTheme = function (theme) { - if (typeof theme === 'string') { - try { - colors.themes[theme] = require(theme); - applyTheme(colors.themes[theme]); - return colors.themes[theme]; - } catch (err) { - console.log(err); - return err; - } - } else { - applyTheme(theme); + })(style); } }; function init() { var ret = {}; - Object.keys(styles).forEach(function (name) { + Object.keys(styles).forEach(function(name) { ret[name] = { - get: function () { + get: function() { return build([name]); - } + }, }; }); return ret; } -var sequencer = function sequencer (map, str) { - var exploded = str.split(""), i = 0; +var sequencer = function sequencer(map, str) { + var exploded = str.split(''); exploded = exploded.map(map); - return exploded.join(""); + return exploded.join(''); }; // custom formatter methods @@ -171,17 +185,17 @@ colors.zalgo = require('./custom/zalgo'); // maps colors.maps = {}; -colors.maps.america = require('./maps/america'); -colors.maps.zebra = require('./maps/zebra'); -colors.maps.rainbow = require('./maps/rainbow'); -colors.maps.random = require('./maps/random') +colors.maps.america = require('./maps/america')(colors); +colors.maps.zebra = require('./maps/zebra')(colors); +colors.maps.rainbow = require('./maps/rainbow')(colors); +colors.maps.random = require('./maps/random')(colors); for (var map in colors.maps) { - (function(map){ - colors[map] = function (str) { + (function(map) { + colors[map] = function(str) { return sequencer(colors.maps[map], str); - } - })(map) + }; + })(map); } -defineProps(colors, init()); \ No newline at end of file +defineProps(colors, init()); diff --git a/node_modules/colors/lib/custom/trap.js b/node_modules/colors/lib/custom/trap.js index 3f0914373817f..fbccf88dede0b 100644 --- a/node_modules/colors/lib/custom/trap.js +++ b/node_modules/colors/lib/custom/trap.js @@ -1,45 +1,46 @@ -module['exports'] = function runTheTrap (text, options) { - var result = ""; - text = text || "Run the trap, drop the bass"; +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){ + 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 chars = trap[c] || [' ']; var rand = Math.floor(Math.random() * chars.length); - if (typeof trap[c] !== "undefined") { + if (typeof trap[c] !== 'undefined') { result += trap[c][rand]; } else { result += c; } }); return result; - -} +}; diff --git a/node_modules/colors/lib/custom/zalgo.js b/node_modules/colors/lib/custom/zalgo.js index 1538c3b49388c..0ef2b01195635 100644 --- a/node_modules/colors/lib/custom/zalgo.js +++ b/node_modules/colors/lib/custom/zalgo.js @@ -1,8 +1,8 @@ // please no module['exports'] = function zalgo(text, options) { - text = text || " he is here "; + text = text || ' he is here '; var soul = { - "up" : [ + 'up': [ '̍', '̎', '̄', '̅', '̿', '̑', '̆', '̐', '͒', '͗', '͑', '̇', @@ -15,9 +15,9 @@ module['exports'] = function zalgo(text, options) { 'ͦ', 'ͧ', 'ͨ', 'ͩ', 'ͪ', 'ͫ', 'ͬ', 'ͭ', 'ͮ', 'ͯ', '̾', '͛', - '͆', '̚' + '͆', '̚', ], - "down" : [ + 'down': [ '̖', '̗', '̘', '̙', '̜', '̝', '̞', '̟', '̠', '̤', '̥', '̦', @@ -27,70 +27,75 @@ module['exports'] = function zalgo(text, options) { '̺', '̻', '̼', 'ͅ', '͇', '͈', '͉', '͍', '͎', '͓', '͔', '͕', - '͖', '͙', '͚', '̣' + '͖', '͙', '͚', '̣', ], - "mid" : [ + 'mid': [ '̕', '̛', '̀', '́', '͘', '̡', '̢', '̧', '̨', '̴', '̵', '̶', '͜', '͝', '͞', '͟', '͠', '͢', '̸', - '̷', '͡', ' ҉' - ] - }, - all = [].concat(soul.up, soul.down, soul.mid), - zalgo = {}; + '̷', '͡', ' ҉', + ], + }; + var all = [].concat(soul.up, soul.down, soul.mid); function randomNumber(range) { var r = Math.floor(Math.random() * range); return r; } - function is_char(character) { + function isChar(character) { var bool = false; - all.filter(function (i) { + all.filter(function(i) { bool = (i === character); }); return bool; } - + function heComes(text, options) { - var result = '', counts, l; + var result = ''; + var counts; + var l; options = options || {}; - options["up"] = typeof options["up"] !== 'undefined' ? options["up"] : true; - options["mid"] = typeof options["mid"] !== 'undefined' ? options["mid"] : true; - options["down"] = typeof options["down"] !== 'undefined' ? options["down"] : true; - options["size"] = typeof options["size"] !== 'undefined' ? options["size"] : "maxi"; + options['up'] = + typeof options['up'] !== 'undefined' ? options['up'] : true; + options['mid'] = + typeof options['mid'] !== 'undefined' ? options['mid'] : true; + options['down'] = + typeof options['down'] !== 'undefined' ? options['down'] : true; + options['size'] = + typeof options['size'] !== 'undefined' ? options['size'] : 'maxi'; text = text.split(''); for (l in text) { - if (is_char(l)) { + if (isChar(l)) { continue; } result = result + text[l]; - counts = {"up" : 0, "down" : 0, "mid" : 0}; + counts = {'up': 0, 'down': 0, 'mid': 0}; switch (options.size) { - case 'mini': - counts.up = randomNumber(8); - counts.mid = randomNumber(2); - counts.down = randomNumber(8); - break; - case 'maxi': - counts.up = randomNumber(16) + 3; - counts.mid = 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; + case 'mini': + counts.up = randomNumber(8); + counts.mid = randomNumber(2); + counts.down = randomNumber(8); + break; + case 'maxi': + counts.up = randomNumber(16) + 3; + counts.mid = 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"]; + var arr = ['up', 'mid', 'down']; for (var d in arr) { var index = arr[d]; - for (var i = 0 ; i <= counts[index]; i++) { + for (var i = 0; i <= counts[index]; i++) { if (options[index]) { result = result + soul[index][randomNumber(soul[index].length)]; } @@ -101,4 +106,5 @@ module['exports'] = function zalgo(text, options) { } // don't summon him return heComes(text, options); -} +}; + diff --git a/node_modules/colors/lib/extendStringPrototype.js b/node_modules/colors/lib/extendStringPrototype.js index 67374a1c22d10..46fd386a915a6 100644 --- a/node_modules/colors/lib/extendStringPrototype.js +++ b/node_modules/colors/lib/extendStringPrototype.js @@ -1,51 +1,42 @@ var colors = require('./colors'); -module['exports'] = function () { - +module['exports'] = function() { // // Extends prototype of native string object to allow for "foo".red syntax // - var addProperty = function (color, func) { + var addProperty = function(color, func) { String.prototype.__defineGetter__(color, func); }; - var sequencer = function sequencer (map, str) { - return function () { - var exploded = this.split(""), i = 0; - exploded = exploded.map(map); - return exploded.join(""); - } - }; - - addProperty('strip', function () { + addProperty('strip', function() { return colors.strip(this); }); - addProperty('stripColors', function () { + addProperty('stripColors', function() { return colors.strip(this); }); - addProperty("trap", function(){ + addProperty('trap', function() { return colors.trap(this); }); - addProperty("zalgo", function(){ + addProperty('zalgo', function() { return colors.zalgo(this); }); - addProperty("zebra", function(){ + addProperty('zebra', function() { return colors.zebra(this); }); - addProperty("rainbow", function(){ + addProperty('rainbow', function() { return colors.rainbow(this); }); - addProperty("random", function(){ + addProperty('random', function() { return colors.random(this); }); - addProperty("america", function(){ + addProperty('america', function() { return colors.america(this); }); @@ -53,8 +44,8 @@ module['exports'] = function () { // Iterate through all default styles and colors // var x = Object.keys(colors.styles); - x.forEach(function (style) { - addProperty(style, function () { + x.forEach(function(style) { + addProperty(style, function() { return colors.stylize(this, style); }); }); @@ -65,49 +56,55 @@ module['exports'] = function () { // on String that you should not overwrite. // var stringPrototypeBlacklist = [ - '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', - 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', - 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring', - 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight' + '__defineGetter__', '__defineSetter__', '__lookupGetter__', + '__lookupSetter__', 'charAt', 'constructor', 'hasOwnProperty', + 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', + 'valueOf', 'charCodeAt', 'indexOf', 'lastIndexOf', 'length', + 'localeCompare', 'match', 'repeat', 'replace', 'search', 'slice', + 'split', 'substring', 'toLocaleLowerCase', 'toLocaleUpperCase', + 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight', ]; - Object.keys(theme).forEach(function (prop) { + Object.keys(theme).forEach(function(prop) { if (stringPrototypeBlacklist.indexOf(prop) !== -1) { - console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name'); - } - else { + console.log('warn: '.red + ('String.prototype' + prop).magenta + + ' is probably something you don\'t want to override. ' + + 'Ignoring style name'); + } else { if (typeof(theme[prop]) === 'string') { colors[prop] = colors[theme[prop]]; - addProperty(prop, function () { - return colors[theme[prop]](this); + addProperty(prop, function() { + return colors[prop](this); }); - } - else { - addProperty(prop, function () { - var ret = this; + } else { + var themePropApplicator = function(str) { + var ret = str || this; for (var t = 0; t < theme[prop].length; t++) { ret = colors[theme[prop][t]](ret); } return ret; - }); + }; + addProperty(prop, themePropApplicator); + colors[prop] = function(str) { + return themePropApplicator(str); + }; } } }); } - colors.setTheme = function (theme) { + colors.setTheme = function(theme) { if (typeof theme === 'string') { - try { - colors.themes[theme] = require(theme); - applyTheme(colors.themes[theme]); - return colors.themes[theme]; - } catch (err) { - console.log(err); - return err; - } + console.log('colors.setTheme now only accepts an object, not a string. ' + + 'If you are trying to set a theme from a file, it is now your (the ' + + 'caller\'s) responsibility to require the file. The old syntax ' + + 'looked like colors.setTheme(__dirname + ' + + '\'/../themes/generic-logging.js\'); The new syntax looks like '+ + 'colors.setTheme(require(__dirname + ' + + '\'/../themes/generic-logging.js\'));'); + return; } else { applyTheme(theme); } }; - -}; \ No newline at end of file +}; diff --git a/node_modules/colors/lib/index.js b/node_modules/colors/lib/index.js index fd0956d03adb6..9df5ab7df3077 100644 --- a/node_modules/colors/lib/index.js +++ b/node_modules/colors/lib/index.js @@ -1,12 +1,13 @@ var colors = require('./colors'); module['exports'] = colors; -// Remark: By default, colors will add style properties to String.prototype +// Remark: By default, colors will add style properties to String.prototype. // -// If you don't wish to extend String.prototype you can do this instead and native String will not be touched +// If you don't wish to extend String.prototype, you can do this instead and +// native String will not be touched: // // var colors = require('colors/safe); // colors.red("foo") // // -require('./extendStringPrototype')(); \ No newline at end of file +require('./extendStringPrototype')(); diff --git a/node_modules/colors/lib/maps/america.js b/node_modules/colors/lib/maps/america.js index a07d8327ff2f4..dc96903328989 100644 --- a/node_modules/colors/lib/maps/america.js +++ b/node_modules/colors/lib/maps/america.js @@ -1,12 +1,10 @@ -var colors = require('../colors'); - -module['exports'] = (function() { - return function (letter, i, exploded) { - if(letter === " ") return letter; - switch(i%3) { +module['exports'] = function(colors) { + 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) + case 1: return colors.white(letter); + case 2: return colors.blue(letter); } - } -})(); \ No newline at end of file + }; +}; diff --git a/node_modules/colors/lib/maps/rainbow.js b/node_modules/colors/lib/maps/rainbow.js index a7ce24e6c15ba..2b00ac0ac998e 100644 --- a/node_modules/colors/lib/maps/rainbow.js +++ b/node_modules/colors/lib/maps/rainbow.js @@ -1,13 +1,12 @@ -var colors = require('../colors'); - -module['exports'] = (function () { - var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV - return function (letter, i, exploded) { - if (letter === " ") { +module['exports'] = function(colors) { + // RoY G BiV + var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; + return function(letter, i, exploded) { + if (letter === ' ') { return letter; } else { return colors[rainbowColors[i++ % rainbowColors.length]](letter); } }; -})(); +}; diff --git a/node_modules/colors/lib/maps/random.js b/node_modules/colors/lib/maps/random.js index 5cd101fae2b3d..6f8f2f8e1e416 100644 --- a/node_modules/colors/lib/maps/random.js +++ b/node_modules/colors/lib/maps/random.js @@ -1,8 +1,10 @@ -var colors = require('../colors'); - -module['exports'] = (function () { - var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; +module['exports'] = function(colors) { + 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); + return letter === ' ' ? letter : + colors[ + available[Math.round(Math.random() * (available.length - 2))] + ](letter); }; -})(); \ No newline at end of file +}; diff --git a/node_modules/colors/lib/maps/zebra.js b/node_modules/colors/lib/maps/zebra.js index bf7dcdead0722..fa73623544a82 100644 --- a/node_modules/colors/lib/maps/zebra.js +++ b/node_modules/colors/lib/maps/zebra.js @@ -1,5 +1,5 @@ -var colors = require('../colors'); - -module['exports'] = function (letter, i, exploded) { - return i % 2 === 0 ? letter : colors.inverse(letter); -}; \ No newline at end of file +module['exports'] = function(colors) { + return function(letter, i, exploded) { + return i % 2 === 0 ? letter : colors.inverse(letter); + }; +}; diff --git a/node_modules/colors/lib/styles.js b/node_modules/colors/lib/styles.js index 067d59070c2a2..02db9acf7c7db 100644 --- a/node_modules/colors/lib/styles.js +++ b/node_modules/colors/lib/styles.js @@ -65,13 +65,13 @@ var codes = { blueBG: [44, 49], magentaBG: [45, 49], cyanBG: [46, 49], - whiteBG: [47, 49] + whiteBG: [47, 49], }; -Object.keys(codes).forEach(function (key) { +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'; -}); \ No newline at end of file +}); diff --git a/node_modules/colors/lib/system/has-flag.js b/node_modules/colors/lib/system/has-flag.js new file mode 100644 index 0000000000000..a347dd4d7a697 --- /dev/null +++ b/node_modules/colors/lib/system/has-flag.js @@ -0,0 +1,35 @@ +/* +MIT License + +Copyright (c) Sindre Sorhus (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. +*/ + +'use strict'; + +module.exports = function(flag, argv) { + argv = argv || process.argv; + + var terminatorPos = argv.indexOf('--'); + var prefix = /^-{1,2}/.test(flag) ? '' : '--'; + var pos = argv.indexOf(prefix + flag); + + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; diff --git a/node_modules/colors/lib/system/supports-colors.js b/node_modules/colors/lib/system/supports-colors.js index 3e008aa93a6a6..f1f9c8ff3da28 100644 --- a/node_modules/colors/lib/system/supports-colors.js +++ b/node_modules/colors/lib/system/supports-colors.js @@ -23,39 +23,129 @@ THE SOFTWARE. */ -var argv = process.argv; +'use strict'; -module.exports = (function () { - if (argv.indexOf('--no-color') !== -1 || - argv.indexOf('--color=false') !== -1) { +var os = require('os'); +var hasFlag = require('./has-flag.js'); + +var env = process.env; + +var forceColor = void 0; +if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') + || hasFlag('color=always')) { + forceColor = true; +} +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 + || parseInt(env.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { return false; } - if (argv.indexOf('--color') !== -1 || - argv.indexOf('--color=true') !== -1 || - argv.indexOf('--color=always') !== -1) { - return true; + return { + level: level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3, + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; } - if (process.stdout && !process.stdout.isTTY) { - return false; + if (hasFlag('color=16m') || hasFlag('color=full') + || hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; } + var min = forceColor ? 1 : 0; + if (process.platform === 'win32') { - return true; + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first + // Windows release that supports 256 colors. Windows 10 build 14931 is the + // first release that supports 16m/TrueColor. + var osRelease = os.release().split('.'); + if (Number(process.versions.node.split('.')[0]) >= 8 + && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) { + return sign in env; + }) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; } - if ('COLORTERM' in process.env) { - return true; + if ('TEAMCITY_VERSION' in env) { + return (/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0 + ); } - if (process.env.TERM === 'dumb') { - return false; + if ('TERM_PROGRAM' in env) { + var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Hyper': + return 3; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; } - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; } - return false; -})(); \ No newline at end of file + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + var level = supportsColor(stream); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr), +}; diff --git a/node_modules/colors/package.json b/node_modules/colors/package.json index 554cbd22e19dc..712ab466de4eb 100644 --- a/node_modules/colors/package.json +++ b/node_modules/colors/package.json @@ -1,40 +1,46 @@ { - "_args": [ - [ - "colors@1.1.2", - "/Users/rebecca/code/npm" - ] - ], - "_from": "colors@1.1.2", - "_id": "colors@1.1.2", + "_from": "colors@^1.1.2", + "_id": "colors@1.3.3", "_inBundle": false, - "_integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "_integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", "_location": "/colors", - "_optional": true, "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "colors@1.1.2", + "raw": "colors@^1.1.2", "name": "colors", "escapedName": "colors", - "rawSpec": "1.1.2", + "rawSpec": "^1.1.2", "saveSpec": null, - "fetchSpec": "1.1.2" + "fetchSpec": "^1.1.2" }, "_requiredBy": [ "/cli-table3" ], - "_resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "_spec": "1.1.2", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "_shasum": "39e005d546afe01e01f9c4ca8fa50f686a01205d", + "_spec": "colors@^1.1.2", + "_where": "/Users/aeschright/code/cli/node_modules/cli-table3", "author": { "name": "Marak Squires" }, "bugs": { "url": "https://github.com/Marak/colors.js/issues" }, + "bundleDependencies": false, + "contributors": [ + { + "name": "DABH", + "url": "https://github.com/DABH" + } + ], + "deprecated": false, "description": "get colors in your node.js console", + "devDependencies": { + "eslint": "^5.2.0", + "eslint-config-google": "^0.11.0" + }, "engines": { "node": ">=0.1.90" }, @@ -43,7 +49,9 @@ "lib", "LICENSE", "safe.js", - "themes" + "themes", + "index.d.ts", + "safe.d.ts" ], "homepage": "https://github.com/Marak/colors.js", "keywords": [ @@ -52,14 +60,15 @@ "colors" ], "license": "MIT", - "main": "lib", + "main": "lib/index.js", "name": "colors", "repository": { "type": "git", "url": "git+ssh://git@github.com/Marak/colors.js.git" }, "scripts": { + "lint": "eslint . --fix", "test": "node tests/basic-test.js && node tests/safe-test.js" }, - "version": "1.1.2" + "version": "1.3.3" } diff --git a/node_modules/colors/safe.d.ts b/node_modules/colors/safe.d.ts new file mode 100644 index 0000000000000..2bafc27984e0e --- /dev/null +++ b/node_modules/colors/safe.d.ts @@ -0,0 +1,48 @@ +// Type definitions for Colors.js 1.2 +// Project: https://github.com/Marak/colors.js +// Definitions by: Bart van der Schoor , Staffan Eketorp +// Definitions: https://github.com/Marak/colors.js + +export const enabled: boolean; +export function enable(): void; +export function disable(): void; +export function setTheme(theme: any): void; + +export function strip(str: string): string; +export function stripColors(str: string): string; + +export function black(str: string): string; +export function red(str: string): string; +export function green(str: string): string; +export function yellow(str: string): string; +export function blue(str: string): string; +export function magenta(str: string): string; +export function cyan(str: string): string; +export function white(str: string): string; +export function gray(str: string): string; +export function grey(str: string): string; + +export function bgBlack(str: string): string; +export function bgRed(str: string): string; +export function bgGreen(str: string): string; +export function bgYellow(str: string): string; +export function bgBlue(str: string): string; +export function bgMagenta(str: string): string; +export function bgCyan(str: string): string; +export function bgWhite(str: string): string; + +export function reset(str: string): string; +export function bold(str: string): string; +export function dim(str: string): string; +export function italic(str: string): string; +export function underline(str: string): string; +export function inverse(str: string): string; +export function hidden(str: string): string; +export function strikethrough(str: string): string; + +export function rainbow(str: string): string; +export function zebra(str: string): string; +export function america(str: string): string; +export function trap(str: string): string; +export function random(str: string): string; +export function zalgo(str: string): string; diff --git a/node_modules/colors/safe.js b/node_modules/colors/safe.js index a6a1f3ab47f06..a013d54246485 100644 --- a/node_modules/colors/safe.js +++ b/node_modules/colors/safe.js @@ -1,9 +1,10 @@ // -// Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype +// Remark: Requiring this file will use the "safe" colors API, +// which will not touch String.prototype. // -// var colors = require('colors/safe); +// var colors = require('colors/safe'); // colors.red("foo") // // var colors = require('./lib/colors'); -module['exports'] = colors; \ No newline at end of file +module['exports'] = colors; diff --git a/node_modules/colors/themes/generic-logging.js b/node_modules/colors/themes/generic-logging.js index 571972c1baa82..63adfe4ac31f9 100644 --- a/node_modules/colors/themes/generic-logging.js +++ b/node_modules/colors/themes/generic-logging.js @@ -8,5 +8,5 @@ module['exports'] = { help: 'cyan', warn: 'yellow', debug: 'blue', - error: 'red' -}; \ No newline at end of file + error: 'red', +}; diff --git a/package-lock.json b/package-lock.json index 843d49a5a8586..1317837f9df62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -538,9 +538,9 @@ } }, "cli-table3": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.0.tgz", - "integrity": "sha512-c7YHpUyO1SaKaO7kYtxd5NZ8FjAmSK3LpKkuzdwn+2CwpFxBpdoQLm+OAnnCfoEl7onKhN9PKQi1lsHuAIUqGQ==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", "requires": { "colors": "^1.1.2", "object-assign": "^4.1.0", @@ -650,9 +650,9 @@ "dev": true }, "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", "optional": true }, "columnify": { diff --git a/package.json b/package.json index b3beced7d6faa..627ead1c49742 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "chownr": "^1.1.1", "ci-info": "^2.0.0", "cli-columns": "^3.1.2", - "cli-table3": "^0.5.0", + "cli-table3": "^0.5.1", "cmd-shim": "~2.0.2", "columnify": "~1.5.4", "config-chain": "^1.1.12",