aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings')
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/LICENSE13
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/README.md145
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/index.js125
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/package.json108
4 files changed, 391 insertions, 0 deletions
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/LICENSE b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/LICENSE
new file mode 100644
index 0000000000..e756052969
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2014, Rebecca Turner <me@re-becca.org>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/README.md
new file mode 100644
index 0000000000..f58cc8d892
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/README.md
@@ -0,0 +1,145 @@
+# Console Control Strings
+
+A library of cross-platform tested terminal/console command strings for
+doing things like color and cursor positioning. This is a subset of both
+ansi and vt100. All control codes included work on both Windows & Unix-like
+OSes, except where noted.
+
+## Usage
+
+```js
+var consoleControl = require('console-control-strings')
+
+console.log(consoleControl.color('blue','bgRed', 'bold') + 'hi there' + consoleControl.color('reset'))
+process.stdout.write(consoleControl.goto(75, 10))
+```
+
+## Why Another?
+
+There are tons of libraries similar to this one. I wanted one that was:
+
+1. Very clear about compatibility goals.
+2. Could emit, for instance, a start color code without an end one.
+3. Returned strings w/o writing to streams.
+4. Was not weighed down with other unrelated baggage.
+
+## Functions
+
+### var code = consoleControl.up(_num = 1_)
+
+Returns the escape sequence to move _num_ lines up.
+
+### var code = consoleControl.down(_num = 1_)
+
+Returns the escape sequence to move _num_ lines down.
+
+### var code = consoleControl.forward(_num = 1_)
+
+Returns the escape sequence to move _num_ lines righ.
+
+### var code = consoleControl.back(_num = 1_)
+
+Returns the escape sequence to move _num_ lines left.
+
+### var code = consoleControl.nextLine(_num = 1_)
+
+Returns the escape sequence to move _num_ lines down and to the beginning of
+the line.
+
+### var code = consoleControl.previousLine(_num = 1_)
+
+Returns the escape sequence to move _num_ lines up and to the beginning of
+the line.
+
+### var code = consoleControl.eraseData()
+
+Returns the escape sequence to erase everything from the current cursor
+position to the bottom right of the screen. This is line based, so it
+erases the remainder of the current line and all following lines.
+
+### var code = consoleControl.eraseLine()
+
+Returns the escape sequence to erase to the end of the current line.
+
+### var code = consoleControl.goto(_x_, _y_)
+
+Returns the escape sequence to move the cursor to the designated position.
+Note that the origin is _1, 1_ not _0, 0_.
+
+### var code = consoleControl.gotoSOL()
+
+Returns the escape sequence to move the cursor to the beginning of the
+current line. (That is, it returns a carriage return, `\r`.)
+
+### var code = consoleControl.beep()
+
+Returns the escape sequence to cause the termianl to beep. (That is, it
+returns unicode character `\x0007`, a Control-G.)
+
+### var code = consoleControl.hideCursor()
+
+Returns the escape sequence to hide the cursor.
+
+### var code = consoleControl.showCursor()
+
+Returns the escape sequence to show the cursor.
+
+### var code = consoleControl.color(_colors = []_)
+
+### var code = consoleControl.color(_color1_, _color2_, _…_, _colorn_)
+
+Returns the escape sequence to set the current terminal display attributes
+(mostly colors). Arguments can either be a list of attributes or an array
+of attributes. The difference between passing in an array or list of colors
+and calling `.color` separately for each one, is that in the former case a
+single escape sequence will be produced where as in the latter each change
+will have its own distinct escape sequence. Each attribute can be one of:
+
+* Reset:
+ * **reset** – Reset all attributes to the terminal default.
+* Styles:
+ * **bold** – Display text as bold. In some terminals this means using a
+ bold font, in others this means changing the color. In some it means
+ both.
+ * **italic** – Display text as italic. This is not available in most Windows terminals.
+ * **underline** – Underline text. This is not available in most Windows Terminals.
+ * **inverse** – Invert the foreground and background colors.
+ * **stopBold** – Do not display text as bold.
+ * **stopItalic** – Do not display text as italic.
+ * **stopUnderline** – Do not underline text.
+ * **stopInverse** – Do not invert foreground and background.
+* Colors:
+ * **white**
+ * **black**
+ * **blue**
+ * **cyan**
+ * **green**
+ * **magenta**
+ * **red**
+ * **yellow**
+ * **grey** / **brightBlack**
+ * **brightRed**
+ * **brightGreen**
+ * **brightYellow**
+ * **brightBlue**
+ * **brightMagenta**
+ * **brightCyan**
+ * **brightWhite**
+* Background Colors:
+ * **bgWhite**
+ * **bgBlack**
+ * **bgBlue**
+ * **bgCyan**
+ * **bgGreen**
+ * **bgMagenta**
+ * **bgRed**
+ * **bgYellow**
+ * **bgGrey** / **bgBrightBlack**
+ * **bgBrightRed**
+ * **bgBrightGreen**
+ * **bgBrightYellow**
+ * **bgBrightBlue**
+ * **bgBrightMagenta**
+ * **bgBrightCyan**
+ * **bgBrightWhite**
+
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/index.js
new file mode 100644
index 0000000000..bf890348ec
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/index.js
@@ -0,0 +1,125 @@
+'use strict'
+
+// These tables borrowed from `ansi`
+
+var prefix = '\x1b['
+
+exports.up = function up (num) {
+ return prefix + (num || '') + 'A'
+}
+
+exports.down = function down (num) {
+ return prefix + (num || '') + 'B'
+}
+
+exports.forward = function forward (num) {
+ return prefix + (num || '') + 'C'
+}
+
+exports.back = function back (num) {
+ return prefix + (num || '') + 'D'
+}
+
+exports.nextLine = function nextLine (num) {
+ return prefix + (num || '') + 'E'
+}
+
+exports.previousLine = function previousLine (num) {
+ return prefix + (num || '') + 'F'
+}
+
+exports.horizontalAbsolute = function horizontalAbsolute (num) {
+ if (num == null) throw new Error('horizontalAboslute requires a column to position to')
+ return prefix + num + 'G'
+}
+
+exports.eraseData = function eraseData () {
+ return prefix + 'J'
+}
+
+exports.eraseLine = function eraseLine () {
+ return prefix + 'K'
+}
+
+exports.goto = function (x, y) {
+ return prefix + y + ';' + x + 'H'
+}
+
+exports.gotoSOL = function () {
+ return '\r'
+}
+
+exports.beep = function () {
+ return '\x07'
+}
+
+exports.hideCursor = function hideCursor () {
+ return prefix + '?25l'
+}
+
+exports.showCursor = function showCursor () {
+ return prefix + '?25h'
+}
+
+var colors = {
+ reset: 0,
+// styles
+ bold: 1,
+ italic: 3,
+ underline: 4,
+ inverse: 7,
+// resets
+ stopBold: 22,
+ stopItalic: 23,
+ stopUnderline: 24,
+ stopInverse: 27,
+// colors
+ white: 37,
+ black: 30,
+ blue: 34,
+ cyan: 36,
+ green: 32,
+ magenta: 35,
+ red: 31,
+ yellow: 33,
+ bgWhite: 47,
+ bgBlack: 40,
+ bgBlue: 44,
+ bgCyan: 46,
+ bgGreen: 42,
+ bgMagenta: 45,
+ bgRed: 41,
+ bgYellow: 43,
+
+ grey: 90,
+ brightBlack: 90,
+ brightRed: 91,
+ brightGreen: 92,
+ brightYellow: 93,
+ brightBlue: 94,
+ brightMagenta: 95,
+ brightCyan: 96,
+ brightWhite: 97,
+
+ bgGrey: 100,
+ bgBrightBlack: 100,
+ bgBrightRed: 101,
+ bgBrightGreen: 102,
+ bgBrightYellow: 103,
+ bgBrightBlue: 104,
+ bgBrightMagenta: 105,
+ bgBrightCyan: 106,
+ bgBrightWhite: 107
+}
+
+exports.color = function color (colorWith) {
+ if (arguments.length !== 1 || !Array.isArray(colorWith)) {
+ colorWith = Array.prototype.slice.call(arguments)
+ }
+ return prefix + colorWith.map(colorNameToCode).join(';') + 'm'
+}
+
+function colorNameToCode (color) {
+ if (colors[color] != null) return colors[color]
+ throw new Error('Unknown color or style name: ' + color)
+}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/package.json
new file mode 100644
index 0000000000..a76eecadec
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/package.json
@@ -0,0 +1,108 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "console-control-strings@~1.1.0",
+ "scope": null,
+ "escapedName": "console-control-strings",
+ "name": "console-control-strings",
+ "rawSpec": "~1.1.0",
+ "spec": ">=1.1.0 <1.2.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/npmlog"
+ ],
+ [
+ {
+ "raw": "console-control-strings@~1.1.0",
+ "scope": null,
+ "escapedName": "console-control-strings",
+ "name": "console-control-strings",
+ "rawSpec": "~1.1.0",
+ "spec": ">=1.1.0 <1.2.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog"
+ ]
+ ],
+ "_from": "console-control-strings@~1.1.0",
+ "_id": "console-control-strings@1.1.0",
+ "_inCache": true,
+ "_location": "/npm-registry-client/npmlog/console-control-strings",
+ "_nodeVersion": "4.4.0",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/console-control-strings-1.1.0.tgz_1466033396831_0.9470485949423164"
+ },
+ "_npmUser": {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ },
+ "_npmVersion": "3.9.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "console-control-strings@~1.1.0",
+ "scope": null,
+ "escapedName": "console-control-strings",
+ "name": "console-control-strings",
+ "rawSpec": "~1.1.0",
+ "spec": ">=1.1.0 <1.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/npm-registry-client/npmlog",
+ "/npm-registry-client/npmlog/gauge"
+ ],
+ "_resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
+ "_shasum": "3d7cf4464db6446ea644bf4b39507f9851008e8e",
+ "_shrinkwrap": null,
+ "_spec": "console-control-strings@~1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org",
+ "url": "http://re-becca.org/"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/console-control-strings/issues"
+ },
+ "dependencies": {},
+ "description": "A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.",
+ "devDependencies": {
+ "standard": "^7.1.2",
+ "tap": "^5.7.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "dist": {
+ "shasum": "3d7cf4464db6446ea644bf4b39507f9851008e8e",
+ "tarball": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz"
+ },
+ "files": [
+ "LICENSE",
+ "index.js"
+ ],
+ "gitHead": "722439b4998d2964ac3d3f9ec175c008aa9b7b4b",
+ "homepage": "https://github.com/iarna/console-control-strings#readme",
+ "keywords": [],
+ "license": "ISC",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ }
+ ],
+ "name": "console-control-strings",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/console-control-strings.git"
+ },
+ "scripts": {
+ "test": "standard && tap test/*.js"
+ },
+ "version": "1.1.0"
+}