diff options
author | Rebecca Turner <me@re-becca.org> | 2017-04-22 02:36:09 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-04-22 02:36:09 +0300 |
commit | a87a4a8359693518ee41dfeb13c5a8929136772a (patch) | |
tree | bd50ff4ac81f233d44fc0c7a1cdb8de4d1da6013 | |
parent | 41c10974fe95a2e520e33e37725570c75f6126ea (diff) |
npmlog@4.0.2
Bump versions of transitive dependencies of npmlog.
Fixes flashing of the progress bar with narrow screens.
22 files changed, 171 insertions, 555 deletions
diff --git a/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore b/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore deleted file mode 100644 index bc818974f..000000000 --- a/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -*~ -.#* -node_modules -coverage -.nyc_output diff --git a/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md b/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md index e990b86dd..46ad07852 100644 --- a/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md +++ b/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md @@ -1,5 +1,17 @@ Hi, figured we could actually use a changelog now: +## 1.1.4 2017-04-21 + +* Fix typo in package.json + +## 1.1.3 2017-04-21 + +* Improve documentation and limit files included in the distribution. + +## 1.1.2 2016-03-15 + +* Add tracker group cycle detection and tests for it + ## 1.1.1 2016-01-29 * Fix a typo in stream completion tracker diff --git a/node_modules/npmlog/node_modules/are-we-there-yet/README.md b/node_modules/npmlog/node_modules/are-we-there-yet/README.md index c41d39229..7e2b42d86 100644 --- a/node_modules/npmlog/node_modules/are-we-there-yet/README.md +++ b/node_modules/npmlog/node_modules/are-we-there-yet/README.md @@ -42,15 +42,16 @@ fs.stat("file", function(er, stat) { Shared Methods ============== -All tracker objects described below have the following methods, they, along -with the event comprise the interface for consumers of tracker objects. - * var completed = tracker.completed() +Implemented in: `Tracker`, `TrackerGroup`, `TrackerStream` + Returns the ratio of completed work to work to be done. Range of 0 to 1. * tracker.finish() +Implemented in: `Tracker`, `TrackerGroup` + Marks the tracker as completed. With a TrackerGroup this marks all of its components as completed. diff --git a/node_modules/npmlog/node_modules/are-we-there-yet/package.json b/node_modules/npmlog/node_modules/are-we-there-yet/package.json index d25c73197..68554ca0b 100644 --- a/node_modules/npmlog/node_modules/are-we-there-yet/package.json +++ b/node_modules/npmlog/node_modules/are-we-there-yet/package.json @@ -1,42 +1,50 @@ { "_args": [ [ - "are-we-there-yet@~1.1.2", - "/Users/rebecca/code/npmlog" + { + "raw": "are-we-there-yet@~1.1.2", + "scope": null, + "escapedName": "are-we-there-yet", + "name": "are-we-there-yet", + "rawSpec": "~1.1.2", + "spec": ">=1.1.2 <1.2.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog" ] ], "_from": "are-we-there-yet@>=1.1.2 <1.2.0", - "_id": "are-we-there-yet@1.1.2", + "_id": "are-we-there-yet@1.1.4", "_inCache": true, - "_installable": true, "_location": "/npmlog/are-we-there-yet", - "_nodeVersion": "4.2.2", + "_nodeVersion": "7.7.4", "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/are-we-there-yet-1.1.2.tgz_1458084397358_0.15847722673788667" + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/are-we-there-yet-1.1.4.tgz_1492760790532_0.2543606413528323" }, "_npmUser": { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" }, - "_npmVersion": "3.8.1", + "_npmVersion": "4.5.0", "_phantomChildren": {}, "_requested": { - "name": "are-we-there-yet", "raw": "are-we-there-yet@~1.1.2", - "rawSpec": "~1.1.2", "scope": null, + "escapedName": "are-we-there-yet", + "name": "are-we-there-yet", + "rawSpec": "~1.1.2", "spec": ">=1.1.2 <1.2.0", "type": "range" }, "_requiredBy": [ "/npmlog" ], - "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", - "_shasum": "80e470e95a084794fe1899262c5667c6e88de1b3", + "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "_shasum": "bb5dca382bb94f05e15194373d16fd3ba1ca110d", "_shrinkwrap": null, "_spec": "are-we-there-yet@~1.1.2", - "_where": "/Users/rebecca/code/npmlog", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog", "author": { "name": "Rebecca Turner", "url": "http://re-becca.org" @@ -46,31 +54,40 @@ }, "dependencies": { "delegates": "^1.0.0", - "readable-stream": "^2.0.0 || ^1.1.13" + "readable-stream": "^2.0.6" }, - "description": "Keep track of the overall completion of many dispirate processes", + "description": "Keep track of the overall completion of many disparate processes", "devDependencies": { "standard": "^6.0.8", "tap": "^5.7.0" }, "directories": {}, "dist": { - "shasum": "80e470e95a084794fe1899262c5667c6e88de1b3", - "tarball": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz" + "shasum": "bb5dca382bb94f05e15194373d16fd3ba1ca110d", + "tarball": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz" }, - "gitHead": "dd5706e2204cb681e78031d0ffe156ed4cc75823", + "files": [ + "index.js", + "tracker-base.js", + "tracker-group.js", + "tracker-stream.js", + "tracker.js", + "CHANGES.md" + ], + "gitHead": "aea89b9c277c0674a2485a3eb94a7269bb2346be", "homepage": "https://github.com/iarna/are-we-there-yet", "license": "ISC", "main": "index.js", "maintainers": [ { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" } ], "name": "are-we-there-yet", "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "readme": "are-we-there-yet\n----------------\n\nTrack complex hiearchies of asynchronous task completion statuses. This is\nintended to give you a way of recording and reporting the progress of the big\nrecursive fan-out and gather type workflows that are so common in async.\n\nWhat you do with this completion data is up to you, but the most common use case is to\nfeed it to one of the many progress bar modules.\n\nMost progress bar modules include a rudamentary version of this, but my\nneeds were more complex.\n\nUsage\n=====\n\n```javascript\nvar TrackerGroup = require(\"are-we-there-yet\").TrackerGroup\n\nvar top = new TrackerGroup(\"program\")\n\nvar single = top.newItem(\"one thing\", 100)\nsingle.completeWork(20)\n\nconsole.log(top.completed()) // 0.2\n\nfs.stat(\"file\", function(er, stat) {\n if (er) throw er \n var stream = top.newStream(\"file\", stat.size)\n console.log(top.completed()) // now 0.1 as single is 50% of the job and is 20% complete\n // and 50% * 20% == 10%\n fs.createReadStream(\"file\").pipe(stream).on(\"data\", function (chunk) {\n // do stuff with chunk\n })\n top.on(\"change\", function (name) {\n // called each time a chunk is read from \"file\"\n // top.completed() will start at 0.1 and fill up to 0.6 as the file is read\n })\n})\n```\n\nShared Methods\n==============\n\n* var completed = tracker.completed()\n\nImplemented in: `Tracker`, `TrackerGroup`, `TrackerStream`\n\nReturns the ratio of completed work to work to be done. Range of 0 to 1.\n\n* tracker.finish()\n\nImplemented in: `Tracker`, `TrackerGroup`\n\nMarks the tracker as completed. With a TrackerGroup this marks all of its\ncomponents as completed.\n\nMarks all of the components of this tracker as finished, which in turn means\nthat `tracker.completed()` for this will now be 1.\n\nThis will result in one or more `change` events being emitted.\n\nEvents\n======\n\nAll tracker objects emit `change` events with the following arguments:\n\n```\nfunction (name, completed, tracker)\n```\n\n`name` is the name of the tracker that originally emitted the event,\nor if it didn't have one, the first containing tracker group that had one.\n\n`completed` is the percent complete (as returned by `tracker.completed()` method).\n\n`tracker` is the tracker object that you are listening for events on.\n\nTrackerGroup\n============\n\n* var tracker = new TrackerGroup(**name**)\n\n * **name** *(optional)* - The name of this tracker group, used in change\n notifications if the component updating didn't have a name. Defaults to undefined.\n\nCreates a new empty tracker aggregation group. These are trackers whose\ncompletion status is determined by the completion status of other trackers.\n\n* tracker.addUnit(**otherTracker**, **weight**)\n\n * **otherTracker** - Any of the other are-we-there-yet tracker objects\n * **weight** *(optional)* - The weight to give the tracker, defaults to 1.\n\nAdds the **otherTracker** to this aggregation group. The weight determines\nhow long you expect this tracker to take to complete in proportion to other\nunits. So for instance, if you add one tracker with a weight of 1 and\nanother with a weight of 2, you're saying the second will take twice as long\nto complete as the first. As such, the first will account for 33% of the\ncompletion of this tracker and the second will account for the other 67%.\n\nReturns **otherTracker**.\n\n* var subGroup = tracker.newGroup(**name**, **weight**)\n\nThe above is exactly equivalent to:\n\n```javascript\n var subGroup = tracker.addUnit(new TrackerGroup(name), weight)\n```\n\n* var subItem = tracker.newItem(**name**, **todo**, **weight**)\n\nThe above is exactly equivalent to:\n\n```javascript\n var subItem = tracker.addUnit(new Tracker(name, todo), weight)\n```\n\n* var subStream = tracker.newStream(**name**, **todo**, **weight**)\n\nThe above is exactly equivalent to:\n\n```javascript\n var subStream = tracker.addUnit(new TrackerStream(name, todo), weight)\n```\n\n* console.log( tracker.debug() )\n\nReturns a tree showing the completion of this tracker group and all of its\nchildren, including recursively entering all of the children.\n\nTracker\n=======\n\n* var tracker = new Tracker(**name**, **todo**)\n\n * **name** *(optional)* The name of this counter to report in change\n events. Defaults to undefined.\n * **todo** *(optional)* The amount of work todo (a number). Defaults to 0.\n\nOrdinarily these are constructed as a part of a tracker group (via\n`newItem`).\n\n* var completed = tracker.completed()\n\nReturns the ratio of completed work to work to be done. Range of 0 to 1. If\ntotal work to be done is 0 then it will return 0.\n\n* tracker.addWork(**todo**)\n\n * **todo** A number to add to the amount of work to be done.\n\nIncreases the amount of work to be done, thus decreasing the completion\npercentage. Triggers a `change` event.\n\n* tracker.completeWork(**completed**)\n\n * **completed** A number to add to the work complete\n\nIncrease the amount of work complete, thus increasing the completion percentage.\nWill never increase the work completed past the amount of work todo. That is,\npercentages > 100% are not allowed. Triggers a `change` event.\n\n* tracker.finish()\n\nMarks this tracker as finished, tracker.completed() will now be 1. Triggers\na `change` event.\n\nTrackerStream\n=============\n\n* var tracker = new TrackerStream(**name**, **size**, **options**)\n\n * **name** *(optional)* The name of this counter to report in change\n events. Defaults to undefined.\n * **size** *(optional)* The number of bytes being sent through this stream.\n * **options** *(optional)* A hash of stream options\n\nThe tracker stream object is a pass through stream that updates an internal\ntracker object each time a block passes through. It's intended to track\ndownloads, file extraction and other related activities. You use it by piping\nyour data source into it and then using it as your data source.\n\nIf your data has a length attribute then that's used as the amount of work\ncompleted when the chunk is passed through. If it does not (eg, object\nstreams) then each chunk counts as completing 1 unit of work, so your size\nshould be the total number of objects being streamed.\n\n* tracker.addWork(**todo**)\n\n * **todo** Increase the expected overall size by **todo** bytes.\n\nIncreases the amount of work to be done, thus decreasing the completion\npercentage. Triggers a `change` event.\n", + "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/iarna/are-we-there-yet.git" @@ -78,5 +95,5 @@ "scripts": { "test": "standard && tap test/*.js" }, - "version": "1.1.2" + "version": "1.1.4" } diff --git a/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js b/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js deleted file mode 100644 index 2aa7c05c5..000000000 --- a/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict' -var util = require('util') - -module.exports = function (obj, event, next) { - var timeout = setTimeout(gotTimeout, 10) - obj.once(event, gotResult) - - function gotTimeout () { - obj.removeListener(event, gotResult) - next(new Error('Timeout listening for ' + event)) - } - var result = [] - function gotResult () { - result = Array.prototype.slice.call(arguments) - clearTimeout(timeout) - timeout = setTimeout(gotNoMoreResults, 10) - obj.once(event, gotTooManyResults) - } - function gotNoMoreResults () { - obj.removeListener(event, gotTooManyResults) - var args = [null].concat(result) - next.apply(null, args) - } - function gotTooManyResults () { - var secondResult = Array.prototype.slice.call(arguments) - clearTimeout(timeout) - next(new Error('Got too many results, first ' + util.inspect(result) + ' and then ' + util.inspect(secondResult))) - } -} diff --git a/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js b/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js deleted file mode 100644 index 374c7739d..000000000 --- a/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict' -var test = require('tap').test -var Tracker = require('../index.js').Tracker - -var testEvent = require('./lib/test-event.js') - -var name = 'test' - -test('initialization', function (t) { - var simple = new Tracker(name) - - t.is(simple.completed(), 0, 'Nothing todo is 0 completion') - t.done() -}) - -var track -var todo = 100 -test('completion', function (t) { - track = new Tracker(name, todo) - t.is(track.completed(), 0, 'Nothing done is 0 completion') - - testEvent(track, 'change', afterCompleteWork) - - track.completeWork(todo) - t.is(track.completed(), 1, 'completeWork: 100% completed') - - function afterCompleteWork (er, onChangeName) { - t.is(er, null, 'completeWork: on change event fired') - t.is(onChangeName, name, 'completeWork: on change emits the correct name') - t.done() - } -}) - -test('add more work', function (t) { - testEvent(track, 'change', afterAddWork) - track.addWork(todo) - t.is(track.completed(), 0.5, 'addWork: 50% completed') - function afterAddWork (er, onChangeName) { - t.is(er, null, 'addWork: on change event fired') - t.is(onChangeName, name, 'addWork: on change emits the correct name') - t.done() - } -}) - -test('complete more work', function (t) { - track.completeWork(200) - t.is(track.completed(), 1, 'completeWork: Over completion is still only 100% complete') - t.done() -}) - -test('finish is always 100%', function (t) { - var finishtest = new Tracker(name, todo) - finishtest.completeWork(50) - finishtest.finish() - t.is(finishtest.completed(), 1, 'finish: Explicitly finishing moves to 100%') - t.done() -}) diff --git a/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js b/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js deleted file mode 100644 index 799a7670b..000000000 --- a/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict' -var test = require('tap').test -var TrackerGroup = require('../index.js').TrackerGroup -var testEvent = require('./lib/test-event.js') - -test('TrackerGroup', function (t) { - var name = 'test' - - var track = new TrackerGroup(name) - t.is(track.completed(), 0, 'Nothing todo is 0 completion') - testEvent(track, 'change', afterFinishEmpty) - track.finish() - var a, b - function afterFinishEmpty (er, onChangeName, completion) { - t.is(er, null, 'finishEmpty: on change event fired') - t.is(onChangeName, name, 'finishEmpty: on change emits the correct name') - t.is(completion, 1, 'finishEmpty: passed through completion was correct') - t.is(track.completed(), 1, 'finishEmpty: Finishing an empty group actually finishes it') - - track = new TrackerGroup(name) - a = track.newItem('a', 10, 1) - b = track.newItem('b', 10, 1) - t.is(track.completed(), 0, 'Initially empty') - testEvent(track, 'change', afterCompleteWork) - a.completeWork(5) - } - function afterCompleteWork (er, onChangeName, completion) { - t.is(er, null, 'on change event fired') - t.is(onChangeName, 'a', 'on change emits the correct name') - t.is(completion, 0.25, 'Complete half of one is a quarter overall') - t.is(track.completed(), 0.25, 'Complete half of one is a quarter overall') - testEvent(track, 'change', afterFinishAll) - track.finish() - } - function afterFinishAll (er, onChangeName, completion) { - t.is(er, null, 'finishAll: on change event fired') - t.is(onChangeName, name, 'finishAll: on change emits the correct name') - t.is(completion, 1, 'Finishing everything ') - t.is(track.completed(), 1, 'Finishing everything ') - - track = new TrackerGroup(name) - a = track.newItem('a', 10, 2) - b = track.newItem('b', 10, 1) - t.is(track.completed(), 0, 'weighted: Initially empty') - testEvent(track, 'change', afterWeightedCompleteWork) - a.completeWork(5) - } - function afterWeightedCompleteWork (er, onChangeName, completion) { - t.is(er, null, 'weighted: on change event fired') - t.is(onChangeName, 'a', 'weighted: on change emits the correct name') - t.is(Math.floor(completion * 100), 33, 'weighted: Complete half of double weighted') - t.is(Math.floor(track.completed() * 100), 33, 'weighted: Complete half of double weighted') - testEvent(track, 'change', afterWeightedFinishAll) - track.finish() - } - function afterWeightedFinishAll (er, onChangeName, completion) { - t.is(er, null, 'weightedFinishAll: on change event fired') - t.is(onChangeName, name, 'weightedFinishAll: on change emits the correct name') - t.is(completion, 1, 'weightedFinishaAll: Finishing everything ') - t.is(track.completed(), 1, 'weightedFinishaAll: Finishing everything ') - - track = new TrackerGroup(name) - a = track.newGroup('a', 10) - b = track.newGroup('b', 10) - var a1 = a.newItem('a.1', 10) - a1.completeWork(5) - t.is(track.completed(), 0.25, 'nested: Initially quarter done') - testEvent(track, 'change', afterNestedComplete) - b.finish() - } - function afterNestedComplete (er, onChangeName, completion) { - t.is(er, null, 'nestedComplete: on change event fired') - t.is(onChangeName, 'b', 'nestedComplete: on change emits the correct name') - t.is(completion, 0.75, 'nestedComplete: Finishing everything ') - t.is(track.completed(), 0.75, 'nestedComplete: Finishing everything ') - t.end() - } -}) - -test('cycles', function (t) { - var track = new TrackerGroup('top') - testCycle(track, track) - var layer1 = track.newGroup('layer1') - testCycle(layer1, track) - t.end() - - function testCycle (addTo, toAdd) { - try { - addTo.addUnit(toAdd) - t.fail(toAdd.name) - } catch (ex) { - console.log(ex) - t.pass(toAdd.name) - } - } -}) diff --git a/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js b/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js deleted file mode 100644 index 65f04b037..000000000 --- a/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict' -var test = require('tap').test -var util = require('util') -var stream = require('readable-stream') -var TrackerStream = require('../index.js').TrackerStream -var testEvent = require('./lib/test-event.js') - -var Sink = function () { - stream.Writable.apply(this, arguments) -} -util.inherits(Sink, stream.Writable) -Sink.prototype._write = function (data, encoding, cb) { - cb() -} - -test('TrackerStream', function (t) { - t.plan(9) - - var name = 'test' - var track = new TrackerStream(name) - - t.is(track.completed(), 0, 'Nothing todo is 0 completion') - - var todo = 10 - track = new TrackerStream(name, todo) - t.is(track.completed(), 0, 'Nothing done is 0 completion') - - track.pipe(new Sink()) - - testEvent(track, 'change', afterCompleteWork) - track.write('0123456789') - function afterCompleteWork (er, onChangeName) { - t.is(er, null, 'write: on change event fired') - t.is(onChangeName, name, 'write: on change emits the correct name') - t.is(track.completed(), 1, 'write: 100% completed') - - testEvent(track, 'change', afterAddWork) - track.addWork(10) - } - function afterAddWork (er, onChangeName) { - t.is(er, null, 'addWork: on change event fired') - t.is(track.completed(), 0.5, 'addWork: 50% completed') - - testEvent(track, 'change', afterAllWork) - track.write('ABCDEFGHIJKLMNOPQRST') - } - function afterAllWork (er) { - t.is(er, null, 'allWork: on change event fired') - t.is(track.completed(), 1, 'allWork: 100% completed') - } -}) diff --git a/node_modules/npmlog/node_modules/gauge/CHANGELOG.md b/node_modules/npmlog/node_modules/gauge/CHANGELOG.md index dcd9fe017..407bc192e 100644 --- a/node_modules/npmlog/node_modules/gauge/CHANGELOG.md +++ b/node_modules/npmlog/node_modules/gauge/CHANGELOG.md @@ -1,3 +1,18 @@ +### v2.7.4 + +* Reset colors prior to ending a line, to eliminate flicker when a line + is trucated between start and end color sequences. + +### v2.7.3 + +* Only create our onExit handler when we're enabled and remove it when we're + disabled. This stops us from creating multiple onExit handlers when + multiple gauge objects are being used. +* Fix bug where if a theme name were given instead of a theme object, it + would crash. +* Remove supports-color because it's not actually used. Uhm. Yes, I just + updated it. >.> + ### v2.7.2 * Use supports-color instead of has-color (as the module has been renamed) diff --git a/node_modules/npmlog/node_modules/gauge/index.js b/node_modules/npmlog/node_modules/gauge/index.js index 17b4ece06..c55324008 100644 --- a/node_modules/npmlog/node_modules/gauge/index.js +++ b/node_modules/npmlog/node_modules/gauge/index.js @@ -62,9 +62,8 @@ function Gauge (arg1, arg2) { this._$$doRedraw = callWith(this, this._doRedraw) this._$$handleSizeChange = callWith(this, this._handleSizeChange) - if (options.cleanupOnExit == null || options.cleanupOnExit) { - onExit(callWith(this, this.disable)) - } + this._cleanupOnExit = options.cleanupOnExit == null || options.cleanupOnExit + this._removeOnExit = null if (options.enabled || (options.enabled == null && this._tty && this._tty.isTTY)) { this.enable() @@ -85,12 +84,12 @@ Gauge.prototype.setTemplate = function (template) { Gauge.prototype._computeTheme = function (theme) { if (!theme) theme = {} - if (theme && (Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null)) { + if (typeof theme === 'string') { + theme = this._themes.getTheme(theme) + } else if (theme && (Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null)) { var useUnicode = theme.hasUnicode == null ? hasUnicode() : theme.hasUnicode var useColor = theme.hasColor == null ? hasColor : theme.hasColor theme = this._themes.getDefault({hasUnicode: useUnicode, hasColor: useColor, platform: theme.platform}) - } else if (typeof theme === 'string') { - theme = this._themes.getTheme(theme) } return theme } @@ -147,6 +146,9 @@ Gauge.prototype.disable = function () { } Gauge.prototype._enableEvents = function () { + if (this._cleanupOnExit) { + this._removeOnExit = onExit(callWith(this, this.disable)) + } this._tty.on('resize', this._$$handleSizeChange) if (this._fixedFramerate) { this.redrawTracker = setInterval(this._$$doRedraw, this._updateInterval) @@ -157,6 +159,7 @@ Gauge.prototype._enableEvents = function () { Gauge.prototype._disableEvents = function () { this._tty.removeListener('resize', this._$$handleSizeChange) if (this._fixedFramerate) clearInterval(this.redrawTracker) + if (this._removeOnExit) this._removeOnExit() } Gauge.prototype.hide = function (cb) { diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/.bin/supports-color b/node_modules/npmlog/node_modules/gauge/node_modules/.bin/supports-color deleted file mode 120000 index af0f05efe..000000000 --- a/node_modules/npmlog/node_modules/gauge/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/npmlog/node_modules/gauge/node_modules/object-assign/index.js b/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js index 508504840..0930cf889 100644 --- a/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js +++ b/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js @@ -1,5 +1,12 @@ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + 'use strict'; /* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; @@ -20,7 +27,7 @@ function shouldUseNative() { // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; @@ -49,7 +56,7 @@ function shouldUseNative() { } return true; - } catch (e) { + } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } @@ -69,8 +76,8 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { } } - if (Object.getOwnPropertySymbols) { - symbols = Object.getOwnPropertySymbols(from); + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json b/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json index f27b55175..ecf9811ca 100644 --- a/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json +++ b/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json @@ -1,62 +1,70 @@ { "_args": [ [ - "object-assign@^4.0.1", + { + "raw": "object-assign@^4.1.0", + "scope": null, + "escapedName": "object-assign", + "name": "object-assign", + "rawSpec": "^4.1.0", + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" ] ], - "_from": "object-assign@>=4.0.1 <5.0.0", - "_id": "object-assign@4.1.0", + "_from": "object-assign@>=4.1.0 <5.0.0", + "_id": "object-assign@4.1.1", "_inCache": true, - "_installable": true, "_location": "/npmlog/gauge/object-assign", - "_nodeVersion": "4.1.0", + "_nodeVersion": "4.6.2", "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/object-assign-4.1.0.tgz_1462212593641_0.3332549517508596" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/object-assign-4.1.1.tgz_1484580915042_0.07107710791751742" }, "_npmUser": { - "email": "ben@benalpert.com", - "name": "spicyj" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, - "_npmVersion": "2.14.19", + "_npmVersion": "2.15.11", "_phantomChildren": {}, "_requested": { - "name": "object-assign", - "raw": "object-assign@^4.0.1", - "rawSpec": "^4.0.1", + "raw": "object-assign@^4.1.0", "scope": null, - "spec": ">=4.0.1 <5.0.0", + "escapedName": "object-assign", + "name": "object-assign", + "rawSpec": "^4.1.0", + "spec": ">=4.1.0 <5.0.0", "type": "range" }, "_requiredBy": [ "/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", - "_shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", + "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863", "_shrinkwrap": null, - "_spec": "object-assign@^4.0.1", + "_spec": "object-assign@^4.1.0", "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/object-assign/issues" }, "dependencies": {}, - "description": "ES2015 Object.assign() ponyfill", + "description": "ES2015 `Object.assign()` ponyfill", "devDependencies": { - "lodash": "^4.8.2", + "ava": "^0.16.0", + "lodash": "^4.16.4", "matcha": "^0.7.0", - "mocha": "*", - "xo": "*" + "xo": "^0.16.0" }, "directories": {}, "dist": { - "shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", - "tarball": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" + "shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863", + "tarball": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" }, "engines": { "node": ">=0.10.0" @@ -64,7 +72,7 @@ "files": [ "index.js" ], - "gitHead": "72fe21c86911758f3342fdf41c2a57860d5829bc", + "gitHead": "a89774b252c91612203876984bbd6addbe3b5a0e", "homepage": "https://github.com/sindresorhus/object-assign#readme", "keywords": [ "object", @@ -83,24 +91,29 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "gaearon", + "email": "dan.abramov@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, { - "email": "ben@benalpert.com", - "name": "spicyj" + "name": "spicyj", + "email": "ben@benalpert.com" } ], "name": "object-assign", "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "readme": "# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)\n\n> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)\n\n\n## Use the built-in\n\nNode.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),\nsupport `Object.assign()` :tada:. If you target only those environments, then by all\nmeans, use `Object.assign()` instead of this package.\n\n\n## Install\n\n```\n$ npm install --save object-assign\n```\n\n\n## Usage\n\n```js\nconst objectAssign = require('object-assign');\n\nobjectAssign({foo: 0}, {bar: 1});\n//=> {foo: 0, bar: 1}\n\n// multiple sources\nobjectAssign({foo: 0}, {bar: 1}, {baz: 2});\n//=> {foo: 0, bar: 1, baz: 2}\n\n// overwrites equal keys\nobjectAssign({foo: 0}, {foo: 1}, {foo: 2});\n//=> {foo: 2}\n\n// ignores null and undefined sources\nobjectAssign({foo: 0}, null, {bar: 1}, undefined);\n//=> {foo: 0, bar: 1}\n```\n\n\n## API\n\n### objectAssign(target, [source, ...])\n\nAssigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.\n\n\n## Resources\n\n- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)\n\n\n## Related\n\n- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n", + "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/object-assign.git" }, "scripts": { "bench": "matcha bench.js", - "test": "xo && mocha" + "test": "xo && ava" }, - "version": "4.1.0" + "version": "4.1.1" } diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md b/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md index 13c097734..1be09d35c 100644 --- a/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md +++ b/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md @@ -1,8 +1,13 @@ # object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) -> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill +> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com) -> Ponyfill: A polyfill that doesn't overwrite the native method + +## Use the built-in + +Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari), +support `Object.assign()` :tada:. If you target only those environments, then by all +means, use `Object.assign()` instead of this package. ## Install @@ -36,7 +41,7 @@ objectAssign({foo: 0}, null, {bar: 1}, undefined); ## API -### objectAssign(target, source, [source, ...]) +### objectAssign(target, [source, ...]) Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/cli.js b/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/cli.js deleted file mode 100755 index 0617971e6..000000000 --- a/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/cli.js +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var pkg = require('./package.json'); -var supportsColor = require('./'); -var input = process.argv[2]; - -function help() { - console.log([ - pkg.description, - '', - 'Usage', - ' $ supports-color', - '', - 'Exits with code 0 if color is supported and 1 if not' - ].join('\n')); -} - -if (!input || process.argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (process.argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -process.exit(supportsColor ? 0 : 1); diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/index.js b/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/index.js deleted file mode 100644 index 092d0baef..000000000 --- a/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -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; -})(); diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/package.json b/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/package.json deleted file mode 100644 index 4a834e578..000000000 --- a/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "supports-color@^0.2.0", - "scope": null, - "escapedName": "supports-color", - "name": "supports-color", - "rawSpec": "^0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" - ] - ], - "_from": "supports-color@>=0.2.0 <0.3.0", - "_id": "supports-color@0.2.0", - "_inCache": true, - "_location": "/npmlog/gauge/supports-color", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "1.4.9", - "_phantomChildren": {}, - "_requested": { - "raw": "supports-color@^0.2.0", - "scope": null, - "escapedName": "supports-color", - "name": "supports-color", - "rawSpec": "^0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/npmlog/gauge" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", - "_shasum": "d92de2694eb3f67323973d7ae3d8b55b4c22190a", - "_shrinkwrap": null, - "_spec": "supports-color@^0.2.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bin": { - "supports-color": "cli.js" - }, - "bugs": { - "url": "https://github.com/sindresorhus/supports-color/issues" - }, - "dependencies": {}, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "d92de2694eb3f67323973d7ae3d8b55b4c22190a", - "tarball": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js", - "cli.js" - ], - "homepage": "https://github.com/sindresorhus/supports-color", - "keywords": [ - "cli", - "bin", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "supports-color", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/supports-color.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.2.0" -} diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/readme.md b/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/readme.md deleted file mode 100644 index 7f07e5fb0..000000000 --- a/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color) - -> Detect whether a terminal supports color - - -## Install - -```sh -$ npm install --save supports-color -``` - - -## Usage - -```js -var supportsColor = require('supports-color'); - -if (supportsColor) { - console.log('Terminal supports color'); -} -``` - -It obeys the `--color` and `--no-color` CLI flags. - - -## CLI - -```sh -$ npm install --global supports-color -``` - -```sh -$ supports-color --help - -Usage - $ supports-color - -# Exits with code 0 if color is supported and 1 if not -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/npmlog/node_modules/gauge/package.json b/node_modules/npmlog/node_modules/gauge/package.json index ed2eb61e9..6e7dd7a3d 100644 --- a/node_modules/npmlog/node_modules/gauge/package.json +++ b/node_modules/npmlog/node_modules/gauge/package.json @@ -14,19 +14,19 @@ ] ], "_from": "gauge@>=2.7.1 <2.8.0", - "_id": "gauge@2.7.2", + "_id": "gauge@2.7.4", "_inCache": true, "_location": "/npmlog/gauge", - "_nodeVersion": "6.9.1", + "_nodeVersion": "7.7.4", "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/gauge-2.7.2.tgz_1480851024801_0.17901206784881651" + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/gauge-2.7.4.tgz_1492815975490_0.4050216095056385" }, "_npmUser": { "name": "iarna", "email": "me@re-becca.org" }, - "_npmVersion": "4.0.5", + "_npmVersion": "4.5.0", "_phantomChildren": { "strip-ansi": "3.0.1" }, @@ -42,8 +42,8 @@ "_requiredBy": [ "/npmlog" ], - "_resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.2.tgz", - "_shasum": "15cecc31b02d05345a5d6b0e171cdb3ad2307774", + "_resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "_shasum": "2c03405c7538c39d7eb37b317022e325fb018bf7", "_shrinkwrap": null, "_spec": "gauge@~2.7.1", "_where": "/Users/rebecca/code/npm/node_modules/npmlog", @@ -62,7 +62,6 @@ "signal-exit": "^3.0.0", "string-width": "^1.0.1", "strip-ansi": "^3.0.1", - "supports-color": "^0.2.0", "wide-align": "^1.1.0" }, "description": "A terminal based horizontal guage", @@ -75,8 +74,8 @@ }, "directories": {}, "dist": { - "shasum": "15cecc31b02d05345a5d6b0e171cdb3ad2307774", - "tarball": "https://registry.npmjs.org/gauge/-/gauge-2.7.2.tgz" + "shasum": "2c03405c7538c39d7eb37b317022e325fb018bf7", + "tarball": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz" }, "files": [ "base-theme.js", @@ -99,7 +98,7 @@ "themes.js", "wide-truncate.js" ], - "gitHead": "6971e27a577d165cde360ebed86a59dfc18ac55b", + "gitHead": "1011abf6c2cb7ae89a3ee76fb447d3182d4e8d3a", "homepage": "https://github.com/iarna/gauge", "keywords": [ "progressbar", @@ -116,7 +115,8 @@ ], "name": "gauge", "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "readme": "gauge\n=====\n\nA nearly stateless terminal based horizontal gauge / progress bar.\n\n```javascript\nvar Gauge = require(\"gauge\")\n\nvar gauge = new Gauge()\n\ngauge.show(\"test\", 0.20)\n\ngauge.pulse(\"this\")\n\ngauge.hide()\n```\n\n![](gauge-demo.gif)\n\n\n### CHANGES FROM 1.x\n\nGauge 2.x is breaking release, please see the [changelog] for details on\nwhat's changed if you were previously a user of this module.\n\n[changelog]: CHANGELOG.md\n\n### THE GAUGE CLASS\n\nThis is the typical interface to the module– it provides a pretty\nfire-and-forget interface to displaying your status information.\n\n```\nvar Gauge = require(\"gauge\")\n\nvar gauge = new Gauge([stream], [options])\n```\n\n* **stream** – *(optional, default STDERR)* A stream that progress bar\n updates are to be written to. Gauge honors backpressure and will pause\n most writing if it is indicated.\n* **options** – *(optional)* An option object.\n\nConstructs a new gauge. Gauges are drawn on a single line, and are not drawn\nif **stream** isn't a tty and a tty isn't explicitly provided.\n\nIf **stream** is a terminal or if you pass in **tty** to **options** then we\nwill detect terminal resizes and redraw to fit. We do this by watching for\n`resize` events on the tty. (To work around a bug in verisons of Node prior\nto 2.5.0, we watch for them on stdout if the tty is stderr.) Resizes to\nlarger window sizes will be clean, but shrinking the window will always\nresult in some cruft.\n\n**IMPORTANT:** If you prevously were passing in a non-tty stream but you still\nwant output (for example, a stream wrapped by the `ansi` module) then you\nneed to pass in the **tty** option below, as `gauge` needs access to\nthe underlying tty in order to do things like terminal resizes and terminal\nwidth detection.\n\nThe **options** object can have the following properties, all of which are\noptional:\n\n* **updateInterval**: How often gauge updates should be drawn, in miliseconds.\n* **fixedFramerate**: Defaults to false on node 0.8, true on everything\n else. When this is true a timer is created to trigger once every\n `updateInterval` ms, when false, updates are printed as soon as they come\n in but updates more often than `updateInterval` are ignored. The reason\n 0.8 doesn't have this set to true is that it can't `unref` its timer and\n so it would stop your program from exiting– if you want to use this\n feature with 0.8 just make sure you call `gauge.disable()` before you\n expect your program to exit.\n* **themes**: A themeset to use when selecting the theme to use. Defaults\n to `gauge/themes`, see the [themes] documentation for details.\n* **theme**: Select a theme for use, it can be a:\n * Theme object, in which case the **themes** is not used.\n * The name of a theme, which will be looked up in the current *themes*\n object.\n * A configuration object with any of `hasUnicode`, `hasColor` or\n `platform` keys, which if wlll be used to override our guesses when making\n a default theme selection.\n\n If no theme is selected then a default is picked using a combination of our\n best guesses at your OS, color support and unicode support.\n* **template**: Describes what you want your gauge to look like. The\n default is what npm uses. Detailed [documentation] is later in this\n document.\n* **hideCursor**: Defaults to true. If true, then the cursor will be hidden\n while the gauge is displayed.\n* **tty**: The tty that you're ultimately writing to. Defaults to the same\n as **stream**. This is used for detecting the width of the terminal and\n resizes. The width used is `tty.columns - 1`. If no tty is available then\n a width of `79` is assumed.\n* **enabled**: Defaults to true if `tty` is a TTY, false otherwise. If true\n the gauge starts enabled. If disabled then all update commands are\n ignored and no gauge will be printed until you call `.enable()`.\n* **Plumbing**: The class to use to actually generate the gauge for\n printing. This defaults to `require('gauge/plumbing')` and ordinarly you\n shouldn't need to override this.\n* **cleanupOnExit**: Defaults to true. Ordinarily we register an exit\n handler to make sure your cursor is turned back on and the progress bar\n erased when your process exits, even if you Ctrl-C out or otherwise exit\n unexpectedly. You can disable this and it won't register the exit handler.\n\n[has-unicode]: https://www.npmjs.com/package/has-unicode\n[themes]: #themes\n[documentation]: #templates\n\n#### `gauge.show(section | status, [completed])`\n\nThe first argument is either the section, the name of the current thing\ncontributing to progress, or an object with keys like **section**,\n**subsection** & **completed** (or any others you have types for in a custom\ntemplate). If you don't want to update or set any of these you can pass\n`null` and it will be ignored.\n\nThe second argument is the percent completed as a value between 0 and 1.\nWithout it, completion is just not updated. You'll also note that completion\ncan be passed in as part of a status object as the first argument. If both\nit and the completed argument are passed in, the completed argument wins.\n\n#### `gauge.hide([cb])`\n\nRemoves the gauge from the terminal. Optionally, callback `cb` after IO has\nhad an opportunity to happen (currently this just means after `setImmediate`\nhas called back.)\n\nIt turns out this is important when you're pausing the progress bar on one\nfilehandle and printing to another– otherwise (with a big enough print) node\ncan end up printing the \"end progress bar\" bits to the progress bar filehandle\nwhile other stuff is printing to another filehandle. These getting interleaved\ncan cause corruption in some terminals.\n\n#### `gauge.pulse([subsection])`\n\n* **subsection** – *(optional)* The specific thing that triggered this pulse\n\nSpins the spinner in the gauge to show output. If **subsection** is\nincluded then it will be combined with the last name passed to `gauge.show`.\n\n#### `gauge.disable()`\n\nHides the gauge and ignores further calls to `show` or `pulse`.\n\n#### `gauge.enable()`\n\nShows the gauge and resumes updating when `show` or `pulse` is called.\n\n#### `gauge.isEnabled()`\n\nReturns true if the gauge is enabled.\n\n#### `gauge.setThemeset(themes)`\n\nChange the themeset to select a theme from. The same as the `themes` option\nused in the constructor. The theme will be reselected from this themeset.\n\n#### `gauge.setTheme(theme)`\n\nChange the active theme, will be displayed with the next show or pulse. This can be:\n\n* Theme object, in which case the **themes** is not used.\n* The name of a theme, which will be looked up in the current *themes*\n object.\n* A configuration object with any of `hasUnicode`, `hasColor` or\n `platform` keys, which if wlll be used to override our guesses when making\n a default theme selection.\n\nIf no theme is selected then a default is picked using a combination of our\nbest guesses at your OS, color support and unicode support.\n\n#### `gauge.setTemplate(template)`\n\nChange the active template, will be displayed with the next show or pulse\n\n### Tracking Completion\n\nIf you have more than one thing going on that you want to track completion\nof, you may find the related [are-we-there-yet] helpful. It's `change`\nevent can be wired up to the `show` method to get a more traditional\nprogress bar interface.\n\n[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet\n\n### THEMES\n\n```\nvar themes = require('gauge/themes')\n\n// fetch the default color unicode theme for this platform\nvar ourTheme = themes({hasUnicode: true, hasColor: true})\n\n// fetch the default non-color unicode theme for osx\nvar ourTheme = themes({hasUnicode: true, hasColor: false, platform: 'darwin'})\n\n// create a new theme based on the color ascii theme for this platform\n// that brackets the progress bar with arrows\nvar ourTheme = themes.newTheme(theme(hasUnicode: false, hasColor: true}), {\n preProgressbar: '→',\n postProgressbar: '←'\n})\n```\n\nThe object returned by `gauge/themes` is an instance of the `ThemeSet` class.\n\n```\nvar ThemeSet = require('gauge/theme-set')\nvar themes = new ThemeSet()\n// or\nvar themes = require('gauge/themes')\nvar mythemes = themes.newThemeset() // creates a new themeset based on the default themes\n```\n\n#### themes(opts)\n#### themes.getDefault(opts)\n\nTheme objects are a function that fetches the default theme based on\nplatform, unicode and color support.\n\nOptions is an object with the following properties:\n\n* **hasUnicode** - If true, fetch a unicode theme, if no unicode theme is\n available then a non-unicode theme will be used.\n* **hasColor** - If true, fetch a color theme, if no color theme is\n available a non-color theme will be used.\n* **platform** (optional) - Defaults to `process.platform`. If no\n platform match is available then `fallback` is used instead.\n\nIf no compatible theme can be found then an error will be thrown with a\n`code` of `EMISSINGTHEME`.\n\n#### themes.addTheme(themeName, themeObj)\n#### themes.addTheme(themeName, [parentTheme], newTheme)\n\nAdds a named theme to the themeset. You can pass in either a theme object,\nas returned by `themes.newTheme` or the arguments you'd pass to\n`themes.newTheme`.\n\n#### themes.getThemeNames()\n\nReturn a list of all of the names of the themes in this themeset. Suitable\nfor use in `themes.getTheme(…)`.\n\n#### themes.getTheme(name)\n\nReturns the theme object from this theme set named `name`.\n\nIf `name` does not exist in this themeset an error will be thrown with\na `code` of `EMISSINGTHEME`.\n\n#### themes.setDefault([opts], themeName)\n\n`opts` is an object with the following properties.\n\n* **platform** - Defaults to `'fallback'`. If your theme is platform\n specific, specify that here with the platform from `process.platform`, eg,\n `win32`, `darwin`, etc.\n* **hasUnicode** - Defaults to `false`. If your theme uses unicode you\n should set this to true.\n* **hasColor** - Defaults to `false`. If your theme uses color you should\n set this to true.\n\n`themeName` is the name of the theme (as given to `addTheme`) to use for\nthis set of `opts`.\n\n#### themes.newTheme([parentTheme,] newTheme)\n\nCreate a new theme object based on `parentTheme`. If no `parentTheme` is\nprovided then a minimal parentTheme that defines functions for rendering the\nactivity indicator (spinner) and progress bar will be defined. (This\nfallback parent is defined in `gauge/base-theme`.)\n\nnewTheme should be a bare object– we'll start by discussing the properties\ndefined by the default themes:\n\n* **preProgressbar** - displayed prior to the progress bar, if the progress\n bar is displayed.\n* **postProgressbar** - displayed after the progress bar, if the progress bar\n is displayed.\n* **progressBarTheme** - The subtheme passed through to the progress bar\n renderer, it's an object with `complete` and `remaining` properties\n that are the strings you want repeated for those sections of the progress\n bar.\n* **activityIndicatorTheme** - The theme for the activity indicator (spinner),\n this can either be a string, in which each character is a different step, or\n an array of strings.\n* **preSubsection** - Displayed as a separator between the `section` and\n `subsection` when the latter is printed.\n\nMore generally, themes can have any value that would be a valid value when rendering\ntemplates. The properties in the theme are used when their name matches a type in\nthe template. Their values can be:\n\n* **strings & numbers** - They'll be included as is\n* **function (values, theme, width)** - Should return what you want in your output.\n *values* is an object with values provided via `gauge.show`,\n *theme* is the theme specific to this item (see below) or this theme object,\n and *width* is the number of characters wide your result should be.\n\nThere are a couple of special prefixes:\n\n* **pre** - Is shown prior to the property, if its displayed.\n* **post** - Is shown after the property, if its displayed.\n\nAnd one special suffix:\n\n* **Theme** - Its value is passed to a function-type item as the theme.\n\n#### themes.addToAllThemes(theme)\n\nThis *mixes-in* `theme` into all themes currently defined. It also adds it\nto the default parent theme for this themeset, so future themes added to\nthis themeset will get the values from `theme` by default.\n\n#### themes.newThemeset()\n\nCopy the current themeset into a new one. This allows you to easily inherit\none themeset from another.\n\n### TEMPLATES\n\nA template is an array of objects and strings that, after being evaluated,\nwill be turned into the gauge line. The default template is:\n\n```javascript\n[\n {type: 'progressbar', length: 20},\n {type: 'activityIndicator', kerning: 1, length: 1},\n {type: 'section', kerning: 1, default: ''},\n {type: 'subsection', kerning: 1, default: ''}\n]\n```\n\nThe various template elements can either be **plain strings**, in which case they will\nbe be included verbatum in the output, or objects with the following properties:\n\n* *type* can be any of the following plus any keys you pass into `gauge.show` plus\n any keys you have on a custom theme.\n * `section` – What big thing you're working on now.\n * `subsection` – What component of that thing is currently working.\n * `activityIndicator` – Shows a spinner using the `activityIndicatorTheme`\n from your active theme.\n * `progressbar` – A progress bar representing your current `completed`\n using the `progressbarTheme` from your active theme.\n* *kerning* – Number of spaces that must be between this item and other\n items, if this item is displayed at all.\n* *maxLength* – The maximum length for this element. If its value is longer it\n will be truncated.\n* *minLength* – The minimum length for this element. If its value is shorter it\n will be padded according to the *align* value.\n* *align* – (Default: left) Possible values \"left\", \"right\" and \"center\". Works\n as you'd expect from word processors.\n* *length* – Provides a single value for both *minLength* and *maxLength*. If both\n *length* and *minLength or *maxLength* are specifed then the latter take precedence.\n* *value* – A literal value to use for this template item.\n* *default* – A default value to use for this template item if a value\n wasn't otherwise passed in.\n\n### PLUMBING\n\nThis is the super simple, assume nothing, do no magic internals used by gauge to\nimplement its ordinary interface.\n\n```\nvar Plumbing = require('gauge/plumbing')\nvar gauge = new Plumbing(theme, template, width)\n```\n\n* **theme**: The theme to use.\n* **template**: The template to use.\n* **width**: How wide your gauge should be\n\n#### `gauge.setTheme(theme)`\n\nChange the active theme.\n\n#### `gauge.setTemplate(template)`\n\nChange the active template.\n\n#### `gauge.setWidth(width)`\n\nChange the width to render at.\n\n#### `gauge.hide()`\n\nReturn the string necessary to hide the progress bar\n\n#### `gauge.hideCursor()`\n\nReturn a string to hide the cursor.\n\n#### `gauge.showCursor()`\n\nReturn a string to show the cursor.\n\n#### `gauge.show(status)`\n\nUsing `status` for values, render the provided template with the theme and return\na string that is suitable for printing to update the gauge.\n", + "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/iarna/gauge.git" @@ -125,5 +125,5 @@ "prepublish": "rm -f *~", "test": "standard && tap test/*.js --coverage" }, - "version": "2.7.2" + "version": "2.7.4" } diff --git a/node_modules/npmlog/node_modules/gauge/plumbing.js b/node_modules/npmlog/node_modules/gauge/plumbing.js index 589a9c928..1afb4af6d 100644 --- a/node_modules/npmlog/node_modules/gauge/plumbing.js +++ b/node_modules/npmlog/node_modules/gauge/plumbing.js @@ -43,5 +43,6 @@ Plumbing.prototype.show = function (status) { } return renderTemplate(this.width, this.template, values).trim() + + consoleControl.color('reset') + consoleControl.eraseLine() + consoleControl.gotoSOL() } diff --git a/node_modules/npmlog/package.json b/node_modules/npmlog/package.json index bab110a08..578444aa4 100644 --- a/node_modules/npmlog/package.json +++ b/node_modules/npmlog/package.json @@ -28,9 +28,9 @@ }, "_npmVersion": "4.0.5", "_phantomChildren": { - "aproba": "1.0.4", + "aproba": "1.1.1", "has-unicode": "2.0.1", - "readable-stream": "2.2.2", + "readable-stream": "2.2.9", "strip-ansi": "3.0.1" }, "_requested": { @@ -45,6 +45,7 @@ "_requiredBy": [ "#USER", "/", + "/node-gyp", "/npm-registry-client" ], "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz", @@ -103,7 +104,8 @@ ], "name": "npmlog", "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "readme": "# npmlog\n\nThe logger util that npm uses.\n\nThis logger is very basic. It does the logging for npm. It supports\ncustom levels and colored output.\n\nBy default, logs are written to stderr. If you want to send log messages\nto outputs other than streams, then you can change the `log.stream`\nmember, or you can just listen to the events that it emits, and do\nwhatever you want with them.\n\n# Installation\n\n```console\nnpm install npmlog --save\n```\n\n# Basic Usage\n\n```javascript\nvar log = require('npmlog')\n\n// additional stuff ---------------------------+\n// message ----------+ |\n// prefix ----+ | |\n// level -+ | | |\n// v v v v\n log.info('fyi', 'I have a kitty cat: %j', myKittyCat)\n```\n\n## log.level\n\n* {String}\n\nThe level to display logs at. Any logs at or above this level will be\ndisplayed. The special level `silent` will prevent anything from being\ndisplayed ever.\n\n## log.record\n\n* {Array}\n\nAn array of all the log messages that have been entered.\n\n## log.maxRecordSize\n\n* {Number}\n\nThe maximum number of records to keep. If log.record gets bigger than\n10% over this value, then it is sliced down to 90% of this value.\n\nThe reason for the 10% window is so that it doesn't have to resize a\nlarge array on every log entry.\n\n## log.prefixStyle\n\n* {Object}\n\nA style object that specifies how prefixes are styled. (See below)\n\n## log.headingStyle\n\n* {Object}\n\nA style object that specifies how the heading is styled. (See below)\n\n## log.heading\n\n* {String} Default: \"\"\n\nIf set, a heading that is printed at the start of every line.\n\n## log.stream\n\n* {Stream} Default: `process.stderr`\n\nThe stream where output is written.\n\n## log.enableColor()\n\nForce colors to be used on all messages, regardless of the output\nstream.\n\n## log.disableColor()\n\nDisable colors on all messages.\n\n## log.enableProgress()\n\nEnable the display of log activity spinner and progress bar\n\n## log.disableProgress()\n\nDisable the display of a progress bar\n\n## log.enableUnicode()\n\nForce the unicode theme to be used for the progress bar.\n\n## log.disableUnicode()\n\nDisable the use of unicode in the progress bar.\n\n## log.setGaugeTemplate(template)\n\nSet a template for outputting the progress bar. See the [gauge documentation] for details.\n\n[gauge documentation]: https://npmjs.com/package/gauge\n\n## log.setGaugeThemeset(themes)\n\nSelect a themeset to pick themes from for the progress bar. See the [gauge documentation] for details.\n\n## log.pause()\n\nStop emitting messages to the stream, but do not drop them.\n\n## log.resume()\n\nEmit all buffered messages that were written while paused.\n\n## log.log(level, prefix, message, ...)\n\n* `level` {String} The level to emit the message at\n* `prefix` {String} A string prefix. Set to \"\" to skip.\n* `message...` Arguments to `util.format`\n\nEmit a log message at the specified level.\n\n## log\\[level](prefix, message, ...)\n\nFor example,\n\n* log.silly(prefix, message, ...)\n* log.verbose(prefix, message, ...)\n* log.info(prefix, message, ...)\n* log.http(prefix, message, ...)\n* log.warn(prefix, message, ...)\n* log.error(prefix, message, ...)\n\nLike `log.log(level, prefix, message, ...)`. In this way, each level is\ngiven a shorthand, so you can do `log.info(prefix, message)`.\n\n## log.addLevel(level, n, style, disp)\n\n* `level` {String} Level indicator\n* `n` {Number} The numeric level\n* `style` {Object} Object with fg, bg, inverse, etc.\n* `disp` {String} Optional replacement for `level` in the output.\n\nSets up a new level with a shorthand function and so forth.\n\nNote that if the number is `Infinity`, then setting the level to that\nwill cause all log messages to be suppressed. If the number is\n`-Infinity`, then the only way to show it is to enable all log messages.\n\n## log.newItem(name, todo, weight)\n\n* `name` {String} Optional; progress item name.\n* `todo` {Number} Optional; total amount of work to be done. Default 0.\n* `weight` {Number} Optional; the weight of this item relative to others. Default 1.\n\nThis adds a new `are-we-there-yet` item tracker to the progress tracker. The\nobject returned has the `log[level]` methods but is otherwise an\n`are-we-there-yet` `Tracker` object.\n\n## log.newStream(name, todo, weight)\n\nThis adds a new `are-we-there-yet` stream tracker to the progress tracker. The\nobject returned has the `log[level]` methods but is otherwise an\n`are-we-there-yet` `TrackerStream` object.\n\n## log.newGroup(name, weight)\n\nThis adds a new `are-we-there-yet` tracker group to the progress tracker. The\nobject returned has the `log[level]` methods but is otherwise an\n`are-we-there-yet` `TrackerGroup` object.\n\n# Events\n\nEvents are all emitted with the message object.\n\n* `log` Emitted for all messages\n* `log.<level>` Emitted for all messages with the `<level>` level.\n* `<prefix>` Messages with prefixes also emit their prefix as an event.\n\n# Style Objects\n\nStyle objects can have the following fields:\n\n* `fg` {String} Color for the foreground text\n* `bg` {String} Color for the background\n* `bold`, `inverse`, `underline` {Boolean} Set the associated property\n* `bell` {Boolean} Make a noise (This is pretty annoying, probably.)\n\n# Message Objects\n\nEvery log event is emitted with a message object, and the `log.record`\nlist contains all of them that have been created. They have the\nfollowing fields:\n\n* `id` {Number}\n* `level` {String}\n* `prefix` {String}\n* `message` {String} Result of `util.format()`\n* `messageRaw` {Array} Arguments to `util.format()`\n\n# Blocking TTYs\n\nWe use [`set-blocking`](https://npmjs.com/package/set-blocking) to set\nstderr and stdout blocking if they are tty's and have the setBlocking call.\nThis is a work around for an issue in early versions of Node.js 6.x, which\nmade stderr and stdout non-blocking on OSX. (They are always blocking\nWindows and were never blocking on Linux.) `npmlog` needs them to be blocking\nso that it can allow output to stdout and stderr to be interlaced.\n", + "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/npm/npmlog.git" diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 61e3a5999..c17c52782 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1595,9 +1595,9 @@ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz", "dependencies": { "are-we-there-yet": { - "version": "1.1.2", + "version": "1.1.4", "from": "are-we-there-yet@>=1.1.2 <1.2.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", "dependencies": { "delegates": { "version": "1.0.0", @@ -1612,14 +1612,14 @@ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" }, "gauge": { - "version": "2.7.2", + "version": "2.7.4", "from": "gauge@>=2.7.1 <2.8.0", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.2.tgz", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "dependencies": { "object-assign": { - "version": "4.1.0", - "from": "object-assign@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" + "version": "4.1.1", + "from": "object-assign@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" }, "signal-exit": { "version": "3.0.2", @@ -1650,11 +1650,6 @@ } } }, - "supports-color": { - "version": "0.2.0", - "from": "supports-color@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz" - }, "wide-align": { "version": "1.1.0", "from": "wide-align@>=1.1.0 <2.0.0", |