diff --git a/node_modules/.bin/has-ansi b/node_modules/.bin/has-ansi deleted file mode 120000 index c1e7413f1f6..00000000000 --- a/node_modules/.bin/has-ansi +++ /dev/null @@ -1 +0,0 @@ -../has-ansi/cli.js \ No newline at end of file diff --git a/node_modules/.bin/supports-color b/node_modules/.bin/supports-color deleted file mode 120000 index af0f05efe85..00000000000 --- a/node_modules/.bin/supports-color +++ /dev/null @@ -1 +0,0 @@ -../supports-color/cli.js \ No newline at end of file diff --git a/node_modules/get-stdin/index.js b/node_modules/get-stdin/index.js deleted file mode 100644 index 0f1aeb3df4e..00000000000 --- a/node_modules/get-stdin/index.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -module.exports = function (cb) { - var stdin = process.stdin; - var ret = ''; - - if (stdin.isTTY) { - setImmediate(cb, ''); - return; - } - - stdin.setEncoding('utf8'); - - stdin.on('readable', function () { - var chunk; - - while (chunk = stdin.read()) { - ret += chunk; - } - }); - - stdin.on('end', function () { - cb(ret); - }); -}; - -module.exports.buffer = function (cb) { - var stdin = process.stdin; - var ret = []; - var len = 0; - - if (stdin.isTTY) { - setImmediate(cb, new Buffer('')); - return; - } - - stdin.on('readable', function () { - var chunk; - - while (chunk = stdin.read()) { - ret.push(chunk); - len += chunk.length; - } - }); - - stdin.on('end', function () { - cb(Buffer.concat(ret, len)); - }); -}; diff --git a/node_modules/get-stdin/package.json b/node_modules/get-stdin/package.json deleted file mode 100644 index 6d1a0932b4a..00000000000 --- a/node_modules/get-stdin/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_args": [ - [ - "get-stdin@^4.0.1", - "/Users/rebecca/code/npm/node_modules/has-ansi" - ] - ], - "_from": "get-stdin@>=4.0.1 <5.0.0", - "_id": "get-stdin@4.0.1", - "_inCache": true, - "_location": "/get-stdin", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "1.4.28", - "_phantomChildren": {}, - "_requested": { - "name": "get-stdin", - "raw": "get-stdin@^4.0.1", - "rawSpec": "^4.0.1", - "scope": null, - "spec": ">=4.0.1 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/has-ansi" - ], - "_resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "_shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe", - "_shrinkwrap": null, - "_spec": "get-stdin@^4.0.1", - "_where": "/Users/rebecca/code/npm/node_modules/has-ansi", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/get-stdin/issues" - }, - "dependencies": {}, - "description": "Easier stdin", - "devDependencies": { - "ava": "0.0.4", - "buffer-equal": "0.0.1" - }, - "directories": {}, - "dist": { - "shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe", - "tarball": "http://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "65c744975229b25d6cc5c7546f49b6ad9099553f", - "homepage": "https://github.com/sindresorhus/get-stdin", - "keywords": [ - "buffer", - "concat", - "process", - "std", - "stdin", - "stdio", - "stream", - "stream" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "get-stdin", - "optionalDependencies": {}, - "repository": { - "type": "git", - "url": "https://github.com/sindresorhus/get-stdin" - }, - "scripts": { - "test": "node test.js && node test-buffer.js && echo unicorns | node test-real.js" - }, - "version": "4.0.1" -} diff --git a/node_modules/get-stdin/readme.md b/node_modules/get-stdin/readme.md deleted file mode 100644 index bc1d32a8ad5..00000000000 --- a/node_modules/get-stdin/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# get-stdin [![Build Status](https://travis-ci.org/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stdin) - -> Easier stdin - - -## Install - -```sh -$ npm install --save get-stdin -``` - - -## Usage - -```js -// example.js -var stdin = require('get-stdin'); - -stdin(function (data) { - console.log(data); - //=> unicorns -}); -``` - -```sh -$ echo unicorns | node example.js -unicorns -``` - - -## API - -### stdin(callback) - -Get `stdin` as a string. - -### stdin.buffer(callback) - -Get `stdin` as a buffer. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/has-ansi/cli.js b/node_modules/has-ansi/cli.js deleted file mode 100755 index 0386a824236..00000000000 --- a/node_modules/has-ansi/cli.js +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var stdin = require('get-stdin'); -var pkg = require('./package.json'); -var hasAnsi = require('./'); -var argv = process.argv.slice(2); -var input = argv[0]; - -function help() { - console.log([ - '', - ' ' + pkg.description, - '', - ' Usage', - ' has-ansi ', - ' echo | has-ansi', - '', - ' Exits with code 0 if input has ANSI escape codes and 1 if not' - ].join('\n')); -} - -function init(data) { - process.exit(hasAnsi(data) ? 0 : 1); -} - -if (argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -if (process.stdin.isTTY) { - if (!input) { - help(); - return; - } - - init(input); -} else { - stdin(init); -} diff --git a/node_modules/has-ansi/node_modules/ansi-regex/index.js b/node_modules/has-ansi/node_modules/ansi-regex/index.js new file mode 100644 index 00000000000..4906755bc93 --- /dev/null +++ b/node_modules/has-ansi/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; +}; diff --git a/node_modules/has-ansi/node_modules/ansi-regex/license b/node_modules/has-ansi/node_modules/ansi-regex/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/node_modules/has-ansi/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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. diff --git a/node_modules/has-ansi/node_modules/ansi-regex/package.json b/node_modules/has-ansi/node_modules/ansi-regex/package.json new file mode 100644 index 00000000000..3264f7561bf --- /dev/null +++ b/node_modules/has-ansi/node_modules/ansi-regex/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + "ansi-regex@^2.0.0", + "/Users/rebecca/code/npm/node_modules/has-ansi" + ] + ], + "_from": "ansi-regex@>=2.0.0 <3.0.0", + "_id": "ansi-regex@2.0.0", + "_inCache": true, + "_location": "/has-ansi/ansi-regex", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "ansi-regex", + "raw": "ansi-regex@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/has-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", + "_shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", + "_shrinkwrap": null, + "_spec": "ansi-regex@^2.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/has-ansi", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/ansi-regex/issues" + }, + "dependencies": {}, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", + "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "57c3f2941a73079fa8b081e02a522e3d29913e2f", + "homepage": "https://github.com/sindresorhus/ansi-regex", + "keywords": [ + "256", + "ansi", + "cli", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "find", + "formatting", + "match", + "pattern", + "re", + "regex", + "regexp", + "rgb", + "shell", + "string", + "styles", + "terminal", + "test", + "text", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "name": "ansi-regex", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "https://github.com/sindresorhus/ansi-regex" + }, + "scripts": { + "test": "mocha test/test.js", + "view-supported": "node test/viewCodes.js" + }, + "version": "2.0.0" +} diff --git a/node_modules/has-ansi/node_modules/ansi-regex/readme.md b/node_modules/has-ansi/node_modules/ansi-regex/readme.md new file mode 100644 index 00000000000..1a4894ec111 --- /dev/null +++ b/node_modules/has-ansi/node_modules/ansi-regex/readme.md @@ -0,0 +1,31 @@ +# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +var ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/has-ansi/package.json b/node_modules/has-ansi/package.json index b661ccd4abb..a7ec031ca30 100644 --- a/node_modules/has-ansi/package.json +++ b/node_modules/has-ansi/package.json @@ -1,74 +1,67 @@ { "_args": [ [ - "has-ansi@^1.0.3", + "has-ansi@^2.0.0", "/Users/rebecca/code/npm/node_modules/chalk" ] ], - "_from": "has-ansi@>=1.0.3 <2.0.0", - "_id": "has-ansi@1.0.3", + "_from": "has-ansi@>=2.0.0 <3.0.0", + "_id": "has-ansi@2.0.0", "_inCache": true, "_location": "/has-ansi", - "_nodeVersion": "0.10.35", + "_nodeVersion": "0.12.5", "_npmUser": { - "email": "jappelman@xebia.com", - "name": "jbnicolai" + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" }, - "_npmVersion": "2.1.16", + "_npmVersion": "2.11.2", "_phantomChildren": {}, "_requested": { "name": "has-ansi", - "raw": "has-ansi@^1.0.3", - "rawSpec": "^1.0.3", + "raw": "has-ansi@^2.0.0", + "rawSpec": "^2.0.0", "scope": null, - "spec": ">=1.0.3 <2.0.0", + "spec": ">=2.0.0 <3.0.0", "type": "range" }, "_requiredBy": [ "/chalk" ], - "_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz", - "_shasum": "c0b5b1615d9e382b0ff67169d967b425e48ca538", + "_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "_shasum": "34f5049ce1ecdf2b0649af3ef24e45ed35416d91", "_shrinkwrap": null, - "_spec": "has-ansi@^1.0.3", + "_spec": "has-ansi@^2.0.0", "_where": "/Users/rebecca/code/npm/node_modules/chalk", "author": { "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", - "url": "http://sindresorhus.com" - }, - "bin": { - "has-ansi": "cli.js" + "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/has-ansi/issues" }, "dependencies": { - "ansi-regex": "^1.1.0", - "get-stdin": "^4.0.1" + "ansi-regex": "^2.0.0" }, "description": "Check if a string has ANSI escape codes", "devDependencies": { - "mocha": "*" + "ava": "0.0.4" }, "directories": {}, "dist": { - "shasum": "c0b5b1615d9e382b0ff67169d967b425e48ca538", - "tarball": "http://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz" + "shasum": "34f5049ce1ecdf2b0649af3ef24e45ed35416d91", + "tarball": "http://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" }, "engines": { "node": ">=0.10.0" }, "files": [ - "cli.js", "index.js" ], - "gitHead": "416428ed16f8e9718aec54cea083173af6019917", + "gitHead": "0722275e1bef139fcd09137da6e5550c3cd368b9", "homepage": "https://github.com/sindresorhus/has-ansi", "keywords": [ "ansi", - "bin", - "cli", "color", "colors", "colour", @@ -109,7 +102,7 @@ "url": "https://github.com/sindresorhus/has-ansi" }, "scripts": { - "test": "mocha" + "test": "node test.js" }, - "version": "1.0.3" + "version": "2.0.0" } diff --git a/node_modules/has-ansi/readme.md b/node_modules/has-ansi/readme.md index 0fa149a82a1..02bc7c2300a 100644 --- a/node_modules/has-ansi/readme.md +++ b/node_modules/has-ansi/readme.md @@ -5,7 +5,7 @@ ## Install -```sh +``` $ npm install --save has-ansi ``` @@ -23,21 +23,12 @@ hasAnsi('cake'); ``` -## CLI - -```sh -$ npm install --global has-ansi -``` +## Related -``` -$ has-ansi --help - - Usage - has-ansi - echo | has-ansi - - Exits with code 0 if input has ANSI escape codes and 1 if not -``` +- [has-ansi-cli](https://github.com/sindresorhus/has-ansi-cli) - CLI for this module +- [strip-ansi](https://github.com/sindresorhus/strip-ansi) - Strip ANSI escape codes +- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right ## License