From 71e285b94c7edaa43aa8115965cf5a36b8e0f80a Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 3 Apr 2019 15:43:32 +0200 Subject: Node.js v11.13.0 --- deps/node/deps/npm/node_modules/ansicolors/LICENSE | 23 +++++++ .../deps/npm/node_modules/ansicolors/README.md | 62 +++++++++++++++++++ .../deps/npm/node_modules/ansicolors/ansicolors.js | 65 ++++++++++++++++++++ .../deps/npm/node_modules/ansicolors/package.json | 58 ++++++++++++++++++ .../npm/node_modules/ansicolors/test/ansicolors.js | 71 ++++++++++++++++++++++ 5 files changed, 279 insertions(+) create mode 100644 deps/node/deps/npm/node_modules/ansicolors/LICENSE create mode 100644 deps/node/deps/npm/node_modules/ansicolors/README.md create mode 100644 deps/node/deps/npm/node_modules/ansicolors/ansicolors.js create mode 100644 deps/node/deps/npm/node_modules/ansicolors/package.json create mode 100644 deps/node/deps/npm/node_modules/ansicolors/test/ansicolors.js (limited to 'deps/node/deps/npm/node_modules/ansicolors') diff --git a/deps/node/deps/npm/node_modules/ansicolors/LICENSE b/deps/node/deps/npm/node_modules/ansicolors/LICENSE new file mode 100644 index 00000000..41702c50 --- /dev/null +++ b/deps/node/deps/npm/node_modules/ansicolors/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +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. diff --git a/deps/node/deps/npm/node_modules/ansicolors/README.md b/deps/node/deps/npm/node_modules/ansicolors/README.md new file mode 100644 index 00000000..f3e9d070 --- /dev/null +++ b/deps/node/deps/npm/node_modules/ansicolors/README.md @@ -0,0 +1,62 @@ +# ansicolors [![build status](https://secure.travis-ci.org/thlorenz/ansicolors.png)](http://next.travis-ci.org/thlorenz/ansicolors) + +Functions that surround a string with ansicolor codes so it prints in color. + +In case you need styles, like `bold`, have a look at [ansistyles](https://github.com/thlorenz/ansistyles). + +## Installation + + npm install ansicolors + +## Usage + +```js +var colors = require('ansicolors'); + +// foreground colors +var redHerring = colors.red('herring'); +var blueMoon = colors.blue('moon'); +var brighBlueMoon = colors.brightBlue('moon'); + +console.log(redHerring); // this will print 'herring' in red +console.log(blueMoon); // this 'moon' in blue +console.log(brightBlueMoon); // I think you got the idea + +// background colors +console.log(colors.bgYellow('printed on yellow background')); +console.log(colors.bgBrightBlue('printed on bright blue background')); + +// mixing background and foreground colors +// below two lines have same result (order in which bg and fg are combined doesn't matter) +console.log(colors.bgYellow(colors.blue('printed on yellow background in blue'))); +console.log(colors.blue(colors.bgYellow('printed on yellow background in blue'))); +``` + +## Advanced API + +**ansicolors** allows you to access opening and closing escape sequences separately. + +```js +var colors = require('ansicolors'); + +function inspect(obj, depth) { + return require('util').inspect(obj, false, depth || 5, true); +} + +console.log('open blue', inspect(colors.open.blue)); +console.log('close bgBlack', inspect(colors.close.bgBlack)); + +// => open blue '\u001b[34m' +// close bgBlack '\u001b[49m' +``` + +## Tests + +Look at the [tests](https://github.com/thlorenz/ansicolors/blob/master/test/ansicolors.js) to see more examples and/or run them via: + + npm explore ansicolors && npm test + +## Alternatives + +**ansicolors** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, +I'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js). diff --git a/deps/node/deps/npm/node_modules/ansicolors/ansicolors.js b/deps/node/deps/npm/node_modules/ansicolors/ansicolors.js new file mode 100644 index 00000000..16b2586f --- /dev/null +++ b/deps/node/deps/npm/node_modules/ansicolors/ansicolors.js @@ -0,0 +1,65 @@ +// ColorCodes explained: http://www.termsys.demon.co.uk/vtansi.htm +'use strict'; + +var colorNums = { + white : 37 + , black : 30 + , blue : 34 + , cyan : 36 + , green : 32 + , magenta : 35 + , red : 31 + , yellow : 33 + , brightBlack : 90 + , brightRed : 91 + , brightGreen : 92 + , brightYellow : 93 + , brightBlue : 94 + , brightMagenta : 95 + , brightCyan : 96 + , brightWhite : 97 + } + , backgroundColorNums = { + bgBlack : 40 + , bgRed : 41 + , bgGreen : 42 + , bgYellow : 43 + , bgBlue : 44 + , bgMagenta : 45 + , bgCyan : 46 + , bgWhite : 47 + , bgBrightBlack : 100 + , bgBrightRed : 101 + , bgBrightGreen : 102 + , bgBrightYellow : 103 + , bgBrightBlue : 104 + , bgBrightMagenta : 105 + , bgBrightCyan : 106 + , bgBrightWhite : 107 + } + , open = {} + , close = {} + , colors = {} + ; + +Object.keys(colorNums).forEach(function (k) { + var o = open[k] = '\u001b[' + colorNums[k] + 'm'; + var c = close[k] = '\u001b[39m'; + + colors[k] = function (s) { + return o + s + c; + }; +}); + +Object.keys(backgroundColorNums).forEach(function (k) { + var o = open[k] = '\u001b[' + backgroundColorNums[k] + 'm'; + var c = close[k] = '\u001b[49m'; + + colors[k] = function (s) { + return o + s + c; + }; +}); + +module.exports = colors; +colors.open = open; +colors.close = close; diff --git a/deps/node/deps/npm/node_modules/ansicolors/package.json b/deps/node/deps/npm/node_modules/ansicolors/package.json new file mode 100644 index 00000000..0b82cc1e --- /dev/null +++ b/deps/node/deps/npm/node_modules/ansicolors/package.json @@ -0,0 +1,58 @@ +{ + "_args": [ + [ + "ansicolors@0.3.2", + "/Users/rebecca/code/npm" + ] + ], + "_from": "ansicolors@0.3.2", + "_id": "ansicolors@0.3.2", + "_inBundle": false, + "_integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", + "_location": "/ansicolors", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ansicolors@0.3.2", + "name": "ansicolors", + "escapedName": "ansicolors", + "rawSpec": "0.3.2", + "saveSpec": null, + "fetchSpec": "0.3.2" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "_spec": "0.3.2", + "_where": "/Users/rebecca/code/npm", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "thlorenz.com" + }, + "bugs": { + "url": "https://github.com/thlorenz/ansicolors/issues" + }, + "description": "Functions that surround a string with ansicolor codes so it prints in color.", + "gitHead": "858847ca28e8b360d9b70eee0592700fa2ab087d", + "homepage": "https://github.com/thlorenz/ansicolors#readme", + "keywords": [ + "ansi", + "colors", + "highlight", + "string" + ], + "license": "MIT", + "main": "ansicolors.js", + "name": "ansicolors", + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/ansicolors.git" + }, + "scripts": { + "test": "node test/*.js" + }, + "version": "0.3.2" +} diff --git a/deps/node/deps/npm/node_modules/ansicolors/test/ansicolors.js b/deps/node/deps/npm/node_modules/ansicolors/test/ansicolors.js new file mode 100644 index 00000000..49453930 --- /dev/null +++ b/deps/node/deps/npm/node_modules/ansicolors/test/ansicolors.js @@ -0,0 +1,71 @@ +'use strict'; + +var assert = require('assert') + , colors = require('..') + , open = colors.open + , close = colors.close + +console.log('Foreground colors ..'); + +assert.equal(colors.white('printed in white'), '\u001b[37mprinted in white\u001b[39m'); + +assert.equal(colors.black('printed in black'), '\u001b[30mprinted in black\u001b[39m'); +assert.equal(colors.brightBlack('printed in bright black'), '\u001b[90mprinted in bright black\u001b[39m'); + +assert.equal(colors.green('printed in green'), '\u001b[32mprinted in green\u001b[39m'); +assert.equal(colors.brightGreen('printed in bright green'), '\u001b[92mprinted in bright green\u001b[39m'); + +assert.equal(colors.red('printed in red'), '\u001b[31mprinted in red\u001b[39m'); +assert.equal(colors.brightRed('printed in bright red'), '\u001b[91mprinted in bright red\u001b[39m'); + +console.log('OK'); + +console.log('Background colors ..'); + +assert.equal( + colors.bgBlack('printed with black background') + , '\u001b[40mprinted with black background\u001b[49m' +); + +assert.equal( + colors.bgYellow('printed with yellow background') + , '\u001b[43mprinted with yellow background\u001b[49m' +); +assert.equal( + colors.bgBrightYellow('printed with bright yellow background') + , '\u001b[103mprinted with bright yellow background\u001b[49m' +); + +assert.equal( + colors.bgWhite('printed with white background') + , '\u001b[47mprinted with white background\u001b[49m' +); + +console.log('OK'); + +console.log('Mixing background and foreground colors ..'); + +assert.equal( + colors.blue(colors.bgYellow('printed in blue with yellow background')) + , '\u001b[34m\u001b[43mprinted in blue with yellow background\u001b[49m\u001b[39m' +); +assert.equal( + colors.bgYellow(colors.blue('printed in blue with yellow background again')) + , '\u001b[43m\u001b[34mprinted in blue with yellow background again\u001b[39m\u001b[49m' +); + +console.log('OK'); + +console.log('Open ...'); + +assert.equal(open.black, '\u001b[30m'); +assert.equal(open.bgYellow, '\u001b[43m'); + +console.log('OK'); + +console.log('Close ...'); + +assert.equal(close.black, '\u001b[39m'); +assert.equal(close.bgYellow, '\u001b[49m'); + +console.log('OK'); -- cgit v1.2.3