From be2a467395eb16e645708623e9929736f5447230 Mon Sep 17 00:00:00 2001 From: Teddy Katz Date: Tue, 22 May 2018 19:54:30 -0400 Subject: [PATCH 01/41] doc: fix incorrect fs.readFileSync example output This fixes an incorrect example in the documentation for calling `fs.readFileSync` on a directory. The example was presumably copied from the documentation for `fs.readFile`, which has an error argument in its callback. PR-URL: https://github.com/nodejs/node/pull/20902 Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Trivikram Kamat --- doc/api/fs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 26eda38f739892..957d6b4265ab7e 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2367,7 +2367,7 @@ fs.readFileSync(''); // => [Error: EISDIR: illegal operation on a directory, read ] // FreeBSD -fs.readFileSync(''); // => null, +fs.readFileSync(''); // => ``` ## fs.readlink(path[, options], callback) From ed84b7d42f9f7e35645727826e8e3abea63b4cb2 Mon Sep 17 00:00:00 2001 From: CoreyGMartin Date: Mon, 21 May 2018 15:50:31 -0400 Subject: [PATCH 02/41] test: changed assert message from string literal to template literal PR-URL: https://github.com/nodejs/node/pull/20870 Reviewed-By: Rich Trott Reviewed-By: Gireesh Punathil Reviewed-By: Khaidi Chu Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- test/parallel/test-http-set-trailers.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-set-trailers.js b/test/parallel/test-http-set-trailers.js index 21c5d604363a36..74eff427a43d30 100644 --- a/test/parallel/test-http-set-trailers.js +++ b/test/parallel/test-http-set-trailers.js @@ -54,7 +54,10 @@ server.on('listening', function() { c.on('end', function() { c.end(); - assert.ok(!/x-foo/.test(res_buffer), 'Trailer in HTTP/1.0 response.'); + assert.ok( + !/x-foo/.test(res_buffer), + `Trailer in HTTP/1.0 response. Response buffer: ${res_buffer}` + ); outstanding_reqs--; if (outstanding_reqs === 0) { server.close(); @@ -84,7 +87,7 @@ server.on('listening', function() { clearTimeout(tid); assert.ok( /0\r\nx-foo: bar\r\n\r\n$/.test(res_buffer), - 'No trailer in HTTP/1.1 response.' + `No trailer in HTTP/1.1 response. Response buffer: ${res_buffer}` ); if (outstanding_reqs === 0) { server.close(); From 443d60afccf0cb87e4d8e0f05d9872c7a49cbc77 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 21 May 2018 14:48:38 -0700 Subject: [PATCH 03/41] test: use log only in test-child-process-fork-net We are currently having issues with test-child-process-fork-net on Windows CI. Debugging is slightly hampered by the mix of `console.log()` and `console.error()` as our test runner does not interleave stdout and stderr, so the order of output is not preserved. Change the sole instance of `console.error()` to `console.log()` to improve debugability. While editing, I also took the opportunity to add capitalization and punctuation to comments (as that is a nit we see from time to time and there is a potential ESLint rule to enforce the capitalization part). PR-URL: https://github.com/nodejs/node/pull/20873 Reviewed-By: Richard Lau Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- test/parallel/test-child-process-fork-net.js | 27 ++++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/test/parallel/test-child-process-fork-net.js b/test/parallel/test-child-process-fork-net.js index 1da92592ffc3ba..cfc8f564d2a03a 100644 --- a/test/parallel/test-child-process-fork-net.js +++ b/test/parallel/test-child-process-fork-net.js @@ -25,7 +25,6 @@ const assert = require('assert'); const fork = require('child_process').fork; const net = require('net'); -// progress tracker function ProgressTracker(missing, callback) { this.missing = missing; this.callback = callback; @@ -54,7 +53,7 @@ if (process.argv[2] === 'child') { socket.destroy(); }); - // start making connection from parent + // Start making connection from parent. console.log('CHILD: server listening'); process.send({ what: 'listening' }); }); @@ -86,10 +85,10 @@ if (process.argv[2] === 'child') { assert.strictEqual(code, 0, message); })); - // send net.Server to child and test by connecting + // Send net.Server to child and test by connecting. function testServer(callback) { - // destroy server execute callback when done + // Destroy server execute callback when done. const progress = new ProgressTracker(2, function() { server.on('close', function() { console.log('PARENT: server closed'); @@ -98,11 +97,11 @@ if (process.argv[2] === 'child') { server.close(); }); - // we expect 4 connections and close events + // We expect 4 connections and close events. const connections = new ProgressTracker(4, progress.done.bind(progress)); const closed = new ProgressTracker(4, progress.done.bind(progress)); - // create server and send it to child + // Create server and send it to child. const server = net.createServer(); server.on('connection', function(socket) { console.log('PARENT: got connection'); @@ -115,11 +114,11 @@ if (process.argv[2] === 'child') { }); server.listen(0); - // handle client messages + // Handle client messages. function messageHandlers(msg) { if (msg.what === 'listening') { - // make connections + // Make connections. let socket; for (let i = 0; i < 4; i++) { socket = net.connect(server.address().port, function() { @@ -143,11 +142,11 @@ if (process.argv[2] === 'child') { child.on('message', messageHandlers); } - // send net.Socket to child + // Send net.Socket to child. function testSocket(callback) { - // create a new server and connect to it, - // but the socket will be handled by the child + // Create a new server and connect to it, + // but the socket will be handled by the child. const server = net.createServer(); server.on('connection', function(socket) { socket.on('close', function() { @@ -159,14 +158,14 @@ if (process.argv[2] === 'child') { console.log('PARENT: server closed'); callback(); }); - // don't listen on the same port, because SmartOS sometimes says + // Don't listen on the same port, because SmartOS sometimes says // that the server's fd is closed, but it still cannot listen // on the same port again. // // An isolated test for this would be lovely, but for now, this // will have to do. server.listen(0, function() { - console.error('testSocket, listening'); + console.log('testSocket, listening'); const connect = net.connect(server.address().port); let store = ''; connect.on('data', function(chunk) { @@ -181,7 +180,7 @@ if (process.argv[2] === 'child') { }); } - // create server and send it to child + // Create server and send it to child. let serverSuccess = false; let socketSuccess = false; child.on('message', function onReady(msg) { From ed9e964357f42cdd0cd0bf88877ee31b8cd5c8be Mon Sep 17 00:00:00 2001 From: chainhelen Date: Mon, 21 May 2018 20:08:12 +0800 Subject: [PATCH 04/41] net: remove unnecessary variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/20864 Reviewed-By: Anatoli Papirovski Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Daniel Bevenius --- lib/net.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/net.js b/lib/net.js index 92b04838b6178d..957035c4724ef8 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1416,8 +1416,7 @@ Server.prototype.listen = function(...args) { throw new ERR_SERVER_ALREADY_LISTEN(); } - var hasCallback = (cb !== null); - if (hasCallback) { + if (cb !== null) { this.once('listening', cb); } var backlogFromArgs = @@ -1704,7 +1703,7 @@ if (process.platform === 'win32') { } }; } else { - _setSimultaneousAccepts = function(handle) {}; + _setSimultaneousAccepts = function() {}; } module.exports = { From ea702e2812556b58d60f2ab6f38b33ef6e123318 Mon Sep 17 00:00:00 2001 From: Tim Seckinger Date: Sun, 20 May 2018 14:37:28 +0200 Subject: [PATCH 05/41] assert: handle undefined filename in getErrMessage When generating an assertion error message, `filename` might be undefined, e.g. if `assert` is called in `eval`. Handle this case gracefully instead of failing with `Cannot read property 'endsWith' of undefined`. Fixes: https://github.com/nodejs/node/issues/20847 PR-URL: https://github.com/nodejs/node/pull/20848 Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Benjamin Gruenbaum Reviewed-By: Khaidi Chu Reviewed-By: James M Snell --- lib/assert.js | 4 ++++ test/parallel/test-assert.js | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/assert.js b/lib/assert.js index da92c02f640e46..47c0e3c1402bdd 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -153,6 +153,10 @@ function getBuffer(fd, assertLine) { function getErrMessage(call) { const filename = call.getFileName(); + if (!filename) { + return; + } + const line = call.getLineNumber() - 1; const column = call.getColumnNumber() - 1; const identifier = `${filename}${line}${column}`; diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index eb084e9b01cb2b..661ba9d3cfa0df 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -783,6 +783,16 @@ common.expectsError( } ); +// works in eval +common.expectsError( + () => new Function('assert', 'assert(1 === 2);')(assert), + { + code: 'ERR_ASSERTION', + type: assert.AssertionError, + message: 'false == true' + } +); + // Do not try to check Node.js modules. { const e = new EventEmitter(); From b0023d7bc979300009a0ff1b6b8a0a022144ebbf Mon Sep 17 00:00:00 2001 From: ohbarye Date: Sun, 20 May 2018 19:05:08 +0900 Subject: [PATCH 06/41] src,doc: add doc of --prof flag to help command Fixes: https://github.com/nodejs/node/issues/16459 PR-URL: https://github.com/nodejs/node/pull/20845 Reviewed-By: Vse Mozhet Byt Reviewed-By: Gireesh Punathil Reviewed-By: Matheus Marchini Reviewed-By: James M Snell --- doc/api/cli.md | 7 +++++++ doc/node.1 | 3 +++ src/node.cc | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index aecc636489c32d..77dab3f00c9321 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -240,6 +240,13 @@ resolving relative paths. See `--preserve-symlinks` for more information. +### `--prof` + + +Generate V8 profiler output. + ### `--prof-process` + + + + + + + +``` + +## Node.js + +To install: + +```sh +yarn add es6-promise +``` + +or + +```sh +npm install es6-promise +``` + +To use: + +```js +var Promise = require('es6-promise').Promise; +``` + + +## Usage in IE<9 + +`catch` and `finally` are reserved keywords in IE<9, meaning +`promise.catch(func)` or `promise.finally(func)` throw a syntax error. To work +around this, you can use a string to access the property as shown in the +following example. + +However most minifiers will automatically fix this for you, making the +resulting code safe for old browsers and production: + +```js +promise['catch'](function(err) { + // ... +}); +``` + +```js +promise['finally'](function() { + // ... +}); +``` + +## Auto-polyfill + +To polyfill the global environment (either in Node or in the browser via CommonJS) use the following code snippet: + +```js +require('es6-promise').polyfill(); +``` + +Alternatively + +```js +require('es6-promise/auto'); +``` + +Notice that we don't assign the result of `polyfill()` to any variable. The `polyfill()` method will patch the global environment (in this case to the `Promise` name) when called. + +## Building & Testing + +You will need to have PhantomJS installed globally in order to run the tests. + +`npm install -g phantomjs` + +* `npm run build` to build +* `npm test` to run tests +* `npm start` to run a build watcher, and webserver to test +* `npm run test:server` for a testem test runner and watching builder diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/auto.js b/deps/npm/node_modules/es6-promise/auto.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/auto.js rename to deps/npm/node_modules/es6-promise/auto.js diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.js b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.js new file mode 100644 index 00000000000000..9e5e513f56d54c --- /dev/null +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.js @@ -0,0 +1,1181 @@ +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.4+314e4831 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.ES6Promise = factory()); +}(this, (function () { 'use strict'; + +function objectOrFunction(x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} + +function isFunction(x) { + return typeof x === 'function'; +} + + + +var _isArray = void 0; +if (Array.isArray) { + _isArray = Array.isArray; +} else { + _isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; +} + +var isArray = _isArray; + +var len = 0; +var vertxNext = void 0; +var customSchedulerFn = void 0; + +var asap = function asap(callback, arg) { + queue[len] = callback; + queue[len + 1] = arg; + len += 2; + if (len === 2) { + // If len is 2, that means that we need to schedule an async flush. + // If additional callbacks are queued before the queue is flushed, they + // will be processed by this flush that we are scheduling. + if (customSchedulerFn) { + customSchedulerFn(flush); + } else { + scheduleFlush(); + } + } +}; + +function setScheduler(scheduleFn) { + customSchedulerFn = scheduleFn; +} + +function setAsap(asapFn) { + asap = asapFn; +} + +var browserWindow = typeof window !== 'undefined' ? window : undefined; +var browserGlobal = browserWindow || {}; +var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; +var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + +// test for web worker but not in IE10 +var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; + +// node +function useNextTick() { + // node version 0.10.x displays a deprecation warning when nextTick is used recursively + // see https://github.com/cujojs/when/issues/410 for details + return function () { + return process.nextTick(flush); + }; +} + +// vertx +function useVertxTimer() { + if (typeof vertxNext !== 'undefined') { + return function () { + vertxNext(flush); + }; + } + + return useSetTimeout(); +} + +function useMutationObserver() { + var iterations = 0; + var observer = new BrowserMutationObserver(flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + + return function () { + node.data = iterations = ++iterations % 2; + }; +} + +// web worker +function useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = flush; + return function () { + return channel.port2.postMessage(0); + }; +} + +function useSetTimeout() { + // Store setTimeout reference so es6-promise will be unaffected by + // other code modifying setTimeout (like sinon.useFakeTimers()) + var globalSetTimeout = setTimeout; + return function () { + return globalSetTimeout(flush, 1); + }; +} + +var queue = new Array(1000); +function flush() { + for (var i = 0; i < len; i += 2) { + var callback = queue[i]; + var arg = queue[i + 1]; + + callback(arg); + + queue[i] = undefined; + queue[i + 1] = undefined; + } + + len = 0; +} + +function attemptVertx() { + try { + var vertx = Function('return this')().require('vertx'); + vertxNext = vertx.runOnLoop || vertx.runOnContext; + return useVertxTimer(); + } catch (e) { + return useSetTimeout(); + } +} + +var scheduleFlush = void 0; +// Decide what async method to use to triggering processing of queued callbacks: +if (isNode) { + scheduleFlush = useNextTick(); +} else if (BrowserMutationObserver) { + scheduleFlush = useMutationObserver(); +} else if (isWorker) { + scheduleFlush = useMessageChannel(); +} else if (browserWindow === undefined && typeof require === 'function') { + scheduleFlush = attemptVertx(); +} else { + scheduleFlush = useSetTimeout(); +} + +function then(onFulfillment, onRejection) { + var parent = this; + + var child = new this.constructor(noop); + + if (child[PROMISE_ID] === undefined) { + makePromise(child); + } + + var _state = parent._state; + + + if (_state) { + var callback = arguments[_state - 1]; + asap(function () { + return invokeCallback(_state, child, callback, parent._result); + }); + } else { + subscribe(parent, child, onFulfillment, onRejection); + } + + return child; +} + +/** + `Promise.resolve` returns a promise that will become resolved with the + passed `value`. It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + resolve(1); + }); + + promise.then(function(value){ + // value === 1 + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.resolve(1); + + promise.then(function(value){ + // value === 1 + }); + ``` + + @method resolve + @static + @param {Any} value value that the returned promise will be resolved with + Useful for tooling. + @return {Promise} a promise that will become fulfilled with the given + `value` +*/ +function resolve$1(object) { + /*jshint validthis:true */ + var Constructor = this; + + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + + var promise = new Constructor(noop); + resolve(promise, object); + return promise; +} + +var PROMISE_ID = Math.random().toString(36).substring(2); + +function noop() {} + +var PENDING = void 0; +var FULFILLED = 1; +var REJECTED = 2; + +var TRY_CATCH_ERROR = { error: null }; + +function selfFulfillment() { + return new TypeError("You cannot resolve a promise with itself"); +} + +function cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); +} + +function getThen(promise) { + try { + return promise.then; + } catch (error) { + TRY_CATCH_ERROR.error = error; + return TRY_CATCH_ERROR; + } +} + +function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { + try { + then$$1.call(value, fulfillmentHandler, rejectionHandler); + } catch (e) { + return e; + } +} + +function handleForeignThenable(promise, thenable, then$$1) { + asap(function (promise) { + var sealed = false; + var error = tryThen(then$$1, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + resolve(promise, value); + } else { + fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + + reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + + if (!sealed && error) { + sealed = true; + reject(promise, error); + } + }, promise); +} + +function handleOwnThenable(promise, thenable) { + if (thenable._state === FULFILLED) { + fulfill(promise, thenable._result); + } else if (thenable._state === REJECTED) { + reject(promise, thenable._result); + } else { + subscribe(thenable, undefined, function (value) { + return resolve(promise, value); + }, function (reason) { + return reject(promise, reason); + }); + } +} + +function handleMaybeThenable(promise, maybeThenable, then$$1) { + if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { + handleOwnThenable(promise, maybeThenable); + } else { + if (then$$1 === TRY_CATCH_ERROR) { + reject(promise, TRY_CATCH_ERROR.error); + TRY_CATCH_ERROR.error = null; + } else if (then$$1 === undefined) { + fulfill(promise, maybeThenable); + } else if (isFunction(then$$1)) { + handleForeignThenable(promise, maybeThenable, then$$1); + } else { + fulfill(promise, maybeThenable); + } + } +} + +function resolve(promise, value) { + if (promise === value) { + reject(promise, selfFulfillment()); + } else if (objectOrFunction(value)) { + handleMaybeThenable(promise, value, getThen(value)); + } else { + fulfill(promise, value); + } +} + +function publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + + publish(promise); +} + +function fulfill(promise, value) { + if (promise._state !== PENDING) { + return; + } + + promise._result = value; + promise._state = FULFILLED; + + if (promise._subscribers.length !== 0) { + asap(publish, promise); + } +} + +function reject(promise, reason) { + if (promise._state !== PENDING) { + return; + } + promise._state = REJECTED; + promise._result = reason; + + asap(publishRejection, promise); +} + +function subscribe(parent, child, onFulfillment, onRejection) { + var _subscribers = parent._subscribers; + var length = _subscribers.length; + + + parent._onerror = null; + + _subscribers[length] = child; + _subscribers[length + FULFILLED] = onFulfillment; + _subscribers[length + REJECTED] = onRejection; + + if (length === 0 && parent._state) { + asap(publish, parent); + } +} + +function publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + + if (subscribers.length === 0) { + return; + } + + var child = void 0, + callback = void 0, + detail = promise._result; + + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + + if (child) { + invokeCallback(settled, child, callback, detail); + } else { + callback(detail); + } + } + + promise._subscribers.length = 0; +} + +function tryCatch(callback, detail) { + try { + return callback(detail); + } catch (e) { + TRY_CATCH_ERROR.error = e; + return TRY_CATCH_ERROR; + } +} + +function invokeCallback(settled, promise, callback, detail) { + var hasCallback = isFunction(callback), + value = void 0, + error = void 0, + succeeded = void 0, + failed = void 0; + + if (hasCallback) { + value = tryCatch(callback, detail); + + if (value === TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value.error = null; + } else { + succeeded = true; + } + + if (promise === value) { + reject(promise, cannotReturnOwn()); + return; + } + } else { + value = detail; + succeeded = true; + } + + if (promise._state !== PENDING) { + // noop + } else if (hasCallback && succeeded) { + resolve(promise, value); + } else if (failed) { + reject(promise, error); + } else if (settled === FULFILLED) { + fulfill(promise, value); + } else if (settled === REJECTED) { + reject(promise, value); + } +} + +function initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + resolve(promise, value); + }, function rejectPromise(reason) { + reject(promise, reason); + }); + } catch (e) { + reject(promise, e); + } +} + +var id = 0; +function nextId() { + return id++; +} + +function makePromise(promise) { + promise[PROMISE_ID] = id++; + promise._state = undefined; + promise._result = undefined; + promise._subscribers = []; +} + +function validationError() { + return new Error('Array Methods must be provided an Array'); +} + +var Enumerator = function () { + function Enumerator(Constructor, input) { + this._instanceConstructor = Constructor; + this.promise = new Constructor(noop); + + if (!this.promise[PROMISE_ID]) { + makePromise(this.promise); + } + + if (isArray(input)) { + this.length = input.length; + this._remaining = input.length; + + this._result = new Array(this.length); + + if (this.length === 0) { + fulfill(this.promise, this._result); + } else { + this.length = this.length || 0; + this._enumerate(input); + if (this._remaining === 0) { + fulfill(this.promise, this._result); + } + } + } else { + reject(this.promise, validationError()); + } + } + + Enumerator.prototype._enumerate = function _enumerate(input) { + for (var i = 0; this._state === PENDING && i < input.length; i++) { + this._eachEntry(input[i], i); + } + }; + + Enumerator.prototype._eachEntry = function _eachEntry(entry, i) { + var c = this._instanceConstructor; + var resolve$$1 = c.resolve; + + + if (resolve$$1 === resolve$1) { + var _then = getThen(entry); + + if (_then === then && entry._state !== PENDING) { + this._settledAt(entry._state, i, entry._result); + } else if (typeof _then !== 'function') { + this._remaining--; + this._result[i] = entry; + } else if (c === Promise$2) { + var promise = new c(noop); + handleMaybeThenable(promise, entry, _then); + this._willSettleAt(promise, i); + } else { + this._willSettleAt(new c(function (resolve$$1) { + return resolve$$1(entry); + }), i); + } + } else { + this._willSettleAt(resolve$$1(entry), i); + } + }; + + Enumerator.prototype._settledAt = function _settledAt(state, i, value) { + var promise = this.promise; + + + if (promise._state === PENDING) { + this._remaining--; + + if (state === REJECTED) { + reject(promise, value); + } else { + this._result[i] = value; + } + } + + if (this._remaining === 0) { + fulfill(promise, this._result); + } + }; + + Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) { + var enumerator = this; + + subscribe(promise, undefined, function (value) { + return enumerator._settledAt(FULFILLED, i, value); + }, function (reason) { + return enumerator._settledAt(REJECTED, i, reason); + }); + }; + + return Enumerator; +}(); + +/** + `Promise.all` accepts an array of promises, and returns a new promise which + is fulfilled with an array of fulfillment values for the passed promises, or + rejected with the reason of the first passed promise to be rejected. It casts all + elements of the passed iterable to promises as it runs this algorithm. + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = resolve(2); + let promise3 = resolve(3); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // The array here would be [ 1, 2, 3 ]; + }); + ``` + + If any of the `promises` given to `all` are rejected, the first promise + that is rejected will be given as an argument to the returned promises's + rejection handler. For example: + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = reject(new Error("2")); + let promise3 = reject(new Error("3")); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // Code here never runs because there are rejected promises! + }, function(error) { + // error.message === "2" + }); + ``` + + @method all + @static + @param {Array} entries array of promises + @param {String} label optional string for labeling the promise. + Useful for tooling. + @return {Promise} promise that is fulfilled when all `promises` have been + fulfilled, or rejected if any of them become rejected. + @static +*/ +function all(entries) { + return new Enumerator(this, entries).promise; +} + +/** + `Promise.race` returns a new promise which is settled in the same way as the + first passed promise to settle. + + Example: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 2'); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // result === 'promise 2' because it was resolved before promise1 + // was resolved. + }); + ``` + + `Promise.race` is deterministic in that only the state of the first + settled promise matters. For example, even if other promises given to the + `promises` array argument are resolved, but the first settled promise has + become rejected before the other promises became fulfilled, the returned + promise will become rejected: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + reject(new Error('promise 2')); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // Code here never runs + }, function(reason){ + // reason.message === 'promise 2' because promise 2 became rejected before + // promise 1 became fulfilled + }); + ``` + + An example real-world use case is implementing timeouts: + + ```javascript + Promise.race([ajax('foo.json'), timeout(5000)]) + ``` + + @method race + @static + @param {Array} promises array of promises to observe + Useful for tooling. + @return {Promise} a promise which settles in the same way as the first passed + promise to settle. +*/ +function race(entries) { + /*jshint validthis:true */ + var Constructor = this; + + if (!isArray(entries)) { + return new Constructor(function (_, reject) { + return reject(new TypeError('You must pass an array to race.')); + }); + } else { + return new Constructor(function (resolve, reject) { + var length = entries.length; + for (var i = 0; i < length; i++) { + Constructor.resolve(entries[i]).then(resolve, reject); + } + }); + } +} + +/** + `Promise.reject` returns a promise rejected with the passed `reason`. + It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + reject(new Error('WHOOPS')); + }); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.reject(new Error('WHOOPS')); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + @method reject + @static + @param {Any} reason value that the returned promise will be rejected with. + Useful for tooling. + @return {Promise} a promise rejected with the given `reason`. +*/ +function reject$1(reason) { + /*jshint validthis:true */ + var Constructor = this; + var promise = new Constructor(noop); + reject(promise, reason); + return promise; +} + +function needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); +} + +function needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); +} + +/** + Promise objects represent the eventual result of an asynchronous operation. The + primary way of interacting with a promise is through its `then` method, which + registers callbacks to receive either a promise's eventual value or the reason + why the promise cannot be fulfilled. + + Terminology + ----------- + + - `promise` is an object or function with a `then` method whose behavior conforms to this specification. + - `thenable` is an object or function that defines a `then` method. + - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). + - `exception` is a value that is thrown using the throw statement. + - `reason` is a value that indicates why a promise was rejected. + - `settled` the final resting state of a promise, fulfilled or rejected. + + A promise can be in one of three states: pending, fulfilled, or rejected. + + Promises that are fulfilled have a fulfillment value and are in the fulfilled + state. Promises that are rejected have a rejection reason and are in the + rejected state. A fulfillment value is never a thenable. + + Promises can also be said to *resolve* a value. If this value is also a + promise, then the original promise's settled state will match the value's + settled state. So a promise that *resolves* a promise that rejects will + itself reject, and a promise that *resolves* a promise that fulfills will + itself fulfill. + + + Basic Usage: + ------------ + + ```js + let promise = new Promise(function(resolve, reject) { + // on success + resolve(value); + + // on failure + reject(reason); + }); + + promise.then(function(value) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Advanced Usage: + --------------- + + Promises shine when abstracting away asynchronous interactions such as + `XMLHttpRequest`s. + + ```js + function getJSON(url) { + return new Promise(function(resolve, reject){ + let xhr = new XMLHttpRequest(); + + xhr.open('GET', url); + xhr.onreadystatechange = handler; + xhr.responseType = 'json'; + xhr.setRequestHeader('Accept', 'application/json'); + xhr.send(); + + function handler() { + if (this.readyState === this.DONE) { + if (this.status === 200) { + resolve(this.response); + } else { + reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); + } + } + }; + }); + } + + getJSON('/posts.json').then(function(json) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Unlike callbacks, promises are great composable primitives. + + ```js + Promise.all([ + getJSON('/posts'), + getJSON('/comments') + ]).then(function(values){ + values[0] // => postsJSON + values[1] // => commentsJSON + + return values; + }); + ``` + + @class Promise + @param {Function} resolver + Useful for tooling. + @constructor +*/ + +var Promise$2 = function () { + function Promise(resolver) { + this[PROMISE_ID] = nextId(); + this._result = this._state = undefined; + this._subscribers = []; + + if (noop !== resolver) { + typeof resolver !== 'function' && needsResolver(); + this instanceof Promise ? initializePromise(this, resolver) : needsNew(); + } + } + + /** + The primary way of interacting with a promise is through its `then` method, + which registers callbacks to receive either a promise's eventual value or the + reason why the promise cannot be fulfilled. + ```js + findUser().then(function(user){ + // user is available + }, function(reason){ + // user is unavailable, and you are given the reason why + }); + ``` + Chaining + -------- + The return value of `then` is itself a promise. This second, 'downstream' + promise is resolved with the return value of the first promise's fulfillment + or rejection handler, or rejected if the handler throws an exception. + ```js + findUser().then(function (user) { + return user.name; + }, function (reason) { + return 'default name'; + }).then(function (userName) { + // If `findUser` fulfilled, `userName` will be the user's name, otherwise it + // will be `'default name'` + }); + findUser().then(function (user) { + throw new Error('Found user, but still unhappy'); + }, function (reason) { + throw new Error('`findUser` rejected and we're unhappy'); + }).then(function (value) { + // never reached + }, function (reason) { + // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. + // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. + }); + ``` + If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. + ```js + findUser().then(function (user) { + throw new PedagogicalException('Upstream error'); + }).then(function (value) { + // never reached + }).then(function (value) { + // never reached + }, function (reason) { + // The `PedgagocialException` is propagated all the way down to here + }); + ``` + Assimilation + ------------ + Sometimes the value you want to propagate to a downstream promise can only be + retrieved asynchronously. This can be achieved by returning a promise in the + fulfillment or rejection handler. The downstream promise will then be pending + until the returned promise is settled. This is called *assimilation*. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // The user's comments are now available + }); + ``` + If the assimliated promise rejects, then the downstream promise will also reject. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // If `findCommentsByAuthor` fulfills, we'll have the value here + }, function (reason) { + // If `findCommentsByAuthor` rejects, we'll have the reason here + }); + ``` + Simple Example + -------------- + Synchronous Example + ```javascript + let result; + try { + result = findResult(); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + findResult(function(result, err){ + if (err) { + // failure + } else { + // success + } + }); + ``` + Promise Example; + ```javascript + findResult().then(function(result){ + // success + }, function(reason){ + // failure + }); + ``` + Advanced Example + -------------- + Synchronous Example + ```javascript + let author, books; + try { + author = findAuthor(); + books = findBooksByAuthor(author); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + function foundBooks(books) { + } + function failure(reason) { + } + findAuthor(function(author, err){ + if (err) { + failure(err); + // failure + } else { + try { + findBoooksByAuthor(author, function(books, err) { + if (err) { + failure(err); + } else { + try { + foundBooks(books); + } catch(reason) { + failure(reason); + } + } + }); + } catch(error) { + failure(err); + } + // success + } + }); + ``` + Promise Example; + ```javascript + findAuthor(). + then(findBooksByAuthor). + then(function(books){ + // found books + }).catch(function(reason){ + // something went wrong + }); + ``` + @method then + @param {Function} onFulfilled + @param {Function} onRejected + Useful for tooling. + @return {Promise} + */ + + /** + `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same + as the catch block of a try/catch statement. + ```js + function findAuthor(){ + throw new Error('couldn't find that author'); + } + // synchronous + try { + findAuthor(); + } catch(reason) { + // something went wrong + } + // async with promises + findAuthor().catch(function(reason){ + // something went wrong + }); + ``` + @method catch + @param {Function} onRejection + Useful for tooling. + @return {Promise} + */ + + + Promise.prototype.catch = function _catch(onRejection) { + return this.then(null, onRejection); + }; + + /** + `finally` will be invoked regardless of the promise's fate just as native + try/catch/finally behaves + + Synchronous example: + + ```js + findAuthor() { + if (Math.random() > 0.5) { + throw new Error(); + } + return new Author(); + } + + try { + return findAuthor(); // succeed or fail + } catch(error) { + return findOtherAuther(); + } finally { + // always runs + // doesn't affect the return value + } + ``` + + Asynchronous example: + + ```js + findAuthor().catch(function(reason){ + return findOtherAuther(); + }).finally(function(){ + // author was either found, or not + }); + ``` + + @method finally + @param {Function} callback + @return {Promise} + */ + + + Promise.prototype.finally = function _finally(callback) { + var promise = this; + var constructor = promise.constructor; + + return promise.then(function (value) { + return constructor.resolve(callback()).then(function () { + return value; + }); + }, function (reason) { + return constructor.resolve(callback()).then(function () { + throw reason; + }); + }); + }; + + return Promise; +}(); + +Promise$2.prototype.then = then; +Promise$2.all = all; +Promise$2.race = race; +Promise$2.resolve = resolve$1; +Promise$2.reject = reject$1; +Promise$2._setScheduler = setScheduler; +Promise$2._setAsap = setAsap; +Promise$2._asap = asap; + +/*global self*/ +function polyfill() { + var local = void 0; + + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + + var P = local.Promise; + + if (P) { + var promiseToString = null; + try { + promiseToString = Object.prototype.toString.call(P.resolve()); + } catch (e) { + // silently ignored + } + + if (promiseToString === '[object Promise]' && !P.cast) { + return; + } + } + + local.Promise = Promise$2; +} + +// Strange compat.. +Promise$2.polyfill = polyfill; +Promise$2.Promise = Promise$2; + +Promise$2.polyfill(); + +return Promise$2; + +}))); + + + +//# sourceMappingURL=es6-promise.auto.map diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.map b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.map new file mode 100644 index 00000000000000..bff203c5faabf0 --- /dev/null +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.map @@ -0,0 +1 @@ +{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;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,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.js"} \ No newline at end of file diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.min.js b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.min.js new file mode 100644 index 00000000000000..fdf8bff2676cc2 --- /dev/null +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.auto.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,C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,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.js b/deps/npm/node_modules/es6-promise/dist/es6-promise.js new file mode 100644 index 00000000000000..80d4645c346986 --- /dev/null +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.js @@ -0,0 +1,1179 @@ +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.4+314e4831 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.ES6Promise = factory()); +}(this, (function () { 'use strict'; + +function objectOrFunction(x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} + +function isFunction(x) { + return typeof x === 'function'; +} + + + +var _isArray = void 0; +if (Array.isArray) { + _isArray = Array.isArray; +} else { + _isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; +} + +var isArray = _isArray; + +var len = 0; +var vertxNext = void 0; +var customSchedulerFn = void 0; + +var asap = function asap(callback, arg) { + queue[len] = callback; + queue[len + 1] = arg; + len += 2; + if (len === 2) { + // If len is 2, that means that we need to schedule an async flush. + // If additional callbacks are queued before the queue is flushed, they + // will be processed by this flush that we are scheduling. + if (customSchedulerFn) { + customSchedulerFn(flush); + } else { + scheduleFlush(); + } + } +}; + +function setScheduler(scheduleFn) { + customSchedulerFn = scheduleFn; +} + +function setAsap(asapFn) { + asap = asapFn; +} + +var browserWindow = typeof window !== 'undefined' ? window : undefined; +var browserGlobal = browserWindow || {}; +var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; +var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + +// test for web worker but not in IE10 +var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; + +// node +function useNextTick() { + // node version 0.10.x displays a deprecation warning when nextTick is used recursively + // see https://github.com/cujojs/when/issues/410 for details + return function () { + return process.nextTick(flush); + }; +} + +// vertx +function useVertxTimer() { + if (typeof vertxNext !== 'undefined') { + return function () { + vertxNext(flush); + }; + } + + return useSetTimeout(); +} + +function useMutationObserver() { + var iterations = 0; + var observer = new BrowserMutationObserver(flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + + return function () { + node.data = iterations = ++iterations % 2; + }; +} + +// web worker +function useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = flush; + return function () { + return channel.port2.postMessage(0); + }; +} + +function useSetTimeout() { + // Store setTimeout reference so es6-promise will be unaffected by + // other code modifying setTimeout (like sinon.useFakeTimers()) + var globalSetTimeout = setTimeout; + return function () { + return globalSetTimeout(flush, 1); + }; +} + +var queue = new Array(1000); +function flush() { + for (var i = 0; i < len; i += 2) { + var callback = queue[i]; + var arg = queue[i + 1]; + + callback(arg); + + queue[i] = undefined; + queue[i + 1] = undefined; + } + + len = 0; +} + +function attemptVertx() { + try { + var vertx = Function('return this')().require('vertx'); + vertxNext = vertx.runOnLoop || vertx.runOnContext; + return useVertxTimer(); + } catch (e) { + return useSetTimeout(); + } +} + +var scheduleFlush = void 0; +// Decide what async method to use to triggering processing of queued callbacks: +if (isNode) { + scheduleFlush = useNextTick(); +} else if (BrowserMutationObserver) { + scheduleFlush = useMutationObserver(); +} else if (isWorker) { + scheduleFlush = useMessageChannel(); +} else if (browserWindow === undefined && typeof require === 'function') { + scheduleFlush = attemptVertx(); +} else { + scheduleFlush = useSetTimeout(); +} + +function then(onFulfillment, onRejection) { + var parent = this; + + var child = new this.constructor(noop); + + if (child[PROMISE_ID] === undefined) { + makePromise(child); + } + + var _state = parent._state; + + + if (_state) { + var callback = arguments[_state - 1]; + asap(function () { + return invokeCallback(_state, child, callback, parent._result); + }); + } else { + subscribe(parent, child, onFulfillment, onRejection); + } + + return child; +} + +/** + `Promise.resolve` returns a promise that will become resolved with the + passed `value`. It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + resolve(1); + }); + + promise.then(function(value){ + // value === 1 + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.resolve(1); + + promise.then(function(value){ + // value === 1 + }); + ``` + + @method resolve + @static + @param {Any} value value that the returned promise will be resolved with + Useful for tooling. + @return {Promise} a promise that will become fulfilled with the given + `value` +*/ +function resolve$1(object) { + /*jshint validthis:true */ + var Constructor = this; + + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + + var promise = new Constructor(noop); + resolve(promise, object); + return promise; +} + +var PROMISE_ID = Math.random().toString(36).substring(2); + +function noop() {} + +var PENDING = void 0; +var FULFILLED = 1; +var REJECTED = 2; + +var TRY_CATCH_ERROR = { error: null }; + +function selfFulfillment() { + return new TypeError("You cannot resolve a promise with itself"); +} + +function cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); +} + +function getThen(promise) { + try { + return promise.then; + } catch (error) { + TRY_CATCH_ERROR.error = error; + return TRY_CATCH_ERROR; + } +} + +function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { + try { + then$$1.call(value, fulfillmentHandler, rejectionHandler); + } catch (e) { + return e; + } +} + +function handleForeignThenable(promise, thenable, then$$1) { + asap(function (promise) { + var sealed = false; + var error = tryThen(then$$1, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + resolve(promise, value); + } else { + fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + + reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + + if (!sealed && error) { + sealed = true; + reject(promise, error); + } + }, promise); +} + +function handleOwnThenable(promise, thenable) { + if (thenable._state === FULFILLED) { + fulfill(promise, thenable._result); + } else if (thenable._state === REJECTED) { + reject(promise, thenable._result); + } else { + subscribe(thenable, undefined, function (value) { + return resolve(promise, value); + }, function (reason) { + return reject(promise, reason); + }); + } +} + +function handleMaybeThenable(promise, maybeThenable, then$$1) { + if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { + handleOwnThenable(promise, maybeThenable); + } else { + if (then$$1 === TRY_CATCH_ERROR) { + reject(promise, TRY_CATCH_ERROR.error); + TRY_CATCH_ERROR.error = null; + } else if (then$$1 === undefined) { + fulfill(promise, maybeThenable); + } else if (isFunction(then$$1)) { + handleForeignThenable(promise, maybeThenable, then$$1); + } else { + fulfill(promise, maybeThenable); + } + } +} + +function resolve(promise, value) { + if (promise === value) { + reject(promise, selfFulfillment()); + } else if (objectOrFunction(value)) { + handleMaybeThenable(promise, value, getThen(value)); + } else { + fulfill(promise, value); + } +} + +function publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + + publish(promise); +} + +function fulfill(promise, value) { + if (promise._state !== PENDING) { + return; + } + + promise._result = value; + promise._state = FULFILLED; + + if (promise._subscribers.length !== 0) { + asap(publish, promise); + } +} + +function reject(promise, reason) { + if (promise._state !== PENDING) { + return; + } + promise._state = REJECTED; + promise._result = reason; + + asap(publishRejection, promise); +} + +function subscribe(parent, child, onFulfillment, onRejection) { + var _subscribers = parent._subscribers; + var length = _subscribers.length; + + + parent._onerror = null; + + _subscribers[length] = child; + _subscribers[length + FULFILLED] = onFulfillment; + _subscribers[length + REJECTED] = onRejection; + + if (length === 0 && parent._state) { + asap(publish, parent); + } +} + +function publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + + if (subscribers.length === 0) { + return; + } + + var child = void 0, + callback = void 0, + detail = promise._result; + + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + + if (child) { + invokeCallback(settled, child, callback, detail); + } else { + callback(detail); + } + } + + promise._subscribers.length = 0; +} + +function tryCatch(callback, detail) { + try { + return callback(detail); + } catch (e) { + TRY_CATCH_ERROR.error = e; + return TRY_CATCH_ERROR; + } +} + +function invokeCallback(settled, promise, callback, detail) { + var hasCallback = isFunction(callback), + value = void 0, + error = void 0, + succeeded = void 0, + failed = void 0; + + if (hasCallback) { + value = tryCatch(callback, detail); + + if (value === TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value.error = null; + } else { + succeeded = true; + } + + if (promise === value) { + reject(promise, cannotReturnOwn()); + return; + } + } else { + value = detail; + succeeded = true; + } + + if (promise._state !== PENDING) { + // noop + } else if (hasCallback && succeeded) { + resolve(promise, value); + } else if (failed) { + reject(promise, error); + } else if (settled === FULFILLED) { + fulfill(promise, value); + } else if (settled === REJECTED) { + reject(promise, value); + } +} + +function initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + resolve(promise, value); + }, function rejectPromise(reason) { + reject(promise, reason); + }); + } catch (e) { + reject(promise, e); + } +} + +var id = 0; +function nextId() { + return id++; +} + +function makePromise(promise) { + promise[PROMISE_ID] = id++; + promise._state = undefined; + promise._result = undefined; + promise._subscribers = []; +} + +function validationError() { + return new Error('Array Methods must be provided an Array'); +} + +var Enumerator = function () { + function Enumerator(Constructor, input) { + this._instanceConstructor = Constructor; + this.promise = new Constructor(noop); + + if (!this.promise[PROMISE_ID]) { + makePromise(this.promise); + } + + if (isArray(input)) { + this.length = input.length; + this._remaining = input.length; + + this._result = new Array(this.length); + + if (this.length === 0) { + fulfill(this.promise, this._result); + } else { + this.length = this.length || 0; + this._enumerate(input); + if (this._remaining === 0) { + fulfill(this.promise, this._result); + } + } + } else { + reject(this.promise, validationError()); + } + } + + Enumerator.prototype._enumerate = function _enumerate(input) { + for (var i = 0; this._state === PENDING && i < input.length; i++) { + this._eachEntry(input[i], i); + } + }; + + Enumerator.prototype._eachEntry = function _eachEntry(entry, i) { + var c = this._instanceConstructor; + var resolve$$1 = c.resolve; + + + if (resolve$$1 === resolve$1) { + var _then = getThen(entry); + + if (_then === then && entry._state !== PENDING) { + this._settledAt(entry._state, i, entry._result); + } else if (typeof _then !== 'function') { + this._remaining--; + this._result[i] = entry; + } else if (c === Promise$1) { + var promise = new c(noop); + handleMaybeThenable(promise, entry, _then); + this._willSettleAt(promise, i); + } else { + this._willSettleAt(new c(function (resolve$$1) { + return resolve$$1(entry); + }), i); + } + } else { + this._willSettleAt(resolve$$1(entry), i); + } + }; + + Enumerator.prototype._settledAt = function _settledAt(state, i, value) { + var promise = this.promise; + + + if (promise._state === PENDING) { + this._remaining--; + + if (state === REJECTED) { + reject(promise, value); + } else { + this._result[i] = value; + } + } + + if (this._remaining === 0) { + fulfill(promise, this._result); + } + }; + + Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) { + var enumerator = this; + + subscribe(promise, undefined, function (value) { + return enumerator._settledAt(FULFILLED, i, value); + }, function (reason) { + return enumerator._settledAt(REJECTED, i, reason); + }); + }; + + return Enumerator; +}(); + +/** + `Promise.all` accepts an array of promises, and returns a new promise which + is fulfilled with an array of fulfillment values for the passed promises, or + rejected with the reason of the first passed promise to be rejected. It casts all + elements of the passed iterable to promises as it runs this algorithm. + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = resolve(2); + let promise3 = resolve(3); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // The array here would be [ 1, 2, 3 ]; + }); + ``` + + If any of the `promises` given to `all` are rejected, the first promise + that is rejected will be given as an argument to the returned promises's + rejection handler. For example: + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = reject(new Error("2")); + let promise3 = reject(new Error("3")); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // Code here never runs because there are rejected promises! + }, function(error) { + // error.message === "2" + }); + ``` + + @method all + @static + @param {Array} entries array of promises + @param {String} label optional string for labeling the promise. + Useful for tooling. + @return {Promise} promise that is fulfilled when all `promises` have been + fulfilled, or rejected if any of them become rejected. + @static +*/ +function all(entries) { + return new Enumerator(this, entries).promise; +} + +/** + `Promise.race` returns a new promise which is settled in the same way as the + first passed promise to settle. + + Example: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 2'); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // result === 'promise 2' because it was resolved before promise1 + // was resolved. + }); + ``` + + `Promise.race` is deterministic in that only the state of the first + settled promise matters. For example, even if other promises given to the + `promises` array argument are resolved, but the first settled promise has + become rejected before the other promises became fulfilled, the returned + promise will become rejected: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + reject(new Error('promise 2')); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // Code here never runs + }, function(reason){ + // reason.message === 'promise 2' because promise 2 became rejected before + // promise 1 became fulfilled + }); + ``` + + An example real-world use case is implementing timeouts: + + ```javascript + Promise.race([ajax('foo.json'), timeout(5000)]) + ``` + + @method race + @static + @param {Array} promises array of promises to observe + Useful for tooling. + @return {Promise} a promise which settles in the same way as the first passed + promise to settle. +*/ +function race(entries) { + /*jshint validthis:true */ + var Constructor = this; + + if (!isArray(entries)) { + return new Constructor(function (_, reject) { + return reject(new TypeError('You must pass an array to race.')); + }); + } else { + return new Constructor(function (resolve, reject) { + var length = entries.length; + for (var i = 0; i < length; i++) { + Constructor.resolve(entries[i]).then(resolve, reject); + } + }); + } +} + +/** + `Promise.reject` returns a promise rejected with the passed `reason`. + It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + reject(new Error('WHOOPS')); + }); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.reject(new Error('WHOOPS')); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + @method reject + @static + @param {Any} reason value that the returned promise will be rejected with. + Useful for tooling. + @return {Promise} a promise rejected with the given `reason`. +*/ +function reject$1(reason) { + /*jshint validthis:true */ + var Constructor = this; + var promise = new Constructor(noop); + reject(promise, reason); + return promise; +} + +function needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); +} + +function needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); +} + +/** + Promise objects represent the eventual result of an asynchronous operation. The + primary way of interacting with a promise is through its `then` method, which + registers callbacks to receive either a promise's eventual value or the reason + why the promise cannot be fulfilled. + + Terminology + ----------- + + - `promise` is an object or function with a `then` method whose behavior conforms to this specification. + - `thenable` is an object or function that defines a `then` method. + - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). + - `exception` is a value that is thrown using the throw statement. + - `reason` is a value that indicates why a promise was rejected. + - `settled` the final resting state of a promise, fulfilled or rejected. + + A promise can be in one of three states: pending, fulfilled, or rejected. + + Promises that are fulfilled have a fulfillment value and are in the fulfilled + state. Promises that are rejected have a rejection reason and are in the + rejected state. A fulfillment value is never a thenable. + + Promises can also be said to *resolve* a value. If this value is also a + promise, then the original promise's settled state will match the value's + settled state. So a promise that *resolves* a promise that rejects will + itself reject, and a promise that *resolves* a promise that fulfills will + itself fulfill. + + + Basic Usage: + ------------ + + ```js + let promise = new Promise(function(resolve, reject) { + // on success + resolve(value); + + // on failure + reject(reason); + }); + + promise.then(function(value) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Advanced Usage: + --------------- + + Promises shine when abstracting away asynchronous interactions such as + `XMLHttpRequest`s. + + ```js + function getJSON(url) { + return new Promise(function(resolve, reject){ + let xhr = new XMLHttpRequest(); + + xhr.open('GET', url); + xhr.onreadystatechange = handler; + xhr.responseType = 'json'; + xhr.setRequestHeader('Accept', 'application/json'); + xhr.send(); + + function handler() { + if (this.readyState === this.DONE) { + if (this.status === 200) { + resolve(this.response); + } else { + reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); + } + } + }; + }); + } + + getJSON('/posts.json').then(function(json) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Unlike callbacks, promises are great composable primitives. + + ```js + Promise.all([ + getJSON('/posts'), + getJSON('/comments') + ]).then(function(values){ + values[0] // => postsJSON + values[1] // => commentsJSON + + return values; + }); + ``` + + @class Promise + @param {Function} resolver + Useful for tooling. + @constructor +*/ + +var Promise$1 = function () { + function Promise(resolver) { + this[PROMISE_ID] = nextId(); + this._result = this._state = undefined; + this._subscribers = []; + + if (noop !== resolver) { + typeof resolver !== 'function' && needsResolver(); + this instanceof Promise ? initializePromise(this, resolver) : needsNew(); + } + } + + /** + The primary way of interacting with a promise is through its `then` method, + which registers callbacks to receive either a promise's eventual value or the + reason why the promise cannot be fulfilled. + ```js + findUser().then(function(user){ + // user is available + }, function(reason){ + // user is unavailable, and you are given the reason why + }); + ``` + Chaining + -------- + The return value of `then` is itself a promise. This second, 'downstream' + promise is resolved with the return value of the first promise's fulfillment + or rejection handler, or rejected if the handler throws an exception. + ```js + findUser().then(function (user) { + return user.name; + }, function (reason) { + return 'default name'; + }).then(function (userName) { + // If `findUser` fulfilled, `userName` will be the user's name, otherwise it + // will be `'default name'` + }); + findUser().then(function (user) { + throw new Error('Found user, but still unhappy'); + }, function (reason) { + throw new Error('`findUser` rejected and we're unhappy'); + }).then(function (value) { + // never reached + }, function (reason) { + // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. + // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. + }); + ``` + If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. + ```js + findUser().then(function (user) { + throw new PedagogicalException('Upstream error'); + }).then(function (value) { + // never reached + }).then(function (value) { + // never reached + }, function (reason) { + // The `PedgagocialException` is propagated all the way down to here + }); + ``` + Assimilation + ------------ + Sometimes the value you want to propagate to a downstream promise can only be + retrieved asynchronously. This can be achieved by returning a promise in the + fulfillment or rejection handler. The downstream promise will then be pending + until the returned promise is settled. This is called *assimilation*. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // The user's comments are now available + }); + ``` + If the assimliated promise rejects, then the downstream promise will also reject. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // If `findCommentsByAuthor` fulfills, we'll have the value here + }, function (reason) { + // If `findCommentsByAuthor` rejects, we'll have the reason here + }); + ``` + Simple Example + -------------- + Synchronous Example + ```javascript + let result; + try { + result = findResult(); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + findResult(function(result, err){ + if (err) { + // failure + } else { + // success + } + }); + ``` + Promise Example; + ```javascript + findResult().then(function(result){ + // success + }, function(reason){ + // failure + }); + ``` + Advanced Example + -------------- + Synchronous Example + ```javascript + let author, books; + try { + author = findAuthor(); + books = findBooksByAuthor(author); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + function foundBooks(books) { + } + function failure(reason) { + } + findAuthor(function(author, err){ + if (err) { + failure(err); + // failure + } else { + try { + findBoooksByAuthor(author, function(books, err) { + if (err) { + failure(err); + } else { + try { + foundBooks(books); + } catch(reason) { + failure(reason); + } + } + }); + } catch(error) { + failure(err); + } + // success + } + }); + ``` + Promise Example; + ```javascript + findAuthor(). + then(findBooksByAuthor). + then(function(books){ + // found books + }).catch(function(reason){ + // something went wrong + }); + ``` + @method then + @param {Function} onFulfilled + @param {Function} onRejected + Useful for tooling. + @return {Promise} + */ + + /** + `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same + as the catch block of a try/catch statement. + ```js + function findAuthor(){ + throw new Error('couldn't find that author'); + } + // synchronous + try { + findAuthor(); + } catch(reason) { + // something went wrong + } + // async with promises + findAuthor().catch(function(reason){ + // something went wrong + }); + ``` + @method catch + @param {Function} onRejection + Useful for tooling. + @return {Promise} + */ + + + Promise.prototype.catch = function _catch(onRejection) { + return this.then(null, onRejection); + }; + + /** + `finally` will be invoked regardless of the promise's fate just as native + try/catch/finally behaves + + Synchronous example: + + ```js + findAuthor() { + if (Math.random() > 0.5) { + throw new Error(); + } + return new Author(); + } + + try { + return findAuthor(); // succeed or fail + } catch(error) { + return findOtherAuther(); + } finally { + // always runs + // doesn't affect the return value + } + ``` + + Asynchronous example: + + ```js + findAuthor().catch(function(reason){ + return findOtherAuther(); + }).finally(function(){ + // author was either found, or not + }); + ``` + + @method finally + @param {Function} callback + @return {Promise} + */ + + + Promise.prototype.finally = function _finally(callback) { + var promise = this; + var constructor = promise.constructor; + + return promise.then(function (value) { + return constructor.resolve(callback()).then(function () { + return value; + }); + }, function (reason) { + return constructor.resolve(callback()).then(function () { + throw reason; + }); + }); + }; + + return Promise; +}(); + +Promise$1.prototype.then = then; +Promise$1.all = all; +Promise$1.race = race; +Promise$1.resolve = resolve$1; +Promise$1.reject = reject$1; +Promise$1._setScheduler = setScheduler; +Promise$1._setAsap = setAsap; +Promise$1._asap = asap; + +/*global self*/ +function polyfill() { + var local = void 0; + + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + + var P = local.Promise; + + if (P) { + var promiseToString = null; + try { + promiseToString = Object.prototype.toString.call(P.resolve()); + } catch (e) { + // silently ignored + } + + if (promiseToString === '[object Promise]' && !P.cast) { + return; + } + } + + local.Promise = Promise$1; +} + +// Strange compat.. +Promise$1.polyfill = polyfill; +Promise$1.Promise = Promise$1; + +return Promise$1; + +}))); + + + +//# sourceMappingURL=es6-promise.map diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.map b/deps/npm/node_modules/es6-promise/dist/es6-promise.map new file mode 100644 index 00000000000000..bbe71e43fc0e35 --- /dev/null +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.map @@ -0,0 +1 @@ +{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7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AG,IAAI;;ACxYpB;AACA,AAEe,SAAS,QAAQ,GAAG;EACjC,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC;;EAEnB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.js"} \ No newline at end of file diff --git a/deps/npm/node_modules/es6-promise/dist/es6-promise.min.js b/deps/npm/node_modules/es6-promise/dist/es6-promise.min.js new file mode 100644 index 00000000000000..1d9dc4877a573b --- /dev/null +++ b/deps/npm/node_modules/es6-promise/dist/es6-promise.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC;AACvB,IAAI,iBAAiB,GAAG,KAAK,CAAC,CAAC;;AAE/B,AAAO,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EAC7C,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT,IAAI,GAAG,KAAK,CAAC,EAAE;;;;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AAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.min.js"} \ No newline at end of file diff --git a/deps/npm/node_modules/es6-promise/es6-promise.d.ts b/deps/npm/node_modules/es6-promise/es6-promise.d.ts new file mode 100644 index 00000000000000..cce5b36071e6cf --- /dev/null +++ b/deps/npm/node_modules/es6-promise/es6-promise.d.ts @@ -0,0 +1,81 @@ +export interface Thenable { + then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Thenable; + then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => void): Thenable; +} + +export class Promise implements Thenable { + /** + * If you call resolve in the body of the callback passed to the constructor, + * your promise is fulfilled with result object passed to resolve. + * If you call reject your promise is rejected with the object passed to resolve. + * For consistency and debugging (eg stack traces), obj should be an instanceof Error. + * Any errors thrown in the constructor callback will be implicitly passed to reject(). + */ + constructor (callback: (resolve : (value?: R | Thenable) => void, reject: (error?: any) => void) => void); + + /** + * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects. + * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called. + * Both callbacks have a single parameter , the fulfillment value or rejection reason. + * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve. + * If an error is thrown in the callback, the returned promise rejects with that error. + * + * @param onFulfilled called when/if "promise" resolves + * @param onRejected called when/if "promise" rejects + */ + then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Promise; + then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => void): Promise; + + /** + * Sugar for promise.then(undefined, onRejected) + * + * @param onRejected called when/if "promise" rejects + */ + catch (onRejected?: (error: any) => U | Thenable): Promise; + + /** + * onSettled is invoked when/if the "promise" settles (either rejects or fulfills); + * + * @param onFinally called when/if "promise" settles + */ + finally (onFinally?: (callback: any) => U | Thenable): Promise; + + /** + * Make a new promise from the thenable. + * A thenable is promise-like in as far as it has a "then" method. + */ + static resolve (): Promise; + static resolve (value: R | Thenable): Promise; + + /** + * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error + */ + static reject (error: any): Promise; + + /** + * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects. + * the array passed to all can be a mixture of promise-like objects and other objects. + * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value. + */ + static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable, T6 | Thenable, T7 | Thenable, T8 | Thenable, T9 | Thenable, T10 | Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; + static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable, T6 | Thenable, T7 | Thenable, T8 | Thenable, T9 | Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; + static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable, T6 | Thenable, T7 | Thenable, T8 | Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; + static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable, T6 | Thenable, T7 | Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; + static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable, T6 | Thenable]): Promise<[T1, T2, T3, T4, T5, T6]>; + static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable]): Promise<[T1, T2, T3, T4, T5]>; + static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable ]): Promise<[T1, T2, T3, T4]>; + static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable]): Promise<[T1, T2, T3]>; + static all(values: [T1 | Thenable, T2 | Thenable]): Promise<[T1, T2]>; + static all(values: [T1 | Thenable]): Promise<[T1]>; + static all(values: Array>): Promise; + + /** + * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects. + */ + static race (promises: (R | Thenable)[]): Promise; +} + +/** + * The polyfill method will patch the global environment (in this case to the Promise name) when called. + */ +export function polyfill (): void; diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise.auto.js b/deps/npm/node_modules/es6-promise/lib/es6-promise.auto.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise.auto.js rename to deps/npm/node_modules/es6-promise/lib/es6-promise.auto.js diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise.js b/deps/npm/node_modules/es6-promise/lib/es6-promise.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise.js rename to deps/npm/node_modules/es6-promise/lib/es6-promise.js diff --git a/deps/npm/node_modules/es6-promise/lib/es6-promise/-internal.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/-internal.js new file mode 100644 index 00000000000000..925776f55f07a2 --- /dev/null +++ b/deps/npm/node_modules/es6-promise/lib/es6-promise/-internal.js @@ -0,0 +1,266 @@ +import { + objectOrFunction, + isFunction +} from './utils'; + +import { + asap +} from './asap'; + +import originalThen from './then'; +import originalResolve from './promise/resolve'; + +export const PROMISE_ID = Math.random().toString(36).substring(2); + +function noop() {} + +const PENDING = void 0; +const FULFILLED = 1; +const REJECTED = 2; + +const TRY_CATCH_ERROR = { error: null }; + +function selfFulfillment() { + return new TypeError("You cannot resolve a promise with itself"); +} + +function cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); +} + +function getThen(promise) { + try { + return promise.then; + } catch(error) { + TRY_CATCH_ERROR.error = error; + return TRY_CATCH_ERROR; + } +} + +function tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } catch(e) { + return e; + } +} + +function handleForeignThenable(promise, thenable, then) { + asap(promise => { + var sealed = false; + var error = tryThen(then, thenable, value => { + if (sealed) { return; } + sealed = true; + if (thenable !== value) { + resolve(promise, value); + } else { + fulfill(promise, value); + } + }, reason => { + if (sealed) { return; } + sealed = true; + + reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + + if (!sealed && error) { + sealed = true; + reject(promise, error); + } + }, promise); +} + +function handleOwnThenable(promise, thenable) { + if (thenable._state === FULFILLED) { + fulfill(promise, thenable._result); + } else if (thenable._state === REJECTED) { + reject(promise, thenable._result); + } else { + subscribe(thenable, undefined, value => resolve(promise, value), + reason => reject(promise, reason)) + } +} + +function handleMaybeThenable(promise, maybeThenable, then) { + if (maybeThenable.constructor === promise.constructor && + then === originalThen && + maybeThenable.constructor.resolve === originalResolve) { + handleOwnThenable(promise, maybeThenable); + } else { + if (then === TRY_CATCH_ERROR) { + reject(promise, TRY_CATCH_ERROR.error); + TRY_CATCH_ERROR.error = null; + } else if (then === undefined) { + fulfill(promise, maybeThenable); + } else if (isFunction(then)) { + handleForeignThenable(promise, maybeThenable, then); + } else { + fulfill(promise, maybeThenable); + } + } +} + +function resolve(promise, value) { + if (promise === value) { + reject(promise, selfFulfillment()); + } else if (objectOrFunction(value)) { + handleMaybeThenable(promise, value, getThen(value)); + } else { + fulfill(promise, value); + } +} + +function publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + + publish(promise); +} + +function fulfill(promise, value) { + if (promise._state !== PENDING) { return; } + + promise._result = value; + promise._state = FULFILLED; + + if (promise._subscribers.length !== 0) { + asap(publish, promise); + } +} + +function reject(promise, reason) { + if (promise._state !== PENDING) { return; } + promise._state = REJECTED; + promise._result = reason; + + asap(publishRejection, promise); +} + +function subscribe(parent, child, onFulfillment, onRejection) { + let { _subscribers } = parent; + let { length } = _subscribers; + + parent._onerror = null; + + _subscribers[length] = child; + _subscribers[length + FULFILLED] = onFulfillment; + _subscribers[length + REJECTED] = onRejection; + + if (length === 0 && parent._state) { + asap(publish, parent); + } +} + +function publish(promise) { + let subscribers = promise._subscribers; + let settled = promise._state; + + if (subscribers.length === 0) { return; } + + let child, callback, detail = promise._result; + + for (let i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + + if (child) { + invokeCallback(settled, child, callback, detail); + } else { + callback(detail); + } + } + + promise._subscribers.length = 0; +} + + +function tryCatch(callback, detail) { + try { + return callback(detail); + } catch(e) { + TRY_CATCH_ERROR.error = e; + return TRY_CATCH_ERROR; + } +} + +function invokeCallback(settled, promise, callback, detail) { + let hasCallback = isFunction(callback), + value, error, succeeded, failed; + + if (hasCallback) { + value = tryCatch(callback, detail); + + if (value === TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value.error = null; + } else { + succeeded = true; + } + + if (promise === value) { + reject(promise, cannotReturnOwn()); + return; + } + + } else { + value = detail; + succeeded = true; + } + + if (promise._state !== PENDING) { + // noop + } else if (hasCallback && succeeded) { + resolve(promise, value); + } else if (failed) { + reject(promise, error); + } else if (settled === FULFILLED) { + fulfill(promise, value); + } else if (settled === REJECTED) { + reject(promise, value); + } +} + +function initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value){ + resolve(promise, value); + }, function rejectPromise(reason) { + reject(promise, reason); + }); + } catch(e) { + reject(promise, e); + } +} + +let id = 0; +function nextId() { + return id++; +} + +function makePromise(promise) { + promise[PROMISE_ID] = id++; + promise._state = undefined; + promise._result = undefined; + promise._subscribers = []; +} + +export { + nextId, + makePromise, + getThen, + noop, + resolve, + reject, + fulfill, + subscribe, + publish, + publishRejection, + initializePromise, + invokeCallback, + FULFILLED, + REJECTED, + PENDING, + handleMaybeThenable +}; diff --git a/deps/npm/node_modules/es6-promise/lib/es6-promise/asap.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/asap.js new file mode 100644 index 00000000000000..0483201dc944c3 --- /dev/null +++ b/deps/npm/node_modules/es6-promise/lib/es6-promise/asap.js @@ -0,0 +1,119 @@ +let len = 0; +let vertxNext; +let customSchedulerFn; + +export var asap = function asap(callback, arg) { + queue[len] = callback; + queue[len + 1] = arg; + len += 2; + if (len === 2) { + // If len is 2, that means that we need to schedule an async flush. + // If additional callbacks are queued before the queue is flushed, they + // will be processed by this flush that we are scheduling. + if (customSchedulerFn) { + customSchedulerFn(flush); + } else { + scheduleFlush(); + } + } +} + +export function setScheduler(scheduleFn) { + customSchedulerFn = scheduleFn; +} + +export function setAsap(asapFn) { + asap = asapFn; +} + +const browserWindow = (typeof window !== 'undefined') ? window : undefined; +const browserGlobal = browserWindow || {}; +const BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; +const isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + +// test for web worker but not in IE10 +const isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + +// node +function useNextTick() { + // node version 0.10.x displays a deprecation warning when nextTick is used recursively + // see https://github.com/cujojs/when/issues/410 for details + return () => process.nextTick(flush); +} + +// vertx +function useVertxTimer() { + if (typeof vertxNext !== 'undefined') { + return function() { + vertxNext(flush); + }; + } + + return useSetTimeout(); +} + +function useMutationObserver() { + let iterations = 0; + const observer = new BrowserMutationObserver(flush); + const node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + + return () => { + node.data = (iterations = ++iterations % 2); + }; +} + +// web worker +function useMessageChannel() { + const channel = new MessageChannel(); + channel.port1.onmessage = flush; + return () => channel.port2.postMessage(0); +} + +function useSetTimeout() { + // Store setTimeout reference so es6-promise will be unaffected by + // other code modifying setTimeout (like sinon.useFakeTimers()) + const globalSetTimeout = setTimeout; + return () => globalSetTimeout(flush, 1); +} + +const queue = new Array(1000); +function flush() { + for (let i = 0; i < len; i+=2) { + let callback = queue[i]; + let arg = queue[i+1]; + + callback(arg); + + queue[i] = undefined; + queue[i+1] = undefined; + } + + len = 0; +} + +function attemptVertx() { + try { + const vertx = Function('return this')().require('vertx'); + vertxNext = vertx.runOnLoop || vertx.runOnContext; + return useVertxTimer(); + } catch(e) { + return useSetTimeout(); + } +} + +let scheduleFlush; +// Decide what async method to use to triggering processing of queued callbacks: +if (isNode) { + scheduleFlush = useNextTick(); +} else if (BrowserMutationObserver) { + scheduleFlush = useMutationObserver(); +} else if (isWorker) { + scheduleFlush = useMessageChannel(); +} else if (browserWindow === undefined && typeof require === 'function') { + scheduleFlush = attemptVertx(); +} else { + scheduleFlush = useSetTimeout(); +} diff --git a/deps/npm/node_modules/es6-promise/lib/es6-promise/enumerator.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/enumerator.js new file mode 100644 index 00000000000000..b0eaa9300eb06c --- /dev/null +++ b/deps/npm/node_modules/es6-promise/lib/es6-promise/enumerator.js @@ -0,0 +1,113 @@ +import { + isArray, + isMaybeThenable +} from './utils'; +import { + noop, + reject, + fulfill, + subscribe, + FULFILLED, + REJECTED, + PENDING, + getThen, + handleMaybeThenable +} from './-internal'; + +import then from './then'; +import Promise from './promise'; +import originalResolve from './promise/resolve'; +import originalThen from './then'; +import { makePromise, PROMISE_ID } from './-internal'; + +function validationError() { + return new Error('Array Methods must be provided an Array'); +}; + +export default class Enumerator { + constructor(Constructor, input) { + this._instanceConstructor = Constructor; + this.promise = new Constructor(noop); + + if (!this.promise[PROMISE_ID]) { + makePromise(this.promise); + } + + if (isArray(input)) { + this.length = input.length; + this._remaining = input.length; + + this._result = new Array(this.length); + + if (this.length === 0) { + fulfill(this.promise, this._result); + } else { + this.length = this.length || 0; + this._enumerate(input); + if (this._remaining === 0) { + fulfill(this.promise, this._result); + } + } + } else { + reject(this.promise, validationError()); + } + } + _enumerate(input) { + for (let i = 0; this._state === PENDING && i < input.length; i++) { + this._eachEntry(input[i], i); + } + } + + _eachEntry(entry, i) { + let c = this._instanceConstructor; + let { resolve } = c; + + if (resolve === originalResolve) { + let then = getThen(entry); + + if (then === originalThen && + entry._state !== PENDING) { + this._settledAt(entry._state, i, entry._result); + } else if (typeof then !== 'function') { + this._remaining--; + this._result[i] = entry; + } else if (c === Promise) { + let promise = new c(noop); + handleMaybeThenable(promise, entry, then); + this._willSettleAt(promise, i); + } else { + this._willSettleAt(new c(resolve => resolve(entry)), i); + } + } else { + this._willSettleAt(resolve(entry), i); + } + } + + _settledAt(state, i, value) { + let { promise } = this; + + if (promise._state === PENDING) { + this._remaining--; + + if (state === REJECTED) { + reject(promise, value); + } else { + this._result[i] = value; + } + } + + if (this._remaining === 0) { + fulfill(promise, this._result); + } + } + + _willSettleAt(promise, i) { + let enumerator = this; + + subscribe( + promise, undefined, + value => enumerator._settledAt(FULFILLED, i, value), + reason => enumerator._settledAt(REJECTED, i, reason) + ); + } +}; diff --git a/deps/npm/node_modules/es6-promise/lib/es6-promise/polyfill.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/polyfill.js new file mode 100644 index 00000000000000..30db73c9d01365 --- /dev/null +++ b/deps/npm/node_modules/es6-promise/lib/es6-promise/polyfill.js @@ -0,0 +1,35 @@ +/*global self*/ +import Promise from './promise'; + +export default function polyfill() { + let local; + + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + + let P = local.Promise; + + if (P) { + var promiseToString = null; + try { + promiseToString = Object.prototype.toString.call(P.resolve()); + } catch(e) { + // silently ignored + } + + if (promiseToString === '[object Promise]' && !P.cast){ + return; + } + } + + local.Promise = Promise; +} diff --git a/deps/npm/node_modules/es6-promise/lib/es6-promise/promise.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/promise.js new file mode 100644 index 00000000000000..8d8f829c5e5198 --- /dev/null +++ b/deps/npm/node_modules/es6-promise/lib/es6-promise/promise.js @@ -0,0 +1,426 @@ +import { + isFunction +} from './utils'; +import { + noop, + nextId, + PROMISE_ID, + initializePromise +} from './-internal'; +import { + asap, + setAsap, + setScheduler +} from './asap'; + +import all from './promise/all'; +import race from './promise/race'; +import Resolve from './promise/resolve'; +import Reject from './promise/reject'; +import then from './then'; + +function needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); +} + +function needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); +} + +/** + Promise objects represent the eventual result of an asynchronous operation. The + primary way of interacting with a promise is through its `then` method, which + registers callbacks to receive either a promise's eventual value or the reason + why the promise cannot be fulfilled. + + Terminology + ----------- + + - `promise` is an object or function with a `then` method whose behavior conforms to this specification. + - `thenable` is an object or function that defines a `then` method. + - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). + - `exception` is a value that is thrown using the throw statement. + - `reason` is a value that indicates why a promise was rejected. + - `settled` the final resting state of a promise, fulfilled or rejected. + + A promise can be in one of three states: pending, fulfilled, or rejected. + + Promises that are fulfilled have a fulfillment value and are in the fulfilled + state. Promises that are rejected have a rejection reason and are in the + rejected state. A fulfillment value is never a thenable. + + Promises can also be said to *resolve* a value. If this value is also a + promise, then the original promise's settled state will match the value's + settled state. So a promise that *resolves* a promise that rejects will + itself reject, and a promise that *resolves* a promise that fulfills will + itself fulfill. + + + Basic Usage: + ------------ + + ```js + let promise = new Promise(function(resolve, reject) { + // on success + resolve(value); + + // on failure + reject(reason); + }); + + promise.then(function(value) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Advanced Usage: + --------------- + + Promises shine when abstracting away asynchronous interactions such as + `XMLHttpRequest`s. + + ```js + function getJSON(url) { + return new Promise(function(resolve, reject){ + let xhr = new XMLHttpRequest(); + + xhr.open('GET', url); + xhr.onreadystatechange = handler; + xhr.responseType = 'json'; + xhr.setRequestHeader('Accept', 'application/json'); + xhr.send(); + + function handler() { + if (this.readyState === this.DONE) { + if (this.status === 200) { + resolve(this.response); + } else { + reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); + } + } + }; + }); + } + + getJSON('/posts.json').then(function(json) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Unlike callbacks, promises are great composable primitives. + + ```js + Promise.all([ + getJSON('/posts'), + getJSON('/comments') + ]).then(function(values){ + values[0] // => postsJSON + values[1] // => commentsJSON + + return values; + }); + ``` + + @class Promise + @param {Function} resolver + Useful for tooling. + @constructor +*/ + +class Promise { + constructor(resolver) { + this[PROMISE_ID] = nextId(); + this._result = this._state = undefined; + this._subscribers = []; + + if (noop !== resolver) { + typeof resolver !== 'function' && needsResolver(); + this instanceof Promise ? initializePromise(this, resolver) : needsNew(); + } + } + + /** + The primary way of interacting with a promise is through its `then` method, + which registers callbacks to receive either a promise's eventual value or the + reason why the promise cannot be fulfilled. + + ```js + findUser().then(function(user){ + // user is available + }, function(reason){ + // user is unavailable, and you are given the reason why + }); + ``` + + Chaining + -------- + + The return value of `then` is itself a promise. This second, 'downstream' + promise is resolved with the return value of the first promise's fulfillment + or rejection handler, or rejected if the handler throws an exception. + + ```js + findUser().then(function (user) { + return user.name; + }, function (reason) { + return 'default name'; + }).then(function (userName) { + // If `findUser` fulfilled, `userName` will be the user's name, otherwise it + // will be `'default name'` + }); + + findUser().then(function (user) { + throw new Error('Found user, but still unhappy'); + }, function (reason) { + throw new Error('`findUser` rejected and we're unhappy'); + }).then(function (value) { + // never reached + }, function (reason) { + // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. + // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. + }); + ``` + If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. + + ```js + findUser().then(function (user) { + throw new PedagogicalException('Upstream error'); + }).then(function (value) { + // never reached + }).then(function (value) { + // never reached + }, function (reason) { + // The `PedgagocialException` is propagated all the way down to here + }); + ``` + + Assimilation + ------------ + + Sometimes the value you want to propagate to a downstream promise can only be + retrieved asynchronously. This can be achieved by returning a promise in the + fulfillment or rejection handler. The downstream promise will then be pending + until the returned promise is settled. This is called *assimilation*. + + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // The user's comments are now available + }); + ``` + + If the assimliated promise rejects, then the downstream promise will also reject. + + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // If `findCommentsByAuthor` fulfills, we'll have the value here + }, function (reason) { + // If `findCommentsByAuthor` rejects, we'll have the reason here + }); + ``` + + Simple Example + -------------- + + Synchronous Example + + ```javascript + let result; + + try { + result = findResult(); + // success + } catch(reason) { + // failure + } + ``` + + Errback Example + + ```js + findResult(function(result, err){ + if (err) { + // failure + } else { + // success + } + }); + ``` + + Promise Example; + + ```javascript + findResult().then(function(result){ + // success + }, function(reason){ + // failure + }); + ``` + + Advanced Example + -------------- + + Synchronous Example + + ```javascript + let author, books; + + try { + author = findAuthor(); + books = findBooksByAuthor(author); + // success + } catch(reason) { + // failure + } + ``` + + Errback Example + + ```js + + function foundBooks(books) { + + } + + function failure(reason) { + + } + + findAuthor(function(author, err){ + if (err) { + failure(err); + // failure + } else { + try { + findBoooksByAuthor(author, function(books, err) { + if (err) { + failure(err); + } else { + try { + foundBooks(books); + } catch(reason) { + failure(reason); + } + } + }); + } catch(error) { + failure(err); + } + // success + } + }); + ``` + + Promise Example; + + ```javascript + findAuthor(). + then(findBooksByAuthor). + then(function(books){ + // found books + }).catch(function(reason){ + // something went wrong + }); + ``` + + @method then + @param {Function} onFulfilled + @param {Function} onRejected + Useful for tooling. + @return {Promise} + */ + + /** + `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same + as the catch block of a try/catch statement. + + ```js + function findAuthor(){ + throw new Error('couldn't find that author'); + } + + // synchronous + try { + findAuthor(); + } catch(reason) { + // something went wrong + } + + // async with promises + findAuthor().catch(function(reason){ + // something went wrong + }); + ``` + + @method catch + @param {Function} onRejection + Useful for tooling. + @return {Promise} + */ + catch(onRejection) { + return this.then(null, onRejection); + } + +/** + `finally` will be invoked regardless of the promise's fate just as native + try/catch/finally behaves + + Synchronous example: + + ```js + findAuthor() { + if (Math.random() > 0.5) { + throw new Error(); + } + return new Author(); + } + + try { + return findAuthor(); // succeed or fail + } catch(error) { + return findOtherAuther(); + } finally { + // always runs + // doesn't affect the return value + } + ``` + + Asynchronous example: + + ```js + findAuthor().catch(function(reason){ + return findOtherAuther(); + }).finally(function(){ + // author was either found, or not + }); + ``` + + @method finally + @param {Function} callback + @return {Promise} +*/ + finally(callback) { + let promise = this; + let constructor = promise.constructor; + + return promise.then(value => constructor.resolve(callback()).then(() => value), + reason => constructor.resolve(callback()).then(() => { throw reason; })); + } +} + +Promise.prototype.then = then; +export default Promise; +Promise.all = all; +Promise.race = race; +Promise.resolve = Resolve; +Promise.reject = Reject; +Promise._setScheduler = setScheduler; +Promise._setAsap = setAsap; +Promise._asap = asap; diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/all.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/promise/all.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/all.js rename to deps/npm/node_modules/es6-promise/lib/es6-promise/promise/all.js diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/race.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/promise/race.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/race.js rename to deps/npm/node_modules/es6-promise/lib/es6-promise/promise/race.js diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/reject.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/promise/reject.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/reject.js rename to deps/npm/node_modules/es6-promise/lib/es6-promise/promise/reject.js diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/resolve.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/promise/resolve.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/resolve.js rename to deps/npm/node_modules/es6-promise/lib/es6-promise/promise/resolve.js diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/then.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/then.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/then.js rename to deps/npm/node_modules/es6-promise/lib/es6-promise/then.js diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/utils.js b/deps/npm/node_modules/es6-promise/lib/es6-promise/utils.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/utils.js rename to deps/npm/node_modules/es6-promise/lib/es6-promise/utils.js diff --git a/deps/npm/node_modules/es6-promise/package.json b/deps/npm/node_modules/es6-promise/package.json new file mode 100644 index 00000000000000..5fe4bcbbfb3291 --- /dev/null +++ b/deps/npm/node_modules/es6-promise/package.json @@ -0,0 +1,104 @@ +{ + "_from": "es6-promise@^4.0.3", + "_id": "es6-promise@4.2.4", + "_inBundle": false, + "_integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==", + "_location": "/es6-promise", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "es6-promise@^4.0.3", + "name": "es6-promise", + "escapedName": "es6-promise", + "rawSpec": "^4.0.3", + "saveSpec": null, + "fetchSpec": "^4.0.3" + }, + "_requiredBy": [ + "/es6-promisify" + ], + "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", + "_shasum": "dc4221c2b16518760bd8c39a52d8f356fc00ed29", + "_spec": "es6-promise@^4.0.3", + "_where": "/Users/rebecca/code/npm/node_modules/es6-promisify", + "author": { + "name": "Yehuda Katz, Tom Dale, Stefan Penner and contributors", + "url": "Conversion to ES6 API by Jake Archibald" + }, + "browser": { + "vertx": false + }, + "bugs": { + "url": "https://github.com/stefanpenner/es6-promise/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "A lightweight library that provides tools for organizing asynchronous code", + "devDependencies": { + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-constants": "^6.1.4", + "babel-plugin-transform-es2015-destructuring": "^6.23.0", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel6-plugin-strip-class-callcheck": "^6.0.0", + "broccoli-babel-transpiler": "^6.0.0", + "broccoli-concat": "^3.1.0", + "broccoli-merge-trees": "^2.0.0", + "broccoli-rollup": "^2.0.0", + "broccoli-stew": "^1.5.0", + "broccoli-uglify-js": "^0.2.0", + "broccoli-watchify": "^1.0.1", + "ember-cli": "2.18.0-beta.2", + "ember-cli-dependency-checker": "^2.1.0", + "git-repo-version": "1.0.1", + "json3": "^3.3.2", + "mocha": "^4.0.1", + "promises-aplus-tests-phantom": "^2.1.0-revise" + }, + "directories": { + "lib": "lib" + }, + "files": [ + "dist", + "lib", + "es6-promise.d.ts", + "auto.js", + "!dist/test" + ], + "homepage": "https://github.com/stefanpenner/es6-promise#readme", + "keywords": [ + "promises", + "promise", + "polyfill", + "futures" + ], + "license": "MIT", + "main": "dist/es6-promise.js", + "name": "es6-promise", + "namespace": "es6-promise", + "repository": { + "type": "git", + "url": "git://github.com/stefanpenner/es6-promise.git" + }, + "scripts": { + "build": "ember build --environment production", + "prepublishOnly": "ember build --environment production", + "start": "ember s", + "test": "ember test", + "test:browser": "ember test --launch PhantomJS", + "test:node": "ember test --launch Mocha", + "test:server": "ember test --server" + }, + "spm": { + "main": "dist/es6-promise.js" + }, + "typings": "es6-promise.d.ts", + "version": "4.2.4" +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/README.md b/deps/npm/node_modules/es6-promisify/README.md similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/README.md rename to deps/npm/node_modules/es6-promisify/README.md diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promise.js b/deps/npm/node_modules/es6-promisify/dist/promise.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promise.js rename to deps/npm/node_modules/es6-promisify/dist/promise.js diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promisify.js b/deps/npm/node_modules/es6-promisify/dist/promisify.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promisify.js rename to deps/npm/node_modules/es6-promisify/dist/promisify.js diff --git a/deps/npm/node_modules/es6-promisify/package.json b/deps/npm/node_modules/es6-promisify/package.json new file mode 100644 index 00000000000000..c66b9667f641b5 --- /dev/null +++ b/deps/npm/node_modules/es6-promisify/package.json @@ -0,0 +1,72 @@ +{ + "_from": "es6-promisify@^5.0.0", + "_id": "es6-promisify@5.0.0", + "_inBundle": false, + "_integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "_location": "/es6-promisify", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "es6-promisify@^5.0.0", + "name": "es6-promisify", + "escapedName": "es6-promisify", + "rawSpec": "^5.0.0", + "saveSpec": null, + "fetchSpec": "^5.0.0" + }, + "_requiredBy": [ + "/agent-base" + ], + "_resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "_shasum": "5109d62f3e56ea967c4b63505aef08291c8a5203", + "_spec": "es6-promisify@^5.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/agent-base", + "author": { + "name": "Mike Hall", + "email": "mikehall314@gmail.com" + }, + "bugs": { + "url": "http://github.com/digitaldesignlabs/es6-promisify/issues" + }, + "bundleDependencies": false, + "dependencies": { + "es6-promise": "^4.0.3" + }, + "deprecated": false, + "description": "Converts callback-based functions to ES6 Promises", + "devDependencies": { + "babel-preset-es2015": "^6.9.0", + "eslint": "^2.13.1", + "gulp": "^3.9.1", + "gulp-babel": "^6.1.2", + "nodeunit": "^0.10.0" + }, + "files": [ + "dist/promisify.js", + "dist/promise.js" + ], + "greenkeeper": { + "ignore": [ + "eslint" + ] + }, + "homepage": "https://github.com/digitaldesignlabs/es6-promisify#readme", + "keywords": [ + "promises", + "es6", + "promisify" + ], + "license": "MIT", + "main": "dist/promisify.js", + "name": "es6-promisify", + "repository": { + "type": "git", + "url": "git+https://github.com/digitaldesignlabs/es6-promisify.git" + }, + "scripts": { + "pretest": "./node_modules/eslint/bin/eslint.js ./lib/*.js ./tests/*.js", + "test": "gulp && nodeunit tests" + }, + "version": "5.0.0" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/chalk/node_modules/escape-string-regexp/index.js b/deps/npm/node_modules/escape-string-regexp/index.js similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/chalk/node_modules/escape-string-regexp/index.js rename to deps/npm/node_modules/escape-string-regexp/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/license b/deps/npm/node_modules/escape-string-regexp/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/license rename to deps/npm/node_modules/escape-string-regexp/license diff --git a/deps/npm/node_modules/escape-string-regexp/package.json b/deps/npm/node_modules/escape-string-regexp/package.json new file mode 100644 index 00000000000000..154bce30d98f5f --- /dev/null +++ b/deps/npm/node_modules/escape-string-regexp/package.json @@ -0,0 +1,84 @@ +{ + "_from": "escape-string-regexp@^1.0.5", + "_id": "escape-string-regexp@1.0.5", + "_inBundle": false, + "_integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "_location": "/escape-string-regexp", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "escape-string-regexp@^1.0.5", + "name": "escape-string-regexp", + "escapedName": "escape-string-regexp", + "rawSpec": "^1.0.5", + "saveSpec": null, + "fetchSpec": "^1.0.5" + }, + "_requiredBy": [ + "/babel-code-frame/chalk", + "/chalk", + "/figures", + "/tap-mocha-reporter" + ], + "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "_shasum": "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4", + "_spec": "escape-string-regexp@^1.0.5", + "_where": "/Users/rebecca/code/npm/node_modules/chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/escape-string-regexp/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Escape RegExp special characters", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", + "keywords": [ + "escape", + "regex", + "regexp", + "re", + "regular", + "expression", + "string", + "str", + "special", + "characters" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + } + ], + "name": "escape-string-regexp", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.5" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/chalk/node_modules/escape-string-regexp/readme.md b/deps/npm/node_modules/escape-string-regexp/readme.md similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/chalk/node_modules/escape-string-regexp/readme.md rename to deps/npm/node_modules/escape-string-regexp/readme.md diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/index.js b/deps/npm/node_modules/execa/index.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/index.js rename to deps/npm/node_modules/execa/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/errname.js b/deps/npm/node_modules/execa/lib/errname.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/errname.js rename to deps/npm/node_modules/execa/lib/errname.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/stdio.js b/deps/npm/node_modules/execa/lib/stdio.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/stdio.js rename to deps/npm/node_modules/execa/lib/stdio.js diff --git a/deps/npm/node_modules/strip-ansi/node_modules/ansi-regex/license b/deps/npm/node_modules/execa/license similarity index 100% rename from deps/npm/node_modules/strip-ansi/node_modules/ansi-regex/license rename to deps/npm/node_modules/execa/license diff --git a/deps/npm/node_modules/execa/package.json b/deps/npm/node_modules/execa/package.json new file mode 100644 index 00000000000000..632267d116cbc4 --- /dev/null +++ b/deps/npm/node_modules/execa/package.json @@ -0,0 +1,109 @@ +{ + "_from": "execa@^0.7.0", + "_id": "execa@0.7.0", + "_inBundle": false, + "_integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "_location": "/execa", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "execa@^0.7.0", + "name": "execa", + "escapedName": "execa", + "rawSpec": "^0.7.0", + "saveSpec": null, + "fetchSpec": "^0.7.0" + }, + "_requiredBy": [ + "/os-locale", + "/term-size" + ], + "_resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "_shasum": "944becd34cc41ee32a63a9faf27ad5a65fc59777", + "_spec": "execa@^0.7.0", + "_where": "/Users/rebecca/code/npm/node_modules/term-size", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/execa/issues" + }, + "bundleDependencies": false, + "dependencies": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "deprecated": false, + "description": "A better `child_process`", + "devDependencies": { + "ava": "*", + "cat-names": "^1.0.2", + "coveralls": "^2.11.9", + "delay": "^2.0.0", + "is-running": "^2.0.0", + "nyc": "^11.0.2", + "tempfile": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/sindresorhus/execa#readme", + "keywords": [ + "exec", + "child", + "process", + "execute", + "fork", + "execfile", + "spawn", + "file", + "shell", + "bin", + "binary", + "binaries", + "npm", + "path", + "local" + ], + "license": "MIT", + "maintainers": [ + { + "name": "James Talmage", + "email": "james@talmage.io", + "url": "github.com/jamestalmage" + } + ], + "name": "execa", + "nyc": { + "reporter": [ + "text", + "lcov" + ], + "exclude": [ + "**/fixtures/**", + "**/test.js", + "**/test/**" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/execa.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "0.7.0" +} diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/readme.md b/deps/npm/node_modules/execa/readme.md similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/readme.md rename to deps/npm/node_modules/execa/readme.md diff --git a/deps/npm/node_modules/request/node_modules/extend/.jscs.json b/deps/npm/node_modules/extend/.jscs.json similarity index 99% rename from deps/npm/node_modules/request/node_modules/extend/.jscs.json rename to deps/npm/node_modules/extend/.jscs.json index 0284c86daafec3..b1c6a99f9723ae 100644 --- a/deps/npm/node_modules/request/node_modules/extend/.jscs.json +++ b/deps/npm/node_modules/extend/.jscs.json @@ -172,4 +172,3 @@ "requireUseStrict": true } - diff --git a/deps/npm/node_modules/request/node_modules/extend/.npmignore b/deps/npm/node_modules/extend/.npmignore similarity index 100% rename from deps/npm/node_modules/request/node_modules/extend/.npmignore rename to deps/npm/node_modules/extend/.npmignore diff --git a/deps/npm/node_modules/request/node_modules/extend/.travis.yml b/deps/npm/node_modules/extend/.travis.yml similarity index 100% rename from deps/npm/node_modules/request/node_modules/extend/.travis.yml rename to deps/npm/node_modules/extend/.travis.yml diff --git a/deps/npm/node_modules/extend/CHANGELOG.md b/deps/npm/node_modules/extend/CHANGELOG.md new file mode 100644 index 00000000000000..7d2e5f3a50bd91 --- /dev/null +++ b/deps/npm/node_modules/extend/CHANGELOG.md @@ -0,0 +1,76 @@ +3.0.1 / 2017-04-27 +================== + * [Fix] deep extending should work with a non-object (#46) + * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config` + * [Tests] up to `node` `v7.9`, `v6.10`, `v4.8`; improve matrix + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. + * [Docs] Add example to readme (#34) + +3.0.0 / 2015-07-01 +================== + * [Possible breaking change] Use global "strict" directive (#32) + * [Tests] `int` is an ES3 reserved word + * [Tests] Test up to `io.js` `v2.3` + * [Tests] Add `npm run eslint` + * [Dev Deps] Update `covert`, `jscs` + +2.0.1 / 2015-04-25 +================== + * Use an inline `isArray` check, for ES3 browsers. (#27) + * Some old browsers fail when an identifier is `toString` + * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds + * Add license info to package.json (#25) + * Update `tape`, `jscs` + * Adding a CHANGELOG + +2.0.0 / 2014-10-01 +================== + * Increase code coverage to 100%; run code coverage as part of tests + * Add `npm run lint`; Run linter as part of tests + * Remove nodeType and setInterval checks in isPlainObject + * Updating `tape`, `jscs`, `covert` + * General style and README cleanup + +1.3.0 / 2014-06-20 +================== + * Add component.json for browser support (#18) + * Use SVG for badges in README (#16) + * Updating `tape`, `covert` + * Updating travis-ci to work with multiple node versions + * Fix `deep === false` bug (returning target as {}) (#14) + * Fixing constructor checks in isPlainObject + * Adding additional test coverage + * Adding `npm run coverage` + * Add LICENSE (#13) + * Adding a warning about `false`, per #11 + * General style and whitespace cleanup + +1.2.1 / 2013-09-14 +================== + * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8 + * Updating `tape` + +1.2.0 / 2013-09-02 +================== + * Updating the README: add badges + * Adding a missing variable reference. + * Using `tape` instead of `buster` for tests; add more tests (#7) + * Adding node 0.10 to Travis CI (#6) + * Enabling "npm test" and cleaning up package.json (#5) + * Add Travis CI. + +1.1.3 / 2012-12-06 +================== + * Added unit tests. + * Ensure extend function is named. (Looks nicer in a stack trace.) + * README cleanup. + +1.1.1 / 2012-11-07 +================== + * README cleanup. + * Added installation instructions. + * Added a missing semicolon + +1.0.0 / 2012-04-08 +================== + * Initial commit diff --git a/deps/npm/node_modules/extend/LICENSE b/deps/npm/node_modules/extend/LICENSE new file mode 100644 index 00000000000000..92d41503d32ec1 --- /dev/null +++ b/deps/npm/node_modules/extend/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 Stefan Thomas + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/extend/README.md b/deps/npm/node_modules/extend/README.md new file mode 100644 index 00000000000000..947dda6aeb9640 --- /dev/null +++ b/deps/npm/node_modules/extend/README.md @@ -0,0 +1,80 @@ +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] + +# extend() for Node.js [![Version Badge][npm-version-png]][npm-url] + +`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true. + +Notes: + +* Since Node.js >= 4, + [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) + now offers the same functionality natively (but without the "deep copy" option). + See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6). +* Some native implementations of `Object.assign` in both Node.js and many + browsers (since NPM modules are for the browser too) may not be fully + spec-compliant. + Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for + a compliant candidate. + +## Installation + +This package is available on [npm][npm-url] as: `extend` + +``` sh +npm install extend +``` + +## Usage + +**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)** + +*Extend one object with one or more others, returning the modified object.* + +**Example:** + +``` js +var extend = require('extend'); +extend(targetObject, object1, object2); +``` + +Keep in mind that the target object will be modified, and will be returned from extend(). + +If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s). +Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over. +Warning: passing `false` as the first argument is not supported. + +### Arguments + +* `deep` *Boolean* (optional) +If set, the merge becomes recursive (i.e. deep copy). +* `target` *Object* +The object to extend. +* `object1` *Object* +The object that will be merged into the first. +* `objectN` *Object* (Optional) +More objects to merge into the first. + +## License + +`node-extend` is licensed under the [MIT License][mit-license-url]. + +## Acknowledgements + +All credit to the jQuery authors for perfecting this amazing utility. + +Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb]. + +[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg +[travis-url]: https://travis-ci.org/justmoon/node-extend +[npm-url]: https://npmjs.org/package/extend +[mit-license-url]: http://opensource.org/licenses/MIT +[github-justmoon]: https://github.com/justmoon +[github-insin]: https://github.com/insin +[github-ljharb]: https://github.com/ljharb +[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg +[deps-svg]: https://david-dm.org/justmoon/node-extend.svg +[deps-url]: https://david-dm.org/justmoon/node-extend +[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg +[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies diff --git a/deps/npm/node_modules/extend/component.json b/deps/npm/node_modules/extend/component.json new file mode 100644 index 00000000000000..0f76b59305b7bc --- /dev/null +++ b/deps/npm/node_modules/extend/component.json @@ -0,0 +1,31 @@ +{ + "name": "extend", + "author": "Stefan Thomas (http://www.justmoon.net)", + "version": "3.0.0", + "description": "Port of jQuery.extend for node.js and the browser.", + "scripts": [ + "index.js" + ], + "contributors": [ + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "keywords": [ + "extend", + "clone", + "merge" + ], + "repository" : { + "type": "git", + "url": "https://github.com/justmoon/node-extend.git" + }, + "dependencies": { + }, + "devDependencies": { + "tape" : "~3.0.0", + "covert": "~0.4.0", + "jscs": "~1.6.2" + } +} diff --git a/deps/npm/node_modules/request/node_modules/extend/index.js b/deps/npm/node_modules/extend/index.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/extend/index.js rename to deps/npm/node_modules/extend/index.js diff --git a/deps/npm/node_modules/extend/package.json b/deps/npm/node_modules/extend/package.json new file mode 100644 index 00000000000000..fe23ab65bb3536 --- /dev/null +++ b/deps/npm/node_modules/extend/package.json @@ -0,0 +1,75 @@ +{ + "_from": "extend@~3.0.1", + "_id": "extend@3.0.1", + "_inBundle": false, + "_integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "_location": "/extend", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "extend@~3.0.1", + "name": "extend", + "escapedName": "extend", + "rawSpec": "~3.0.1", + "saveSpec": null, + "fetchSpec": "~3.0.1" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "_shasum": "a755ea7bc1adfcc5a31ce7e762dbaadc5e636444", + "_spec": "extend@~3.0.1", + "_where": "/Users/rebecca/code/npm/node_modules/request", + "author": { + "name": "Stefan Thomas", + "email": "justmoon@members.fsf.org", + "url": "http://www.justmoon.net" + }, + "bugs": { + "url": "https://github.com/justmoon/node-extend/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Port of jQuery.extend for node.js and the browser", + "devDependencies": { + "@ljharb/eslint-config": "^11.0.0", + "covert": "^1.1.0", + "eslint": "^3.19.0", + "jscs": "^3.0.7", + "tape": "^4.6.3" + }, + "homepage": "https://github.com/justmoon/node-extend#readme", + "keywords": [ + "extend", + "clone", + "merge" + ], + "license": "MIT", + "main": "index", + "name": "extend", + "repository": { + "type": "git", + "url": "git+https://github.com/justmoon/node-extend.git" + }, + "scripts": { + "coverage": "covert test/index.js", + "coverage-quiet": "covert test/index.js --quiet", + "eslint": "eslint *.js */*.js", + "jscs": "jscs *.js */*.js", + "lint": "npm run jscs && npm run eslint", + "posttest": "npm run coverage-quiet", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "node test" + }, + "version": "3.0.1" +} diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/.gitmodules b/deps/npm/node_modules/extsprintf/.gitmodules similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/.gitmodules rename to deps/npm/node_modules/extsprintf/.gitmodules diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/.npmignore b/deps/npm/node_modules/extsprintf/.npmignore similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/.npmignore rename to deps/npm/node_modules/extsprintf/.npmignore diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/LICENSE b/deps/npm/node_modules/extsprintf/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/LICENSE rename to deps/npm/node_modules/extsprintf/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/Makefile b/deps/npm/node_modules/extsprintf/Makefile similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/Makefile rename to deps/npm/node_modules/extsprintf/Makefile diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/Makefile.targ b/deps/npm/node_modules/extsprintf/Makefile.targ similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/Makefile.targ rename to deps/npm/node_modules/extsprintf/Makefile.targ diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/README.md b/deps/npm/node_modules/extsprintf/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/README.md rename to deps/npm/node_modules/extsprintf/README.md diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/jsl.node.conf b/deps/npm/node_modules/extsprintf/jsl.node.conf similarity index 99% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/jsl.node.conf rename to deps/npm/node_modules/extsprintf/jsl.node.conf index 03f787ffbdee4e..eabe9650f5e489 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/jsl.node.conf +++ b/deps/npm/node_modules/extsprintf/jsl.node.conf @@ -1,5 +1,5 @@ # -# Configuration File for JavaScript Lint +# Configuration File for JavaScript Lint # # This configuration file can be used to lint a collection of scripts, or to enable # or disable warnings for scripts that are linted via the command line. @@ -134,4 +134,3 @@ # To add a set of files, use "+process FileName", "+process Folder\Path\*.js", # or "+process Folder\Path\*.htm". # - diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/lib/extsprintf.js b/deps/npm/node_modules/extsprintf/lib/extsprintf.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/lib/extsprintf.js rename to deps/npm/node_modules/extsprintf/lib/extsprintf.js diff --git a/deps/npm/node_modules/extsprintf/package.json b/deps/npm/node_modules/extsprintf/package.json new file mode 100644 index 00000000000000..c96db9bb20c3d9 --- /dev/null +++ b/deps/npm/node_modules/extsprintf/package.json @@ -0,0 +1,44 @@ +{ + "_from": "extsprintf@1.3.0", + "_id": "extsprintf@1.3.0", + "_inBundle": false, + "_integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "_location": "/extsprintf", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "extsprintf@1.3.0", + "name": "extsprintf", + "escapedName": "extsprintf", + "rawSpec": "1.3.0", + "saveSpec": null, + "fetchSpec": "1.3.0" + }, + "_requiredBy": [ + "/jsprim", + "/verror" + ], + "_resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "_shasum": "96918440e3041a7a414f8c52e3c574eb3c3e1e05", + "_spec": "extsprintf@1.3.0", + "_where": "/Users/rebecca/code/npm/node_modules/jsprim", + "bugs": { + "url": "https://github.com/davepacheco/node-extsprintf/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "extended POSIX-style sprintf", + "engines": [ + "node >=0.6.0" + ], + "homepage": "https://github.com/davepacheco/node-extsprintf#readme", + "license": "MIT", + "main": "./lib/extsprintf.js", + "name": "extsprintf", + "repository": { + "type": "git", + "url": "git://github.com/davepacheco/node-extsprintf.git" + }, + "version": "1.3.0" +} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/LICENSE b/deps/npm/node_modules/fast-deep-equal/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/LICENSE rename to deps/npm/node_modules/fast-deep-equal/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/README.md b/deps/npm/node_modules/fast-deep-equal/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/README.md rename to deps/npm/node_modules/fast-deep-equal/README.md diff --git a/deps/npm/node_modules/fast-deep-equal/index.d.ts b/deps/npm/node_modules/fast-deep-equal/index.d.ts new file mode 100644 index 00000000000000..3c042caa7d5916 --- /dev/null +++ b/deps/npm/node_modules/fast-deep-equal/index.d.ts @@ -0,0 +1,4 @@ +declare module 'fast-deep-equal' { + const equal: (a: any, b: any) => boolean; + export = equal; +} diff --git a/deps/npm/node_modules/fast-deep-equal/index.js b/deps/npm/node_modules/fast-deep-equal/index.js new file mode 100644 index 00000000000000..7aaaba3f6c1678 --- /dev/null +++ b/deps/npm/node_modules/fast-deep-equal/index.js @@ -0,0 +1,55 @@ +'use strict'; + +var isArray = Array.isArray; +var keyList = Object.keys; +var hasProp = Object.prototype.hasOwnProperty; + +module.exports = function equal(a, b) { + if (a === b) return true; + + var arrA = isArray(a) + , arrB = isArray(b) + , i + , length + , key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = 0; i < length; i++) + if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + var dateA = a instanceof Date + , dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + + var regexpA = a instanceof RegExp + , regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + + if (a instanceof Object && b instanceof Object) { + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) + return false; + + for (i = 0; i < length; i++) + if (!hasProp.call(b, keys[i])) return false; + + for (i = 0; i < length; i++) { + key = keys[i]; + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + return false; +}; diff --git a/deps/npm/node_modules/fast-deep-equal/package.json b/deps/npm/node_modules/fast-deep-equal/package.json new file mode 100644 index 00000000000000..d084012d2d0090 --- /dev/null +++ b/deps/npm/node_modules/fast-deep-equal/package.json @@ -0,0 +1,85 @@ +{ + "_from": "fast-deep-equal@^1.0.0", + "_id": "fast-deep-equal@1.1.0", + "_inBundle": false, + "_integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "_location": "/fast-deep-equal", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "fast-deep-equal@^1.0.0", + "name": "fast-deep-equal", + "escapedName": "fast-deep-equal", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/ajv" + ], + "_resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "_shasum": "c053477817c86b51daa853c81e059b733d023614", + "_spec": "fast-deep-equal@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/ajv", + "author": { + "name": "Evgeny Poberezkin" + }, + "bugs": { + "url": "https://github.com/epoberezkin/fast-deep-equal/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Fast deep equal", + "devDependencies": { + "benchmark": "^2.1.4", + "coveralls": "^2.13.1", + "deep-eql": "^2.0.2", + "deep-equal": "^1.0.1", + "eslint": "^4.0.0", + "lodash": "^4.17.4", + "mocha": "^3.4.2", + "nano-equal": "^1.0.1", + "nyc": "^11.0.2", + "pre-commit": "^1.2.2", + "shallow-equal-fuzzy": "0.0.2", + "typescript": "^2.6.1", + "underscore": "^1.8.3" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme", + "keywords": [ + "fast", + "equal", + "deep-equal" + ], + "license": "MIT", + "main": "index.js", + "name": "fast-deep-equal", + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/fast-deep-equal.git" + }, + "scripts": { + "eslint": "eslint *.js benchmark spec", + "test": "npm run eslint && npm run test-ts && npm run test-cov", + "test-cov": "nyc npm run test-spec", + "test-spec": "mocha spec/*.spec.js -R spec", + "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts" + }, + "types": "index.d.ts", + "version": "1.1.0" +} diff --git a/deps/npm/node_modules/fast-json-stable-stringify/.eslintrc.yml b/deps/npm/node_modules/fast-json-stable-stringify/.eslintrc.yml new file mode 100644 index 00000000000000..1c77b0d4790359 --- /dev/null +++ b/deps/npm/node_modules/fast-json-stable-stringify/.eslintrc.yml @@ -0,0 +1,26 @@ +extends: eslint:recommended +env: + node: true + browser: true +rules: + block-scoped-var: 2 + callback-return: 2 + dot-notation: 2 + indent: 2 + linebreak-style: [2, unix] + new-cap: 2 + no-console: [2, allow: [warn, error]] + no-else-return: 2 + no-eq-null: 2 + no-fallthrough: 2 + no-invalid-this: 2 + no-return-assign: 2 + no-shadow: 1 + no-trailing-spaces: 2 + no-use-before-define: [2, nofunc] + quotes: [2, single, avoid-escape] + semi: [2, always] + strict: [2, global] + valid-jsdoc: [2, requireReturn: false] + no-control-regex: 0 + no-useless-escape: 2 diff --git a/deps/npm/node_modules/fast-json-stable-stringify/.npmignore b/deps/npm/node_modules/fast-json-stable-stringify/.npmignore new file mode 100644 index 00000000000000..899d7360ba2001 --- /dev/null +++ b/deps/npm/node_modules/fast-json-stable-stringify/.npmignore @@ -0,0 +1,4 @@ +node_modules +.nyc_output/ +coverage/ +.DS_Store diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.travis.yml b/deps/npm/node_modules/fast-json-stable-stringify/.travis.yml similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.travis.yml rename to deps/npm/node_modules/fast-json-stable-stringify/.travis.yml diff --git a/deps/npm/node_modules/mkdirp/node_modules/minimist/LICENSE b/deps/npm/node_modules/fast-json-stable-stringify/LICENSE similarity index 100% rename from deps/npm/node_modules/mkdirp/node_modules/minimist/LICENSE rename to deps/npm/node_modules/fast-json-stable-stringify/LICENSE diff --git a/deps/npm/node_modules/fast-json-stable-stringify/README.md b/deps/npm/node_modules/fast-json-stable-stringify/README.md new file mode 100644 index 00000000000000..0f43b4a7e034e4 --- /dev/null +++ b/deps/npm/node_modules/fast-json-stable-stringify/README.md @@ -0,0 +1,119 @@ +# fast-json-stable-stringify + +Deterministic `JSON.stringify()` - a faster version of [@substack](https://github.com/substack)'s json-stable-strigify without [jsonify](https://github.com/substack/jsonify). + +You can also pass in a custom comparison function. + +[![Build Status](https://travis-ci.org/epoberezkin/fast-json-stable-stringify.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-json-stable-stringify) +[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-json-stable-stringify/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-json-stable-stringify?branch=master) + +# example + +``` js +var stringify = require('fast-json-stable-stringify'); +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +console.log(stringify(obj)); +``` + +output: + +``` +{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} +``` + + +# methods + +``` js +var stringify = require('fast-json-stable-stringify') +``` + +## var str = stringify(obj, opts) + +Return a deterministic stringified string `str` from the object `obj`. + + +## options + +### cmp + +If `opts` is given, you can supply an `opts.cmp` to have a custom comparison +function for object keys. Your function `opts.cmp` is called with these +parameters: + +``` js +opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) +``` + +For example, to sort on the object key names in reverse order you could write: + +``` js +var stringify = require('fast-json-stable-stringify'); + +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +var s = stringify(obj, function (a, b) { + return a.key < b.key ? 1 : -1; +}); +console.log(s); +``` + +which results in the output string: + +``` +{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} +``` + +Or if you wanted to sort on the object values in reverse order, you could write: + +``` +var stringify = require('fast-json-stable-stringify'); + +var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; +var s = stringify(obj, function (a, b) { + return a.value < b.value ? 1 : -1; +}); +console.log(s); +``` + +which outputs: + +``` +{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} +``` + +### cycles + +Pass `true` in `opts.cycles` to stringify circular property as `__cycle__` - the result will not be a valid JSON string in this case. + +TypeError will be thrown in case of circular object without this option. + + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install fast-json-stable-stringify +``` + + +# benchmark + +To run benchmark (requires Node.js 6+): +``` +node benchmark +``` + +Results: +``` +fast-json-stable-stringify x 17,189 ops/sec ±1.43% (83 runs sampled) +json-stable-stringify x 13,634 ops/sec ±1.39% (85 runs sampled) +fast-stable-stringify x 20,212 ops/sec ±1.20% (84 runs sampled) +faster-stable-stringify x 15,549 ops/sec ±1.12% (84 runs sampled) +The fastest is fast-stable-stringify +``` + + +# license + +[MIT](https://github.com/epoberezkin/fast-json-stable-stringify/blob/master/LICENSE) diff --git a/deps/npm/node_modules/fast-json-stable-stringify/benchmark/index.js b/deps/npm/node_modules/fast-json-stable-stringify/benchmark/index.js new file mode 100644 index 00000000000000..e725f9fc5f1e8f --- /dev/null +++ b/deps/npm/node_modules/fast-json-stable-stringify/benchmark/index.js @@ -0,0 +1,31 @@ +'use strict'; + +const Benchmark = require('benchmark'); +const suite = new Benchmark.Suite; +const testData = require('./test.json'); + + +const stringifyPackages = { + // 'JSON.stringify': JSON.stringify, + 'fast-json-stable-stringify': require('../index'), + 'json-stable-stringify': true, + 'fast-stable-stringify': true, + 'faster-stable-stringify': true +}; + + +for (const name in stringifyPackages) { + let func = stringifyPackages[name]; + if (func === true) func = require(name); + + suite.add(name, function() { + func(testData); + }); +} + +suite + .on('cycle', (event) => console.log(String(event.target))) + .on('complete', function () { + console.log('The fastest is ' + this.filter('fastest').map('name')); + }) + .run({async: true}); diff --git a/deps/npm/node_modules/fast-json-stable-stringify/benchmark/test.json b/deps/npm/node_modules/fast-json-stable-stringify/benchmark/test.json new file mode 100644 index 00000000000000..c9118c11f5905b --- /dev/null +++ b/deps/npm/node_modules/fast-json-stable-stringify/benchmark/test.json @@ -0,0 +1,137 @@ +[ + { + "_id": "59ef4a83ee8364808d761beb", + "index": 0, + "guid": "e50ffae9-7128-4148-9ee5-40c3fc523c5d", + "isActive": false, + "balance": "$2,341.81", + "picture": "http://placehold.it/32x32", + "age": 28, + "eyeColor": "brown", + "name": "Carey Savage", + "gender": "female", + "company": "VERAQ", + "email": "careysavage@veraq.com", + "phone": "+1 (897) 574-3014", + "address": "458 Willow Street, Henrietta, California, 7234", + "about": "Nisi reprehenderit nulla ad officia pariatur non dolore laboris irure cupidatat laborum. Minim eu ex Lorem adipisicing exercitation irure minim sunt est enim mollit incididunt voluptate nulla. Ut mollit anim reprehenderit et aliqua ex esse aliquip. Aute sit duis deserunt do incididunt consequat minim qui dolor commodo deserunt et voluptate.\r\n", + "registered": "2014-05-21T01:56:51 -01:00", + "latitude": 63.89502, + "longitude": 62.369807, + "tags": [ + "nostrud", + "nisi", + "consectetur", + "ullamco", + "cupidatat", + "culpa", + "commodo" + ], + "friends": [ + { + "id": 0, + "name": "Henry Walls" + }, + { + "id": 1, + "name": "Janice Baker" + }, + { + "id": 2, + "name": "Russell Bush" + } + ], + "greeting": "Hello, Carey Savage! You have 4 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "59ef4a83ff5774a691454e89", + "index": 1, + "guid": "2bee9efc-4095-4c2e-87ef-d08c8054c89d", + "isActive": true, + "balance": "$1,618.15", + "picture": "http://placehold.it/32x32", + "age": 35, + "eyeColor": "blue", + "name": "Elinor Pearson", + "gender": "female", + "company": "FLEXIGEN", + "email": "elinorpearson@flexigen.com", + "phone": "+1 (923) 548-3751", + "address": "600 Bayview Avenue, Draper, Montana, 3088", + "about": "Mollit commodo ea sit Lorem velit. Irure anim esse Lorem sint quis officia ut. Aliqua nisi dolore in aute deserunt mollit ex ea in mollit.\r\n", + "registered": "2017-04-22T07:58:41 -01:00", + "latitude": -87.824919, + "longitude": 69.538927, + "tags": [ + "fugiat", + "labore", + "proident", + "quis", + "eiusmod", + "qui", + "est" + ], + "friends": [ + { + "id": 0, + "name": "Massey Wagner" + }, + { + "id": 1, + "name": "Marcella Ferrell" + }, + { + "id": 2, + "name": "Evans Mckee" + } + ], + "greeting": "Hello, Elinor Pearson! You have 3 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "59ef4a839ec8a4be4430b36b", + "index": 2, + "guid": "ddd6e8c0-95bd-416d-8b46-a768d6363809", + "isActive": false, + "balance": "$2,046.95", + "picture": "http://placehold.it/32x32", + "age": 40, + "eyeColor": "green", + "name": "Irwin Davidson", + "gender": "male", + "company": "DANJA", + "email": "irwindavidson@danja.com", + "phone": "+1 (883) 537-2041", + "address": "439 Cook Street, Chapin, Kentucky, 7398", + "about": "Irure velit non commodo aliqua exercitation ut nostrud minim magna. Dolor ad ad ut irure eu. Non pariatur dolor eiusmod ipsum do et exercitation cillum. Et amet laboris minim eiusmod ullamco magna ea reprehenderit proident sunt.\r\n", + "registered": "2016-09-01T07:49:08 -01:00", + "latitude": -49.803812, + "longitude": 104.93279, + "tags": [ + "consequat", + "enim", + "quis", + "magna", + "est", + "culpa", + "tempor" + ], + "friends": [ + { + "id": 0, + "name": "Ruth Hansen" + }, + { + "id": 1, + "name": "Kathrine Austin" + }, + { + "id": 2, + "name": "Rivera Munoz" + } + ], + "greeting": "Hello, Irwin Davidson! You have 2 unread messages.", + "favoriteFruit": "banana" + } +] diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js b/deps/npm/node_modules/fast-json-stable-stringify/example/key_cmp.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js rename to deps/npm/node_modules/fast-json-stable-stringify/example/key_cmp.js diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/nested.js b/deps/npm/node_modules/fast-json-stable-stringify/example/nested.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/nested.js rename to deps/npm/node_modules/fast-json-stable-stringify/example/nested.js diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/str.js b/deps/npm/node_modules/fast-json-stable-stringify/example/str.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/str.js rename to deps/npm/node_modules/fast-json-stable-stringify/example/str.js diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/value_cmp.js b/deps/npm/node_modules/fast-json-stable-stringify/example/value_cmp.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/value_cmp.js rename to deps/npm/node_modules/fast-json-stable-stringify/example/value_cmp.js diff --git a/deps/npm/node_modules/fast-json-stable-stringify/index.js b/deps/npm/node_modules/fast-json-stable-stringify/index.js new file mode 100644 index 00000000000000..c44e6a4137212c --- /dev/null +++ b/deps/npm/node_modules/fast-json-stable-stringify/index.js @@ -0,0 +1,59 @@ +'use strict'; + +module.exports = function (data, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (node) { + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + if (node === undefined) return; + if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; + if (typeof node !== 'object') return JSON.stringify(node); + + var i, out; + if (Array.isArray(node)) { + out = '['; + for (i = 0; i < node.length; i++) { + if (i) out += ','; + out += stringify(node[i]) || 'null'; + } + return out + ']'; + } + + if (node === null) return 'null'; + + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ''; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node[key]); + + if (!value) continue; + if (out) out += ','; + out += JSON.stringify(key) + ':' + value; + } + seen.splice(seenIndex, 1); + return '{' + out + '}'; + })(data); +}; diff --git a/deps/npm/node_modules/fast-json-stable-stringify/package.json b/deps/npm/node_modules/fast-json-stable-stringify/package.json new file mode 100644 index 00000000000000..965546480e965b --- /dev/null +++ b/deps/npm/node_modules/fast-json-stable-stringify/package.json @@ -0,0 +1,78 @@ +{ + "_from": "fast-json-stable-stringify@^2.0.0", + "_id": "fast-json-stable-stringify@2.0.0", + "_inBundle": false, + "_integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "_location": "/fast-json-stable-stringify", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "fast-json-stable-stringify@^2.0.0", + "name": "fast-json-stable-stringify", + "escapedName": "fast-json-stable-stringify", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/ajv" + ], + "_resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "_shasum": "d5142c0caee6b1189f87d3a76111064f86c8bbf2", + "_spec": "fast-json-stable-stringify@^2.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/ajv", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/epoberezkin/fast-json-stable-stringify/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify", + "devDependencies": { + "benchmark": "^2.1.4", + "coveralls": "^3.0.0", + "eslint": "^4.9.0", + "fast-stable-stringify": "latest", + "faster-stable-stringify": "latest", + "json-stable-stringify": "latest", + "nyc": "^11.2.1", + "pre-commit": "^1.2.2", + "tape": "~1.0.4" + }, + "homepage": "https://github.com/epoberezkin/fast-json-stable-stringify", + "keywords": [ + "json", + "stringify", + "deterministic", + "hash", + "stable" + ], + "license": "MIT", + "main": "index.js", + "name": "fast-json-stable-stringify", + "nyc": { + "exclude": [ + "test", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/epoberezkin/fast-json-stable-stringify.git" + }, + "scripts": { + "eslint": "eslint index.js test", + "test": "npm run eslint && nyc npm run test-spec", + "test-spec": "tape test/*.js" + }, + "version": "2.0.0" +} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/cmp.js b/deps/npm/node_modules/fast-json-stable-stringify/test/cmp.js similarity index 95% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/cmp.js rename to deps/npm/node_modules/fast-json-stable-stringify/test/cmp.js index 2dbb39355c652b..4efd6b59721f9f 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/cmp.js +++ b/deps/npm/node_modules/fast-json-stable-stringify/test/cmp.js @@ -1,3 +1,5 @@ +'use strict'; + var test = require('tape'); var stringify = require('../'); diff --git a/deps/npm/node_modules/fast-json-stable-stringify/test/nested.js b/deps/npm/node_modules/fast-json-stable-stringify/test/nested.js new file mode 100644 index 00000000000000..167a358e09a296 --- /dev/null +++ b/deps/npm/node_modules/fast-json-stable-stringify/test/nested.js @@ -0,0 +1,44 @@ +'use strict'; + +var test = require('tape'); +var stringify = require('../'); + +test('nested', function (t) { + t.plan(1); + var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; + t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}'); +}); + +test('cyclic (default)', function (t) { + t.plan(1); + var one = { a: 1 }; + var two = { a: 2, one: one }; + one.two = two; + try { + stringify(one); + } catch (ex) { + t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON'); + } +}); + +test('cyclic (specifically allowed)', function (t) { + t.plan(1); + var one = { a: 1 }; + var two = { a: 2, one: one }; + one.two = two; + t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}'); +}); + +test('repeated non-cyclic value', function(t) { + t.plan(1); + var one = { x: 1 }; + var two = { a: one, b: one }; + t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}'); +}); + +test('acyclic but with reused obj-property pointers', function (t) { + t.plan(1); + var x = { a: 1 }; + var y = { b: x, c: x }; + t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}'); +}); diff --git a/deps/npm/node_modules/fast-json-stable-stringify/test/str.js b/deps/npm/node_modules/fast-json-stable-stringify/test/str.js new file mode 100644 index 00000000000000..99a9ade18bb857 --- /dev/null +++ b/deps/npm/node_modules/fast-json-stable-stringify/test/str.js @@ -0,0 +1,46 @@ +'use strict'; + +var test = require('tape'); +var stringify = require('../'); + +test('simple object', function (t) { + t.plan(1); + var obj = { c: 6, b: [4,5], a: 3, z: null }; + t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}'); +}); + +test('object with undefined', function (t) { + t.plan(1); + var obj = { a: 3, z: undefined }; + t.equal(stringify(obj), '{"a":3}'); +}); + +test('object with null', function (t) { + t.plan(1); + var obj = { a: 3, z: null }; + t.equal(stringify(obj), '{"a":3,"z":null}'); +}); + +test('object with NaN and Infinity', function (t) { + t.plan(1); + var obj = { a: 3, b: NaN, c: Infinity }; + t.equal(stringify(obj), '{"a":3,"b":null,"c":null}'); +}); + +test('array with undefined', function (t) { + t.plan(1); + var obj = [4, undefined, 6]; + t.equal(stringify(obj), '[4,null,6]'); +}); + +test('object with empty string', function (t) { + t.plan(1); + var obj = { a: 3, z: '' }; + t.equal(stringify(obj), '{"a":3,"z":""}'); +}); + +test('array with empty string', function (t) { + t.plan(1); + var obj = [4, '', 6]; + t.equal(stringify(obj), '[4,"",6]'); +}); diff --git a/deps/npm/node_modules/fast-json-stable-stringify/test/to-json.js b/deps/npm/node_modules/fast-json-stable-stringify/test/to-json.js new file mode 100644 index 00000000000000..2fb2cfa3e8754a --- /dev/null +++ b/deps/npm/node_modules/fast-json-stable-stringify/test/to-json.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var stringify = require('../'); + +test('toJSON function', function (t) { + t.plan(1); + var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } }; + t.equal(stringify(obj), '{"one":1}' ); +}); + +test('toJSON returns string', function (t) { + t.plan(1); + var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } }; + t.equal(stringify(obj), '"one"'); +}); + +test('toJSON returns array', function (t) { + t.plan(1); + var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } }; + t.equal(stringify(obj), '["one"]'); +}); diff --git a/deps/npm/node_modules/figgy-pudding/CHANGELOG.md b/deps/npm/node_modules/figgy-pudding/CHANGELOG.md new file mode 100644 index 00000000000000..02cf10f4947afe --- /dev/null +++ b/deps/npm/node_modules/figgy-pudding/CHANGELOG.md @@ -0,0 +1,66 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [3.1.0](https://github.com/zkat/figgy-pudding/compare/v3.0.0...v3.1.0) (2018-04-08) + + +### Features + +* **opts:** allow direct option fetching without .get() ([ca77aad](https://github.com/zkat/figgy-pudding/commit/ca77aad)) + + + + +# [3.0.0](https://github.com/zkat/figgy-pudding/compare/v2.0.1...v3.0.0) (2018-04-06) + + +### Bug Fixes + +* **ci:** oops -- forgot to update CI config ([7a40563](https://github.com/zkat/figgy-pudding/commit/7a40563)) +* **get:** make provider lookup order like Object.assign ([33ff89b](https://github.com/zkat/figgy-pudding/commit/33ff89b)) + + +### Features + +* **concat:** add .concat() method to opts ([d310fce](https://github.com/zkat/figgy-pudding/commit/d310fce)) + + +### meta + +* drop support for node@4 and node@7 ([9f8a61c](https://github.com/zkat/figgy-pudding/commit/9f8a61c)) + + +### BREAKING CHANGES + +* node@4 and node@7 are no longer supported +* **get:** shadow order for properties in providers is reversed + + + + +## [2.0.1](https://github.com/zkat/figgy-pudding/compare/v2.0.0...v2.0.1) (2018-03-16) + + +### Bug Fixes + +* **opts:** ignore non-object providers ([7b9c0f8](https://github.com/zkat/figgy-pudding/commit/7b9c0f8)) + + + + +# [2.0.0](https://github.com/zkat/figgy-pudding/compare/v1.0.0...v2.0.0) (2018-03-16) + + +### Features + +* **api:** overhauled API with new opt handling concept ([e6cc929](https://github.com/zkat/figgy-pudding/commit/e6cc929)) +* **license:** relicense to ISC ([87479aa](https://github.com/zkat/figgy-pudding/commit/87479aa)) + + +### BREAKING CHANGES + +* **license:** the license has been changed from CC0-1.0 to ISC. +* **api:** this is a completely different approach than previously +used by this library. See the readme for the new API and an explanation. diff --git a/deps/npm/node_modules/cacache/node_modules/ssri/LICENSE.md b/deps/npm/node_modules/figgy-pudding/LICENSE.md similarity index 100% rename from deps/npm/node_modules/cacache/node_modules/ssri/LICENSE.md rename to deps/npm/node_modules/figgy-pudding/LICENSE.md diff --git a/deps/npm/node_modules/figgy-pudding/README.md b/deps/npm/node_modules/figgy-pudding/README.md new file mode 100644 index 00000000000000..8fbc9e15a0e2da --- /dev/null +++ b/deps/npm/node_modules/figgy-pudding/README.md @@ -0,0 +1,149 @@ +# figgy-pudding [![npm version](https://img.shields.io/npm/v/figgy-pudding.svg)](https://npm.im/figgy-pudding) [![license](https://img.shields.io/npm/l/figgy-pudding.svg)](https://npm.im/figgy-pudding) [![Travis](https://img.shields.io/travis/zkat/figgy-pudding.svg)](https://travis-ci.org/zkat/figgy-pudding) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/figgy-pudding?svg=true)](https://ci.appveyor.com/project/zkat/figgy-pudding) [![Coverage Status](https://coveralls.io/repos/github/zkat/figgy-pudding/badge.svg?branch=latest)](https://coveralls.io/github/zkat/figgy-pudding?branch=latest) + +# Death to the God Object! Now Bring Us Some Figgy Pudding! + +[`figgy-pudding`](https://github.com/zkat/figgy-pudding) is a simple JavaScript library for managing and composing cascading options objects -- hiding what needs to be hidden from each layer, without having to do a lot of manual munging and passing of options. + +## Install + +`$ npm install figgy-pudding` + +## Table of Contents + +* [Example](#example) +* [Features](#features) +* [API](#api) + * [`figgyPudding(spec)`](#figgy-pudding) + * [`Opts(values)`](#opts) + * [`opts.get()`](#opts-get) + * [`opts.concat()`](#opts-concat) + +### Example + +```javascript +const puddin = require('figgyPudding') + +const RequestOpts = puddin({ + follow: { + default: true + }, + streaming: { + default: false + }, + log: { + default: require('npmlog') + } +}) + +const MyAppOpts = puddin({ + log: { + default: require('npmlog') + }, + cache: { + default: './cache' + } +}) + +function start (opts) { + opts = MyAppOpts(opts) + initCache(opts.get('cache')) + opts.get('streaming') // => undefined + reqStuff('https://npm.im/figgy-pudding', opts) +} + +function reqStuff (uri, opts) { + opts = RequestOpts(opts) + require('request').get(uri, opts) // can't see `cache` +} +``` + +### Features + +* Hide options from layer that didn't ask for it +* Shared multi-layer options + +### API + +#### `> figgyPudding({ key: { default: val } | String }, [opts])` + +Defines an Options constructor that can be used to collect only the needed +options. + +An optional `default` property for specs can be used to specify default values +if nothing was passed in. + +If the value for a spec is a string, it will be treated as an alias to that +other key. + +##### Example + +```javascript +const MyAppOpts = figgyPudding({ + lg: 'log', + log: { + default: () => require('npmlog') + }, + cache: {} +}) +``` + +#### `> Opts(...providers)` + +Instantiates an options object defined by `figgyPudding()`, which uses +`providers`, in order, to find requested properties. + +Each provider can be either a plain object, a `Map`-like object (that is, one +with a `.get()` method) or another figgyPudding `Opts` object. + +When nesting `Opts` objects, their properties will not become available to the +new object, but any further nested `Opts` that reference that property _will_ be +able to read from their grandparent, as long as they define that key. Default +values for nested `Opts` parents will be used, if found. + +##### Example + +```javascript +const ReqOpts = figgyPudding({ + follow: {} +}) + +const opts = ReqOpts({ + follow: true, + log: require('npmlog') +}) + +opts.get('follow') // => true +opts.get('log') // => Error: ReqOpts does not define `log` + +const MoreOpts = figgyPudding({ + log: {} +}) +MoreOpts(opts).get('log') // => npmlog object (passed in from original plain obj) +MoreOpts(opts).get('follow') // => Error: MoreOpts does not define `follow` +``` + +#### `> opts.get(key)` + +Gets a value from the options object. + +##### Example + +```js +const opts = MyOpts(config) +opts.get('foo') // value of `foo` +``` + +#### `> opts.concat(...moreProviders)` + +Creates a new opts object of the same type as `opts` with additional providers. +Providers further to the right shadow providers to the left, with properties in +the original `opts` being shadows by the new providers. + +##### Example + +```js +const opts = MyOpts({x: 1}) +opts.get('x') // 1 +opts.concat({x: 2}).get('x') // 2 +opts.get('x') // 1 (original opts object left intact) +``` diff --git a/deps/npm/node_modules/figgy-pudding/index.js b/deps/npm/node_modules/figgy-pudding/index.js new file mode 100644 index 00000000000000..a3c9c94ebf4e4a --- /dev/null +++ b/deps/npm/node_modules/figgy-pudding/index.js @@ -0,0 +1,101 @@ +'use strict' + +class FiggyPudding { + constructor (specs, opts, providers) { + this.__specs = specs || {} + this.__opts = opts || (() => false) + this.__providers = reverse((providers || []).filter( + x => x != null && typeof x === 'object' + )) + this.__isFiggyPudding = true + } + get (key) { + return pudGet(this, key, true) + } + concat (...moreConfig) { + return new FiggyPudding( + this.__specs, + this.__opts, + reverse(this.__providers).concat(moreConfig) + ) + } +} + +function pudGet (pud, key, validate) { + let spec = pud.__specs[key] + if (typeof spec === 'string') { + key = spec + spec = pud.__specs[key] + } + if (validate && !spec && (!pud.__opts.other || !pud.__opts.other(key))) { + throw new Error(`invalid config key requested: ${key}`) + } else { + if (!spec) { spec = {} } + let ret + for (let p of pud.__providers) { + if (p.__isFiggyPudding) { + ret = pudGet(p, key, false) + } else if (typeof p.get === 'function') { + ret = p.get(key) + } else { + ret = p[key] + } + if (ret !== undefined) { + break + } + } + if (ret === undefined && spec.default !== undefined) { + if (typeof spec.default === 'function') { + return spec.default() + } else { + return spec.default + } + } else { + return ret + } + } +} + +const proxyHandler = { + has (obj, prop) { + return pudGet(obj, prop, false) !== undefined + }, + get (obj, prop) { + if ( + prop === 'concat' || + prop === 'get' || + prop.slice(0, 2) === '__' + ) { + return obj[prop] + } + return obj.get(prop) + }, + set (obj, prop, value) { + if (prop.slice(0, 2) === '__') { + obj[prop] = value + } else { + throw new Error('figgyPudding options cannot be modified. Use .concat() instead.') + } + }, + delete () { + throw new Error('figgyPudding options cannot be deleted. Use .concat() and shadow them instead.') + } +} + +module.exports = figgyPudding +function figgyPudding (specs, opts) { + function factory (...providers) { + return new Proxy(new FiggyPudding( + specs, + opts, + providers + ), proxyHandler) + } + return factory +} + +function reverse (arr) { + const ret = [] + arr.forEach(x => ret.unshift(x)) + return ret +} diff --git a/deps/npm/node_modules/figgy-pudding/package.json b/deps/npm/node_modules/figgy-pudding/package.json new file mode 100644 index 00000000000000..cf6ee25471f1d4 --- /dev/null +++ b/deps/npm/node_modules/figgy-pudding/package.json @@ -0,0 +1,76 @@ +{ + "_args": [ + [ + "figgy-pudding@3.1.0", + "/Users/rebecca/code/npm" + ] + ], + "_from": "figgy-pudding@3.1.0", + "_id": "figgy-pudding@3.1.0", + "_inBundle": false, + "_integrity": "sha512-Gi2vIue0ec6P/7LNpueGhLuvfF2ztuterl8YFBQn1yKgIS46noGxCbi+vviPdObNYtgUSh5FpHy5q0Cw9XhxKQ==", + "_location": "/figgy-pudding", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "figgy-pudding@3.1.0", + "name": "figgy-pudding", + "escapedName": "figgy-pudding", + "rawSpec": "3.1.0", + "saveSpec": null, + "fetchSpec": "3.1.0" + }, + "_requiredBy": [ + "/", + "/cacache", + "/libnpmhook", + "/libnpmhook/npm-registry-fetch" + ], + "_resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.1.0.tgz", + "_spec": "3.1.0", + "_where": "/Users/rebecca/code/npm", + "author": { + "name": "Kat Marchán", + "email": "kzm@sykosomatic.org" + }, + "bugs": { + "url": "https://github.com/zkat/figgy-pudding/issues" + }, + "dependencies": {}, + "description": "Delicious, festive, cascading config/opts definitions", + "devDependencies": { + "standard": "^11.0.1", + "standard-version": "^4.3.0", + "tap": "^11.1.2", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.8" + }, + "files": [ + "*.js", + "lib" + ], + "homepage": "https://github.com/zkat/figgy-pudding#readme", + "keywords": [ + "config", + "options", + "yummy" + ], + "license": "ISC", + "main": "index.js", + "name": "figgy-pudding", + "repository": { + "type": "git", + "url": "git+https://github.com/zkat/figgy-pudding.git" + }, + "scripts": { + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --coverage test/*.js", + "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", + "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" + }, + "version": "3.1.0" +} diff --git a/deps/npm/node_modules/find-npm-prefix/find-prefix.js b/deps/npm/node_modules/find-npm-prefix/find-prefix.js index 089572ec110b07..d5e271322be226 100644 --- a/deps/npm/node_modules/find-npm-prefix/find-prefix.js +++ b/deps/npm/node_modules/find-npm-prefix/find-prefix.js @@ -5,11 +5,9 @@ module.exports = findPrefix const fs = require('fs') const path = require('path') -const Bluebird = require('bluebird') -const readdir = Bluebird.promisify(fs.readdir) function findPrefix (dir) { - return Bluebird.try(() => { + return new Promise((resolve, reject) => { dir = path.resolve(dir) // this is a weird special case where an infinite recurse of @@ -20,9 +18,11 @@ function findPrefix (dir) { dir = path.dirname(dir) walkedUp = true } - if (walkedUp) return dir - - return findPrefix_(dir) + if (walkedUp) { + resolve(dir) + } else { + resolve(findPrefix_(dir)) + } }) } @@ -32,23 +32,25 @@ function findPrefix_ (dir, original) { const parent = path.dirname(dir) // this is a platform independent way of checking if we're in the root // directory - if (parent === dir) return original - - return readdir(dir).then(files => { - if (files.indexOf('node_modules') !== -1 || - files.indexOf('package.json') !== -1) { - return dir - } - - return findPrefix_(parent, original) - }, er => { - // an error right away is a bad sign. - // unless the prefix was simply a non - // existent directory. - if (er && dir === original && er.code !== 'ENOENT') { - throw er - } else { - return original - } + if (parent === dir) return Promise.resolve(original) + + return new Promise((resolve, reject) => { + fs.readdir(dir, (err, files) => { + if (err) { + // an error right away is a bad sign. + // unless the prefix was simply a non + // existent directory. + if (err && dir === original && err.code !== 'ENOENT') { + reject(err) + } else { + resolve(original) + } + } else if (files.indexOf('node_modules') !== -1 || + files.indexOf('package.json') !== -1) { + resolve(dir) + } else { + resolve(findPrefix_(parent, original)) + } + }) }) } diff --git a/deps/npm/node_modules/find-npm-prefix/package.json b/deps/npm/node_modules/find-npm-prefix/package.json index 4007b90c3cb59a..e9344afe54d206 100644 --- a/deps/npm/node_modules/find-npm-prefix/package.json +++ b/deps/npm/node_modules/find-npm-prefix/package.json @@ -1,27 +1,32 @@ { - "_from": "find-npm-prefix@latest", - "_id": "find-npm-prefix@1.0.1", + "_args": [ + [ + "find-npm-prefix@1.0.2", + "/Users/rebecca/code/npm" + ] + ], + "_from": "find-npm-prefix@1.0.2", + "_id": "find-npm-prefix@1.0.2", "_inBundle": false, - "_integrity": "sha512-I9R7ZnsjlKRvXBJjA1PE4wAkSc24YChoomWdEPTZgeB4DHxf87OutNGV5McFj6WwPghH97nZRejH58XvY6ga6Q==", + "_integrity": "sha512-KEftzJ+H90x6pcKtdXZEPsQse8/y/UnvzRKrOSQFprnrGaFuJ62fVkP34Iu2IYuMvyauCyoLTNkJZgrrGA2wkA==", "_location": "/find-npm-prefix", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "find-npm-prefix@latest", + "raw": "find-npm-prefix@1.0.2", "name": "find-npm-prefix", "escapedName": "find-npm-prefix", - "rawSpec": "latest", + "rawSpec": "1.0.2", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "1.0.2" }, "_requiredBy": [ - "#USER", - "/" + "/", + "/libcipm" ], - "_resolved": "https://registry.npmjs.org/find-npm-prefix/-/find-npm-prefix-1.0.1.tgz", - "_shasum": "af0faa74e19294b3c8634bae0e91017bb5adfac2", - "_spec": "find-npm-prefix@latest", + "_resolved": "https://registry.npmjs.org/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz", + "_spec": "1.0.2", "_where": "/Users/rebecca/code/npm", "author": { "name": "Rebecca Turner", @@ -31,9 +36,7 @@ "bugs": { "url": "https://github.com/npm/find-npm-prefix/issues" }, - "bundleDependencies": false, "dependencies": {}, - "deprecated": false, "description": "Find the npm project directory associated with for a given directory", "devDependencies": { "require-inject": "^1.4.2", @@ -55,5 +58,5 @@ "scripts": { "test": "standard && tap --100 test" }, - "version": "1.0.1" + "version": "1.0.2" } diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/index.js b/deps/npm/node_modules/find-up/index.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/index.js rename to deps/npm/node_modules/find-up/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/license b/deps/npm/node_modules/find-up/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/license rename to deps/npm/node_modules/find-up/license diff --git a/deps/npm/node_modules/find-up/package.json b/deps/npm/node_modules/find-up/package.json new file mode 100644 index 00000000000000..3647cbf41fd903 --- /dev/null +++ b/deps/npm/node_modules/find-up/package.json @@ -0,0 +1,87 @@ +{ + "_from": "find-up@^2.1.0", + "_id": "find-up@2.1.0", + "_inBundle": false, + "_integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "_location": "/find-up", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "find-up@^2.1.0", + "name": "find-up", + "escapedName": "find-up", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/pkg-conf", + "/read-pkg-up", + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "_shasum": "45d1b7e506c717ddd482775a2b77920a3c0c57a7", + "_spec": "find-up@^2.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/yargs", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/find-up/issues" + }, + "bundleDependencies": false, + "dependencies": { + "locate-path": "^2.0.0" + }, + "deprecated": false, + "description": "Find a file by walking up parent directories", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.1", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/find-up#readme", + "keywords": [ + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "package", + "resolve", + "parent", + "parents", + "folder", + "directory", + "dir", + "walk", + "walking", + "path" + ], + "license": "MIT", + "name": "find-up", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/find-up.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0", + "xo": { + "esnext": true + } +} diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/readme.md b/deps/npm/node_modules/find-up/readme.md similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/readme.md rename to deps/npm/node_modules/find-up/readme.md diff --git a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml b/deps/npm/node_modules/flush-write-stream/.travis.yml similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml rename to deps/npm/node_modules/flush-write-stream/.travis.yml diff --git a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/LICENSE b/deps/npm/node_modules/flush-write-stream/LICENSE similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/flush-write-stream/LICENSE rename to deps/npm/node_modules/flush-write-stream/LICENSE diff --git a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/README.md b/deps/npm/node_modules/flush-write-stream/README.md similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/flush-write-stream/README.md rename to deps/npm/node_modules/flush-write-stream/README.md diff --git a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/example.js b/deps/npm/node_modules/flush-write-stream/example.js similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/flush-write-stream/example.js rename to deps/npm/node_modules/flush-write-stream/example.js diff --git a/deps/npm/node_modules/flush-write-stream/index.js b/deps/npm/node_modules/flush-write-stream/index.js new file mode 100644 index 00000000000000..d7c62095626432 --- /dev/null +++ b/deps/npm/node_modules/flush-write-stream/index.js @@ -0,0 +1,54 @@ +var stream = require('readable-stream') +var inherits = require('inherits') + +var SIGNAL_FLUSH =(Buffer.from && Buffer.from !== Uint8Array.from) + ? Buffer.from([0]) + : new Buffer([0]) + +module.exports = WriteStream + +function WriteStream (opts, write, flush) { + if (!(this instanceof WriteStream)) return new WriteStream(opts, write, flush) + + if (typeof opts === 'function') { + flush = write + write = opts + opts = {} + } + + stream.Writable.call(this, opts) + + this.destroyed = false + this._worker = write || null + this._flush = flush || null +} + +inherits(WriteStream, stream.Writable) + +WriteStream.obj = function (opts, worker, flush) { + if (typeof opts === 'function') return WriteStream.obj(null, opts, worker) + if (!opts) opts = {} + opts.objectMode = true + return new WriteStream(opts, worker, flush) +} + +WriteStream.prototype._write = function (data, enc, cb) { + if (SIGNAL_FLUSH === data) this._flush(cb) + else this._worker(data, enc, cb) +} + +WriteStream.prototype.end = function (data, enc, cb) { + if (!this._flush) return stream.Writable.prototype.end.apply(this, arguments) + if (typeof data === 'function') return this.end(null, null, data) + if (typeof enc === 'function') return this.end(data, null, enc) + if (data) this.write(data) + if (!this._writableState.ending) this.write(SIGNAL_FLUSH) + return stream.Writable.prototype.end.call(this, cb) +} + +WriteStream.prototype.destroy = function (err) { + if (this.destroyed) return + this.destroyed = true + if (err) this.emit('error', err) + this.emit('close') +} diff --git a/deps/npm/node_modules/flush-write-stream/package.json b/deps/npm/node_modules/flush-write-stream/package.json new file mode 100644 index 00000000000000..408f39da35ad28 --- /dev/null +++ b/deps/npm/node_modules/flush-write-stream/package.json @@ -0,0 +1,57 @@ +{ + "_from": "flush-write-stream@^1.0.0", + "_id": "flush-write-stream@1.0.3", + "_inBundle": false, + "_integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "_location": "/flush-write-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "flush-write-stream@^1.0.0", + "name": "flush-write-stream", + "escapedName": "flush-write-stream", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/mississippi", + "/npm-profile/cacache/mississippi", + "/npm-profile/mississippi", + "/npm-registry-fetch/cacache/mississippi" + ], + "_resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "_shasum": "c5d586ef38af6097650b49bc41b55fabb19f35bd", + "_spec": "flush-write-stream@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/mississippi", + "author": { + "name": "Mathias Buus", + "url": "@mafintosh" + }, + "bugs": { + "url": "https://github.com/mafintosh/flush-write-stream/issues" + }, + "bundleDependencies": false, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + }, + "deprecated": false, + "description": "A write stream constructor that supports a flush function that is called before finish is emitted", + "devDependencies": { + "tape": "^4.2.2" + }, + "homepage": "https://github.com/mafintosh/flush-write-stream", + "license": "MIT", + "main": "index.js", + "name": "flush-write-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/mafintosh/flush-write-stream.git" + }, + "scripts": { + "test": "tape test.js" + }, + "version": "1.0.3" +} diff --git a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/test.js b/deps/npm/node_modules/flush-write-stream/test.js similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/flush-write-stream/test.js rename to deps/npm/node_modules/flush-write-stream/test.js diff --git a/deps/npm/node_modules/request/node_modules/forever-agent/LICENSE b/deps/npm/node_modules/forever-agent/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/forever-agent/LICENSE rename to deps/npm/node_modules/forever-agent/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/forever-agent/README.md b/deps/npm/node_modules/forever-agent/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/forever-agent/README.md rename to deps/npm/node_modules/forever-agent/README.md diff --git a/deps/npm/node_modules/forever-agent/index.js b/deps/npm/node_modules/forever-agent/index.js new file mode 100644 index 00000000000000..d7276fd97391c6 --- /dev/null +++ b/deps/npm/node_modules/forever-agent/index.js @@ -0,0 +1,138 @@ +module.exports = ForeverAgent +ForeverAgent.SSL = ForeverAgentSSL + +var util = require('util') + , Agent = require('http').Agent + , net = require('net') + , tls = require('tls') + , AgentSSL = require('https').Agent + +function getConnectionName(host, port) { + var name = '' + if (typeof host === 'string') { + name = host + ':' + port + } else { + // For node.js v012.0 and iojs-v1.5.1, host is an object. And any existing localAddress is part of the connection name. + name = host.host + ':' + host.port + ':' + (host.localAddress ? (host.localAddress + ':') : ':') + } + return name +} + +function ForeverAgent(options) { + var self = this + self.options = options || {} + self.requests = {} + self.sockets = {} + self.freeSockets = {} + self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets + self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets + self.on('free', function(socket, host, port) { + var name = getConnectionName(host, port) + + if (self.requests[name] && self.requests[name].length) { + self.requests[name].shift().onSocket(socket) + } else if (self.sockets[name].length < self.minSockets) { + if (!self.freeSockets[name]) self.freeSockets[name] = [] + self.freeSockets[name].push(socket) + + // if an error happens while we don't use the socket anyway, meh, throw the socket away + var onIdleError = function() { + socket.destroy() + } + socket._onIdleError = onIdleError + socket.on('error', onIdleError) + } else { + // If there are no pending requests just destroy the + // socket and it will get removed from the pool. This + // gets us out of timeout issues and allows us to + // default to Connection:keep-alive. + socket.destroy() + } + }) + +} +util.inherits(ForeverAgent, Agent) + +ForeverAgent.defaultMinSockets = 5 + + +ForeverAgent.prototype.createConnection = net.createConnection +ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest +ForeverAgent.prototype.addRequest = function(req, host, port) { + var name = getConnectionName(host, port) + + if (typeof host !== 'string') { + var options = host + port = options.port + host = options.host + } + + if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) { + var idleSocket = this.freeSockets[name].pop() + idleSocket.removeListener('error', idleSocket._onIdleError) + delete idleSocket._onIdleError + req._reusedSocket = true + req.onSocket(idleSocket) + } else { + this.addRequestNoreuse(req, host, port) + } +} + +ForeverAgent.prototype.removeSocket = function(s, name, host, port) { + if (this.sockets[name]) { + var index = this.sockets[name].indexOf(s) + if (index !== -1) { + this.sockets[name].splice(index, 1) + } + } else if (this.sockets[name] && this.sockets[name].length === 0) { + // don't leak + delete this.sockets[name] + delete this.requests[name] + } + + if (this.freeSockets[name]) { + var index = this.freeSockets[name].indexOf(s) + if (index !== -1) { + this.freeSockets[name].splice(index, 1) + if (this.freeSockets[name].length === 0) { + delete this.freeSockets[name] + } + } + } + + if (this.requests[name] && this.requests[name].length) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(name, host, port).emit('free') + } +} + +function ForeverAgentSSL (options) { + ForeverAgent.call(this, options) +} +util.inherits(ForeverAgentSSL, ForeverAgent) + +ForeverAgentSSL.prototype.createConnection = createConnectionSSL +ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest + +function createConnectionSSL (port, host, options) { + if (typeof port === 'object') { + options = port; + } else if (typeof host === 'object') { + options = host; + } else if (typeof options === 'object') { + options = options; + } else { + options = {}; + } + + if (typeof port === 'number') { + options.port = port; + } + + if (typeof host === 'string') { + options.host = host; + } + + return tls.connect(options); +} diff --git a/deps/npm/node_modules/forever-agent/package.json b/deps/npm/node_modules/forever-agent/package.json new file mode 100644 index 00000000000000..e338b5721cfd49 --- /dev/null +++ b/deps/npm/node_modules/forever-agent/package.json @@ -0,0 +1,50 @@ +{ + "_from": "forever-agent@~0.6.1", + "_id": "forever-agent@0.6.1", + "_inBundle": false, + "_integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "_location": "/forever-agent", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "forever-agent@~0.6.1", + "name": "forever-agent", + "escapedName": "forever-agent", + "rawSpec": "~0.6.1", + "saveSpec": null, + "fetchSpec": "~0.6.1" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "_shasum": "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91", + "_spec": "forever-agent@~0.6.1", + "_where": "/Users/rebecca/code/npm/node_modules/request", + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com", + "url": "http://www.futurealoof.com" + }, + "bugs": { + "url": "https://github.com/mikeal/forever-agent/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.", + "devDependencies": {}, + "engines": { + "node": "*" + }, + "homepage": "https://github.com/mikeal/forever-agent#readme", + "license": "Apache-2.0", + "main": "index.js", + "name": "forever-agent", + "optionalDependencies": {}, + "repository": { + "url": "git+https://github.com/mikeal/forever-agent.git" + }, + "version": "0.6.1" +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/License b/deps/npm/node_modules/form-data/License similarity index 100% rename from deps/npm/node_modules/request/node_modules/form-data/License rename to deps/npm/node_modules/form-data/License diff --git a/deps/npm/node_modules/form-data/README.md b/deps/npm/node_modules/form-data/README.md new file mode 100644 index 00000000000000..cb421fbb40fdd6 --- /dev/null +++ b/deps/npm/node_modules/form-data/README.md @@ -0,0 +1,234 @@ +# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) + +A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. + +The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. + +[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface + +[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.3.2.svg?label=linux:4.x-9.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.3.2.svg?label=macos:4.x-9.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.3.2.svg?label=windows:4.x-9.x)](https://ci.appveyor.com/project/alexindigo/form-data) + +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.3.2.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) +[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data) + +## Install + +``` +npm install --save form-data +``` + +## Usage + +In this example we are constructing a form with 3 fields that contain a string, +a buffer and a file stream. + +``` javascript +var FormData = require('form-data'); +var fs = require('fs'); + +var form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); +``` + +Also you can use http-response stream: + +``` javascript +var FormData = require('form-data'); +var http = require('http'); + +var form = new FormData(); + +http.request('http://nodejs.org/images/logo.png', function(response) { + form.append('my_field', 'my value'); + form.append('my_buffer', new Buffer(10)); + form.append('my_logo', response); +}); +``` + +Or @mikeal's [request](https://github.com/request/request) stream: + +``` javascript +var FormData = require('form-data'); +var request = require('request'); + +var form = new FormData(); + +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_logo', request('http://nodejs.org/images/logo.png')); +``` + +In order to submit this form to a web application, call ```submit(url, [callback])``` method: + +``` javascript +form.submit('http://example.org/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +}); + +``` + +For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. + +### Custom options + +You can provide custom options, such as `maxDataSize`: + +``` javascript +var FormData = require('form-data'); + +var form = new FormData({ maxDataSize: 20971520 }); +form.append('my_field', 'my value'); +form.append('my_buffer', /* something big */); +``` + +List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) + +### Alternative submission methods + +You can use node's http client interface: + +``` javascript +var http = require('http'); + +var request = http.request({ + method: 'post', + host: 'example.org', + path: '/upload', + headers: form.getHeaders() +}); + +form.pipe(request); + +request.on('response', function(res) { + console.log(res.statusCode); +}); +``` + +Or if you would prefer the `'Content-Length'` header to be set for you: + +``` javascript +form.submit('example.org/upload', function(err, res) { + console.log(res.statusCode); +}); +``` + +To use custom headers and pre-known length in parts: + +``` javascript +var CRLF = '\r\n'; +var form = new FormData(); + +var options = { + header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, + knownLength: 1 +}; + +form.append('my_buffer', buffer, options); + +form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); +}); +``` + +Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: + +``` javascript +someModule.stream(function(err, stdout, stderr) { + if (err) throw err; + + var form = new FormData(); + + form.append('file', stdout, { + filename: 'unicycle.jpg', // ... or: + filepath: 'photos/toys/unicycle.jpg', + contentType: 'image/jpeg', + knownLength: 19806 + }); + + form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); + }); +}); +``` + +The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). + +For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: + +``` javascript +form.submit({ + host: 'example.com', + path: '/probably.php?extra=params', + auth: 'username:password' +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: + +``` javascript +form.submit({ + host: 'example.com', + path: '/surelynot.php', + headers: {'x-test-header': 'test-header-value'} +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +### Integration with other libraries + +#### Request + +Form submission using [request](https://github.com/request/request): + +```javascript +var formData = { + my_field: 'my_value', + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), +}; + +request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). + +#### node-fetch + +You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): + +```javascript +var form = new FormData(); + +form.append('a', 1); + +fetch('http://example.com', { method: 'POST', body: form }) + .then(function(res) { + return res.json(); + }).then(function(json) { + console.log(json); + }); +``` + +## Notes + +- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. +- Starting version `2.x` FormData has dropped support for `node@0.10.x`. + +## License + +Form-Data is released under the [MIT](License) license. diff --git a/deps/npm/node_modules/request/node_modules/form-data/README.md.bak b/deps/npm/node_modules/form-data/README.md.bak similarity index 96% rename from deps/npm/node_modules/request/node_modules/form-data/README.md.bak rename to deps/npm/node_modules/form-data/README.md.bak index 927d08289d2d03..0524d60288a137 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/README.md.bak +++ b/deps/npm/node_modules/form-data/README.md.bak @@ -6,9 +6,9 @@ The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface] [xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface -[![Linux Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=linux:0.12-8.x)](https://travis-ci.org/form-data/form-data) -[![MacOS Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=macos:0.12-8.x)](https://travis-ci.org/form-data/form-data) -[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/master.svg?label=windows:0.12-8.x)](https://ci.appveyor.com/project/alexindigo/form-data) +[![Linux Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=linux:4.x-9.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=macos:4.x-9.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/master.svg?label=windows:4.x-9.x)](https://ci.appveyor.com/project/alexindigo/form-data) [![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/master.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) [![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) diff --git a/deps/npm/node_modules/request/node_modules/form-data/lib/browser.js b/deps/npm/node_modules/form-data/lib/browser.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/form-data/lib/browser.js rename to deps/npm/node_modules/form-data/lib/browser.js diff --git a/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js b/deps/npm/node_modules/form-data/lib/form_data.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js rename to deps/npm/node_modules/form-data/lib/form_data.js diff --git a/deps/npm/node_modules/request/node_modules/form-data/lib/populate.js b/deps/npm/node_modules/form-data/lib/populate.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/form-data/lib/populate.js rename to deps/npm/node_modules/form-data/lib/populate.js diff --git a/deps/npm/node_modules/form-data/package.json b/deps/npm/node_modules/form-data/package.json new file mode 100644 index 00000000000000..f5ac03c1bb42dd --- /dev/null +++ b/deps/npm/node_modules/form-data/package.json @@ -0,0 +1,98 @@ +{ + "_from": "form-data@~2.3.1", + "_id": "form-data@2.3.2", + "_inBundle": false, + "_integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "_location": "/form-data", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "form-data@~2.3.1", + "name": "form-data", + "escapedName": "form-data", + "rawSpec": "~2.3.1", + "saveSpec": null, + "fetchSpec": "~2.3.1" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "_shasum": "4970498be604c20c005d4f5c23aecd21d6b49099", + "_spec": "form-data@~2.3.1", + "_where": "/Users/rebecca/code/npm/node_modules/request", + "author": { + "name": "Felix Geisendörfer", + "email": "felix@debuggable.com", + "url": "http://debuggable.com/" + }, + "browser": "./lib/browser", + "bugs": { + "url": "https://github.com/form-data/form-data/issues" + }, + "bundleDependencies": false, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + }, + "deprecated": false, + "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", + "devDependencies": { + "browserify": "^13.1.1", + "browserify-istanbul": "^2.0.0", + "coveralls": "^2.11.14", + "cross-spawn": "^4.0.2", + "eslint": "^3.9.1", + "fake": "^0.2.2", + "far": "^0.0.7", + "formidable": "^1.0.17", + "in-publish": "^2.0.0", + "is-node-modern": "^1.0.0", + "istanbul": "^0.4.5", + "obake": "^0.1.2", + "phantomjs-prebuilt": "^2.1.13", + "pkgfiles": "^2.3.0", + "pre-commit": "^1.1.3", + "request": "2.76.0", + "rimraf": "^2.5.4", + "tape": "^4.6.2" + }, + "engines": { + "node": ">= 0.12" + }, + "homepage": "https://github.com/form-data/form-data#readme", + "license": "MIT", + "main": "./lib/form_data", + "name": "form-data", + "pre-commit": [ + "lint", + "ci-test", + "check" + ], + "repository": { + "type": "git", + "url": "git://github.com/form-data/form-data.git" + }, + "scripts": { + "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage", + "check": "istanbul check-coverage coverage/coverage*.json", + "ci-lint": "is-node-modern 6 && npm run lint || is-node-not-modern 6", + "ci-test": "npm run test && npm run browser && npm run report", + "debug": "verbose=1 ./test/run.js", + "files": "pkgfiles --sort=name", + "get-version": "node -e \"console.log(require('./package.json').version)\"", + "lint": "eslint lib/*.js test/*.js test/integration/*.js", + "postpublish": "npm run restore-readme", + "posttest": "istanbul report lcov text", + "predebug": "rimraf coverage test/tmp", + "prepublish": "in-publish && npm run update-readme || not-in-publish", + "pretest": "rimraf coverage test/tmp", + "report": "istanbul report lcov text", + "restore-readme": "mv README.md.bak README.md", + "test": "istanbul cover test/run.js", + "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md" + }, + "version": "2.3.2" +} diff --git a/deps/npm/node_modules/mississippi/node_modules/from2/.travis.yml b/deps/npm/node_modules/from2/.travis.yml similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/from2/.travis.yml rename to deps/npm/node_modules/from2/.travis.yml diff --git a/deps/npm/node_modules/mississippi/node_modules/from2/LICENSE.md b/deps/npm/node_modules/from2/LICENSE.md similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/from2/LICENSE.md rename to deps/npm/node_modules/from2/LICENSE.md diff --git a/deps/npm/node_modules/mississippi/node_modules/from2/README.md b/deps/npm/node_modules/from2/README.md similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/from2/README.md rename to deps/npm/node_modules/from2/README.md diff --git a/deps/npm/node_modules/mississippi/node_modules/from2/index.js b/deps/npm/node_modules/from2/index.js similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/from2/index.js rename to deps/npm/node_modules/from2/index.js diff --git a/deps/npm/node_modules/from2/package.json b/deps/npm/node_modules/from2/package.json new file mode 100644 index 00000000000000..d5431768f07b91 --- /dev/null +++ b/deps/npm/node_modules/from2/package.json @@ -0,0 +1,72 @@ +{ + "_from": "from2@^2.1.0", + "_id": "from2@2.3.0", + "_inBundle": false, + "_integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "_location": "/from2", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "from2@^2.1.0", + "name": "from2", + "escapedName": "from2", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/mississippi", + "/npm-profile/cacache/mississippi", + "/npm-profile/mississippi", + "/npm-registry-fetch/cacache/mississippi" + ], + "_resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "_shasum": "8bfb5502bde4a4d36cfdeea007fcca21d7e382af", + "_spec": "from2@^2.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/mississippi", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "bugs": { + "url": "https://github.com/hughsk/from2/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Mathias Buus", + "email": "mathiasbuus@gmail.com" + } + ], + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + }, + "deprecated": false, + "description": "Convenience wrapper for ReadableStream, with an API lifted from \"from\" and \"through2\"", + "devDependencies": { + "tape": "^4.0.0" + }, + "homepage": "https://github.com/hughsk/from2", + "keywords": [ + "from", + "stream", + "readable", + "pull", + "convenience", + "wrapper" + ], + "license": "MIT", + "main": "index.js", + "name": "from2", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/from2.git" + }, + "scripts": { + "test": "node test" + }, + "version": "2.3.0" +} diff --git a/deps/npm/node_modules/mississippi/node_modules/from2/test.js b/deps/npm/node_modules/from2/test.js similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/from2/test.js rename to deps/npm/node_modules/from2/test.js diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/LICENSE b/deps/npm/node_modules/fs-minipass/LICENSE similarity index 100% rename from deps/npm/node_modules/glob/node_modules/minimatch/LICENSE rename to deps/npm/node_modules/fs-minipass/LICENSE diff --git a/deps/npm/node_modules/fs-minipass/README.md b/deps/npm/node_modules/fs-minipass/README.md new file mode 100644 index 00000000000000..1e61241cf03a63 --- /dev/null +++ b/deps/npm/node_modules/fs-minipass/README.md @@ -0,0 +1,70 @@ +# fs-minipass + +Filesystem streams based on [minipass](http://npm.im/minipass). + +4 classes are exported: + +- ReadStream +- ReadStreamSync +- WriteStream +- WriteStreamSync + +When using `ReadStreamSync`, all of the data is made available +immediately upon consuming the stream. Nothing is buffered in memory +when the stream is constructed. If the stream is piped to a writer, +then it will synchronously `read()` and emit data into the writer as +fast as the writer can consume it. (That is, it will respect +backpressure.) If you call `stream.read()` then it will read the +entire file and return the contents. + +When using `WriteStreamSync`, every write is flushed to the file +synchronously. If your writes all come in a single tick, then it'll +write it all out in a single tick. It's as synchronous as you are. + +The async versions work much like their node builtin counterparts, +with the exception of introducing significantly less Stream machinery +overhead. + +## USAGE + +It's just streams, you pipe them or read() them or write() to them. + +```js +const fsm = require('fs-minipass') +const readStream = new fsm.ReadStream('file.txt') +const writeStream = new fsm.WriteStream('output.txt') +writeStream.write('some file header or whatever\n') +readStream.pipe(writeStream) +``` + +## ReadStream(path, options) + +Path string is required, but somewhat irrelevant if an open file +descriptor is passed in as an option. + +Options: + +- `fd` Pass in a numeric file descriptor, if the file is already open. +- `readSize` The size of reads to do, defaults to 16MB +- `size` The size of the file, if known. Prevents zero-byte read() + call at the end. +- `autoClose` Set to `false` to prevent the file descriptor from being + closed when the file is done being read. + +## WriteStream(path, options) + +Path string is required, but somewhat irrelevant if an open file +descriptor is passed in as an option. + +Options: + +- `fd` Pass in a numeric file descriptor, if the file is already open. +- `mode` The mode to create the file with. Defaults to `0o666`. +- `start` The position in the file to start reading. If not + specified, then the file will start writing at position zero, and be + truncated by default. +- `autoClose` Set to `false` to prevent the file descriptor from being + closed when the stream is ended. +- `flags` Flags to use when opening the file. Irrelevant if `fd` is + passed in, since file won't be opened in that case. Defaults to + `'a'` if a `pos` is specified, or `'w'` otherwise. diff --git a/deps/npm/node_modules/fs-minipass/index.js b/deps/npm/node_modules/fs-minipass/index.js new file mode 100644 index 00000000000000..0f15c810ebf5f9 --- /dev/null +++ b/deps/npm/node_modules/fs-minipass/index.js @@ -0,0 +1,386 @@ +'use strict' +const MiniPass = require('minipass') +const EE = require('events').EventEmitter +const fs = require('fs') + +// for writev +const binding = process.binding('fs') +const writeBuffers = binding.writeBuffers +const FSReqWrap = binding.FSReqWrap + +const _autoClose = Symbol('_autoClose') +const _close = Symbol('_close') +const _ended = Symbol('_ended') +const _fd = Symbol('_fd') +const _finished = Symbol('_finished') +const _flags = Symbol('_flags') +const _flush = Symbol('_flush') +const _handleChunk = Symbol('_handleChunk') +const _makeBuf = Symbol('_makeBuf') +const _mode = Symbol('_mode') +const _needDrain = Symbol('_needDrain') +const _onerror = Symbol('_onerror') +const _onopen = Symbol('_onopen') +const _onread = Symbol('_onread') +const _onwrite = Symbol('_onwrite') +const _open = Symbol('_open') +const _path = Symbol('_path') +const _pos = Symbol('_pos') +const _queue = Symbol('_queue') +const _read = Symbol('_read') +const _readSize = Symbol('_readSize') +const _reading = Symbol('_reading') +const _remain = Symbol('_remain') +const _size = Symbol('_size') +const _write = Symbol('_write') +const _writing = Symbol('_writing') +const _defaultFlag = Symbol('_defaultFlag') + +class ReadStream extends MiniPass { + constructor (path, opt) { + opt = opt || {} + super(opt) + + this.writable = false + + if (typeof path !== 'string') + throw new TypeError('path must be a string') + + this[_fd] = typeof opt.fd === 'number' ? opt.fd : null + this[_path] = path + this[_readSize] = opt.readSize || 16*1024*1024 + this[_reading] = false + this[_size] = typeof opt.size === 'number' ? opt.size : Infinity + this[_remain] = this[_size] + this[_autoClose] = typeof opt.autoClose === 'boolean' ? + opt.autoClose : true + + if (typeof this[_fd] === 'number') + this[_read]() + else + this[_open]() + } + + get fd () { return this[_fd] } + get path () { return this[_path] } + + write () { + throw new TypeError('this is a readable stream') + } + + end () { + throw new TypeError('this is a readable stream') + } + + [_open] () { + fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)) + } + + [_onopen] (er, fd) { + if (er) + this[_onerror](er) + else { + this[_fd] = fd + this.emit('open', fd) + this[_read]() + } + } + + [_makeBuf] () { + return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])) + } + + [_read] () { + if (!this[_reading]) { + this[_reading] = true + const buf = this[_makeBuf]() + /* istanbul ignore if */ + if (buf.length === 0) return process.nextTick(() => this[_onread](null, 0, buf)) + fs.read(this[_fd], buf, 0, buf.length, null, (er, br, buf) => + this[_onread](er, br, buf)) + } + } + + [_onread] (er, br, buf) { + this[_reading] = false + if (er) + this[_onerror](er) + else if (this[_handleChunk](br, buf)) + this[_read]() + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + fs.close(this[_fd], _ => this.emit('close')) + this[_fd] = null + } + } + + [_onerror] (er) { + this[_reading] = true + this[_close]() + this.emit('error', er) + } + + [_handleChunk] (br, buf) { + let ret = false + // no effect if infinite + this[_remain] -= br + if (br > 0) + ret = super.write(br < buf.length ? buf.slice(0, br) : buf) + + if (br === 0 || this[_remain] <= 0) { + ret = false + this[_close]() + super.end() + } + + return ret + } + + emit (ev, data) { + switch (ev) { + case 'prefinish': + case 'finish': + break + + case 'drain': + if (typeof this[_fd] === 'number') + this[_read]() + break + + default: + return super.emit(ev, data) + } + } +} + +class ReadStreamSync extends ReadStream { + [_open] () { + let threw = true + try { + this[_onopen](null, fs.openSync(this[_path], 'r')) + threw = false + } finally { + if (threw) + this[_close]() + } + } + + [_read] () { + let threw = true + try { + if (!this[_reading]) { + this[_reading] = true + do { + const buf = this[_makeBuf]() + /* istanbul ignore next */ + const br = buf.length === 0 ? 0 : fs.readSync(this[_fd], buf, 0, buf.length, null) + if (!this[_handleChunk](br, buf)) + break + } while (true) + this[_reading] = false + } + threw = false + } finally { + if (threw) + this[_close]() + } + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + try { + fs.closeSync(this[_fd]) + } catch (er) {} + this[_fd] = null + this.emit('close') + } + } +} + +class WriteStream extends EE { + constructor (path, opt) { + opt = opt || {} + super(opt) + this.readable = false + this[_writing] = false + this[_ended] = false + this[_needDrain] = false + this[_queue] = [] + this[_path] = path + this[_fd] = typeof opt.fd === 'number' ? opt.fd : null + this[_mode] = opt.mode === undefined ? 0o666 : opt.mode + this[_pos] = typeof opt.start === 'number' ? opt.start : null + this[_autoClose] = typeof opt.autoClose === 'boolean' ? + opt.autoClose : true + + // truncating makes no sense when writing into the middle + const defaultFlag = this[_pos] !== null ? 'r+' : 'w' + this[_defaultFlag] = opt.flags === undefined + this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags + + if (this[_fd] === null) + this[_open]() + } + + get fd () { return this[_fd] } + get path () { return this[_path] } + + [_onerror] (er) { + this[_close]() + this[_writing] = true + this.emit('error', er) + } + + [_open] () { + fs.open(this[_path], this[_flags], this[_mode], + (er, fd) => this[_onopen](er, fd)) + } + + [_onopen] (er, fd) { + if (this[_defaultFlag] && + this[_flags] === 'r+' && + er && er.code === 'ENOENT') { + this[_flags] = 'w' + this[_open]() + } else if (er) + this[_onerror](er) + else { + this[_fd] = fd + this.emit('open', fd) + this[_flush]() + } + } + + end (buf, enc) { + if (buf) + this.write(buf, enc) + + this[_ended] = true + + // synthetic after-write logic, where drain/finish live + if (!this[_writing] && !this[_queue].length && + typeof this[_fd] === 'number') + this[_onwrite](null, 0) + } + + write (buf, enc) { + if (typeof buf === 'string') + buf = new Buffer(buf, enc) + + if (this[_ended]) { + this.emit('error', new Error('write() after end()')) + return false + } + + if (this[_fd] === null || this[_writing] || this[_queue].length) { + this[_queue].push(buf) + this[_needDrain] = true + return false + } + + this[_writing] = true + this[_write](buf) + return true + } + + [_write] (buf) { + fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => + this[_onwrite](er, bw)) + } + + [_onwrite] (er, bw) { + if (er) + this[_onerror](er) + else { + if (this[_pos] !== null) + this[_pos] += bw + if (this[_queue].length) + this[_flush]() + else { + this[_writing] = false + + if (this[_ended] && !this[_finished]) { + this[_finished] = true + this[_close]() + this.emit('finish') + } else if (this[_needDrain]) { + this[_needDrain] = false + this.emit('drain') + } + } + } + } + + [_flush] () { + if (this[_queue].length === 0) { + if (this[_ended]) + this[_onwrite](null, 0) + } else if (this[_queue].length === 1) + this[_write](this[_queue].pop()) + else { + const iovec = this[_queue] + this[_queue] = [] + writev(this[_fd], iovec, this[_pos], + (er, bw) => this[_onwrite](er, bw)) + } + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + fs.close(this[_fd], _ => this.emit('close')) + this[_fd] = null + } + } +} + +class WriteStreamSync extends WriteStream { + [_open] () { + let fd + try { + fd = fs.openSync(this[_path], this[_flags], this[_mode]) + } catch (er) { + if (this[_defaultFlag] && + this[_flags] === 'r+' && + er && er.code === 'ENOENT') { + this[_flags] = 'w' + return this[_open]() + } else + throw er + } + this[_onopen](null, fd) + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + try { + fs.closeSync(this[_fd]) + } catch (er) {} + this[_fd] = null + this.emit('close') + } + } + + [_write] (buf) { + try { + this[_onwrite](null, + fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos])) + } catch (er) { + this[_onwrite](er, 0) + } + } +} + +const writev = (fd, iovec, pos, cb) => { + const done = (er, bw) => cb(er, bw, iovec) + const req = new FSReqWrap() + req.oncomplete = done + binding.writeBuffers(fd, iovec, pos, req) +} + +exports.ReadStream = ReadStream +exports.ReadStreamSync = ReadStreamSync + +exports.WriteStream = WriteStream +exports.WriteStreamSync = WriteStreamSync diff --git a/deps/npm/node_modules/fs-minipass/package.json b/deps/npm/node_modules/fs-minipass/package.json new file mode 100644 index 00000000000000..c2f925e8895a60 --- /dev/null +++ b/deps/npm/node_modules/fs-minipass/package.json @@ -0,0 +1,62 @@ +{ + "_from": "fs-minipass@^1.2.5", + "_id": "fs-minipass@1.2.5", + "_inBundle": false, + "_integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "_location": "/fs-minipass", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "fs-minipass@^1.2.5", + "name": "fs-minipass", + "escapedName": "fs-minipass", + "rawSpec": "^1.2.5", + "saveSpec": null, + "fetchSpec": "^1.2.5" + }, + "_requiredBy": [ + "/tar" + ], + "_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "_shasum": "06c277218454ec288df77ada54a03b8702aacb9d", + "_spec": "fs-minipass@^1.2.5", + "_where": "/Users/rebecca/code/npm/node_modules/tar", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/fs-minipass/issues" + }, + "bundleDependencies": false, + "dependencies": { + "minipass": "^2.2.1" + }, + "deprecated": false, + "description": "fs read and write streams based on minipass", + "devDependencies": { + "mutate-fs": "^2.0.1", + "tap": "^10.7.2" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/npm/fs-minipass#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "fs-minipass", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fs-minipass.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100 -J" + }, + "version": "1.2.5" +} diff --git a/deps/npm/node_modules/fs-vacuum/package.json b/deps/npm/node_modules/fs-vacuum/package.json index e05972ae685e19..69529764dd5e95 100644 --- a/deps/npm/node_modules/fs-vacuum/package.json +++ b/deps/npm/node_modules/fs-vacuum/package.json @@ -1,42 +1,45 @@ { - "_from": "fs-vacuum@~1.2.10", + "_args": [ + [ + "fs-vacuum@1.2.10", + "/Users/rebecca/code/npm" + ] + ], + "_from": "fs-vacuum@1.2.10", "_id": "fs-vacuum@1.2.10", + "_inBundle": false, "_integrity": "sha1-t2Kb7AekAxolSP35n17PHMizHjY=", "_location": "/fs-vacuum", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "fs-vacuum@~1.2.10", + "raw": "fs-vacuum@1.2.10", "name": "fs-vacuum", "escapedName": "fs-vacuum", - "rawSpec": "~1.2.10", + "rawSpec": "1.2.10", "saveSpec": null, - "fetchSpec": "~1.2.10" + "fetchSpec": "1.2.10" }, "_requiredBy": [ - "/" + "/", + "/gentle-fs" ], "_resolved": "https://registry.npmjs.org/fs-vacuum/-/fs-vacuum-1.2.10.tgz", - "_shasum": "b7629bec07a4031a2548fdf99f5ecf1cc8b31e36", - "_shrinkwrap": null, - "_spec": "fs-vacuum@~1.2.10", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "1.2.10", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Forrest L Norvell", "email": "ogd@aoaioxxysz.net" }, - "bin": null, "bugs": { "url": "https://github.com/npm/fs-vacuum/issues" }, - "bundleDependencies": false, "dependencies": { "graceful-fs": "^4.1.2", "path-is-inside": "^1.0.1", "rimraf": "^2.5.2" }, - "deprecated": false, "description": "recursively remove empty directories -- to a point", "devDependencies": { "errno": "~0.1.0", @@ -55,8 +58,6 @@ "license": "ISC", "main": "vacuum.js", "name": "fs-vacuum", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/npm/fs-vacuum.git" diff --git a/deps/npm/node_modules/iferr/.npmignore b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/.npmignore similarity index 100% rename from deps/npm/node_modules/iferr/.npmignore rename to deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/.npmignore diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/LICENSE b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/LICENSE new file mode 100644 index 00000000000000..19d5f4bce547ba --- /dev/null +++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Nadav Ivgi + +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. \ No newline at end of file diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/README.md b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/README.md new file mode 100644 index 00000000000000..0940763fa94137 --- /dev/null +++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/README.md @@ -0,0 +1,40 @@ +# iferr + +Higher-order functions for easier error handling. + +`if (err) return cb(err);` be gone! + +## Install +```bash +npm install iferr +``` + +## Use + +### JavaScript example +```js +var iferr = require('iferr'); + +function get_friends_count(id, cb) { + User.load_user(id, iferr(cb, function(user) { + user.load_friends(iferr(cb, function(friends) { + cb(null, friends.length); + })); + })); +} +``` + +### CoffeeScript example +```coffee +iferr = require 'iferr' + +get_friends_count = (id, cb) -> + User.load_user id, iferr cb, (user) -> + user.load_friends iferr cb, (friends) -> + cb null, friends.length +``` + +(TODO: document tiferr, throwerr and printerr) + +## License +MIT diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/index.coffee b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/index.coffee new file mode 100644 index 00000000000000..da6d00719f10c4 --- /dev/null +++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/index.coffee @@ -0,0 +1,24 @@ +# Delegates to `succ` on sucecss or to `fail` on error +# ex: Thing.load 123, iferr cb, (thing) -> ... +iferr = (fail, succ) -> (err, a...) -> + if err? then fail err + else succ? a... + +# Like iferr, but also catches errors thrown from `succ` and passes to `fail` +tiferr = (fail, succ) -> iferr fail, (a...) -> + try succ a... + catch err then fail err + +# Delegate to the success function on success, or throw the error otherwise +# ex: Thing.load 123, throwerr (thing) -> ... +throwerr = iferr.bind null, (err) -> throw err + +# Prints errors when one is passed, or does nothing otherwise +# ex: thing.save printerr +printerr = iferr (err) -> console.error err.stack or err + +module.exports = exports = iferr +exports.iferr = iferr +exports.tiferr = tiferr +exports.throwerr = throwerr +exports.printerr = printerr diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/index.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/index.js new file mode 100644 index 00000000000000..78fce3d2b0965a --- /dev/null +++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/index.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var exports, iferr, printerr, throwerr, tiferr, + __slice = [].slice; + + iferr = function(fail, succ) { + return function() { + var a, err; + err = arguments[0], a = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (err != null) { + return fail(err); + } else { + return typeof succ === "function" ? succ.apply(null, a) : void 0; + } + }; + }; + + tiferr = function(fail, succ) { + return iferr(fail, function() { + var a, err; + a = 1 <= arguments.length ? __slice.call(arguments, 0) : []; + try { + return succ.apply(null, a); + } catch (_error) { + err = _error; + return fail(err); + } + }); + }; + + throwerr = iferr.bind(null, function(err) { + throw err; + }); + + printerr = iferr(function(err) { + return console.error(err.stack || err); + }); + + module.exports = exports = iferr; + + exports.iferr = iferr; + + exports.tiferr = tiferr; + + exports.throwerr = throwerr; + + exports.printerr = printerr; + +}).call(this); diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/package.json b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/package.json new file mode 100644 index 00000000000000..5ac59fc8ee7473 --- /dev/null +++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/package.json @@ -0,0 +1,55 @@ +{ + "_from": "iferr@^0.1.5", + "_id": "iferr@0.1.5", + "_inBundle": false, + "_integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "_location": "/fs-write-stream-atomic/iferr", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "iferr@^0.1.5", + "name": "iferr", + "escapedName": "iferr", + "rawSpec": "^0.1.5", + "saveSpec": null, + "fetchSpec": "^0.1.5" + }, + "_requiredBy": [ + "/fs-write-stream-atomic" + ], + "_resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "_shasum": "c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501", + "_spec": "iferr@^0.1.5", + "_where": "/Users/rebecca/code/npm/node_modules/fs-write-stream-atomic", + "author": { + "name": "Nadav Ivgi" + }, + "bugs": { + "url": "https://github.com/shesek/iferr/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Higher-order functions for easier error handling", + "devDependencies": { + "coffee-script": "^1.7.1", + "mocha": "^1.18.2" + }, + "homepage": "https://github.com/shesek/iferr", + "keywords": [ + "error", + "errors" + ], + "license": "MIT", + "main": "index.js", + "name": "iferr", + "repository": { + "type": "git", + "url": "git+https://github.com/shesek/iferr.git" + }, + "scripts": { + "prepublish": "coffee -c index.coffee", + "test": "mocha" + }, + "version": "0.1.5" +} diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/test/index.coffee b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/test/index.coffee new file mode 100644 index 00000000000000..be0bc56fdf1b96 --- /dev/null +++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/test/index.coffee @@ -0,0 +1,42 @@ +{ iferr, tiferr, throwerr } = require '../index.coffee' +{ equal: eq, throws } = require 'assert' + +invoke_fail = (cb) -> cb new Error 'callback error' +invoke_succ = (cb) -> cb null +throw_error = -> throw new Error 'thrown' + +describe 'iferr', -> + it 'calls the error callback on errors', (done) -> + invoke_fail iferr( + (err) -> + eq err.message, 'callback error' + do done + -> + done new Error 'shouldn\'t call the success callback' + ) + + it 'calls the success callback on success', (done) -> + invoke_succ iferr( + -> done new Error 'shouldn\'t call the error callback' + done + ) + +describe 'tiferr', -> + it 'catches errors in the success callback', (done) -> + invoke_succ tiferr( + (err) -> + eq err.message, 'thrown' + do done + throw_error + ) + +describe 'throwerr', -> + it 'throws errors passed to the callback', (done)-> + try invoke_fail throwerr -> + done 'shouldn\'t call the success callback' + catch err + eq err.message, 'callback error' + do done + + it 'delegates to the success callback otherwise', (done) -> + invoke_succ throwerr done diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/test/mocha.opts b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/test/mocha.opts new file mode 100644 index 00000000000000..019defcf152a84 --- /dev/null +++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/test/mocha.opts @@ -0,0 +1,2 @@ +--compilers coffee:coffee-script/register +--reporter spec diff --git a/deps/npm/node_modules/fs-write-stream-atomic/package.json b/deps/npm/node_modules/fs-write-stream-atomic/package.json index 2e43e5d327443a..d6901239751dd6 100644 --- a/deps/npm/node_modules/fs-write-stream-atomic/package.json +++ b/deps/npm/node_modules/fs-write-stream-atomic/package.json @@ -1,46 +1,48 @@ { - "_from": "fs-write-stream-atomic@~1.0.10", + "_args": [ + [ + "fs-write-stream-atomic@1.0.10", + "/Users/rebecca/code/npm" + ] + ], + "_from": "fs-write-stream-atomic@1.0.10", "_id": "fs-write-stream-atomic@1.0.10", + "_inBundle": false, "_integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", "_location": "/fs-write-stream-atomic", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "fs-write-stream-atomic@~1.0.10", + "raw": "fs-write-stream-atomic@1.0.10", "name": "fs-write-stream-atomic", "escapedName": "fs-write-stream-atomic", - "rawSpec": "~1.0.10", + "rawSpec": "1.0.10", "saveSpec": null, - "fetchSpec": "~1.0.10" + "fetchSpec": "1.0.10" }, "_requiredBy": [ "/", - "/move-concurrently", - "/move-concurrently/copy-concurrently" + "/copy-concurrently", + "/move-concurrently" ], "_resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "_shasum": "b47df53493ef911df75731e70a9ded0189db40c9", - "_shrinkwrap": null, - "_spec": "fs-write-stream-atomic@~1.0.10", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "1.0.10", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "bin": null, "bugs": { "url": "https://github.com/npm/fs-write-stream-atomic/issues" }, - "bundleDependencies": false, "dependencies": { "graceful-fs": "^4.1.2", "iferr": "^0.1.5", "imurmurhash": "^0.1.4", "readable-stream": "1 || 2" }, - "deprecated": false, "description": "Like `fs.createWriteStream(...)`, but atomic.", "devDependencies": { "rimraf": "^2.4.4", @@ -54,8 +56,6 @@ "license": "ISC", "main": "index.js", "name": "fs-write-stream-atomic", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/npm/fs-write-stream-atomic.git" diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/LICENSE b/deps/npm/node_modules/fs.realpath/LICENSE similarity index 100% rename from deps/npm/node_modules/glob/node_modules/fs.realpath/LICENSE rename to deps/npm/node_modules/fs.realpath/LICENSE diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/README.md b/deps/npm/node_modules/fs.realpath/README.md similarity index 100% rename from deps/npm/node_modules/glob/node_modules/fs.realpath/README.md rename to deps/npm/node_modules/fs.realpath/README.md diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/index.js b/deps/npm/node_modules/fs.realpath/index.js similarity index 100% rename from deps/npm/node_modules/glob/node_modules/fs.realpath/index.js rename to deps/npm/node_modules/fs.realpath/index.js diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/old.js b/deps/npm/node_modules/fs.realpath/old.js similarity index 100% rename from deps/npm/node_modules/glob/node_modules/fs.realpath/old.js rename to deps/npm/node_modules/fs.realpath/old.js diff --git a/deps/npm/node_modules/fs.realpath/package.json b/deps/npm/node_modules/fs.realpath/package.json new file mode 100644 index 00000000000000..4550e22bdc7c7b --- /dev/null +++ b/deps/npm/node_modules/fs.realpath/package.json @@ -0,0 +1,59 @@ +{ + "_from": "fs.realpath@^1.0.0", + "_id": "fs.realpath@1.0.0", + "_inBundle": false, + "_integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "_location": "/fs.realpath", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "fs.realpath@^1.0.0", + "name": "fs.realpath", + "escapedName": "fs.realpath", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "_shasum": "1504ad2523158caa40db4a2787cb01411994ea4f", + "_spec": "fs.realpath@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/glob", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/fs.realpath/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", + "devDependencies": {}, + "files": [ + "old.js", + "index.js" + ], + "homepage": "https://github.com/isaacs/fs.realpath#readme", + "keywords": [ + "realpath", + "fs", + "polyfill" + ], + "license": "ISC", + "main": "index.js", + "name": "fs.realpath", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/fs.realpath.git" + }, + "scripts": { + "test": "tap test/*.js --cov" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/.npmignore b/deps/npm/node_modules/fstream/.npmignore similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/.npmignore rename to deps/npm/node_modules/fstream/.npmignore diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/.travis.yml b/deps/npm/node_modules/fstream/.travis.yml similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/.travis.yml rename to deps/npm/node_modules/fstream/.travis.yml diff --git a/deps/npm/node_modules/lru-cache/node_modules/pseudomap/LICENSE b/deps/npm/node_modules/fstream/LICENSE similarity index 100% rename from deps/npm/node_modules/lru-cache/node_modules/pseudomap/LICENSE rename to deps/npm/node_modules/fstream/LICENSE diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/README.md b/deps/npm/node_modules/fstream/README.md similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/README.md rename to deps/npm/node_modules/fstream/README.md diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/filter-pipe.js b/deps/npm/node_modules/fstream/examples/filter-pipe.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/examples/filter-pipe.js rename to deps/npm/node_modules/fstream/examples/filter-pipe.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/pipe.js b/deps/npm/node_modules/fstream/examples/pipe.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/examples/pipe.js rename to deps/npm/node_modules/fstream/examples/pipe.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/reader.js b/deps/npm/node_modules/fstream/examples/reader.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/examples/reader.js rename to deps/npm/node_modules/fstream/examples/reader.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/symlink-write.js b/deps/npm/node_modules/fstream/examples/symlink-write.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/examples/symlink-write.js rename to deps/npm/node_modules/fstream/examples/symlink-write.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/fstream.js b/deps/npm/node_modules/fstream/fstream.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/fstream.js rename to deps/npm/node_modules/fstream/fstream.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/abstract.js b/deps/npm/node_modules/fstream/lib/abstract.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/abstract.js rename to deps/npm/node_modules/fstream/lib/abstract.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/collect.js b/deps/npm/node_modules/fstream/lib/collect.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/collect.js rename to deps/npm/node_modules/fstream/lib/collect.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-reader.js b/deps/npm/node_modules/fstream/lib/dir-reader.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-reader.js rename to deps/npm/node_modules/fstream/lib/dir-reader.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-writer.js b/deps/npm/node_modules/fstream/lib/dir-writer.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-writer.js rename to deps/npm/node_modules/fstream/lib/dir-writer.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-reader.js b/deps/npm/node_modules/fstream/lib/file-reader.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-reader.js rename to deps/npm/node_modules/fstream/lib/file-reader.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-writer.js b/deps/npm/node_modules/fstream/lib/file-writer.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-writer.js rename to deps/npm/node_modules/fstream/lib/file-writer.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/get-type.js b/deps/npm/node_modules/fstream/lib/get-type.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/get-type.js rename to deps/npm/node_modules/fstream/lib/get-type.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-reader.js b/deps/npm/node_modules/fstream/lib/link-reader.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-reader.js rename to deps/npm/node_modules/fstream/lib/link-reader.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-writer.js b/deps/npm/node_modules/fstream/lib/link-writer.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-writer.js rename to deps/npm/node_modules/fstream/lib/link-writer.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-reader.js b/deps/npm/node_modules/fstream/lib/proxy-reader.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-reader.js rename to deps/npm/node_modules/fstream/lib/proxy-reader.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-writer.js b/deps/npm/node_modules/fstream/lib/proxy-writer.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-writer.js rename to deps/npm/node_modules/fstream/lib/proxy-writer.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/reader.js b/deps/npm/node_modules/fstream/lib/reader.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/reader.js rename to deps/npm/node_modules/fstream/lib/reader.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/socket-reader.js b/deps/npm/node_modules/fstream/lib/socket-reader.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/socket-reader.js rename to deps/npm/node_modules/fstream/lib/socket-reader.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/writer.js b/deps/npm/node_modules/fstream/lib/writer.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/writer.js rename to deps/npm/node_modules/fstream/lib/writer.js diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json new file mode 100644 index 00000000000000..25418b6709e64a --- /dev/null +++ b/deps/npm/node_modules/fstream/package.json @@ -0,0 +1,62 @@ +{ + "_from": "fstream@^1.0.0", + "_id": "fstream@1.0.11", + "_inBundle": false, + "_integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "_location": "/fstream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "fstream@^1.0.0", + "name": "fstream", + "escapedName": "fstream", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/node-gyp", + "/node-gyp/tar" + ], + "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "_shasum": "5c1fb1f117477114f0632a0eb4b71b3cb0fd3171", + "_spec": "fstream@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/fstream/issues" + }, + "bundleDependencies": false, + "dependencies": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "deprecated": false, + "description": "Advanced file system stream things", + "devDependencies": { + "standard": "^4.0.0", + "tap": "^1.2.0" + }, + "engines": { + "node": ">=0.6" + }, + "homepage": "https://github.com/npm/fstream#readme", + "license": "ISC", + "main": "fstream.js", + "name": "fstream", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fstream.git" + }, + "scripts": { + "test": "standard && tap examples/*.js" + }, + "version": "1.0.11" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md b/deps/npm/node_modules/gauge/CHANGELOG.md similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md rename to deps/npm/node_modules/gauge/CHANGELOG.md diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/LICENSE b/deps/npm/node_modules/gauge/LICENSE similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/LICENSE rename to deps/npm/node_modules/gauge/LICENSE diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/README.md b/deps/npm/node_modules/gauge/README.md similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/README.md rename to deps/npm/node_modules/gauge/README.md diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/base-theme.js b/deps/npm/node_modules/gauge/base-theme.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/base-theme.js rename to deps/npm/node_modules/gauge/base-theme.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/error.js b/deps/npm/node_modules/gauge/error.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/error.js rename to deps/npm/node_modules/gauge/error.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/has-color.js b/deps/npm/node_modules/gauge/has-color.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/has-color.js rename to deps/npm/node_modules/gauge/has-color.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/index.js b/deps/npm/node_modules/gauge/index.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/index.js rename to deps/npm/node_modules/gauge/index.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/deps/npm/node_modules/gauge/node_modules/ansi-regex/index.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/index.js rename to deps/npm/node_modules/gauge/node_modules/ansi-regex/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/license b/deps/npm/node_modules/gauge/node_modules/ansi-regex/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/license rename to deps/npm/node_modules/gauge/node_modules/ansi-regex/license diff --git a/deps/npm/node_modules/gauge/node_modules/ansi-regex/package.json b/deps/npm/node_modules/gauge/node_modules/ansi-regex/package.json new file mode 100644 index 00000000000000..9a902d5bf49c09 --- /dev/null +++ b/deps/npm/node_modules/gauge/node_modules/ansi-regex/package.json @@ -0,0 +1,108 @@ +{ + "_from": "ansi-regex@^2.0.0", + "_id": "ansi-regex@2.1.1", + "_inBundle": false, + "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "_location": "/gauge/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-regex@^2.0.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/gauge/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", + "_spec": "ansi-regex@^2.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/gauge/node_modules/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "0.17.0", + "xo": "0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "2.1.1", + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/gauge/node_modules/ansi-regex/readme.md similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/readme.md rename to deps/npm/node_modules/gauge/node_modules/ansi-regex/readme.md diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/index.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js rename to deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/license b/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/license rename to deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/license diff --git a/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 00000000000000..08f31e91e2479a --- /dev/null +++ b/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,77 @@ +{ + "_from": "is-fullwidth-code-point@^1.0.0", + "_id": "is-fullwidth-code-point@1.0.0", + "_inBundle": false, + "_integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "_location": "/gauge/is-fullwidth-code-point", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-fullwidth-code-point@^1.0.0", + "name": "is-fullwidth-code-point", + "escapedName": "is-fullwidth-code-point", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/gauge/string-width" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb", + "_spec": "is-fullwidth-code-point@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/gauge/node_modules/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "bundleDependencies": false, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "deprecated": false, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "0.0.4", + "code-point-at": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "char", + "string", + "str", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "license": "MIT", + "name": "is-fullwidth-code-point", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/readme.md similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md rename to deps/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/readme.md diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/index.js b/deps/npm/node_modules/gauge/node_modules/string-width/index.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/index.js rename to deps/npm/node_modules/gauge/node_modules/string-width/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/license b/deps/npm/node_modules/gauge/node_modules/string-width/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/license rename to deps/npm/node_modules/gauge/node_modules/string-width/license diff --git a/deps/npm/node_modules/gauge/node_modules/string-width/package.json b/deps/npm/node_modules/gauge/node_modules/string-width/package.json new file mode 100644 index 00000000000000..8b450344af3a15 --- /dev/null +++ b/deps/npm/node_modules/gauge/node_modules/string-width/package.json @@ -0,0 +1,88 @@ +{ + "_from": "string-width@^1.0.1", + "_id": "string-width@1.0.2", + "_inBundle": false, + "_integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "_location": "/gauge/string-width", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "string-width@^1.0.1", + "name": "string-width", + "escapedName": "string-width", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/gauge" + ], + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "_shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3", + "_spec": "string-width@^1.0.1", + "_where": "/Users/rebecca/code/npm/node_modules/gauge", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/string-width/issues" + }, + "bundleDependencies": false, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "deprecated": false, + "description": "Get the visual width of a string - the number of columns required to display it", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/string-width#readme", + "keywords": [ + "string", + "str", + "character", + "char", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "license": "MIT", + "name": "string-width", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/readme.md b/deps/npm/node_modules/gauge/node_modules/string-width/readme.md similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/readme.md rename to deps/npm/node_modules/gauge/node_modules/string-width/readme.md diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/index.js b/deps/npm/node_modules/gauge/node_modules/strip-ansi/index.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/index.js rename to deps/npm/node_modules/gauge/node_modules/strip-ansi/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/is-stream/license b/deps/npm/node_modules/gauge/node_modules/strip-ansi/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/is-stream/license rename to deps/npm/node_modules/gauge/node_modules/strip-ansi/license diff --git a/deps/npm/node_modules/gauge/node_modules/strip-ansi/package.json b/deps/npm/node_modules/gauge/node_modules/strip-ansi/package.json new file mode 100644 index 00000000000000..cc7b9886136c0d --- /dev/null +++ b/deps/npm/node_modules/gauge/node_modules/strip-ansi/package.json @@ -0,0 +1,102 @@ +{ + "_from": "strip-ansi@^3.0.1", + "_id": "strip-ansi@3.0.1", + "_inBundle": false, + "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "_location": "/gauge/strip-ansi", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "strip-ansi@^3.0.1", + "name": "strip-ansi", + "escapedName": "strip-ansi", + "rawSpec": "^3.0.1", + "saveSpec": null, + "fetchSpec": "^3.0.1" + }, + "_requiredBy": [ + "/gauge", + "/gauge/string-width" + ], + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", + "_spec": "strip-ansi@^3.0.1", + "_where": "/Users/rebecca/code/npm/node_modules/gauge", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "deprecated": false, + "description": "Strip ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/strip-ansi#readme", + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "strip-ansi", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.1" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/gauge/node_modules/strip-ansi/readme.md similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/readme.md rename to deps/npm/node_modules/gauge/node_modules/strip-ansi/readme.md diff --git a/deps/npm/node_modules/gauge/package.json b/deps/npm/node_modules/gauge/package.json new file mode 100644 index 00000000000000..9900ba9dd51e84 --- /dev/null +++ b/deps/npm/node_modules/gauge/package.json @@ -0,0 +1,94 @@ +{ + "_from": "gauge@~2.7.3", + "_id": "gauge@2.7.4", + "_inBundle": false, + "_integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "_location": "/gauge", + "_phantomChildren": { + "code-point-at": "1.1.0", + "number-is-nan": "1.0.1" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "gauge@~2.7.3", + "name": "gauge", + "escapedName": "gauge", + "rawSpec": "~2.7.3", + "saveSpec": null, + "fetchSpec": "~2.7.3" + }, + "_requiredBy": [ + "/npmlog" + ], + "_resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "_shasum": "2c03405c7538c39d7eb37b317022e325fb018bf7", + "_spec": "gauge@~2.7.3", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog", + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org" + }, + "bugs": { + "url": "https://github.com/iarna/gauge/issues" + }, + "bundleDependencies": false, + "dependencies": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "deprecated": false, + "description": "A terminal based horizontal guage", + "devDependencies": { + "readable-stream": "^2.0.6", + "require-inject": "^1.4.0", + "standard": "^7.1.2", + "tap": "^5.7.2", + "through2": "^2.0.0" + }, + "files": [ + "base-theme.js", + "CHANGELOG.md", + "error.js", + "has-color.js", + "index.js", + "LICENSE", + "package.json", + "plumbing.js", + "process.js", + "progress-bar.js", + "README.md", + "render-template.js", + "set-immediate.js", + "set-interval.js", + "spin.js", + "template-item.js", + "theme-set.js", + "themes.js", + "wide-truncate.js" + ], + "homepage": "https://github.com/iarna/gauge", + "keywords": [ + "progressbar", + "progress", + "gauge" + ], + "license": "ISC", + "main": "index.js", + "name": "gauge", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/gauge.git" + }, + "scripts": { + "prepublish": "rm -f *~", + "test": "standard && tap test/*.js --coverage" + }, + "version": "2.7.4" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/plumbing.js b/deps/npm/node_modules/gauge/plumbing.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/plumbing.js rename to deps/npm/node_modules/gauge/plumbing.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/process.js b/deps/npm/node_modules/gauge/process.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/process.js rename to deps/npm/node_modules/gauge/process.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js b/deps/npm/node_modules/gauge/progress-bar.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js rename to deps/npm/node_modules/gauge/progress-bar.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/render-template.js b/deps/npm/node_modules/gauge/render-template.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/render-template.js rename to deps/npm/node_modules/gauge/render-template.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/set-immediate.js b/deps/npm/node_modules/gauge/set-immediate.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/set-immediate.js rename to deps/npm/node_modules/gauge/set-immediate.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/set-interval.js b/deps/npm/node_modules/gauge/set-interval.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/set-interval.js rename to deps/npm/node_modules/gauge/set-interval.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/spin.js b/deps/npm/node_modules/gauge/spin.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/spin.js rename to deps/npm/node_modules/gauge/spin.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/template-item.js b/deps/npm/node_modules/gauge/template-item.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/template-item.js rename to deps/npm/node_modules/gauge/template-item.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/theme-set.js b/deps/npm/node_modules/gauge/theme-set.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/theme-set.js rename to deps/npm/node_modules/gauge/theme-set.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/themes.js b/deps/npm/node_modules/gauge/themes.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/themes.js rename to deps/npm/node_modules/gauge/themes.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/wide-truncate.js b/deps/npm/node_modules/gauge/wide-truncate.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/wide-truncate.js rename to deps/npm/node_modules/gauge/wide-truncate.js diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/CHANGELOG.md b/deps/npm/node_modules/genfun/CHANGELOG.md similarity index 100% rename from deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/CHANGELOG.md rename to deps/npm/node_modules/genfun/CHANGELOG.md diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/README.md b/deps/npm/node_modules/genfun/README.md similarity index 100% rename from deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/README.md rename to deps/npm/node_modules/genfun/README.md diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/lib/genfun.js b/deps/npm/node_modules/genfun/lib/genfun.js similarity index 100% rename from deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/lib/genfun.js rename to deps/npm/node_modules/genfun/lib/genfun.js diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/lib/method.js b/deps/npm/node_modules/genfun/lib/method.js similarity index 100% rename from deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/lib/method.js rename to deps/npm/node_modules/genfun/lib/method.js diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/lib/role.js b/deps/npm/node_modules/genfun/lib/role.js similarity index 100% rename from deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/lib/role.js rename to deps/npm/node_modules/genfun/lib/role.js diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/lib/util.js b/deps/npm/node_modules/genfun/lib/util.js similarity index 100% rename from deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/lib/util.js rename to deps/npm/node_modules/genfun/lib/util.js diff --git a/deps/npm/node_modules/genfun/package.json b/deps/npm/node_modules/genfun/package.json new file mode 100644 index 00000000000000..60295ade5dd319 --- /dev/null +++ b/deps/npm/node_modules/genfun/package.json @@ -0,0 +1,79 @@ +{ + "_from": "genfun@^4.0.1", + "_id": "genfun@4.0.1", + "_inBundle": false, + "_integrity": "sha1-7RAEHy5KfxsKOEZtF6XD4n3x38E=", + "_location": "/genfun", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "genfun@^4.0.1", + "name": "genfun", + "escapedName": "genfun", + "rawSpec": "^4.0.1", + "saveSpec": null, + "fetchSpec": "^4.0.1" + }, + "_requiredBy": [ + "/protoduck" + ], + "_resolved": "https://registry.npmjs.org/genfun/-/genfun-4.0.1.tgz", + "_shasum": "ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1", + "_spec": "genfun@^4.0.1", + "_where": "/Users/rebecca/code/npm/node_modules/protoduck", + "author": { + "name": "Kat Marchán", + "email": "kzm@sykosomatic.org" + }, + "bugs": { + "url": "https://github.com/zkat/genfun/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Fast, prototype-friendly multimethods.", + "devDependencies": { + "mocha": "^3.2.0", + "nyc": "^10.2.0", + "standard": "^10.0.2", + "standard-version": "^4.0.0", + "weallbehave": "^1.0.3", + "weallcontribute": "^1.0.8" + }, + "files": [ + "lib/*.js" + ], + "homepage": "http://github.com/zkat/genfun", + "keywords": [ + "clos", + "functional", + "oop", + "util", + "object oriented", + "prototypes", + "multimethod", + "generic functions", + "multiple dispatch", + "polymorphism", + "polymorphic", + "protocols" + ], + "license": "CC0-1.0", + "main": "lib/genfun.js", + "name": "genfun", + "repository": { + "type": "git", + "url": "git://github.com/zkat/genfun.git" + }, + "scripts": { + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "standard lib", + "release": "standard-version -s", + "test": "nyc -- mocha --reporter spec", + "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", + "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" + }, + "version": "4.0.1" +} diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/.npmignore b/deps/npm/node_modules/gentle-fs/node_modules/iferr/.npmignore similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/duplexify/.npmignore rename to deps/npm/node_modules/gentle-fs/node_modules/iferr/.npmignore diff --git a/deps/npm/node_modules/gentle-fs/node_modules/iferr/LICENSE b/deps/npm/node_modules/gentle-fs/node_modules/iferr/LICENSE new file mode 100644 index 00000000000000..19d5f4bce547ba --- /dev/null +++ b/deps/npm/node_modules/gentle-fs/node_modules/iferr/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Nadav Ivgi + +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. \ No newline at end of file diff --git a/deps/npm/node_modules/gentle-fs/node_modules/iferr/README.md b/deps/npm/node_modules/gentle-fs/node_modules/iferr/README.md new file mode 100644 index 00000000000000..0940763fa94137 --- /dev/null +++ b/deps/npm/node_modules/gentle-fs/node_modules/iferr/README.md @@ -0,0 +1,40 @@ +# iferr + +Higher-order functions for easier error handling. + +`if (err) return cb(err);` be gone! + +## Install +```bash +npm install iferr +``` + +## Use + +### JavaScript example +```js +var iferr = require('iferr'); + +function get_friends_count(id, cb) { + User.load_user(id, iferr(cb, function(user) { + user.load_friends(iferr(cb, function(friends) { + cb(null, friends.length); + })); + })); +} +``` + +### CoffeeScript example +```coffee +iferr = require 'iferr' + +get_friends_count = (id, cb) -> + User.load_user id, iferr cb, (user) -> + user.load_friends iferr cb, (friends) -> + cb null, friends.length +``` + +(TODO: document tiferr, throwerr and printerr) + +## License +MIT diff --git a/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.coffee b/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.coffee new file mode 100644 index 00000000000000..da6d00719f10c4 --- /dev/null +++ b/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.coffee @@ -0,0 +1,24 @@ +# Delegates to `succ` on sucecss or to `fail` on error +# ex: Thing.load 123, iferr cb, (thing) -> ... +iferr = (fail, succ) -> (err, a...) -> + if err? then fail err + else succ? a... + +# Like iferr, but also catches errors thrown from `succ` and passes to `fail` +tiferr = (fail, succ) -> iferr fail, (a...) -> + try succ a... + catch err then fail err + +# Delegate to the success function on success, or throw the error otherwise +# ex: Thing.load 123, throwerr (thing) -> ... +throwerr = iferr.bind null, (err) -> throw err + +# Prints errors when one is passed, or does nothing otherwise +# ex: thing.save printerr +printerr = iferr (err) -> console.error err.stack or err + +module.exports = exports = iferr +exports.iferr = iferr +exports.tiferr = tiferr +exports.throwerr = throwerr +exports.printerr = printerr diff --git a/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.js b/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.js new file mode 100644 index 00000000000000..78fce3d2b0965a --- /dev/null +++ b/deps/npm/node_modules/gentle-fs/node_modules/iferr/index.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var exports, iferr, printerr, throwerr, tiferr, + __slice = [].slice; + + iferr = function(fail, succ) { + return function() { + var a, err; + err = arguments[0], a = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (err != null) { + return fail(err); + } else { + return typeof succ === "function" ? succ.apply(null, a) : void 0; + } + }; + }; + + tiferr = function(fail, succ) { + return iferr(fail, function() { + var a, err; + a = 1 <= arguments.length ? __slice.call(arguments, 0) : []; + try { + return succ.apply(null, a); + } catch (_error) { + err = _error; + return fail(err); + } + }); + }; + + throwerr = iferr.bind(null, function(err) { + throw err; + }); + + printerr = iferr(function(err) { + return console.error(err.stack || err); + }); + + module.exports = exports = iferr; + + exports.iferr = iferr; + + exports.tiferr = tiferr; + + exports.throwerr = throwerr; + + exports.printerr = printerr; + +}).call(this); diff --git a/deps/npm/node_modules/gentle-fs/node_modules/iferr/package.json b/deps/npm/node_modules/gentle-fs/node_modules/iferr/package.json new file mode 100644 index 00000000000000..fcddb232460a79 --- /dev/null +++ b/deps/npm/node_modules/gentle-fs/node_modules/iferr/package.json @@ -0,0 +1,55 @@ +{ + "_from": "iferr@^0.1.5", + "_id": "iferr@0.1.5", + "_inBundle": false, + "_integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "_location": "/gentle-fs/iferr", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "iferr@^0.1.5", + "name": "iferr", + "escapedName": "iferr", + "rawSpec": "^0.1.5", + "saveSpec": null, + "fetchSpec": "^0.1.5" + }, + "_requiredBy": [ + "/gentle-fs" + ], + "_resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "_shasum": "c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501", + "_spec": "iferr@^0.1.5", + "_where": "/Users/rebecca/code/npm/node_modules/gentle-fs", + "author": { + "name": "Nadav Ivgi" + }, + "bugs": { + "url": "https://github.com/shesek/iferr/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Higher-order functions for easier error handling", + "devDependencies": { + "coffee-script": "^1.7.1", + "mocha": "^1.18.2" + }, + "homepage": "https://github.com/shesek/iferr", + "keywords": [ + "error", + "errors" + ], + "license": "MIT", + "main": "index.js", + "name": "iferr", + "repository": { + "type": "git", + "url": "git+https://github.com/shesek/iferr.git" + }, + "scripts": { + "prepublish": "coffee -c index.coffee", + "test": "mocha" + }, + "version": "0.1.5" +} diff --git a/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/index.coffee b/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/index.coffee new file mode 100644 index 00000000000000..be0bc56fdf1b96 --- /dev/null +++ b/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/index.coffee @@ -0,0 +1,42 @@ +{ iferr, tiferr, throwerr } = require '../index.coffee' +{ equal: eq, throws } = require 'assert' + +invoke_fail = (cb) -> cb new Error 'callback error' +invoke_succ = (cb) -> cb null +throw_error = -> throw new Error 'thrown' + +describe 'iferr', -> + it 'calls the error callback on errors', (done) -> + invoke_fail iferr( + (err) -> + eq err.message, 'callback error' + do done + -> + done new Error 'shouldn\'t call the success callback' + ) + + it 'calls the success callback on success', (done) -> + invoke_succ iferr( + -> done new Error 'shouldn\'t call the error callback' + done + ) + +describe 'tiferr', -> + it 'catches errors in the success callback', (done) -> + invoke_succ tiferr( + (err) -> + eq err.message, 'thrown' + do done + throw_error + ) + +describe 'throwerr', -> + it 'throws errors passed to the callback', (done)-> + try invoke_fail throwerr -> + done 'shouldn\'t call the success callback' + catch err + eq err.message, 'callback error' + do done + + it 'delegates to the success callback otherwise', (done) -> + invoke_succ throwerr done diff --git a/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/mocha.opts b/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/mocha.opts new file mode 100644 index 00000000000000..019defcf152a84 --- /dev/null +++ b/deps/npm/node_modules/gentle-fs/node_modules/iferr/test/mocha.opts @@ -0,0 +1,2 @@ +--compilers coffee:coffee-script/register +--reporter spec diff --git a/deps/npm/node_modules/gentle-fs/package.json b/deps/npm/node_modules/gentle-fs/package.json index ea08e40c43039f..55bc6bd40eca1b 100644 --- a/deps/npm/node_modules/gentle-fs/package.json +++ b/deps/npm/node_modules/gentle-fs/package.json @@ -1,36 +1,39 @@ { - "_from": "gentle-fs@latest", + "_args": [ + [ + "gentle-fs@2.0.1", + "/Users/rebecca/code/npm" + ] + ], + "_from": "gentle-fs@2.0.1", "_id": "gentle-fs@2.0.1", "_inBundle": false, "_integrity": "sha512-cEng5+3fuARewXktTEGbwsktcldA+YsnUEaXZwcK/3pjSE1X9ObnTs+/8rYf8s+RnIcQm2D5x3rwpN7Zom8Bew==", "_location": "/gentle-fs", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "gentle-fs@latest", + "raw": "gentle-fs@2.0.1", "name": "gentle-fs", "escapedName": "gentle-fs", - "rawSpec": "latest", + "rawSpec": "2.0.1", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "2.0.1" }, "_requiredBy": [ - "#USER", "/", "/bin-links" ], "_resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.0.1.tgz", - "_shasum": "585cfd612bfc5cd52471fdb42537f016a5ce3687", - "_spec": "gentle-fs@latest", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "2.0.1", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Mike Sherov" }, "bugs": { "url": "https://github.com/npm/gentle-fs/issues" }, - "bundleDependencies": false, "dependencies": { "aproba": "^1.1.2", "fs-vacuum": "^1.2.10", @@ -41,7 +44,6 @@ "read-cmd-shim": "^1.0.1", "slide": "^1.1.6" }, - "deprecated": false, "description": "Gentle Filesystem operations", "devDependencies": { "dezalgo": "^1.0.3", diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/get-caller-file/README.md b/deps/npm/node_modules/get-caller-file/README.md similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/get-caller-file/README.md rename to deps/npm/node_modules/get-caller-file/README.md diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/get-caller-file/index.js b/deps/npm/node_modules/get-caller-file/index.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/get-caller-file/index.js rename to deps/npm/node_modules/get-caller-file/index.js diff --git a/deps/npm/node_modules/get-caller-file/package.json b/deps/npm/node_modules/get-caller-file/package.json new file mode 100644 index 00000000000000..d5c90d52fca1e5 --- /dev/null +++ b/deps/npm/node_modules/get-caller-file/package.json @@ -0,0 +1,58 @@ +{ + "_from": "get-caller-file@^1.0.1", + "_id": "get-caller-file@1.0.2", + "_inBundle": false, + "_integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "_location": "/get-caller-file", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "get-caller-file@^1.0.1", + "name": "get-caller-file", + "escapedName": "get-caller-file", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "_shasum": "f702e63127e7e231c160a80c1554acb70d5047e5", + "_spec": "get-caller-file@^1.0.1", + "_where": "/Users/rebecca/code/npm/node_modules/yargs", + "author": { + "name": "Stefan Penner" + }, + "bugs": { + "url": "https://github.com/stefanpenner/get-caller-file/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "[![Build Status](https://travis-ci.org/ember-cli/ember-cli.svg?branch=master)](https://travis-ci.org/ember-cli/ember-cli) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master)", + "devDependencies": { + "chai": "^3.4.1", + "ensure-posix-path": "^1.0.1", + "mocha": "^2.3.4" + }, + "directories": { + "test": "tests" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/stefanpenner/get-caller-file#readme", + "license": "ISC", + "main": "index.js", + "name": "get-caller-file", + "repository": { + "type": "git", + "url": "git+https://github.com/stefanpenner/get-caller-file.git" + }, + "scripts": { + "test": "mocha test", + "test:debug": "mocha test" + }, + "version": "1.0.2" +} diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/buffer-stream.js b/deps/npm/node_modules/get-stream/buffer-stream.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/buffer-stream.js rename to deps/npm/node_modules/get-stream/buffer-stream.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/index.js b/deps/npm/node_modules/get-stream/index.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/index.js rename to deps/npm/node_modules/get-stream/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/npm-run-path/license b/deps/npm/node_modules/get-stream/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/npm-run-path/license rename to deps/npm/node_modules/get-stream/license diff --git a/deps/npm/node_modules/get-stream/package.json b/deps/npm/node_modules/get-stream/package.json new file mode 100644 index 00000000000000..3042176e149329 --- /dev/null +++ b/deps/npm/node_modules/get-stream/package.json @@ -0,0 +1,82 @@ +{ + "_from": "get-stream@^3.0.0", + "_id": "get-stream@3.0.0", + "_inBundle": false, + "_integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "_location": "/get-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "get-stream@^3.0.0", + "name": "get-stream", + "escapedName": "get-stream", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/execa", + "/got", + "/pacote" + ], + "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "_shasum": "8e943d1358dc37555054ecbe2edb05aa174ede14", + "_spec": "get-stream@^3.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/pacote", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/get-stream/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Get a stream as a string, buffer, or array", + "devDependencies": { + "ava": "*", + "into-stream": "^3.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "buffer-stream.js" + ], + "homepage": "https://github.com/sindresorhus/get-stream#readme", + "keywords": [ + "get", + "stream", + "promise", + "concat", + "string", + "str", + "text", + "buffer", + "read", + "data", + "consume", + "readable", + "readablestream", + "array", + "object", + "obj" + ], + "license": "MIT", + "name": "get-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/get-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0", + "xo": { + "esnext": true + } +} diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/readme.md b/deps/npm/node_modules/get-stream/readme.md similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/readme.md rename to deps/npm/node_modules/get-stream/readme.md diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.npmignore b/deps/npm/node_modules/getpass/.npmignore similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.npmignore rename to deps/npm/node_modules/getpass/.npmignore diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.travis.yml b/deps/npm/node_modules/getpass/.travis.yml similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.travis.yml rename to deps/npm/node_modules/getpass/.travis.yml diff --git a/deps/npm/node_modules/request/node_modules/http-signature/LICENSE b/deps/npm/node_modules/getpass/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/LICENSE rename to deps/npm/node_modules/getpass/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/README.md b/deps/npm/node_modules/getpass/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/README.md rename to deps/npm/node_modules/getpass/README.md diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/lib/index.js b/deps/npm/node_modules/getpass/lib/index.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/lib/index.js rename to deps/npm/node_modules/getpass/lib/index.js diff --git a/deps/npm/node_modules/getpass/package.json b/deps/npm/node_modules/getpass/package.json new file mode 100644 index 00000000000000..51e481a227fc57 --- /dev/null +++ b/deps/npm/node_modules/getpass/package.json @@ -0,0 +1,50 @@ +{ + "_from": "getpass@^0.1.1", + "_id": "getpass@0.1.7", + "_inBundle": false, + "_integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "_location": "/getpass", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "getpass@^0.1.1", + "name": "getpass", + "escapedName": "getpass", + "rawSpec": "^0.1.1", + "saveSpec": null, + "fetchSpec": "^0.1.1" + }, + "_requiredBy": [ + "/sshpk" + ], + "_resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "_shasum": "5eff8e3e684d569ae4cb2b1282604e8ba62149fa", + "_spec": "getpass@^0.1.1", + "_where": "/Users/rebecca/code/npm/node_modules/sshpk", + "author": { + "name": "Alex Wilson", + "email": "alex.wilson@joyent.com" + }, + "bugs": { + "url": "https://github.com/arekinath/node-getpass/issues" + }, + "bundleDependencies": false, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "deprecated": false, + "description": "getpass for node.js", + "homepage": "https://github.com/arekinath/node-getpass#readme", + "license": "MIT", + "main": "lib/index.js", + "name": "getpass", + "repository": { + "type": "git", + "url": "git+https://github.com/arekinath/node-getpass.git" + }, + "scripts": { + "test": "tape test/*.test.js" + }, + "version": "0.1.7" +} diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json b/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json deleted file mode 100644 index 3aa9a5eb53101d..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "fs.realpath@^1.0.0", - "_id": "fs.realpath@1.0.0", - "_integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "_location": "/glob/fs.realpath", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fs.realpath@^1.0.0", - "name": "fs.realpath", - "escapedName": "fs.realpath", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "_shasum": "1504ad2523158caa40db4a2787cb01411994ea4f", - "_shrinkwrap": null, - "_spec": "fs.realpath@^1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bin": null, - "bugs": { - "url": "https://github.com/isaacs/fs.realpath/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", - "devDependencies": {}, - "files": [ - "old.js", - "index.js" - ], - "homepage": "https://github.com/isaacs/fs.realpath#readme", - "keywords": [ - "realpath", - "fs", - "polyfill" - ], - "license": "ISC", - "main": "index.js", - "name": "fs.realpath", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/fs.realpath.git" - }, - "scripts": { - "test": "tap test/*.js --cov" - }, - "version": "1.0.0" -} diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md deleted file mode 100644 index ed2ec1fdd78f56..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js deleted file mode 100644 index 0478be81eabc2b..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json deleted file mode 100644 index 23f4e2cc6923d4..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "balanced-match@^1.0.0", - "_id": "balanced-match@1.0.0", - "_inBundle": false, - "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "_location": "/glob/minimatch/brace-expansion/balanced-match", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "balanced-match@^1.0.0", - "name": "balanced-match", - "escapedName": "balanced-match", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/glob/minimatch/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767", - "_spec": "balanced-match@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/balanced-match/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "license": "MIT", - "main": "index.js", - "name": "balanced-match", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "scripts": { - "bench": "make bench", - "test": "make test" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json deleted file mode 100644 index 69797016b2af65..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_from": "concat-map@0.0.1", - "_id": "concat-map@0.0.1", - "_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "_location": "/glob/minimatch/brace-expansion/concat-map", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "concat-map@0.0.1", - "name": "concat-map", - "escapedName": "concat-map", - "rawSpec": "0.0.1", - "saveSpec": null, - "fetchSpec": "0.0.1" - }, - "_requiredBy": [ - "/glob/minimatch/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "_shrinkwrap": null, - "_spec": "concat-map@0.0.1", - "_where": "/Users/zkat/Documents/code/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bin": null, - "bugs": { - "url": "https://github.com/substack/node-concat-map/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "concatenative mapdashery", - "devDependencies": { - "tape": "~2.4.0" - }, - "directories": { - "example": "example", - "test": "test" - }, - "homepage": "https://github.com/substack/node-concat-map#readme", - "keywords": [ - "concat", - "concatMap", - "map", - "functional", - "higher-order" - ], - "license": "MIT", - "main": "index.js", - "name": "concat-map", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/substack/node-concat-map.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": { - "ie": [ - 6, - 7, - 8, - 9 - ], - "ff": [ - 3.5, - 10, - 15 - ], - "chrome": [ - 10, - 22 - ], - "safari": [ - 5.1 - ], - "opera": [ - 12 - ] - } - }, - "version": "0.0.1" -} diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json deleted file mode 100644 index e7c21ffc56f679..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "brace-expansion@^1.1.7", - "_id": "brace-expansion@1.1.8", - "_inBundle": false, - "_integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "_location": "/glob/minimatch/brace-expansion", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "brace-expansion@^1.1.7", - "name": "brace-expansion", - "escapedName": "brace-expansion", - "rawSpec": "^1.1.7", - "saveSpec": null, - "fetchSpec": "^1.1.7" - }, - "_requiredBy": [ - "/glob/minimatch" - ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292", - "_spec": "brace-expansion@^1.1.7", - "_where": "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/brace-expansion/issues" - }, - "bundleDependencies": false, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - }, - "deprecated": false, - "description": "Brace expansion as known from sh/bash", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "keywords": [], - "license": "MIT", - "main": "index.js", - "name": "brace-expansion", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "scripts": { - "bench": "matcha test/perf/bench.js", - "gentest": "bash test/generate.sh", - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.1.8" -} diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/package.json deleted file mode 100644 index c329ba05343200..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "minimatch@^3.0.4", - "_id": "minimatch@3.0.4", - "_inBundle": false, - "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "_location": "/glob/minimatch", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "minimatch@^3.0.4", - "name": "minimatch", - "escapedName": "minimatch", - "rawSpec": "^3.0.4", - "saveSpec": null, - "fetchSpec": "^3.0.4" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "_shasum": "5166e286457f03306064be5497e8dbb0c3d32083", - "_spec": "minimatch@^3.0.4", - "_where": "/Users/zkat/Documents/code/npm/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "bundleDependencies": false, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "deprecated": false, - "description": "a glob matcher in javascript", - "devDependencies": { - "tap": "^10.3.2" - }, - "engines": { - "node": "*" - }, - "files": [ - "minimatch.js" - ], - "homepage": "https://github.com/isaacs/minimatch#readme", - "license": "ISC", - "main": "minimatch.js", - "name": "minimatch", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test/*.js --cov" - }, - "version": "3.0.4" -} diff --git a/deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json b/deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json deleted file mode 100644 index 39ea93a966d8e3..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_from": "path-is-absolute@^1.0.0", - "_id": "path-is-absolute@1.0.1", - "_integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "_location": "/glob/path-is-absolute", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "path-is-absolute@^1.0.0", - "name": "path-is-absolute", - "escapedName": "path-is-absolute", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", - "_shrinkwrap": null, - "_spec": "path-is-absolute@^1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/glob", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bin": null, - "bugs": { - "url": "https://github.com/sindresorhus/path-is-absolute/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "devDependencies": { - "xo": "^0.16.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/path-is-absolute#readme", - "keywords": [ - "path", - "paths", - "file", - "dir", - "absolute", - "isabsolute", - "is-absolute", - "built-in", - "util", - "utils", - "core", - "ponyfill", - "polyfill", - "shim", - "is", - "detect", - "check" - ], - "license": "MIT", - "name": "path-is-absolute", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/path-is-absolute.git" - }, - "scripts": { - "test": "xo && node test.js" - }, - "version": "1.0.1" -} diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index afa4b50f1636db..480fdff5da7f58 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -1,36 +1,44 @@ { - "_from": "glob@~7.1.2", + "_args": [ + [ + "glob@7.1.2", + "/Users/rebecca/code/npm" + ] + ], + "_from": "glob@7.1.2", "_id": "glob@7.1.2", "_inBundle": false, "_integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "_location": "/glob", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "glob@~7.1.2", + "raw": "glob@7.1.2", "name": "glob", "escapedName": "glob", - "rawSpec": "~7.1.2", + "rawSpec": "7.1.2", "saveSpec": null, - "fetchSpec": "~7.1.2" + "fetchSpec": "7.1.2" }, "_requiredBy": [ - "#USER", "/", "/cacache", + "/deglob", + "/eslint", + "/globby", "/init-package-json", "/node-gyp", + "/npm-profile/cacache", + "/npm-registry-fetch/cacache", "/pacote", "/read-package-json", "/rimraf", - "/standard/standard-engine/deglob", "/tap", - "/tap/tap-mocha-reporter" + "/tap-mocha-reporter" ], "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "_shasum": "c19c9df9a028702d678612384a6552404c636d15", - "_spec": "glob@~7.1.2", + "_spec": "7.1.2", "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", @@ -40,7 +48,6 @@ "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, - "bundleDependencies": false, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -49,7 +56,6 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, - "deprecated": false, "description": "a little globber", "devDependencies": { "mkdirp": "0", diff --git a/deps/npm/node_modules/global-dirs/index.js b/deps/npm/node_modules/global-dirs/index.js new file mode 100644 index 00000000000000..2b61d4eae2566f --- /dev/null +++ b/deps/npm/node_modules/global-dirs/index.js @@ -0,0 +1,90 @@ +'use strict'; +const path = require('path'); +const os = require('os'); +const fs = require('fs'); +const ini = require('ini'); + +const readRc = fp => { + try { + return ini.parse(fs.readFileSync(fp, 'utf8')).prefix; + } catch (err) {} +}; + +const defaultNpmPrefix = (() => { + if (process.env.PREFIX) { + return process.env.PREFIX; + } + + if (process.platform === 'win32') { + // `c:\node\node.exe` → `prefix=c:\node\` + return path.dirname(process.execPath); + } + + // `/usr/local/bin/node` → `prefix=/usr/local` + return path.dirname(path.dirname(process.execPath)); +})(); + +const getNpmPrefix = () => { + if (process.env.PREFIX) { + return process.env.PREFIX; + } + + const homePrefix = readRc(path.join(os.homedir(), '.npmrc')); + if (homePrefix) { + return homePrefix; + } + + const globalConfigPrefix = readRc(path.resolve(defaultNpmPrefix, 'etc', 'npmrc')); + if (globalConfigPrefix) { + return globalConfigPrefix; + } + + if (process.platform === 'win32' && process.env.APPDATA) { + // Hardcoded contents of `c:\Program Files\nodejs\node_modules\npm\.npmrc` + const prefix = path.join(process.env.APPDATA, 'npm'); + if (fs.existsSync(prefix)) { + return prefix; + } + } + + return defaultNpmPrefix; +}; + +const npmPrefix = path.resolve(getNpmPrefix()); + +const getYarnPrefix = () => { + if (process.env.PREFIX) { + return process.env.PREFIX; + } + + if (process.platform === 'win32' && process.env.LOCALAPPDATA) { + const prefix = path.join(process.env.LOCALAPPDATA, 'Yarn'); + if (fs.existsSync(prefix)) { + return prefix; + } + } + + const configPrefix = path.join(os.homedir(), '.config/yarn'); + if (fs.existsSync(configPrefix)) { + return configPrefix; + } + + const homePrefix = path.join(os.homedir(), '.yarn-config'); + if (fs.existsSync(homePrefix)) { + return homePrefix; + } + + // Yarn supports the npm conventions but the inverse is not true + return npmPrefix; +}; + +exports.npm = {}; +exports.npm.prefix = npmPrefix; +exports.npm.packages = path.join(npmPrefix, process.platform === 'win32' ? 'node_modules' : 'lib/node_modules'); +exports.npm.binaries = process.platform === 'win32' ? npmPrefix : path.join(npmPrefix, 'bin'); + +const yarnPrefix = path.resolve(getYarnPrefix()); +exports.yarn = {}; +exports.yarn.prefix = yarnPrefix; +exports.yarn.packages = path.join(yarnPrefix, process.platform === 'win32' ? 'config/global/node_modules' : 'global/node_modules'); +exports.yarn.binaries = path.join(exports.yarn.packages, '.bin'); diff --git a/deps/npm/node_modules/update-notifier/node_modules/boxen/license b/deps/npm/node_modules/global-dirs/license similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/boxen/license rename to deps/npm/node_modules/global-dirs/license diff --git a/deps/npm/node_modules/global-dirs/package.json b/deps/npm/node_modules/global-dirs/package.json new file mode 100644 index 00000000000000..41f0a2e2d39a48 --- /dev/null +++ b/deps/npm/node_modules/global-dirs/package.json @@ -0,0 +1,84 @@ +{ + "_from": "global-dirs@^0.1.0", + "_id": "global-dirs@0.1.1", + "_inBundle": false, + "_integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "_location": "/global-dirs", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "global-dirs@^0.1.0", + "name": "global-dirs", + "escapedName": "global-dirs", + "rawSpec": "^0.1.0", + "saveSpec": null, + "fetchSpec": "^0.1.0" + }, + "_requiredBy": [ + "/is-installed-globally" + ], + "_resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "_shasum": "b319c0dd4607f353f3be9cca4c72fc148c49f445", + "_spec": "global-dirs@^0.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/is-installed-globally", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/global-dirs/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ini": "^1.3.4" + }, + "deprecated": false, + "description": "Get the directory of globally installed packages and binaries", + "devDependencies": { + "ava": "*", + "execa": "^0.7.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/global-dirs#readme", + "keywords": [ + "global", + "prefix", + "path", + "paths", + "npm", + "yarn", + "node", + "modules", + "node-modules", + "package", + "packages", + "binary", + "binaries", + "bin", + "directory", + "directories", + "npmrc", + "rc", + "config", + "root", + "resolve" + ], + "license": "MIT", + "name": "global-dirs", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/global-dirs.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "0.1.1" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/is-installed-globally/node_modules/global-dirs/readme.md b/deps/npm/node_modules/global-dirs/readme.md similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/is-installed-globally/node_modules/global-dirs/readme.md rename to deps/npm/node_modules/global-dirs/readme.md diff --git a/deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/index.js b/deps/npm/node_modules/got/index.js similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/index.js rename to deps/npm/node_modules/got/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/npm-run-path/node_modules/path-key/license b/deps/npm/node_modules/got/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/npm-run-path/node_modules/path-key/license rename to deps/npm/node_modules/got/license diff --git a/deps/npm/node_modules/got/package.json b/deps/npm/node_modules/got/package.json new file mode 100644 index 00000000000000..67a0cedf56264b --- /dev/null +++ b/deps/npm/node_modules/got/package.json @@ -0,0 +1,110 @@ +{ + "_from": "got@^6.7.1", + "_id": "got@6.7.1", + "_inBundle": false, + "_integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "_location": "/got", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "got@^6.7.1", + "name": "got", + "escapedName": "got", + "rawSpec": "^6.7.1", + "saveSpec": null, + "fetchSpec": "^6.7.1" + }, + "_requiredBy": [ + "/package-json" + ], + "_resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "_shasum": "240cd05785a9a18e561dc1b44b41c763ef1e8db0", + "_spec": "got@^6.7.1", + "_where": "/Users/rebecca/code/npm/node_modules/package-json", + "ava": { + "concurrency": 4 + }, + "browser": { + "unzip-response": false + }, + "bugs": { + "url": "https://github.com/sindresorhus/got/issues" + }, + "bundleDependencies": false, + "dependencies": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + }, + "deprecated": false, + "description": "Simplified HTTP requests", + "devDependencies": { + "ava": "^0.17.0", + "coveralls": "^2.11.4", + "form-data": "^2.1.1", + "get-port": "^2.0.0", + "into-stream": "^3.0.0", + "nyc": "^10.0.0", + "pem": "^1.4.4", + "pify": "^2.3.0", + "tempfile": "^1.1.1", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/got#readme", + "keywords": [ + "http", + "https", + "get", + "got", + "url", + "uri", + "request", + "util", + "utility", + "simple", + "curl", + "wget", + "fetch" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + } + ], + "name": "got", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/got.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "6.7.1", + "xo": { + "esnext": true + } +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/readme.md b/deps/npm/node_modules/got/readme.md similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/readme.md rename to deps/npm/node_modules/got/readme.md diff --git a/deps/npm/node_modules/graceful-fs/package.json b/deps/npm/node_modules/graceful-fs/package.json index dada1f56f07c22..d5b0bf01db5536 100644 --- a/deps/npm/node_modules/graceful-fs/package.json +++ b/deps/npm/node_modules/graceful-fs/package.json @@ -1,50 +1,59 @@ { - "_from": "graceful-fs@~4.1.11", + "_args": [ + [ + "graceful-fs@4.1.11", + "/Users/rebecca/code/npm" + ] + ], + "_from": "graceful-fs@4.1.11", "_id": "graceful-fs@4.1.11", + "_inBundle": false, "_integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "_location": "/graceful-fs", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "graceful-fs@~4.1.11", + "raw": "graceful-fs@4.1.11", "name": "graceful-fs", "escapedName": "graceful-fs", - "rawSpec": "~4.1.11", + "rawSpec": "4.1.11", "saveSpec": null, - "fetchSpec": "~4.1.11" + "fetchSpec": "4.1.11" }, "_requiredBy": [ "/", + "/bin-links", "/cacache", "/cmd-shim", + "/configstore", + "/flat-cache", "/fs-vacuum", "/fs-write-stream-atomic", "/fstream", + "/gentle-fs", + "/libcipm", + "/load-json-file", "/node-gyp", + "/npm-lifecycle", + "/npm-profile/cacache", "/npm-registry-client", + "/npm-registry-fetch/cacache", + "/pkg-conf/load-json-file", "/read-cmd-shim", "/read-installed", "/read-package-json", "/readdir-scoped-modules", "/sha", - "/standard/eslint/file-entry-cache/flat-cache", "/tacks", - "/update-notifier/configstore", "/write-file-atomic" ], "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "_shasum": "0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658", - "_shrinkwrap": null, - "_spec": "graceful-fs@~4.1.11", - "_where": "/Users/zkat/Documents/code/npm", - "bin": null, + "_spec": "4.1.11", + "_where": "/Users/rebecca/code/npm", "bugs": { "url": "https://github.com/isaacs/node-graceful-fs/issues" }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, "description": "A drop-in replacement for fs, making various improvements.", "devDependencies": { "mkdirp": "^0.5.0", @@ -83,8 +92,6 @@ "license": "ISC", "main": "graceful-fs.js", "name": "graceful-fs", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/isaacs/node-graceful-fs.git" diff --git a/deps/npm/node_modules/request/node_modules/har-validator/LICENSE b/deps/npm/node_modules/har-schema/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/LICENSE rename to deps/npm/node_modules/har-schema/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/README.md b/deps/npm/node_modules/har-schema/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/README.md rename to deps/npm/node_modules/har-schema/README.md diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/afterRequest.json b/deps/npm/node_modules/har-schema/lib/afterRequest.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/afterRequest.json rename to deps/npm/node_modules/har-schema/lib/afterRequest.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/beforeRequest.json b/deps/npm/node_modules/har-schema/lib/beforeRequest.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/beforeRequest.json rename to deps/npm/node_modules/har-schema/lib/beforeRequest.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/browser.json b/deps/npm/node_modules/har-schema/lib/browser.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/browser.json rename to deps/npm/node_modules/har-schema/lib/browser.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/cache.json b/deps/npm/node_modules/har-schema/lib/cache.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/cache.json rename to deps/npm/node_modules/har-schema/lib/cache.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/content.json b/deps/npm/node_modules/har-schema/lib/content.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/content.json rename to deps/npm/node_modules/har-schema/lib/content.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/cookie.json b/deps/npm/node_modules/har-schema/lib/cookie.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/cookie.json rename to deps/npm/node_modules/har-schema/lib/cookie.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/creator.json b/deps/npm/node_modules/har-schema/lib/creator.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/creator.json rename to deps/npm/node_modules/har-schema/lib/creator.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/entry.json b/deps/npm/node_modules/har-schema/lib/entry.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/entry.json rename to deps/npm/node_modules/har-schema/lib/entry.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/har.json b/deps/npm/node_modules/har-schema/lib/har.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/har.json rename to deps/npm/node_modules/har-schema/lib/har.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/header.json b/deps/npm/node_modules/har-schema/lib/header.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/header.json rename to deps/npm/node_modules/har-schema/lib/header.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/index.js b/deps/npm/node_modules/har-schema/lib/index.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/index.js rename to deps/npm/node_modules/har-schema/lib/index.js diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/log.json b/deps/npm/node_modules/har-schema/lib/log.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/log.json rename to deps/npm/node_modules/har-schema/lib/log.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/page.json b/deps/npm/node_modules/har-schema/lib/page.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/page.json rename to deps/npm/node_modules/har-schema/lib/page.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/pageTimings.json b/deps/npm/node_modules/har-schema/lib/pageTimings.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/pageTimings.json rename to deps/npm/node_modules/har-schema/lib/pageTimings.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/postData.json b/deps/npm/node_modules/har-schema/lib/postData.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/postData.json rename to deps/npm/node_modules/har-schema/lib/postData.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/query.json b/deps/npm/node_modules/har-schema/lib/query.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/query.json rename to deps/npm/node_modules/har-schema/lib/query.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/request.json b/deps/npm/node_modules/har-schema/lib/request.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/request.json rename to deps/npm/node_modules/har-schema/lib/request.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/response.json b/deps/npm/node_modules/har-schema/lib/response.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/response.json rename to deps/npm/node_modules/har-schema/lib/response.json diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/timings.json b/deps/npm/node_modules/har-schema/lib/timings.json similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/lib/timings.json rename to deps/npm/node_modules/har-schema/lib/timings.json diff --git a/deps/npm/node_modules/har-schema/package.json b/deps/npm/node_modules/har-schema/package.json new file mode 100644 index 00000000000000..ddb3608ab1750a --- /dev/null +++ b/deps/npm/node_modules/har-schema/package.json @@ -0,0 +1,86 @@ +{ + "_from": "har-schema@^2.0.0", + "_id": "har-schema@2.0.0", + "_inBundle": false, + "_integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "_location": "/har-schema", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "har-schema@^2.0.0", + "name": "har-schema", + "escapedName": "har-schema", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/har-validator" + ], + "_resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "_shasum": "a94c2224ebcac04782a0d9035521f24735b7ec92", + "_spec": "har-schema@^2.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/har-validator", + "author": { + "name": "Ahmad Nassri", + "email": "ahmad@ahmadnassri.com", + "url": "https://www.ahmadnassri.com/" + }, + "bugs": { + "url": "https://github.com/ahmadnassri/har-schema/issues" + }, + "bundleDependencies": false, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } + }, + "contributors": [ + { + "name": "Evgeny Poberezkin", + "email": "e.poberezkin@me.com" + } + ], + "deprecated": false, + "description": "JSON Schema for HTTP Archive (HAR)", + "devDependencies": { + "ajv": "^5.0.0", + "codeclimate-test-reporter": "^0.4.0", + "cz-conventional-changelog": "^1.2.0", + "echint": "^2.1.0", + "semantic-release": "^6.3.2", + "snazzy": "^5.0.0", + "tap": "^8.0.1" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/ahmadnassri/har-schema", + "keywords": [ + "har", + "http", + "archive", + "JSON", + "schema", + "JSON-schema" + ], + "license": "ISC", + "main": "lib/index.js", + "name": "har-schema", + "repository": { + "type": "git", + "url": "git+https://github.com/ahmadnassri/har-schema.git" + }, + "scripts": { + "codeclimate": "tap --coverage-report=text-lcov | codeclimate-test-reporter", + "coverage": "tap test --reporter silent --coverage", + "pretest": "snazzy && echint", + "semantic-release": "semantic-release pre && npm publish && semantic-release post", + "test": "tap test --reporter spec" + }, + "version": "2.0.0" +} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/LICENSE b/deps/npm/node_modules/har-validator/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/har-schema/LICENSE rename to deps/npm/node_modules/har-validator/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/har-validator/README.md b/deps/npm/node_modules/har-validator/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/README.md rename to deps/npm/node_modules/har-validator/README.md diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/async.js b/deps/npm/node_modules/har-validator/lib/async.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/lib/async.js rename to deps/npm/node_modules/har-validator/lib/async.js diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/error.js b/deps/npm/node_modules/har-validator/lib/error.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/lib/error.js rename to deps/npm/node_modules/har-validator/lib/error.js diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/promise.js b/deps/npm/node_modules/har-validator/lib/promise.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/lib/promise.js rename to deps/npm/node_modules/har-validator/lib/promise.js diff --git a/deps/npm/node_modules/har-validator/package.json b/deps/npm/node_modules/har-validator/package.json new file mode 100644 index 00000000000000..544692d7330ab2 --- /dev/null +++ b/deps/npm/node_modules/har-validator/package.json @@ -0,0 +1,75 @@ +{ + "_from": "har-validator@~5.0.3", + "_id": "har-validator@5.0.3", + "_inBundle": false, + "_integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "_location": "/har-validator", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "har-validator@~5.0.3", + "name": "har-validator", + "escapedName": "har-validator", + "rawSpec": "~5.0.3", + "saveSpec": null, + "fetchSpec": "~5.0.3" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "_shasum": "ba402c266194f15956ef15e0fcf242993f6a7dfd", + "_spec": "har-validator@~5.0.3", + "_where": "/Users/rebecca/code/npm/node_modules/request", + "author": { + "name": "Ahmad Nassri", + "email": "ahmad@ahmadnassri.com", + "url": "https://www.ahmadnassri.com/" + }, + "bugs": { + "url": "https://github.com/ahmadnassri/har-validator/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ajv": "^5.1.0", + "har-schema": "^2.0.0" + }, + "deprecated": false, + "description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema", + "devDependencies": { + "echint": "^4.0.1", + "standard": "^10.0.2", + "tap": "^10.3.2" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/ahmadnassri/har-validator", + "keywords": [ + "har", + "cli", + "ajv", + "http", + "archive", + "validate", + "validator" + ], + "license": "ISC", + "main": "lib/promise.js", + "name": "har-validator", + "repository": { + "type": "git", + "url": "git+https://github.com/ahmadnassri/har-validator.git" + }, + "scripts": { + "coverage": "tap test --reporter silent --coverage", + "lint": "standard && echint", + "pretest": "npm run lint", + "test": "tap test" + }, + "version": "5.0.3" +} diff --git a/deps/npm/node_modules/has-flag/index.js b/deps/npm/node_modules/has-flag/index.js new file mode 100644 index 00000000000000..5139728fba6a26 --- /dev/null +++ b/deps/npm/node_modules/has-flag/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = (flag, argv) => { + argv = argv || process.argv; + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const pos = argv.indexOf(prefix + flag); + const terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; diff --git a/deps/npm/node_modules/update-notifier/node_modules/boxen/node_modules/string-width/license b/deps/npm/node_modules/has-flag/license similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/boxen/node_modules/string-width/license rename to deps/npm/node_modules/has-flag/license diff --git a/deps/npm/node_modules/has-flag/package.json b/deps/npm/node_modules/has-flag/package.json new file mode 100644 index 00000000000000..4bcd2125a89c64 --- /dev/null +++ b/deps/npm/node_modules/has-flag/package.json @@ -0,0 +1,76 @@ +{ + "_from": "has-flag@^3.0.0", + "_id": "has-flag@3.0.0", + "_inBundle": false, + "_integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "_location": "/has-flag", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "has-flag@^3.0.0", + "name": "has-flag", + "escapedName": "has-flag", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/supports-color" + ], + "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "_shasum": "b5d454dc2199ae225699f3467e5a07f3b955bafd", + "_spec": "has-flag@^3.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/has-flag/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if argv has a specific flag", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/has-flag#readme", + "keywords": [ + "has", + "check", + "detect", + "contains", + "find", + "flag", + "cli", + "command-line", + "argv", + "process", + "arg", + "args", + "argument", + "arguments", + "getopt", + "minimist", + "optimist" + ], + "license": "MIT", + "name": "has-flag", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/has-flag.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/deps/npm/node_modules/has-flag/readme.md b/deps/npm/node_modules/has-flag/readme.md new file mode 100644 index 00000000000000..677893c278a2e3 --- /dev/null +++ b/deps/npm/node_modules/has-flag/readme.md @@ -0,0 +1,70 @@ +# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag) + +> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag + +Correctly stops looking after an `--` argument terminator. + + +## Install + +``` +$ npm install has-flag +``` + + +## Usage + +```js +// foo.js +const hasFlag = require('has-flag'); + +hasFlag('unicorn'); +//=> true + +hasFlag('--unicorn'); +//=> true + +hasFlag('f'); +//=> true + +hasFlag('-f'); +//=> true + +hasFlag('foo=bar'); +//=> true + +hasFlag('foo'); +//=> false + +hasFlag('rainbow'); +//=> false +``` + +``` +$ node foo.js -f --unicorn --foo=bar -- --rainbow +``` + + +## API + +### hasFlag(flag, [argv]) + +Returns a boolean for whether the flag exists. + +#### flag + +Type: `string` + +CLI flag to look for. The `--` prefix is optional. + +#### argv + +Type: `string[]`
+Default: `process.argv` + +CLI arguments. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/has-unicode/package.json b/deps/npm/node_modules/has-unicode/package.json index d6794e54b33fa5..b57ffd53d096b5 100644 --- a/deps/npm/node_modules/has-unicode/package.json +++ b/deps/npm/node_modules/has-unicode/package.json @@ -1,39 +1,40 @@ { - "_from": "has-unicode@~2.0.1", + "_args": [ + [ + "has-unicode@2.0.1", + "/Users/rebecca/code/npm" + ] + ], + "_from": "has-unicode@2.0.1", "_id": "has-unicode@2.0.1", + "_inBundle": false, "_integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "_location": "/has-unicode", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "has-unicode@~2.0.1", + "raw": "has-unicode@2.0.1", "name": "has-unicode", "escapedName": "has-unicode", - "rawSpec": "~2.0.1", + "rawSpec": "2.0.1", "saveSpec": null, - "fetchSpec": "~2.0.1" + "fetchSpec": "2.0.1" }, "_requiredBy": [ "/", - "/npmlog/gauge" + "/gauge" ], "_resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "_shasum": "e0e6fe6a28cf51138855e086d1691e771de2a8b9", - "_shrinkwrap": null, - "_spec": "has-unicode@~2.0.1", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "2.0.1", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org" }, - "bin": null, "bugs": { "url": "https://github.com/iarna/has-unicode/issues" }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, "description": "Try to guess if your terminal supports unicode", "devDependencies": { "require-inject": "^1.3.0", @@ -50,8 +51,6 @@ "license": "ISC", "main": "index.js", "name": "has-unicode", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/iarna/has-unicode.git" diff --git a/deps/npm/node_modules/request/node_modules/hawk/.npmignore b/deps/npm/node_modules/hawk/.npmignore similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/.npmignore rename to deps/npm/node_modules/hawk/.npmignore diff --git a/deps/npm/node_modules/request/node_modules/hawk/LICENSE b/deps/npm/node_modules/hawk/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/LICENSE rename to deps/npm/node_modules/hawk/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/hawk/README.md b/deps/npm/node_modules/hawk/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/README.md rename to deps/npm/node_modules/hawk/README.md diff --git a/deps/npm/node_modules/request/node_modules/hawk/client.js b/deps/npm/node_modules/hawk/client.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/client.js rename to deps/npm/node_modules/hawk/client.js diff --git a/deps/npm/node_modules/request/node_modules/hawk/dist/browser.js b/deps/npm/node_modules/hawk/dist/browser.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/dist/browser.js rename to deps/npm/node_modules/hawk/dist/browser.js diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js b/deps/npm/node_modules/hawk/lib/browser.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/lib/browser.js rename to deps/npm/node_modules/hawk/lib/browser.js diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/client.js b/deps/npm/node_modules/hawk/lib/client.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/lib/client.js rename to deps/npm/node_modules/hawk/lib/client.js diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/crypto.js b/deps/npm/node_modules/hawk/lib/crypto.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/lib/crypto.js rename to deps/npm/node_modules/hawk/lib/crypto.js diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/index.js b/deps/npm/node_modules/hawk/lib/index.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/lib/index.js rename to deps/npm/node_modules/hawk/lib/index.js diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/server.js b/deps/npm/node_modules/hawk/lib/server.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/lib/server.js rename to deps/npm/node_modules/hawk/lib/server.js diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js b/deps/npm/node_modules/hawk/lib/utils.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/lib/utils.js rename to deps/npm/node_modules/hawk/lib/utils.js diff --git a/deps/npm/node_modules/hawk/package.json b/deps/npm/node_modules/hawk/package.json new file mode 100755 index 00000000000000..f9c37bb7d82f16 --- /dev/null +++ b/deps/npm/node_modules/hawk/package.json @@ -0,0 +1,78 @@ +{ + "_from": "hawk@~6.0.2", + "_id": "hawk@6.0.2", + "_inBundle": false, + "_integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "_location": "/hawk", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "hawk@~6.0.2", + "name": "hawk", + "escapedName": "hawk", + "rawSpec": "~6.0.2", + "saveSpec": null, + "fetchSpec": "~6.0.2" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "_shasum": "af4d914eb065f9b5ce4d9d11c1cb2126eecc3038", + "_spec": "hawk@~6.0.2", + "_where": "/Users/rebecca/code/npm/node_modules/request", + "author": { + "name": "Eran Hammer", + "email": "eran@hammer.io", + "url": "http://hueniverse.com" + }, + "babel": { + "presets": [ + "es2015" + ] + }, + "browser": "dist/browser.js", + "bugs": { + "url": "https://github.com/hueniverse/hawk/issues" + }, + "bundleDependencies": false, + "dependencies": { + "boom": "4.x.x", + "cryptiles": "3.x.x", + "hoek": "4.x.x", + "sntp": "2.x.x" + }, + "deprecated": false, + "description": "HTTP Hawk Authentication Scheme", + "devDependencies": { + "babel-cli": "^6.1.2", + "babel-preset-es2015": "^6.1.2", + "code": "4.x.x", + "lab": "14.x.x" + }, + "engines": { + "node": ">=4.5.0" + }, + "homepage": "https://github.com/hueniverse/hawk#readme", + "keywords": [ + "http", + "authentication", + "scheme", + "hawk" + ], + "license": "BSD-3-Clause", + "main": "lib/index.js", + "name": "hawk", + "repository": { + "type": "git", + "url": "git://github.com/hueniverse/hawk.git" + }, + "scripts": { + "build-client": "mkdir -p dist; babel lib/browser.js --out-file dist/browser.js", + "prepublish": "npm run-script build-client", + "test": "lab -a code -t 100 -L", + "test-cov-html": "lab -a code -r html -o coverage.html" + }, + "version": "6.0.2" +} diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore b/deps/npm/node_modules/hoek/.npmignore similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore rename to deps/npm/node_modules/hoek/.npmignore diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE b/deps/npm/node_modules/hoek/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE rename to deps/npm/node_modules/hoek/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md b/deps/npm/node_modules/hoek/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md rename to deps/npm/node_modules/hoek/README.md diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js b/deps/npm/node_modules/hoek/lib/escape.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js rename to deps/npm/node_modules/hoek/lib/escape.js diff --git a/deps/npm/node_modules/hoek/lib/index.js b/deps/npm/node_modules/hoek/lib/index.js new file mode 100755 index 00000000000000..75bbeb7c571080 --- /dev/null +++ b/deps/npm/node_modules/hoek/lib/index.js @@ -0,0 +1,978 @@ +'use strict'; + +// Load modules + +const Crypto = require('crypto'); +const Path = require('path'); +const Util = require('util'); +const Escape = require('./escape'); + + +// Declare internals + +const internals = {}; + + +// Clone object or array + +exports.clone = function (obj, seen) { + + if (typeof obj !== 'object' || + obj === null) { + + return obj; + } + + seen = seen || new Map(); + + const lookup = seen.get(obj); + if (lookup) { + return lookup; + } + + let newObj; + let cloneDeep = false; + + if (!Array.isArray(obj)) { + if (Buffer.isBuffer(obj)) { + newObj = new Buffer(obj); + } + else if (obj instanceof Date) { + newObj = new Date(obj.getTime()); + } + else if (obj instanceof RegExp) { + newObj = new RegExp(obj); + } + else { + const proto = Object.getPrototypeOf(obj); + if (proto && + proto.isImmutable) { + + newObj = obj; + } + else { + newObj = Object.create(proto); + cloneDeep = true; + } + } + } + else { + newObj = []; + cloneDeep = true; + } + + seen.set(obj, newObj); + + if (cloneDeep) { + const keys = Object.getOwnPropertyNames(obj); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const descriptor = Object.getOwnPropertyDescriptor(obj, key); + if (descriptor && + (descriptor.get || + descriptor.set)) { + + Object.defineProperty(newObj, key, descriptor); + } + else { + newObj[key] = exports.clone(obj[key], seen); + } + } + } + + return newObj; +}; + + +// Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied + +/*eslint-disable */ +exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) { +/*eslint-enable */ + + exports.assert(target && typeof target === 'object', 'Invalid target value: must be an object'); + exports.assert(source === null || source === undefined || typeof source === 'object', 'Invalid source value: must be null, undefined, or an object'); + + if (!source) { + return target; + } + + if (Array.isArray(source)) { + exports.assert(Array.isArray(target), 'Cannot merge array onto an object'); + if (isMergeArrays === false) { // isMergeArrays defaults to true + target.length = 0; // Must not change target assignment + } + + for (let i = 0; i < source.length; ++i) { + target.push(exports.clone(source[i])); + } + + return target; + } + + const keys = Object.keys(source); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (key === '__proto__') { + continue; + } + + const value = source[key]; + if (value && + typeof value === 'object') { + + if (!target[key] || + typeof target[key] !== 'object' || + (Array.isArray(target[key]) !== Array.isArray(value)) || + value instanceof Date || + Buffer.isBuffer(value) || + value instanceof RegExp) { + + target[key] = exports.clone(value); + } + else { + exports.merge(target[key], value, isNullOverride, isMergeArrays); + } + } + else { + if (value !== null && + value !== undefined) { // Explicit to preserve empty strings + + target[key] = value; + } + else if (isNullOverride !== false) { // Defaults to true + target[key] = value; + } + } + } + + return target; +}; + + +// Apply options to a copy of the defaults + +exports.applyToDefaults = function (defaults, options, isNullOverride) { + + exports.assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object'); + exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object'); + + if (!options) { // If no options, return null + return null; + } + + const copy = exports.clone(defaults); + + if (options === true) { // If options is set to true, use defaults + return copy; + } + + return exports.merge(copy, options, isNullOverride === true, false); +}; + + +// Clone an object except for the listed keys which are shallow copied + +exports.cloneWithShallow = function (source, keys) { + + if (!source || + typeof source !== 'object') { + + return source; + } + + const storage = internals.store(source, keys); // Move shallow copy items to storage + const copy = exports.clone(source); // Deep copy the rest + internals.restore(copy, source, storage); // Shallow copy the stored items and restore + return copy; +}; + + +internals.store = function (source, keys) { + + const storage = {}; + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const value = exports.reach(source, key); + if (value !== undefined) { + storage[key] = value; + internals.reachSet(source, key, undefined); + } + } + + return storage; +}; + + +internals.restore = function (copy, source, storage) { + + const keys = Object.keys(storage); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + internals.reachSet(copy, key, storage[key]); + internals.reachSet(source, key, storage[key]); + } +}; + + +internals.reachSet = function (obj, key, value) { + + const path = key.split('.'); + let ref = obj; + for (let i = 0; i < path.length; ++i) { + const segment = path[i]; + if (i + 1 === path.length) { + ref[segment] = value; + } + + ref = ref[segment]; + } +}; + + +// Apply options to defaults except for the listed keys which are shallow copied from option without merging + +exports.applyToDefaultsWithShallow = function (defaults, options, keys) { + + exports.assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object'); + exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object'); + exports.assert(keys && Array.isArray(keys), 'Invalid keys'); + + if (!options) { // If no options, return null + return null; + } + + const copy = exports.cloneWithShallow(defaults, keys); + + if (options === true) { // If options is set to true, use defaults + return copy; + } + + const storage = internals.store(options, keys); // Move shallow copy items to storage + exports.merge(copy, options, false, false); // Deep copy the rest + internals.restore(copy, options, storage); // Shallow copy the stored items and restore + return copy; +}; + + +// Deep object or array comparison + +exports.deepEqual = function (obj, ref, options, seen) { + + options = options || { prototype: true }; + + const type = typeof obj; + + if (type !== typeof ref) { + return false; + } + + if (type !== 'object' || + obj === null || + ref === null) { + + if (obj === ref) { // Copied from Deep-eql, copyright(c) 2013 Jake Luer, jake@alogicalparadox.com, MIT Licensed, https://github.com/chaijs/deep-eql + return obj !== 0 || 1 / obj === 1 / ref; // -0 / +0 + } + + return obj !== obj && ref !== ref; // NaN + } + + seen = seen || []; + if (seen.indexOf(obj) !== -1) { + return true; // If previous comparison failed, it would have stopped execution + } + + seen.push(obj); + + if (Array.isArray(obj)) { + if (!Array.isArray(ref)) { + return false; + } + + if (!options.part && obj.length !== ref.length) { + return false; + } + + for (let i = 0; i < obj.length; ++i) { + if (options.part) { + let found = false; + for (let j = 0; j < ref.length; ++j) { + if (exports.deepEqual(obj[i], ref[j], options)) { + found = true; + break; + } + } + + return found; + } + + if (!exports.deepEqual(obj[i], ref[i], options)) { + return false; + } + } + + return true; + } + + if (Buffer.isBuffer(obj)) { + if (!Buffer.isBuffer(ref)) { + return false; + } + + if (obj.length !== ref.length) { + return false; + } + + for (let i = 0; i < obj.length; ++i) { + if (obj[i] !== ref[i]) { + return false; + } + } + + return true; + } + + if (obj instanceof Date) { + return (ref instanceof Date && obj.getTime() === ref.getTime()); + } + + if (obj instanceof RegExp) { + return (ref instanceof RegExp && obj.toString() === ref.toString()); + } + + if (options.prototype) { + if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) { + return false; + } + } + + const keys = Object.getOwnPropertyNames(obj); + + if (!options.part && keys.length !== Object.getOwnPropertyNames(ref).length) { + return false; + } + + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const descriptor = Object.getOwnPropertyDescriptor(obj, key); + if (descriptor.get) { + if (!exports.deepEqual(descriptor, Object.getOwnPropertyDescriptor(ref, key), options, seen)) { + return false; + } + } + else if (!exports.deepEqual(obj[key], ref[key], options, seen)) { + return false; + } + } + + return true; +}; + + +// Remove duplicate items from array + +exports.unique = (array, key) => { + + let result; + if (key) { + result = []; + const index = new Set(); + array.forEach((item) => { + + const identifier = item[key]; + if (!index.has(identifier)) { + index.add(identifier); + result.push(item); + } + }); + } + else { + result = Array.from(new Set(array)); + } + + return result; +}; + + +// Convert array into object + +exports.mapToObject = function (array, key) { + + if (!array) { + return null; + } + + const obj = {}; + for (let i = 0; i < array.length; ++i) { + if (key) { + if (array[i][key]) { + obj[array[i][key]] = true; + } + } + else { + obj[array[i]] = true; + } + } + + return obj; +}; + + +// Find the common unique items in two arrays + +exports.intersect = function (array1, array2, justFirst) { + + if (!array1 || !array2) { + return []; + } + + const common = []; + const hash = (Array.isArray(array1) ? exports.mapToObject(array1) : array1); + const found = {}; + for (let i = 0; i < array2.length; ++i) { + if (hash[array2[i]] && !found[array2[i]]) { + if (justFirst) { + return array2[i]; + } + + common.push(array2[i]); + found[array2[i]] = true; + } + } + + return (justFirst ? null : common); +}; + + +// Test if the reference contains the values + +exports.contain = function (ref, values, options) { + + /* + string -> string(s) + array -> item(s) + object -> key(s) + object -> object (key:value) + */ + + let valuePairs = null; + if (typeof ref === 'object' && + typeof values === 'object' && + !Array.isArray(ref) && + !Array.isArray(values)) { + + valuePairs = values; + values = Object.keys(values); + } + else { + values = [].concat(values); + } + + options = options || {}; // deep, once, only, part + + exports.assert(arguments.length >= 2, 'Insufficient arguments'); + exports.assert(typeof ref === 'string' || typeof ref === 'object', 'Reference must be string or an object'); + exports.assert(values.length, 'Values array cannot be empty'); + + let compare; + let compareFlags; + if (options.deep) { + compare = exports.deepEqual; + + const hasOnly = options.hasOwnProperty('only'); + const hasPart = options.hasOwnProperty('part'); + + compareFlags = { + prototype: hasOnly ? options.only : hasPart ? !options.part : false, + part: hasOnly ? !options.only : hasPart ? options.part : true + }; + } + else { + compare = (a, b) => a === b; + } + + let misses = false; + const matches = new Array(values.length); + for (let i = 0; i < matches.length; ++i) { + matches[i] = 0; + } + + if (typeof ref === 'string') { + let pattern = '('; + for (let i = 0; i < values.length; ++i) { + const value = values[i]; + exports.assert(typeof value === 'string', 'Cannot compare string reference to non-string value'); + pattern += (i ? '|' : '') + exports.escapeRegex(value); + } + + const regex = new RegExp(pattern + ')', 'g'); + const leftovers = ref.replace(regex, ($0, $1) => { + + const index = values.indexOf($1); + ++matches[index]; + return ''; // Remove from string + }); + + misses = !!leftovers; + } + else if (Array.isArray(ref)) { + for (let i = 0; i < ref.length; ++i) { + let matched = false; + for (let j = 0; j < values.length && matched === false; ++j) { + matched = compare(values[j], ref[i], compareFlags) && j; + } + + if (matched !== false) { + ++matches[matched]; + } + else { + misses = true; + } + } + } + else { + const keys = Object.getOwnPropertyNames(ref); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const pos = values.indexOf(key); + if (pos !== -1) { + if (valuePairs && + !compare(valuePairs[key], ref[key], compareFlags)) { + + return false; + } + + ++matches[pos]; + } + else { + misses = true; + } + } + } + + let result = false; + for (let i = 0; i < matches.length; ++i) { + result = result || !!matches[i]; + if ((options.once && matches[i] > 1) || + (!options.part && !matches[i])) { + + return false; + } + } + + if (options.only && + misses) { + + return false; + } + + return result; +}; + + +// Flatten array + +exports.flatten = function (array, target) { + + const result = target || []; + + for (let i = 0; i < array.length; ++i) { + if (Array.isArray(array[i])) { + exports.flatten(array[i], result); + } + else { + result.push(array[i]); + } + } + + return result; +}; + + +// Convert an object key chain string ('a.b.c') to reference (object[a][b][c]) + +exports.reach = function (obj, chain, options) { + + if (chain === false || + chain === null || + typeof chain === 'undefined') { + + return obj; + } + + options = options || {}; + if (typeof options === 'string') { + options = { separator: options }; + } + + const path = chain.split(options.separator || '.'); + let ref = obj; + for (let i = 0; i < path.length; ++i) { + let key = path[i]; + if (key[0] === '-' && Array.isArray(ref)) { + key = key.slice(1, key.length); + key = ref.length - key; + } + + if (!ref || + !((typeof ref === 'object' || typeof ref === 'function') && key in ref) || + (typeof ref !== 'object' && options.functions === false)) { // Only object and function can have properties + + exports.assert(!options.strict || i + 1 === path.length, 'Missing segment', key, 'in reach path ', chain); + exports.assert(typeof ref === 'object' || options.functions === true || typeof ref !== 'function', 'Invalid segment', key, 'in reach path ', chain); + ref = options.default; + break; + } + + ref = ref[key]; + } + + return ref; +}; + + +exports.reachTemplate = function (obj, template, options) { + + return template.replace(/{([^}]+)}/g, ($0, chain) => { + + const value = exports.reach(obj, chain, options); + return (value === undefined || value === null ? '' : value); + }); +}; + + +exports.formatStack = function (stack) { + + const trace = []; + for (let i = 0; i < stack.length; ++i) { + const item = stack[i]; + trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]); + } + + return trace; +}; + + +exports.formatTrace = function (trace) { + + const display = []; + + for (let i = 0; i < trace.length; ++i) { + const row = trace[i]; + display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')'); + } + + return display; +}; + + +exports.callStack = function (slice) { + + // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + + const v8 = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { + + return stack; + }; + + const capture = {}; + Error.captureStackTrace(capture, this); // arguments.callee is not supported in strict mode so we use this and slice the trace of this off the result + const stack = capture.stack; + + Error.prepareStackTrace = v8; + + const trace = exports.formatStack(stack); + + return trace.slice(1 + slice); +}; + + +exports.displayStack = function (slice) { + + const trace = exports.callStack(slice === undefined ? 1 : slice + 1); + + return exports.formatTrace(trace); +}; + + +exports.abortThrow = false; + + +exports.abort = function (message, hideStack) { + + if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) { + throw new Error(message || 'Unknown error'); + } + + let stack = ''; + if (!hideStack) { + stack = exports.displayStack(1).join('\n\t'); + } + console.log('ABORT: ' + message + '\n\t' + stack); + process.exit(1); +}; + + +exports.assert = function (condition /*, msg1, msg2, msg3 */) { + + if (condition) { + return; + } + + if (arguments.length === 2 && arguments[1] instanceof Error) { + throw arguments[1]; + } + + let msgs = []; + for (let i = 1; i < arguments.length; ++i) { + if (arguments[i] !== '') { + msgs.push(arguments[i]); // Avoids Array.slice arguments leak, allowing for V8 optimizations + } + } + + msgs = msgs.map((msg) => { + + return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : exports.stringify(msg); + }); + + throw new Error(msgs.join(' ') || 'Unknown error'); +}; + + +exports.Timer = function () { + + this.ts = 0; + this.reset(); +}; + + +exports.Timer.prototype.reset = function () { + + this.ts = Date.now(); +}; + + +exports.Timer.prototype.elapsed = function () { + + return Date.now() - this.ts; +}; + + +exports.Bench = function () { + + this.ts = 0; + this.reset(); +}; + + +exports.Bench.prototype.reset = function () { + + this.ts = exports.Bench.now(); +}; + + +exports.Bench.prototype.elapsed = function () { + + return exports.Bench.now() - this.ts; +}; + + +exports.Bench.now = function () { + + const ts = process.hrtime(); + return (ts[0] * 1e3) + (ts[1] / 1e6); +}; + + +// Escape string for Regex construction + +exports.escapeRegex = function (string) { + + // Escape ^$.*+-?=!:|\/()[]{}, + return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&'); +}; + + +// Base64url (RFC 4648) encode + +exports.base64urlEncode = function (value, encoding) { + + exports.assert(typeof value === 'string' || Buffer.isBuffer(value), 'value must be string or buffer'); + const buf = (Buffer.isBuffer(value) ? value : new Buffer(value, encoding || 'binary')); + return buf.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, ''); +}; + + +// Base64url (RFC 4648) decode + +exports.base64urlDecode = function (value, encoding) { + + if (typeof value !== 'string') { + + return new Error('Value not a string'); + } + + if (!/^[\w\-]*$/.test(value)) { + + return new Error('Invalid character'); + } + + const buf = new Buffer(value, 'base64'); + return (encoding === 'buffer' ? buf : buf.toString(encoding || 'binary')); +}; + + +// Escape attribute value for use in HTTP header + +exports.escapeHeaderAttribute = function (attribute) { + + // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \, " + + exports.assert(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(attribute), 'Bad attribute value (' + attribute + ')'); + + return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); // Escape quotes and slash +}; + + +exports.escapeHtml = function (string) { + + return Escape.escapeHtml(string); +}; + + +exports.escapeJavaScript = function (string) { + + return Escape.escapeJavaScript(string); +}; + +exports.escapeJson = function (string) { + + return Escape.escapeJson(string); +}; + +exports.nextTick = function (callback) { + + return function () { + + const args = arguments; + process.nextTick(() => { + + callback.apply(null, args); + }); + }; +}; + + +exports.once = function (method) { + + if (method._hoekOnce) { + return method; + } + + let once = false; + const wrapped = function () { + + if (!once) { + once = true; + method.apply(null, arguments); + } + }; + + wrapped._hoekOnce = true; + + return wrapped; +}; + + +exports.isInteger = Number.isSafeInteger; + + +exports.ignore = function () { }; + + +exports.inherits = Util.inherits; + + +exports.format = Util.format; + + +exports.transform = function (source, transform, options) { + + exports.assert(source === null || source === undefined || typeof source === 'object' || Array.isArray(source), 'Invalid source object: must be null, undefined, an object, or an array'); + const separator = (typeof options === 'object' && options !== null) ? (options.separator || '.') : '.'; + + if (Array.isArray(source)) { + const results = []; + for (let i = 0; i < source.length; ++i) { + results.push(exports.transform(source[i], transform, options)); + } + return results; + } + + const result = {}; + const keys = Object.keys(transform); + + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const path = key.split(separator); + const sourcePath = transform[key]; + + exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings'); + + let segment; + let res = result; + + while (path.length > 1) { + segment = path.shift(); + if (!res[segment]) { + res[segment] = {}; + } + res = res[segment]; + } + segment = path.shift(); + res[segment] = exports.reach(source, sourcePath, options); + } + + return result; +}; + + +exports.uniqueFilename = function (path, extension) { + + if (extension) { + extension = extension[0] !== '.' ? '.' + extension : extension; + } + else { + extension = ''; + } + + path = Path.resolve(path); + const name = [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-') + extension; + return Path.join(path, name); +}; + + +exports.stringify = function () { + + try { + return JSON.stringify.apply(null, arguments); + } + catch (err) { + return '[Cannot display object: ' + err.message + ']'; + } +}; + + +exports.shallow = function (source) { + + const target = {}; + const keys = Object.keys(source); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + target[key] = source[key]; + } + + return target; +}; diff --git a/deps/npm/node_modules/hoek/package.json b/deps/npm/node_modules/hoek/package.json new file mode 100644 index 00000000000000..8d36bdcd595dce --- /dev/null +++ b/deps/npm/node_modules/hoek/package.json @@ -0,0 +1,58 @@ +{ + "_from": "hoek@4.x.x", + "_id": "hoek@4.2.1", + "_inBundle": false, + "_integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", + "_location": "/hoek", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "hoek@4.x.x", + "name": "hoek", + "escapedName": "hoek", + "rawSpec": "4.x.x", + "saveSpec": null, + "fetchSpec": "4.x.x" + }, + "_requiredBy": [ + "/boom", + "/cryptiles/boom", + "/hawk", + "/sntp" + ], + "_resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "_shasum": "9634502aa12c445dd5a7c5734b572bb8738aacbb", + "_spec": "hoek@4.x.x", + "_where": "/Users/rebecca/code/npm/node_modules/hawk", + "bugs": { + "url": "https://github.com/hapijs/hoek/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "General purpose node utilities", + "devDependencies": { + "code": "4.x.x", + "lab": "13.x.x" + }, + "engines": { + "node": ">=4.0.0" + }, + "homepage": "https://github.com/hapijs/hoek#readme", + "keywords": [ + "utilities" + ], + "license": "BSD-3-Clause", + "main": "lib/index.js", + "name": "hoek", + "repository": { + "type": "git", + "url": "git://github.com/hapijs/hoek.git" + }, + "scripts": { + "test": "lab -a code -t 100 -L", + "test-cov-html": "lab -a code -t 100 -L -r html -o coverage.html" + }, + "version": "4.2.1" +} diff --git a/deps/npm/node_modules/hosted-git-info/CHANGELOG.md b/deps/npm/node_modules/hosted-git-info/CHANGELOG.md new file mode 100644 index 00000000000000..d450f74a9236eb --- /dev/null +++ b/deps/npm/node_modules/hosted-git-info/CHANGELOG.md @@ -0,0 +1,17 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [2.6.0](https://github.com/npm/hosted-git-info/compare/v2.5.0...v2.6.0) (2018-03-07) + + +### Bug Fixes + +* **compat:** remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25)) ([627ab55](https://github.com/npm/hosted-git-info/commit/627ab55)) +* **git-host:** fix forgotten extend() ([eba1f7b](https://github.com/npm/hosted-git-info/commit/eba1f7b)) + + +### Features + +* **browse:** fragment support for browse() ([#28](https://github.com/npm/hosted-git-info/issues/28)) ([cd5e5bb](https://github.com/npm/hosted-git-info/commit/cd5e5bb)) diff --git a/deps/npm/node_modules/hosted-git-info/README.md b/deps/npm/node_modules/hosted-git-info/README.md index 503090d934b557..7b723f6b9e2134 100644 --- a/deps/npm/node_modules/hosted-git-info/README.md +++ b/deps/npm/node_modules/hosted-git-info/README.md @@ -77,9 +77,11 @@ would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/packa eg, `github:npm/hosted-git-info` -* info.browse(opts) +* info.browse(path, fragment, opts) -eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0` +eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`, +`https://github.com/npm/hosted-git-info/tree/v1.2.0/package.json`, +`https://github.com/npm/hosted-git-info/tree/v1.2.0/REAMDE.md#supported-hosts` * info.bugs(opts) diff --git a/deps/npm/node_modules/hosted-git-info/git-host-info.js b/deps/npm/node_modules/hosted-git-info/git-host-info.js index 93cf6174400769..6d6c109de71d44 100644 --- a/deps/npm/node_modules/hosted-git-info/git-host-info.js +++ b/deps/npm/node_modules/hosted-git-info/git-host-info.js @@ -36,11 +36,15 @@ var gitHosts = module.exports = { 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', 'browsetemplate': 'https://{domain}/{project}{/committish}', + 'browsefiletemplate': 'https://{domain}/{project}{/committish}{#path}', 'docstemplate': 'https://{domain}/{project}{/committish}', 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', 'shortcuttemplate': '{type}:{project}{#committish}', 'pathtemplate': '{project}{#committish}', - 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz', + 'hashformat': function (fragment) { + return 'file-' + formatHashFragment(fragment) + } } } @@ -48,12 +52,14 @@ var gitHostDefaults = { 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', + 'browsefiletemplate': 'https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}', 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', 'shortcuttemplate': '{type}:{user}/{project}{#committish}', 'pathtemplate': '{user}/{project}{#committish}', - 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/ + 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/, + 'hashformat': formatHashFragment } Object.keys(gitHosts).forEach(function (name) { @@ -66,3 +72,7 @@ Object.keys(gitHosts).forEach(function (name) { return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1') }).join('|') + '):$') }) + +function formatHashFragment (fragment) { + return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-') +} diff --git a/deps/npm/node_modules/hosted-git-info/git-host.js b/deps/npm/node_modules/hosted-git-info/git-host.js index 4c6641bbf7f274..6b97531ad68865 100644 --- a/deps/npm/node_modules/hosted-git-info/git-host.js +++ b/deps/npm/node_modules/hosted-git-info/git-host.js @@ -1,6 +1,5 @@ 'use strict' var gitHosts = require('./git-host-info.js') -var extend = Object.assign || require('util')._extend var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) { var gitHostInfo = this @@ -23,18 +22,25 @@ GitHost.prototype.hash = function () { GitHost.prototype._fill = function (template, opts) { if (!template) return - var vars = extend({}, opts) - opts = extend(extend({}, this.opts), opts) + var vars = Object.assign({}, opts) + vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : '' + opts = Object.assign({}, this.opts, opts) var self = this Object.keys(this).forEach(function (key) { if (self[key] != null && vars[key] == null) vars[key] = self[key] }) var rawAuth = vars.auth var rawComittish = vars.committish + var rawFragment = vars.fragment + var rawPath = vars.path Object.keys(vars).forEach(function (key) { vars[key] = encodeURIComponent(vars[key]) }) vars['auth@'] = rawAuth ? rawAuth + '@' : '' + vars['#fragment'] = rawFragment ? '#' + this.hashformat(rawFragment) : '' + vars.fragment = vars.fragment ? vars.fragment : '' + vars['#path'] = rawPath ? '#' + this.hashformat(rawPath) : '' + vars['/path'] = vars.path ? '/' + vars.path : '' if (opts.noCommittish) { vars['#committish'] = '' vars['/tree/committish'] = '' @@ -67,8 +73,19 @@ GitHost.prototype.sshurl = function (opts) { return this._fill(this.sshurltemplate, opts) } -GitHost.prototype.browse = function (opts) { - return this._fill(this.browsetemplate, opts) +GitHost.prototype.browse = function (P, F, opts) { + if (typeof P === 'string') { + if (typeof F !== 'string') { + opts = F + F = null + } + return this._fill(this.browsefiletemplate, Object.assign({ + fragment: F, + path: P + }, opts)) + } else { + return this._fill(this.browsetemplate, P) + } } GitHost.prototype.docs = function (opts) { @@ -100,9 +117,7 @@ GitHost.prototype.tarball = function (opts) { } GitHost.prototype.file = function (P, opts) { - return this._fill(this.filetemplate, extend({ - path: P.replace(/^[/]+/g, '') - }, opts)) + return this._fill(this.filetemplate, Object.assign({ path: P }, opts)) } GitHost.prototype.getDefaultRepresentation = function () { diff --git a/deps/npm/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/hosted-git-info/package.json index de691a86c0db77..d176266cca3fee 100644 --- a/deps/npm/node_modules/hosted-git-info/package.json +++ b/deps/npm/node_modules/hosted-git-info/package.json @@ -1,29 +1,33 @@ { - "_from": "hosted-git-info@2.5.0", - "_id": "hosted-git-info@2.5.0", + "_args": [ + [ + "hosted-git-info@2.6.0", + "/Users/rebecca/code/npm" + ] + ], + "_from": "hosted-git-info@2.6.0", + "_id": "hosted-git-info@2.6.0", "_inBundle": false, - "_integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "_integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", "_location": "/hosted-git-info", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "hosted-git-info@2.5.0", + "raw": "hosted-git-info@2.6.0", "name": "hosted-git-info", "escapedName": "hosted-git-info", - "rawSpec": "2.5.0", + "rawSpec": "2.6.0", "saveSpec": null, - "fetchSpec": "2.5.0" + "fetchSpec": "2.6.0" }, "_requiredBy": [ - "#USER", "/", "/normalize-package-data", "/npm-package-arg" ], - "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "_shasum": "6d60e34b3abbc8313062c3b798ef8d901a07af3c", - "_spec": "hosted-git-info@2.5.0", + "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "_spec": "2.6.0", "_where": "/Users/rebecca/code/npm", "author": { "name": "Rebecca Turner", @@ -33,13 +37,15 @@ "bugs": { "url": "https://github.com/npm/hosted-git-info/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", "devDependencies": { "standard": "^9.0.2", + "standard-version": "^4.3.0", "tap": "^10.3.0" }, + "engines": { + "node": ">=4" + }, "files": [ "index.js", "git-host.js", @@ -60,7 +66,11 @@ "url": "git+https://github.com/npm/hosted-git-info.git" }, "scripts": { - "test": "standard && tap -J --coverage test/*.js" + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --nyc-arg=--all --coverage test" }, - "version": "2.5.0" + "version": "2.6.0" } diff --git a/deps/npm/node_modules/http-cache-semantics/README.md b/deps/npm/node_modules/http-cache-semantics/README.md new file mode 100644 index 00000000000000..99069fc8d7c071 --- /dev/null +++ b/deps/npm/node_modules/http-cache-semantics/README.md @@ -0,0 +1,177 @@ +# Can I cache this? [![Build Status](https://travis-ci.org/pornel/http-cache-semantics.svg?branch=master)](https://travis-ci.org/pornel/http-cache-semantics) + +`CachePolicy` tells when responses can be reused from a cache, taking into account [HTTP RFC 7234](http://httpwg.org/specs/rfc7234.html) rules for user agents and shared caches. It's aware of many tricky details such as the `Vary` header, proxy revalidation, and authenticated responses. + +## Usage + +Cacheability of an HTTP response depends on how it was requested, so both `request` and `response` are required to create the policy. + +```js +const policy = new CachePolicy(request, response, options); + +if (!policy.storable()) { + // throw the response away, it's not usable at all + return; +} + +// Cache the data AND the policy object in your cache +// (this is pseudocode, roll your own cache (lru-cache package works)) +letsPretendThisIsSomeCache.set(request.url, {policy, response}, policy.timeToLive()); +``` + +```js +// And later, when you receive a new request: +const {policy, response} = letsPretendThisIsSomeCache.get(newRequest.url); + +// It's not enough that it exists in the cache, it has to match the new request, too: +if (policy && policy.satisfiesWithoutRevalidation(newRequest)) { + // OK, the previous response can be used to respond to the `newRequest`. + // Response headers have to be updated, e.g. to add Age and remove uncacheable headers. + response.headers = policy.responseHeaders(); + return response; +} +``` + +It may be surprising, but it's not enough for an HTTP response to be [fresh](#yo-fresh) to satisfy a request. It may need to match request headers specified in `Vary`. Even a matching fresh response may still not be usable if the new request restricted cacheability, etc. + +The key method is `satisfiesWithoutRevalidation(newRequest)`, which checks whether the `newRequest` is compatible with the original request and whether all caching conditions are met. + +### Constructor options + +Request and response must have a `headers` property with all header names in lower case. `url`, `status` and `method` are optional (defaults are any URL, status `200`, and `GET` method). + +```js +const request = { + url: '/', + method: 'GET', + headers: { + accept: '*/*', + }, +}; + +const response = { + status: 200, + headers: { + 'cache-control': 'public, max-age=7234', + }, +}; + +const options = { + shared: true, + cacheHeuristic: 0.1, + immutableMinTimeToLive: 24*3600*1000, // 24h + ignoreCargoCult: false, +}; +``` + +If `options.shared` is `true` (default), then the response is evaluated from a perspective of a shared cache (i.e. `private` is not cacheable and `s-maxage` is respected). If `options.shared` is `false`, then the response is evaluated from a perspective of a single-user cache (i.e. `private` is cacheable and `s-maxage` is ignored). + +`options.cacheHeuristic` is a fraction of response's age that is used as a fallback cache duration. The default is 0.1 (10%), e.g. if a file hasn't been modified for 100 days, it'll be cached for 100*0.1 = 10 days. + +`options.immutableMinTimeToLive` is a number of milliseconds to assume as the default time to cache responses with `Cache-Control: immutable`. Note that [per RFC](http://httpwg.org/http-extensions/immutable.html) these can become stale, so `max-age` still overrides the default. + +If `options.ignoreCargoCult` is true, common anti-cache directives will be completely ignored if the non-standard `pre-check` and `post-check` directives are present. These two useless directives are most commonly found in bad StackOverflow answers and PHP's "session limiter" defaults. + +### `storable()` + +Returns `true` if the response can be stored in a cache. If it's `false` then you MUST NOT store either the request or the response. + +### `satisfiesWithoutRevalidation(newRequest)` + +This is the most important method. Use this method to check whether the cached response is still fresh in the context of the new request. + +If it returns `true`, then the given `request` matches the original response this cache policy has been created with, and the response can be reused without contacting the server. Note that the old response can't be returned without being updated, see `responseHeaders()`. + +If it returns `false`, then the response may not be matching at all (e.g. it's for a different URL or method), or may require to be refreshed first (see `revalidationHeaders()`). + +### `responseHeaders()` + +Returns updated, filtered set of response headers to return to clients receiving the cached response. This function is necessary, because proxies MUST always remove hop-by-hop headers (such as `TE` and `Connection`) and update response's `Age` to avoid doubling cache time. + +```js +cachedResponse.headers = cachePolicy.responseHeaders(cachedResponse); +``` + +### `timeToLive()` + +Returns approximate time in *milliseconds* until the response becomes stale (i.e. not fresh). + +After that time (when `timeToLive() <= 0`) the response might not be usable without revalidation. However, there are exceptions, e.g. a client can explicitly allow stale responses, so always check with `satisfiesWithoutRevalidation()`. + +### `toObject()`/`fromObject(json)` + +Chances are you'll want to store the `CachePolicy` object along with the cached response. `obj = policy.toObject()` gives a plain JSON-serializable object. `policy = CachePolicy.fromObject(obj)` creates an instance from it. + +### Refreshing stale cache (revalidation) + +When a cached response has expired, it can be made fresh again by making a request to the origin server. The server may respond with status 304 (Not Modified) without sending the response body again, saving bandwidth. + +The following methods help perform the update efficiently and correctly. + +#### `revalidationHeaders(newRequest)` + +Returns updated, filtered set of request headers to send to the origin server to check if the cached response can be reused. These headers allow the origin server to return status 304 indicating the response is still fresh. All headers unrelated to caching are passed through as-is. + +Use this method when updating cache from the origin server. + +```js +updateRequest.headers = cachePolicy.revalidationHeaders(updateRequest); +``` + +#### `revalidatedPolicy(revalidationRequest, revalidationResponse)` + +Use this method to update the cache after receiving a new response from the origin server. It returns an object with two keys: + +* `policy` — A new `CachePolicy` with HTTP headers updated from `revalidationResponse`. You can always replace the old cached `CachePolicy` with the new one. +* `modified` — Boolean indicating whether the response body has changed. + * If `false`, then a valid 304 Not Modified response has been received, and you can reuse the old cached response body. + * If `true`, you should use new response's body (if present), or make another request to the origin server without any conditional headers (i.e. don't use `revalidationHeaders()` this time) to get the new resource. + +```js +// When serving requests from cache: +const {oldPolicy, oldResponse} = letsPretendThisIsSomeCache.get(newRequest.url); + +if (!oldPolicy.satisfiesWithoutRevalidation(newRequest)) { + // Change the request to ask the origin server if the cached response can be used + newRequest.headers = oldPolicy.revalidationHeaders(newRequest); + + // Send request to the origin server. The server may respond with status 304 + const newResponse = await makeRequest(newResponse); + + // Create updated policy and combined response from the old and new data + const {policy, modified} = oldPolicy.revalidatedPolicy(newRequest, newResponse); + const response = modified ? newResponse : oldResponse; + + // Update the cache with the newer/fresher response + letsPretendThisIsSomeCache.set(newRequest.url, {policy, response}, policy.timeToLive()); + + // And proceed returning cached response as usual + response.headers = policy.responseHeaders(); + return response; +} +``` + +# Yo, FRESH + +![satisfiesWithoutRevalidation](fresh.jpg) + +## Used by + +* [ImageOptim API](https://imageoptim.com/api), [make-fetch-happen](https://github.com/zkat/make-fetch-happen), [cacheable-request](https://www.npmjs.com/package/cacheable-request), [npm/registry-fetch](https://github.com/npm/registry-fetch), [etc.](https://github.com/pornel/http-cache-semantics/network/dependents) + +## Implemented + +* `Cache-Control` response header with all the quirks. +* `Expires` with check for bad clocks. +* `Pragma` response header. +* `Age` response header. +* `Vary` response header. +* Default cacheability of statuses and methods. +* Requests for stale data. +* Filtering of hop-by-hop headers. +* Basic revalidation request + +## Unimplemented + +* Merging of range requests, If-Range (but correctly supports them as non-cacheable) +* Revalidation of multiple representations diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/node4/index.js b/deps/npm/node_modules/http-cache-semantics/node4/index.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/node4/index.js rename to deps/npm/node_modules/http-cache-semantics/node4/index.js diff --git a/deps/npm/node_modules/http-cache-semantics/package.json b/deps/npm/node_modules/http-cache-semantics/package.json new file mode 100644 index 00000000000000..000f357a835d5a --- /dev/null +++ b/deps/npm/node_modules/http-cache-semantics/package.json @@ -0,0 +1,60 @@ +{ + "_from": "http-cache-semantics@^3.8.1", + "_id": "http-cache-semantics@3.8.1", + "_inBundle": false, + "_integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "_location": "/http-cache-semantics", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "http-cache-semantics@^3.8.1", + "name": "http-cache-semantics", + "escapedName": "http-cache-semantics", + "rawSpec": "^3.8.1", + "saveSpec": null, + "fetchSpec": "^3.8.1" + }, + "_requiredBy": [ + "/make-fetch-happen", + "/npm-profile/make-fetch-happen", + "/npm-registry-fetch/make-fetch-happen" + ], + "_resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "_shasum": "39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2", + "_spec": "http-cache-semantics@^3.8.1", + "_where": "/Users/rebecca/code/npm/node_modules/make-fetch-happen", + "author": { + "name": "Kornel Lesiński", + "email": "kornel@geekhood.net", + "url": "https://kornel.ski/" + }, + "bugs": { + "url": "https://github.com/pornel/http-cache-semantics/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies", + "devDependencies": { + "babel-cli": "^6.24.1", + "babel-preset-env": "^1.6.1", + "mocha": "^3.4.2" + }, + "files": [ + "node4/index.js" + ], + "homepage": "https://github.com/pornel/http-cache-semantics#readme", + "license": "BSD-2-Clause", + "main": "node4/index.js", + "name": "http-cache-semantics", + "repository": { + "type": "git", + "url": "git+https://github.com/pornel/http-cache-semantics.git" + }, + "scripts": { + "compile": "babel -d node4/ index.js; babel -d node4/test test", + "prepublish": "npm run compile", + "test": "npm run compile; mocha node4/test" + }, + "version": "3.8.1" +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.travis.yml b/deps/npm/node_modules/http-proxy-agent/.travis.yml similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.travis.yml rename to deps/npm/node_modules/http-proxy-agent/.travis.yml diff --git a/deps/npm/node_modules/http-proxy-agent/History.md b/deps/npm/node_modules/http-proxy-agent/History.md new file mode 100644 index 00000000000000..7e3e1e7836cba3 --- /dev/null +++ b/deps/npm/node_modules/http-proxy-agent/History.md @@ -0,0 +1,101 @@ + +2.1.0 / 2018-03-03 +================== + + * Add "engines" to package.json + * Use `Buffer.from()` + * Update package.json - outdated debug version (#7) + +2.0.0 / 2017-06-27 +================== + + * drop support for Node.js < v4 + * update "mocha" to v3 + * update to "agent-base" v4 + * rename http-proxy-agent.js to index.js + * remove `extend` dependency + * test Node.js 4, 5, 6, 7 and 8 on Travis-CI + +1.0.0 / 2015-07-10 +================== + + * http-proxy-agent: use %o debug() formatter + * http-proxy-agent: remove `defaults` merging logic + * package: update "agent-base" to v2 + * test: add an assert() call + * test: use ssl-cert-snakeoil self-signed SSL certs + * README: add note about node-https-proxy-agent + +0.2.7 / 2015-07-06 +================== + + * travis: ensure latest npm before testing + * travis: test node v0.8, v0.10, and v0.12 + * README: use SVG for Travis-CI badge + * package: update "extend" to v3 + * package: update "mocha" to v2 + * package: update "debug" to v2 + +0.2.6 / 2014-06-11 +================== + + * package: update "debug" to v1.0.0 + +0.2.5 / 2014-04-09 +================== + + * package: update outdated deps + +0.2.4 / 2014-01-12 +================== + + * http-proxy-agent: fix using the agent after the first tick of creating the ClientRequest + * http-proxy-agent: use "debug" module + * History: fix whitespace + +0.2.3 / 2013-11-18 +================== + + * https-proxy-agent: allow "https" without trailing colon + +0.2.2 / 2013-11-16 +================== + + * http-proxy-agent: delete the `port` if it matches default port + * http-proxy-agent: don't mix in the `proxy` opts to the endpoint opts + * http-proxy-agent: delete `pathname` from the proxy opts as well + +0.2.1 / 2013-10-28 +================== + + * http-proxy-agent: properly proxy the query-string on request URLs (GH-1) + +0.2.0 / 2013-09-16 +================== + + * http-proxy-agent: update to `agent-base` v1.0.0 API + * http-proxy-agent: rename `secure` option to `secureProxy` + * http-proxy-agent: default the "port" to 80 if not set + * http-proxy-agent: use "extend" module + * test: refactor tests + * test: add 407 auth test + * test: add bad proxy info test + * test: add "secureProxy" option tests + +0.1.0 / 2013-09-03 +================== + + * Add initial "Proxy-Authorization" Basic authentication support + +0.0.2 / 2013-07-11 +================== + + * test: make tests pass, ensure valid IP addresses are returned + * test: add tests + * throw an Error when no proxy info is given + * add support for passing options to net/tls .connect() + +0.0.1 / 2013-07-09 +================== + + * Initial release diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/README.md b/deps/npm/node_modules/http-proxy-agent/README.md similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/README.md rename to deps/npm/node_modules/http-proxy-agent/README.md diff --git a/deps/npm/node_modules/http-proxy-agent/index.js b/deps/npm/node_modules/http-proxy-agent/index.js new file mode 100644 index 00000000000000..f90a5297ca8caa --- /dev/null +++ b/deps/npm/node_modules/http-proxy-agent/index.js @@ -0,0 +1,111 @@ + +/** + * Module dependencies. + */ + +var net = require('net'); +var tls = require('tls'); +var url = require('url'); +var Agent = require('agent-base'); +var inherits = require('util').inherits; +var debug = require('debug')('http-proxy-agent'); + +/** + * Module exports. + */ + +module.exports = HttpProxyAgent; + +/** + * The `HttpProxyAgent` implements an HTTP Agent subclass that connects to the + * specified "HTTP proxy server" in order to proxy HTTP requests. + * + * @api public + */ + +function HttpProxyAgent (opts) { + if (!(this instanceof HttpProxyAgent)) return new HttpProxyAgent(opts); + if ('string' == typeof opts) opts = url.parse(opts); + if (!opts) throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); + debug('creating new HttpProxyAgent instance: %o', opts); + Agent.call(this, opts); + + var proxy = Object.assign({}, opts); + + // if `true`, then connect to the proxy server over TLS. defaults to `false`. + this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false; + + // prefer `hostname` over `host`, and set the `port` if needed + proxy.host = proxy.hostname || proxy.host; + proxy.port = +proxy.port || (this.secureProxy ? 443 : 80); + + if (proxy.host && proxy.path) { + // if both a `host` and `path` are specified then it's most likely the + // result of a `url.parse()` call... we need to remove the `path` portion so + // that `net.connect()` doesn't attempt to open that as a unix socket file. + delete proxy.path; + delete proxy.pathname; + } + + this.proxy = proxy; +} +inherits(HttpProxyAgent, Agent); + +/** + * Called when the node-core HTTP client library is creating a new HTTP request. + * + * @api public + */ + +HttpProxyAgent.prototype.callback = function connect (req, opts, fn) { + var proxy = this.proxy; + + // change the `http.ClientRequest` instance's "path" field + // to the absolute path of the URL that will be requested + var parsed = url.parse(req.path); + if (null == parsed.protocol) parsed.protocol = 'http:'; + if (null == parsed.hostname) parsed.hostname = opts.hostname || opts.host; + if (null == parsed.port) parsed.port = opts.port; + if (parsed.port == 80) { + // if port is 80, then we can remove the port so that the + // ":80" portion is not on the produced URL + delete parsed.port; + } + var absolute = url.format(parsed); + req.path = absolute; + + // inject the `Proxy-Authorization` header if necessary + if (proxy.auth) { + req.setHeader( + 'Proxy-Authorization', + 'Basic ' + Buffer.from(proxy.auth).toString('base64') + ); + } + + // create a socket connection to the proxy server + var socket; + if (this.secureProxy) { + socket = tls.connect(proxy); + } else { + socket = net.connect(proxy); + } + + // at this point, the http ClientRequest's internal `_header` field might have + // already been set. If this is the case then we'll need to re-generate the + // string since we just changed the `req.path` + if (req._header) { + debug('regenerating stored HTTP header string for request'); + req._header = null; + req._implicitHeader(); + if (req.output && req.output.length > 0) { + debug('patching connection write() output buffer with updated header'); + // the _header has already been queued to be written to the socket + var first = req.output[0]; + var endOfHeaders = first.indexOf('\r\n\r\n') + 4; + req.output[0] = req._header + first.substring(endOfHeaders); + debug('output buffer: %o', req.output); + } + } + + fn(null, socket); +}; diff --git a/deps/npm/node_modules/http-proxy-agent/package.json b/deps/npm/node_modules/http-proxy-agent/package.json new file mode 100644 index 00000000000000..99e28fdc6aa59c --- /dev/null +++ b/deps/npm/node_modules/http-proxy-agent/package.json @@ -0,0 +1,67 @@ +{ + "_from": "http-proxy-agent@^2.1.0", + "_id": "http-proxy-agent@2.1.0", + "_inBundle": false, + "_integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "_location": "/http-proxy-agent", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "http-proxy-agent@^2.1.0", + "name": "http-proxy-agent", + "escapedName": "http-proxy-agent", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/make-fetch-happen", + "/npm-profile/make-fetch-happen", + "/npm-registry-fetch/make-fetch-happen" + ], + "_resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "_shasum": "e4821beef5b2142a2026bd73926fe537631c5405", + "_spec": "http-proxy-agent@^2.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/make-fetch-happen", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io/" + }, + "bugs": { + "url": "https://github.com/TooTallNate/node-http-proxy-agent/issues" + }, + "bundleDependencies": false, + "dependencies": { + "agent-base": "4", + "debug": "3.1.0" + }, + "deprecated": false, + "description": "An HTTP(s) proxy `http.Agent` implementation for HTTP", + "devDependencies": { + "mocha": "3", + "proxy": "~0.2.3" + }, + "engines": { + "node": ">= 4.5.0" + }, + "homepage": "https://github.com/TooTallNate/node-http-proxy-agent#readme", + "keywords": [ + "http", + "proxy", + "endpoint", + "agent" + ], + "license": "MIT", + "main": "./index.js", + "name": "http-proxy-agent", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-http-proxy-agent.git" + }, + "scripts": { + "test": "mocha --reporter spec" + }, + "version": "2.1.0" +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.key b/deps/npm/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.key similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.key rename to deps/npm/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.key diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.pem b/deps/npm/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.pem similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.pem rename to deps/npm/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.pem diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/test/test.js b/deps/npm/node_modules/http-proxy-agent/test/test.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/test/test.js rename to deps/npm/node_modules/http-proxy-agent/test/test.js diff --git a/deps/npm/node_modules/request/node_modules/http-signature/.dir-locals.el b/deps/npm/node_modules/http-signature/.dir-locals.el similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/.dir-locals.el rename to deps/npm/node_modules/http-signature/.dir-locals.el diff --git a/deps/npm/node_modules/request/node_modules/http-signature/.npmignore b/deps/npm/node_modules/http-signature/.npmignore similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/.npmignore rename to deps/npm/node_modules/http-signature/.npmignore diff --git a/deps/npm/node_modules/http-signature/CHANGES.md b/deps/npm/node_modules/http-signature/CHANGES.md new file mode 100644 index 00000000000000..3e4b13881e0de4 --- /dev/null +++ b/deps/npm/node_modules/http-signature/CHANGES.md @@ -0,0 +1,46 @@ +# node-http-signature changelog + +## 1.1.1 + +- Version of dependency `assert-plus` updated: old version was missing + some license information +- Corrected examples in `http_signing.md`, added auto-tests to + automatically validate these examples + +## 1.1.0 + +- Bump version of `sshpk` dependency, remove peerDependency on it since + it now supports exchanging objects between multiple versions of itself + where possible + +## 1.0.2 + +- Bump min version of `jsprim` dependency, to include fixes for using + http-signature with `browserify` + +## 1.0.1 + +- Bump minimum version of `sshpk` dependency, to include fixes for + whitespace tolerance in key parsing. + +## 1.0.0 + +- First semver release. +- #36: Ensure verifySignature does not leak useful timing information +- #42: Bring the library up to the latest version of the spec (including the + request-target changes) +- Support for ECDSA keys and signatures. +- Now uses `sshpk` for key parsing, validation and conversion. +- Fixes for #21, #47, #39 and compatibility with node 0.8 + +## 0.11.0 + +- Split up HMAC and Signature verification to avoid vulnerabilities where a + key intended for use with one can be validated against the other method + instead. + +## 0.10.2 + +- Updated versions of most dependencies. +- Utility functions exported for PEM => SSH-RSA conversion. +- Improvements to tests and examples. diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/LICENSE b/deps/npm/node_modules/http-signature/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/LICENSE rename to deps/npm/node_modules/http-signature/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/http-signature/README.md b/deps/npm/node_modules/http-signature/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/README.md rename to deps/npm/node_modules/http-signature/README.md diff --git a/deps/npm/node_modules/request/node_modules/http-signature/http_signing.md b/deps/npm/node_modules/http-signature/http_signing.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/http_signing.md rename to deps/npm/node_modules/http-signature/http_signing.md diff --git a/deps/npm/node_modules/request/node_modules/http-signature/lib/index.js b/deps/npm/node_modules/http-signature/lib/index.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/lib/index.js rename to deps/npm/node_modules/http-signature/lib/index.js diff --git a/deps/npm/node_modules/request/node_modules/http-signature/lib/parser.js b/deps/npm/node_modules/http-signature/lib/parser.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/lib/parser.js rename to deps/npm/node_modules/http-signature/lib/parser.js diff --git a/deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js b/deps/npm/node_modules/http-signature/lib/signer.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js rename to deps/npm/node_modules/http-signature/lib/signer.js diff --git a/deps/npm/node_modules/request/node_modules/http-signature/lib/utils.js b/deps/npm/node_modules/http-signature/lib/utils.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/lib/utils.js rename to deps/npm/node_modules/http-signature/lib/utils.js diff --git a/deps/npm/node_modules/request/node_modules/http-signature/lib/verify.js b/deps/npm/node_modules/http-signature/lib/verify.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/lib/verify.js rename to deps/npm/node_modules/http-signature/lib/verify.js diff --git a/deps/npm/node_modules/http-signature/package.json b/deps/npm/node_modules/http-signature/package.json new file mode 100644 index 00000000000000..0b265440605bd4 --- /dev/null +++ b/deps/npm/node_modules/http-signature/package.json @@ -0,0 +1,77 @@ +{ + "_from": "http-signature@~1.2.0", + "_id": "http-signature@1.2.0", + "_inBundle": false, + "_integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "_location": "/http-signature", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "http-signature@~1.2.0", + "name": "http-signature", + "escapedName": "http-signature", + "rawSpec": "~1.2.0", + "saveSpec": null, + "fetchSpec": "~1.2.0" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "_shasum": "9aecd925114772f3d95b65a60abb8f7c18fbace1", + "_spec": "http-signature@~1.2.0", + "_where": "/Users/rebecca/code/npm/node_modules/request", + "author": { + "name": "Joyent, Inc" + }, + "bugs": { + "url": "https://github.com/joyent/node-http-signature/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Mark Cavage", + "email": "mcavage@gmail.com" + }, + { + "name": "David I. Lehn", + "email": "dil@lehn.org" + }, + { + "name": "Patrick Mooney", + "email": "patrick.f.mooney@gmail.com" + } + ], + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "deprecated": false, + "description": "Reference implementation of Joyent's HTTP Signature scheme.", + "devDependencies": { + "tap": "0.4.2", + "uuid": "^2.0.2" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + }, + "homepage": "https://github.com/joyent/node-http-signature/", + "keywords": [ + "https", + "request" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "http-signature", + "repository": { + "type": "git", + "url": "git://github.com/joyent/node-http-signature.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.2.0" +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/https-proxy-agent/.travis.yml similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml rename to deps/npm/node_modules/https-proxy-agent/.travis.yml diff --git a/deps/npm/node_modules/https-proxy-agent/History.md b/deps/npm/node_modules/https-proxy-agent/History.md new file mode 100644 index 00000000000000..f723812312f879 --- /dev/null +++ b/deps/npm/node_modules/https-proxy-agent/History.md @@ -0,0 +1,124 @@ + +2.2.0 / 2018-03-03 +================== + + * Add "engines" to package.json - requires Node.js >= 4.5.0 + * Use `Buffer.from()` + +2.1.1 / 2017-11-28 +================== + + * Update `debug` - Security Problems with Previous Version (#38) + +2.1.0 / 2017-08-08 +================== + + * only include the port number in the Host header when non-default port (#22) + * set ALPN to "http 1.1" by default when using tlsproxy (#25) + * only set `ALPNProtocols` when the property does not already exist + * support SNI (#14) + +2.0.0 / 2017-06-26 +================== + + * rename https-proxy-agent.js to index.js + * update dependencies and remove semver-specific test case + * update `agent-base` to v4 + * remove `extend` dependency + * :arrow_up: update minimum version of debug dependency + * opts/options + * drop Node versions < v4 from Travis-CI + * test Node.js 5, 6, 7 and 8 on Travis-CI + * README: remove outdated `secureEndpoint` reference + * README: remove `secureEndpoint` docs, add `headers` + * https-proxy-agent: add support for proxy "headers" + +1.0.0 / 2015-07-10 +================== + + * upgrade to "agent-base" v2 API + * test: test case is fixed + * use %o debug() formatter + * README: use SVG for Travis-CI badge + +0.3.6 / 2015-07-06 +================== + + * package: update "extend" to v3 + * package: update "mocha" to v2 + * package: update "debug" to v2 + * travis: test node v0.8, v0.10, and v0.12 + * test: use ssl-cert-snakeoil self-signed SSL certs + +0.3.5 / 2014-06-11 +================== + + * package: update "debug" to v1.0.0 + +0.3.4 / 2014-04-09 +================== + + * gitignore: ignore root level ?.js files + * package: update outdated dependencies + +0.3.3 / 2014-01-13 +================== + + * https-proxy-agnet: use debug() instead of console.error() + * https-proxy-agent: fix debug() call + * History: fix whitespace + +0.3.2 / 2013-11-18 +================== + + * https-proxy-agent: allow "https" without trailing colon + * README: fix typo + +0.3.1 / 2013-11-16 +================== + + * test: enable the HTTPS over HTTPS test on node v0.11.8 + * https-proxy-agent: create the proxy socket connection first + * https-proxy-agent: delete `pathname` from the proxy opts as well + * https-proxy-agent: remove dead "end"-emitting code + +0.3.0 / 2013-09-16 +================== + + * https-proxy-agent: use "debug" module + * https-proxy-agent: update to the "agent-base" v1 API + * https-proxy-agent: default the "port" to 443 if not set + * https-proxy-agent: augment the `opts` object for the `tls.connect` function + * https-proxy-agent: use "extend" module + * https-proxy-agent: remove use of `this` as much as possible + * https-proxy-agent: listen for the "error" event of the socket + * test: refactor of tests to use "proxy" module + * test: add "error" event catching test + * test: add 407 proxy response test + * test: use "semver" module, disable the HTTPS over HTTPS test for node >= v0.11.3 + +0.2.0 / 2013-09-03 +================== + + * Add initial "Proxy-Authorization" Basic authentication support + +0.1.0 / 2013-07-21 +================== + + * rename `secure` to `secureProxy` + * added `secureEndpoint` option + * various optimizations + * README improvements + +0.0.2 / 2013-07-11 +================== + + * test: add mocha tests + * don't use `socket.ondata`, use the official API instead + * throw an Error when no proxy info is given + * add support for passing options to net/tls .connect() + +0.0.1 / 2013-07-09 +================== + + * Initial release diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/README.md b/deps/npm/node_modules/https-proxy-agent/README.md similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/README.md rename to deps/npm/node_modules/https-proxy-agent/README.md diff --git a/deps/npm/node_modules/https-proxy-agent/index.js b/deps/npm/node_modules/https-proxy-agent/index.js new file mode 100644 index 00000000000000..0a2fdabe8dcfab --- /dev/null +++ b/deps/npm/node_modules/https-proxy-agent/index.js @@ -0,0 +1,229 @@ +/** + * Module dependencies. + */ + +var net = require('net'); +var tls = require('tls'); +var url = require('url'); +var Agent = require('agent-base'); +var inherits = require('util').inherits; +var debug = require('debug')('https-proxy-agent'); + +/** + * Module exports. + */ + +module.exports = HttpsProxyAgent; + +/** + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to the + * specified "HTTP(s) proxy server" in order to proxy HTTPS requests. + * + * @api public + */ + +function HttpsProxyAgent(opts) { + if (!(this instanceof HttpsProxyAgent)) return new HttpsProxyAgent(opts); + if ('string' == typeof opts) opts = url.parse(opts); + if (!opts) + throw new Error( + 'an HTTP(S) proxy server `host` and `port` must be specified!' + ); + debug('creating new HttpsProxyAgent instance: %o', opts); + Agent.call(this, opts); + + var proxy = Object.assign({}, opts); + + // if `true`, then connect to the proxy server over TLS. defaults to `false`. + this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false; + + // prefer `hostname` over `host`, and set the `port` if needed + proxy.host = proxy.hostname || proxy.host; + proxy.port = +proxy.port || (this.secureProxy ? 443 : 80); + + // ALPN is supported by Node.js >= v5. + // attempt to negotiate http/1.1 for proxy servers that support http/2 + if (this.secureProxy && !('ALPNProtocols' in proxy)) { + proxy.ALPNProtocols = ['http 1.1'] + } + + if (proxy.host && proxy.path) { + // if both a `host` and `path` are specified then it's most likely the + // result of a `url.parse()` call... we need to remove the `path` portion so + // that `net.connect()` doesn't attempt to open that as a unix socket file. + delete proxy.path; + delete proxy.pathname; + } + + this.proxy = proxy; + this.defaultPort = 443; +} +inherits(HttpsProxyAgent, Agent); + +/** + * Called when the node-core HTTP client library is creating a new HTTP request. + * + * @api public + */ + +HttpsProxyAgent.prototype.callback = function connect(req, opts, fn) { + var proxy = this.proxy; + + // create a socket connection to the proxy server + var socket; + if (this.secureProxy) { + socket = tls.connect(proxy); + } else { + socket = net.connect(proxy); + } + + // we need to buffer any HTTP traffic that happens with the proxy before we get + // the CONNECT response, so that if the response is anything other than an "200" + // response code, then we can re-play the "data" events on the socket once the + // HTTP parser is hooked up... + var buffers = []; + var buffersLength = 0; + + function read() { + var b = socket.read(); + if (b) ondata(b); + else socket.once('readable', read); + } + + function cleanup() { + socket.removeListener('data', ondata); + socket.removeListener('end', onend); + socket.removeListener('error', onerror); + socket.removeListener('close', onclose); + socket.removeListener('readable', read); + } + + function onclose(err) { + debug('onclose had error %o', err); + } + + function onend() { + debug('onend'); + } + + function onerror(err) { + cleanup(); + fn(err); + } + + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + var buffered = Buffer.concat(buffers, buffersLength); + var str = buffered.toString('ascii'); + + if (!~str.indexOf('\r\n\r\n')) { + // keep buffering + debug('have not received end of HTTP headers yet...'); + if (socket.read) { + read(); + } else { + socket.once('data', ondata); + } + return; + } + + var firstLine = str.substring(0, str.indexOf('\r\n')); + var statusCode = +firstLine.split(' ')[1]; + debug('got proxy server response: %o', firstLine); + + if (200 == statusCode) { + // 200 Connected status code! + var sock = socket; + + // nullify the buffered data since we won't be needing it + buffers = buffered = null; + + if (opts.secureEndpoint) { + // since the proxy is connecting to an SSL server, we have + // to upgrade this socket connection to an SSL connection + debug( + 'upgrading proxy-connected socket to TLS connection: %o', + opts.host + ); + opts.socket = socket; + opts.servername = opts.servername || opts.host; + opts.host = null; + opts.hostname = null; + opts.port = null; + sock = tls.connect(opts); + } + + cleanup(); + fn(null, sock); + } else { + // some other status code that's not 200... need to re-play the HTTP header + // "data" events onto the socket once the HTTP machinery is attached so that + // the user can parse and handle the error status code + cleanup(); + + // save a reference to the concat'd Buffer for the `onsocket` callback + buffers = buffered; + + // need to wait for the "socket" event to re-play the "data" events + req.once('socket', onsocket); + fn(null, socket); + } + } + + function onsocket(socket) { + // replay the "buffers" Buffer onto the `socket`, since at this point + // the HTTP module machinery has been hooked up for the user + if ('function' == typeof socket.ondata) { + // node <= v0.11.3, the `ondata` function is set on the socket + socket.ondata(buffers, 0, buffers.length); + } else if (socket.listeners('data').length > 0) { + // node > v0.11.3, the "data" event is listened for directly + socket.emit('data', buffers); + } else { + // never? + throw new Error('should not happen...'); + } + + // nullify the cached Buffer instance + buffers = null; + } + + socket.on('error', onerror); + socket.on('close', onclose); + socket.on('end', onend); + + if (socket.read) { + read(); + } else { + socket.once('data', ondata); + } + + var hostname = opts.host + ':' + opts.port; + var msg = 'CONNECT ' + hostname + ' HTTP/1.1\r\n'; + + var headers = Object.assign({}, proxy.headers); + if (proxy.auth) { + headers['Proxy-Authorization'] = + 'Basic ' + Buffer.from(proxy.auth).toString('base64'); + } + + // the Host header should only include the port + // number when it is a non-standard port + var host = opts.host; + if (!isDefaultPort(opts.port, opts.secureEndpoint)) { + host += ':' + opts.port; + } + headers['Host'] = host; + + headers['Connection'] = 'close'; + Object.keys(headers).forEach(function(name) { + msg += name + ': ' + headers[name] + '\r\n'; + }); + + socket.write(msg + '\r\n'); +}; + +function isDefaultPort(port, secure) { + return Boolean((!secure && port === 80) || (secure && port === 443)); +} diff --git a/deps/npm/node_modules/https-proxy-agent/package.json b/deps/npm/node_modules/https-proxy-agent/package.json new file mode 100644 index 00000000000000..538782a862a386 --- /dev/null +++ b/deps/npm/node_modules/https-proxy-agent/package.json @@ -0,0 +1,67 @@ +{ + "_from": "https-proxy-agent@^2.2.1", + "_id": "https-proxy-agent@2.2.1", + "_inBundle": false, + "_integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "_location": "/https-proxy-agent", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "https-proxy-agent@^2.2.1", + "name": "https-proxy-agent", + "escapedName": "https-proxy-agent", + "rawSpec": "^2.2.1", + "saveSpec": null, + "fetchSpec": "^2.2.1" + }, + "_requiredBy": [ + "/make-fetch-happen", + "/npm-profile/make-fetch-happen", + "/npm-registry-fetch/make-fetch-happen" + ], + "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "_shasum": "51552970fa04d723e04c56d04178c3f92592bbc0", + "_spec": "https-proxy-agent@^2.2.1", + "_where": "/Users/rebecca/code/npm/node_modules/make-fetch-happen", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io/" + }, + "bugs": { + "url": "https://github.com/TooTallNate/node-https-proxy-agent/issues" + }, + "bundleDependencies": false, + "dependencies": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + }, + "deprecated": false, + "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", + "devDependencies": { + "mocha": "^3.4.2", + "proxy": "^0.2.4" + }, + "engines": { + "node": ">= 4.5.0" + }, + "homepage": "https://github.com/TooTallNate/node-https-proxy-agent#readme", + "keywords": [ + "https", + "proxy", + "endpoint", + "agent" + ], + "license": "MIT", + "main": "./index.js", + "name": "https-proxy-agent", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-https-proxy-agent.git" + }, + "scripts": { + "test": "mocha --reporter spec" + }, + "version": "2.2.1" +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key b/deps/npm/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.key similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key rename to deps/npm/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.key diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem b/deps/npm/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.pem similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem rename to deps/npm/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.pem diff --git a/deps/npm/node_modules/https-proxy-agent/test/test.js b/deps/npm/node_modules/https-proxy-agent/test/test.js new file mode 100644 index 00000000000000..b368495821421f --- /dev/null +++ b/deps/npm/node_modules/https-proxy-agent/test/test.js @@ -0,0 +1,342 @@ + +/** + * Module dependencies. + */ + +var fs = require('fs'); +var url = require('url'); +var http = require('http'); +var https = require('https'); +var assert = require('assert'); +var Proxy = require('proxy'); +var HttpsProxyAgent = require('../'); + +describe('HttpsProxyAgent', function () { + + var server; + var serverPort; + + var sslServer; + var sslServerPort; + + var proxy; + var proxyPort; + + var sslProxy; + var sslProxyPort; + + before(function (done) { + // setup target HTTP server + server = http.createServer(); + server.listen(function () { + serverPort = server.address().port; + done(); + }); + }); + + before(function (done) { + // setup HTTP proxy server + proxy = Proxy(); + proxy.listen(function () { + proxyPort = proxy.address().port; + done(); + }); + }); + + before(function (done) { + // setup target HTTPS server + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + sslServer = https.createServer(options); + sslServer.listen(function () { + sslServerPort = sslServer.address().port; + done(); + }); + }); + + before(function (done) { + // setup SSL HTTP proxy server + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + sslProxy = Proxy(https.createServer(options)); + sslProxy.listen(function () { + sslProxyPort = sslProxy.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function (done) { + server.once('close', function () { done(); }); + server.close(); + }); + + after(function (done) { + proxy.once('close', function () { done(); }); + proxy.close(); + }); + + after(function (done) { + sslServer.once('close', function () { done(); }); + sslServer.close(); + }); + + after(function (done) { + sslProxy.once('close', function () { done(); }); + sslProxy.close(); + }); + + describe('constructor', function () { + it('should throw an Error if no "proxy" argument is given', function () { + assert.throws(function () { + new HttpsProxyAgent(); + }); + }); + it('should accept a "string" proxy argument', function () { + var agent = new HttpsProxyAgent('http://127.0.0.1:' + proxyPort); + assert.equal('127.0.0.1', agent.proxy.host); + assert.equal(proxyPort, agent.proxy.port); + }); + it('should accept a `url.parse()` result object argument', function () { + var opts = url.parse('http://127.0.0.1:' + proxyPort); + var agent = new HttpsProxyAgent(opts); + assert.equal('127.0.0.1', agent.proxy.host); + assert.equal(proxyPort, agent.proxy.port); + }); + it('should set a `defaultPort` property', function () { + var opts = url.parse("http://127.0.0.1:" + proxyPort); + var agent = new HttpsProxyAgent(opts); + assert.equal(443, agent.defaultPort); + }); + describe('secureProxy', function () { + it('should default to `false`', function () { + var agent = new HttpsProxyAgent({ port: proxyPort }); + assert.equal(false, agent.secureProxy); + }); + it('should be `false` when "http:" protocol is used', function () { + var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'http:' }); + assert.equal(false, agent.secureProxy); + }); + it('should be `true` when "https:" protocol is used', function () { + var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'https:' }); + assert.equal(true, agent.secureProxy); + }); + it('should be `true` when "https" protocol is used', function () { + var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'https' }); + assert.equal(true, agent.secureProxy); + }); + }); + }); + + describe('"http" module', function () { + + beforeEach(function () { + delete proxy.authenticate; + }); + + it('should work over an HTTP proxy', function (done) { + server.once('request', function (req, res) { + res.end(JSON.stringify(req.headers)); + }); + + var proxy = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort; + var agent = new HttpsProxyAgent(proxy); + + var opts = url.parse('http://127.0.0.1:' + serverPort); + opts.agent = agent; + + var req = http.get(opts, function (res) { + var data = ''; + res.setEncoding('utf8'); + res.on('data', function (b) { + data += b; + }); + res.on('end', function () { + data = JSON.parse(data); + assert.equal('127.0.0.1:' + serverPort, data.host); + done(); + }); + }); + req.once('error', done); + }); + it('should work over an HTTPS proxy', function (done) { + server.once('request', function (req, res) { + res.end(JSON.stringify(req.headers)); + }); + + var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || 'https://127.0.0.1:' + sslProxyPort; + proxy = url.parse(proxy); + proxy.rejectUnauthorized = false; + var agent = new HttpsProxyAgent(proxy); + + var opts = url.parse('http://127.0.0.1:' + serverPort); + opts.agent = agent; + + http.get(opts, function (res) { + var data = ''; + res.setEncoding('utf8'); + res.on('data', function (b) { + data += b; + }); + res.on('end', function () { + data = JSON.parse(data); + assert.equal('127.0.0.1:' + serverPort, data.host); + done(); + }); + }); + }); + it('should receive the 407 authorization code on the `http.ClientResponse`', function (done) { + // set a proxy authentication function for this test + proxy.authenticate = function (req, fn) { + // reject all requests + fn(null, false); + }; + + var proxyUri = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort; + var agent = new HttpsProxyAgent(proxyUri); + + var opts = {}; + // `host` and `port` don't really matter since the proxy will reject anyways + opts.host = '127.0.0.1'; + opts.port = 80; + opts.agent = agent; + + var req = http.get(opts, function (res) { + assert.equal(407, res.statusCode); + assert('proxy-authenticate' in res.headers); + done(); + }); + }); + it('should emit an "error" event on the `http.ClientRequest` if the proxy does not exist', function (done) { + // port 4 is a reserved, but "unassigned" port + var proxyUri = 'http://127.0.0.1:4'; + var agent = new HttpsProxyAgent(proxyUri); + + var opts = url.parse('http://nodejs.org'); + opts.agent = agent; + + var req = http.get(opts); + req.once('error', function (err) { + assert.equal('ECONNREFUSED', err.code); + req.abort(); + done(); + }); + }); + + it('should allow custom proxy "headers"', function (done) { + server.once('connect', function (req, socket, head) { + assert.equal('CONNECT', req.method); + assert.equal('bar', req.headers.foo); + socket.destroy(); + done(); + }); + + var uri = 'http://127.0.0.1:' + serverPort; + var proxyOpts = url.parse(uri); + proxyOpts.headers = { + 'Foo': 'bar' + }; + var agent = new HttpsProxyAgent(proxyOpts); + + var opts = {}; + // `host` and `port` don't really matter since the proxy will reject anyways + opts.host = '127.0.0.1'; + opts.port = 80; + opts.agent = agent; + + http.get(opts); + }); + + }); + + describe('"https" module', function () { + it('should work over an HTTP proxy', function (done) { + sslServer.once('request', function (req, res) { + res.end(JSON.stringify(req.headers)); + }); + + var proxy = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort; + var agent = new HttpsProxyAgent(proxy); + + var opts = url.parse('https://127.0.0.1:' + sslServerPort); + opts.rejectUnauthorized = false; + opts.agent = agent; + + https.get(opts, function (res) { + var data = ''; + res.setEncoding('utf8'); + res.on('data', function (b) { + data += b; + }); + res.on('end', function () { + data = JSON.parse(data); + assert.equal('127.0.0.1:' + sslServerPort, data.host); + done(); + }); + }); + }); + + it('should work over an HTTPS proxy', function (done) { + sslServer.once('request', function (req, res) { + res.end(JSON.stringify(req.headers)); + }); + + var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || 'https://127.0.0.1:' + sslProxyPort; + proxy = url.parse(proxy); + proxy.rejectUnauthorized = false; + var agent = new HttpsProxyAgent(proxy); + + var opts = url.parse('https://127.0.0.1:' + sslServerPort); + opts.agent = agent; + opts.rejectUnauthorized = false; + + https.get(opts, function (res) { + var data = ''; + res.setEncoding('utf8'); + res.on('data', function (b) { + data += b; + }); + res.on('end', function () { + data = JSON.parse(data); + assert.equal('127.0.0.1:' + sslServerPort, data.host); + done(); + }); + }); + }); + + it('should not send a port number for the default port', function (done) { + sslServer.once('request', function (req, res) { + res.end(JSON.stringify(req.headers)); + }); + + var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || "https://127.0.0.1:" + sslProxyPort; + proxy = url.parse(proxy); + proxy.rejectUnauthorized = false; + var agent = new HttpsProxyAgent(proxy); + agent.defaultPort = sslServerPort; + + var opts = url.parse("https://127.0.0.1:" + sslServerPort); + opts.agent = agent; + opts.rejectUnauthorized = false; + + https.get(opts, function(res) { + var data = ""; + res.setEncoding("utf8"); + res.on("data", function(b) { + data += b; + }); + res.on("end", function() { + data = JSON.parse(data); + assert.equal("127.0.0.1", data.host); + done(); + }); + }); + }); + + }); + +}); diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/History.md b/deps/npm/node_modules/humanize-ms/History.md similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/History.md rename to deps/npm/node_modules/humanize-ms/History.md diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/LICENSE b/deps/npm/node_modules/humanize-ms/LICENSE similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/LICENSE rename to deps/npm/node_modules/humanize-ms/LICENSE diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/README.md b/deps/npm/node_modules/humanize-ms/README.md similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/README.md rename to deps/npm/node_modules/humanize-ms/README.md diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/index.js b/deps/npm/node_modules/humanize-ms/index.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/index.js rename to deps/npm/node_modules/humanize-ms/index.js diff --git a/deps/npm/node_modules/humanize-ms/package.json b/deps/npm/node_modules/humanize-ms/package.json new file mode 100644 index 00000000000000..7cb9c4aa837106 --- /dev/null +++ b/deps/npm/node_modules/humanize-ms/package.json @@ -0,0 +1,66 @@ +{ + "_from": "humanize-ms@^1.2.1", + "_id": "humanize-ms@1.2.1", + "_inBundle": false, + "_integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", + "_location": "/humanize-ms", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "humanize-ms@^1.2.1", + "name": "humanize-ms", + "escapedName": "humanize-ms", + "rawSpec": "^1.2.1", + "saveSpec": null, + "fetchSpec": "^1.2.1" + }, + "_requiredBy": [ + "/agentkeepalive" + ], + "_resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "_shasum": "c46e3159a293f6b896da29316d8b6fe8bb79bbed", + "_spec": "humanize-ms@^1.2.1", + "_where": "/Users/rebecca/code/npm/node_modules/agentkeepalive", + "author": { + "name": "dead-horse", + "email": "dead_horse@qq.com", + "url": "http://deadhorse.me" + }, + "bugs": { + "url": "https://github.com/node-modules/humanize-ms/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ms": "^2.0.0" + }, + "deprecated": false, + "description": "transform humanize time to ms", + "devDependencies": { + "autod": "*", + "beautify-benchmark": "~0.2.4", + "benchmark": "~1.0.0", + "istanbul": "*", + "mocha": "*", + "should": "*" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/node-modules/humanize-ms#readme", + "keywords": [ + "humanize", + "ms" + ], + "license": "MIT", + "main": "index.js", + "name": "humanize-ms", + "repository": { + "type": "git", + "url": "git+https://github.com/node-modules/humanize-ms.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.2.1" +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/.travis.yml b/deps/npm/node_modules/iconv-lite/.travis.yml similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/.travis.yml rename to deps/npm/node_modules/iconv-lite/.travis.yml diff --git a/deps/npm/node_modules/iconv-lite/Changelog.md b/deps/npm/node_modules/iconv-lite/Changelog.md new file mode 100644 index 00000000000000..6425e27c388b19 --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/Changelog.md @@ -0,0 +1,156 @@ + +# 0.4.23 / 2018-05-07 + + * Fix deprecation warning in Node v10 due to the last usage of `new Buffer` (#185, by @felixbuenemann) + * Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn) + + +# 0.4.22 / 2018-05-05 + + * Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson) + * Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson) + + +# 0.4.21 / 2018-04-06 + + * Fix encoding canonicalization (#156) + * Fix the paths in the "browser" field in package.json (#174 by @LMLB) + * Removed "contributors" section in package.json - see Git history instead. + + +# 0.4.20 / 2018-04-06 + + * Updated `new Buffer()` usages with recommended replacements as it's being deprecated in Node v10 (#176, #178 by @ChALkeR) + + +# 0.4.19 / 2017-09-09 + + * Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147) + * Re-generated windows1255 codec, because it was updated in iconv project + * Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8 + + +# 0.4.18 / 2017-06-13 + + * Fixed CESU-8 regression in Node v8. + + +# 0.4.17 / 2017-04-22 + + * Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn) + + +# 0.4.16 / 2017-04-22 + + * Added support for React Native (#150) + * Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex) + * Fixed typo in Readme (#138 by @jiangzhuo) + * Fixed build for Node v6.10+ by making correct version comparison + * Added a warning if iconv-lite is loaded not as utf-8 (see #142) + + +# 0.4.15 / 2016-11-21 + + * Fixed typescript type definition (#137) + + +# 0.4.14 / 2016-11-20 + + * Preparation for v1.0 + * Added Node v6 and latest Node versions to Travis CI test rig + * Deprecated Node v0.8 support + * Typescript typings (@larssn) + * Fix encoding of Euro character in GB 18030 (inspired by @lygstate) + * Add ms prefix to dbcs windows encodings (@rokoroku) + + +# 0.4.13 / 2015-10-01 + + * Fix silly mistake in deprecation notice. + + +# 0.4.12 / 2015-09-26 + + * Node v4 support: + * Added CESU-8 decoding (#106) + * Added deprecation notice for `extendNodeEncodings` + * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol) + + +# 0.4.11 / 2015-07-03 + + * Added CESU-8 encoding. + + +# 0.4.10 / 2015-05-26 + + * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not + just spaces. This should minimize the importance of "default" endianness. + + +# 0.4.9 / 2015-05-24 + + * Streamlined BOM handling: strip BOM by default, add BOM when encoding if + addBOM: true. Added docs to Readme. + * UTF16 now uses UTF16-LE by default. + * Fixed minor issue with big5 encoding. + * Added io.js testing on Travis; updated node-iconv version to test against. + Now we just skip testing SBCS encodings that node-iconv doesn't support. + * (internal refactoring) Updated codec interface to use classes. + * Use strict mode in all files. + + +# 0.4.8 / 2015-04-14 + + * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94) + + +# 0.4.7 / 2015-02-05 + + * stop official support of Node.js v0.8. Should still work, but no guarantees. + reason: Packages needed for testing are hard to get on Travis CI. + * work in environment where Object.prototype is monkey patched with enumerable + props (#89). + + +# 0.4.6 / 2015-01-12 + + * fix rare aliases of single-byte encodings (thanks @mscdex) + * double the timeout for dbcs tests to make them less flaky on travis + + +# 0.4.5 / 2014-11-20 + + * fix windows-31j and x-sjis encoding support (@nleush) + * minor fix: undefined variable reference when internal error happens + + +# 0.4.4 / 2014-07-16 + + * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3) + * fixed streaming base64 encoding + + +# 0.4.3 / 2014-06-14 + + * added encodings UTF-16BE and UTF-16 with BOM + + +# 0.4.2 / 2014-06-12 + + * don't throw exception if `extendNodeEncodings()` is called more than once + + +# 0.4.1 / 2014-06-11 + + * codepage 808 added + + +# 0.4.0 / 2014-06-10 + + * code is rewritten from scratch + * all widespread encodings are supported + * streaming interface added + * browserify compatibility added + * (optional) extend core primitive encodings to make usage even simpler + * moved from vows to mocha as the testing framework diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/LICENSE b/deps/npm/node_modules/iconv-lite/LICENSE similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/LICENSE rename to deps/npm/node_modules/iconv-lite/LICENSE diff --git a/deps/npm/node_modules/iconv-lite/README.md b/deps/npm/node_modules/iconv-lite/README.md new file mode 100644 index 00000000000000..1d61f9e84d13ec --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/README.md @@ -0,0 +1,156 @@ +## Pure JS character encoding conversion [![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite) + + * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io). + * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), + [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others. + * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison). + * Intuitive encode/decode API + * Streaming support for Node v0.10+ + * [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings. + * In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included). + * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included. + * React Native is supported (need to explicitly `npm install` two more modules: `buffer` and `stream`). + * License: MIT. + +[![NPM Stats](https://nodei.co/npm/iconv-lite.png?downloads=true&downloadRank=true)](https://npmjs.org/packages/iconv-lite/) + +## Usage +### Basic API +```javascript +var iconv = require('iconv-lite'); + +// Convert from an encoded buffer to js string. +str = iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251'); + +// Convert from js string to an encoded buffer. +buf = iconv.encode("Sample input string", 'win1251'); + +// Check if encoding is supported +iconv.encodingExists("us-ascii") +``` + +### Streaming API (Node v0.10+) +```javascript + +// Decode stream (from binary stream to js strings) +http.createServer(function(req, res) { + var converterStream = iconv.decodeStream('win1251'); + req.pipe(converterStream); + + converterStream.on('data', function(str) { + console.log(str); // Do something with decoded strings, chunk-by-chunk. + }); +}); + +// Convert encoding streaming example +fs.createReadStream('file-in-win1251.txt') + .pipe(iconv.decodeStream('win1251')) + .pipe(iconv.encodeStream('ucs2')) + .pipe(fs.createWriteStream('file-in-ucs2.txt')); + +// Sugar: all encode/decode streams have .collect(cb) method to accumulate data. +http.createServer(function(req, res) { + req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) { + assert(typeof body == 'string'); + console.log(body); // full request body string + }); +}); +``` + +### [Deprecated] Extend Node.js own encodings +> NOTE: This doesn't work on latest Node versions. See [details](https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility). + +```javascript +// After this call all Node basic primitives will understand iconv-lite encodings. +iconv.extendNodeEncodings(); + +// Examples: +buf = new Buffer(str, 'win1251'); +buf.write(str, 'gbk'); +str = buf.toString('latin1'); +assert(Buffer.isEncoding('iso-8859-15')); +Buffer.byteLength(str, 'us-ascii'); + +http.createServer(function(req, res) { + req.setEncoding('big5'); + req.collect(function(err, body) { + console.log(body); + }); +}); + +fs.createReadStream("file.txt", "shift_jis"); + +// External modules are also supported (if they use Node primitives, which they probably do). +request = require('request'); +request({ + url: "http://github.com/", + encoding: "cp932" +}); + +// To remove extensions +iconv.undoExtendNodeEncodings(); +``` + +## Supported encodings + + * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex. + * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap. + * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family, + IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library. + Aliases like 'latin1', 'us-ascii' also supported. + * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP. + +See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). + +Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors! + +Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors! + + +## Encoding/decoding speed + +Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0). +Note: your results may vary, so please always check on your hardware. + + operation iconv@2.1.4 iconv-lite@0.4.7 + ---------------------------------------------------------- + encode('win1251') ~96 Mb/s ~320 Mb/s + decode('win1251') ~95 Mb/s ~246 Mb/s + +## BOM handling + + * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options + (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`). + A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found. + * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module. + * Encoding: No BOM added, unless overridden by `addBOM: true` option. + +## UTF-16 Encodings + +This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be +smart about endianness in the following ways: + * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be + overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`. + * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override. + +## Other notes + +When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding). +Untranslatable characters are set to � or ?. No transliteration is currently supported. +Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77). + +## Testing + +```bash +$ git clone git@github.com:ashtuchkin/iconv-lite.git +$ cd iconv-lite +$ npm install +$ npm test + +$ # To view performance: +$ node test/performance.js + +$ # To view test coverage: +$ npm run coverage +$ open coverage/lcov-report/index.html +``` diff --git a/deps/npm/node_modules/iconv-lite/encodings/dbcs-codec.js b/deps/npm/node_modules/iconv-lite/encodings/dbcs-codec.js new file mode 100644 index 00000000000000..7a8559824e75d3 --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/encodings/dbcs-codec.js @@ -0,0 +1,554 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. +// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. +// To save memory and loading time, we read table files only when requested. + +exports._dbcs = DBCSCodec; + +var UNASSIGNED = -1, + GB18030_CODE = -2, + SEQ_START = -10, + NODE_START = -1000, + UNASSIGNED_NODE = new Array(0x100), + DEF_CHAR = -1; + +for (var i = 0; i < 0x100; i++) + UNASSIGNED_NODE[i] = UNASSIGNED; + + +// Class DBCSCodec reads and initializes mapping tables. +function DBCSCodec(codecOptions, iconv) { + this.encodingName = codecOptions.encodingName; + if (!codecOptions) + throw new Error("DBCS codec is called without the data.") + if (!codecOptions.table) + throw new Error("Encoding '" + this.encodingName + "' has no data."); + + // Load tables. + var mappingTable = codecOptions.table(); + + + // Decode tables: MBCS -> Unicode. + + // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. + // Trie root is decodeTables[0]. + // Values: >= 0 -> unicode character code. can be > 0xFFFF + // == UNASSIGNED -> unknown/unassigned sequence. + // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. + // <= NODE_START -> index of the next node in our trie to process next byte. + // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. + this.decodeTables = []; + this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. + + // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. + this.decodeTableSeq = []; + + // Actual mapping tables consist of chunks. Use them to fill up decode tables. + for (var i = 0; i < mappingTable.length; i++) + this._addDecodeChunk(mappingTable[i]); + + this.defaultCharUnicode = iconv.defaultCharUnicode; + + + // Encode tables: Unicode -> DBCS. + + // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. + // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. + // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). + // == UNASSIGNED -> no conversion found. Output a default char. + // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. + this.encodeTable = []; + + // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of + // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key + // means end of sequence (needed when one sequence is a strict subsequence of another). + // Objects are kept separately from encodeTable to increase performance. + this.encodeTableSeq = []; + + // Some chars can be decoded, but need not be encoded. + var skipEncodeChars = {}; + if (codecOptions.encodeSkipVals) + for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { + var val = codecOptions.encodeSkipVals[i]; + if (typeof val === 'number') + skipEncodeChars[val] = true; + else + for (var j = val.from; j <= val.to; j++) + skipEncodeChars[j] = true; + } + + // Use decode trie to recursively fill out encode tables. + this._fillEncodeTable(0, 0, skipEncodeChars); + + // Add more encoding pairs when needed. + if (codecOptions.encodeAdd) { + for (var uChar in codecOptions.encodeAdd) + if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) + this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); + } + + this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; + if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); + + + // Load & create GB18030 tables when needed. + if (typeof codecOptions.gb18030 === 'function') { + this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. + + // Add GB18030 decode tables. + var thirdByteNodeIdx = this.decodeTables.length; + var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + var fourthByteNodeIdx = this.decodeTables.length; + var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + for (var i = 0x81; i <= 0xFE; i++) { + var secondByteNodeIdx = NODE_START - this.decodeTables[0][i]; + var secondByteNode = this.decodeTables[secondByteNodeIdx]; + for (var j = 0x30; j <= 0x39; j++) + secondByteNode[j] = NODE_START - thirdByteNodeIdx; + } + for (var i = 0x81; i <= 0xFE; i++) + thirdByteNode[i] = NODE_START - fourthByteNodeIdx; + for (var i = 0x30; i <= 0x39; i++) + fourthByteNode[i] = GB18030_CODE + } +} + +DBCSCodec.prototype.encoder = DBCSEncoder; +DBCSCodec.prototype.decoder = DBCSDecoder; + +// Decoder helpers +DBCSCodec.prototype._getDecodeTrieNode = function(addr) { + var bytes = []; + for (; addr > 0; addr >>= 8) + bytes.push(addr & 0xFF); + if (bytes.length == 0) + bytes.push(0); + + var node = this.decodeTables[0]; + for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. + var val = node[bytes[i]]; + + if (val == UNASSIGNED) { // Create new node. + node[bytes[i]] = NODE_START - this.decodeTables.length; + this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); + } + else if (val <= NODE_START) { // Existing node. + node = this.decodeTables[NODE_START - val]; + } + else + throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); + } + return node; +} + + +DBCSCodec.prototype._addDecodeChunk = function(chunk) { + // First element of chunk is the hex mbcs code where we start. + var curAddr = parseInt(chunk[0], 16); + + // Choose the decoding node where we'll write our chars. + var writeTable = this._getDecodeTrieNode(curAddr); + curAddr = curAddr & 0xFF; + + // Write all other elements of the chunk to the table. + for (var k = 1; k < chunk.length; k++) { + var part = chunk[k]; + if (typeof part === "string") { // String, write as-is. + for (var l = 0; l < part.length;) { + var code = part.charCodeAt(l++); + if (0xD800 <= code && code < 0xDC00) { // Decode surrogate + var codeTrail = part.charCodeAt(l++); + if (0xDC00 <= codeTrail && codeTrail < 0xE000) + writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); + else + throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); + } + else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) + var len = 0xFFF - code + 2; + var seq = []; + for (var m = 0; m < len; m++) + seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. + + writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; + this.decodeTableSeq.push(seq); + } + else + writeTable[curAddr++] = code; // Basic char + } + } + else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. + var charCode = writeTable[curAddr - 1] + 1; + for (var l = 0; l < part; l++) + writeTable[curAddr++] = charCode++; + } + else + throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); + } + if (curAddr > 0xFF) + throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); +} + +// Encoder helpers +DBCSCodec.prototype._getEncodeBucket = function(uCode) { + var high = uCode >> 8; // This could be > 0xFF because of astral characters. + if (this.encodeTable[high] === undefined) + this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. + return this.encodeTable[high]; +} + +DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + if (bucket[low] <= SEQ_START) + this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. + else if (bucket[low] == UNASSIGNED) + bucket[low] = dbcsCode; +} + +DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { + + // Get the root of character tree according to first character of the sequence. + var uCode = seq[0]; + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + + var node; + if (bucket[low] <= SEQ_START) { + // There's already a sequence with - use it. + node = this.encodeTableSeq[SEQ_START-bucket[low]]; + } + else { + // There was no sequence object - allocate a new one. + node = {}; + if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. + bucket[low] = SEQ_START - this.encodeTableSeq.length; + this.encodeTableSeq.push(node); + } + + // Traverse the character tree, allocating new nodes as needed. + for (var j = 1; j < seq.length-1; j++) { + var oldVal = node[uCode]; + if (typeof oldVal === 'object') + node = oldVal; + else { + node = node[uCode] = {} + if (oldVal !== undefined) + node[DEF_CHAR] = oldVal + } + } + + // Set the leaf to given dbcsCode. + uCode = seq[seq.length-1]; + node[uCode] = dbcsCode; +} + +DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { + var node = this.decodeTables[nodeIdx]; + for (var i = 0; i < 0x100; i++) { + var uCode = node[i]; + var mbCode = prefix + i; + if (skipEncodeChars[mbCode]) + continue; + + if (uCode >= 0) + this._setEncodeChar(uCode, mbCode); + else if (uCode <= NODE_START) + this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); + else if (uCode <= SEQ_START) + this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); + } +} + + + +// == Encoder ================================================================== + +function DBCSEncoder(options, codec) { + // Encoder state + this.leadSurrogate = -1; + this.seqObj = undefined; + + // Static data + this.encodeTable = codec.encodeTable; + this.encodeTableSeq = codec.encodeTableSeq; + this.defaultCharSingleByte = codec.defCharSB; + this.gb18030 = codec.gb18030; +} + +DBCSEncoder.prototype.write = function(str) { + var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), + leadSurrogate = this.leadSurrogate, + seqObj = this.seqObj, nextChar = -1, + i = 0, j = 0; + + while (true) { + // 0. Get next character. + if (nextChar === -1) { + if (i == str.length) break; + var uCode = str.charCodeAt(i++); + } + else { + var uCode = nextChar; + nextChar = -1; + } + + // 1. Handle surrogates. + if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. + if (uCode < 0xDC00) { // We've got lead surrogate. + if (leadSurrogate === -1) { + leadSurrogate = uCode; + continue; + } else { + leadSurrogate = uCode; + // Double lead surrogate found. + uCode = UNASSIGNED; + } + } else { // We've got trail surrogate. + if (leadSurrogate !== -1) { + uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); + leadSurrogate = -1; + } else { + // Incomplete surrogate pair - only trail surrogate found. + uCode = UNASSIGNED; + } + + } + } + else if (leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. + leadSurrogate = -1; + } + + // 2. Convert uCode character. + var dbcsCode = UNASSIGNED; + if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence + var resCode = seqObj[uCode]; + if (typeof resCode === 'object') { // Sequence continues. + seqObj = resCode; + continue; + + } else if (typeof resCode == 'number') { // Sequence finished. Write it. + dbcsCode = resCode; + + } else if (resCode == undefined) { // Current character is not part of the sequence. + + // Try default character for this sequence + resCode = seqObj[DEF_CHAR]; + if (resCode !== undefined) { + dbcsCode = resCode; // Found. Write it. + nextChar = uCode; // Current character will be written too in the next iteration. + + } else { + // TODO: What if we have no default? (resCode == undefined) + // Then, we should write first char of the sequence as-is and try the rest recursively. + // Didn't do it for now because no encoding has this situation yet. + // Currently, just skip the sequence and write current char. + } + } + seqObj = undefined; + } + else if (uCode >= 0) { // Regular character + var subtable = this.encodeTable[uCode >> 8]; + if (subtable !== undefined) + dbcsCode = subtable[uCode & 0xFF]; + + if (dbcsCode <= SEQ_START) { // Sequence start + seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; + continue; + } + + if (dbcsCode == UNASSIGNED && this.gb18030) { + // Use GB18030 algorithm to find character(s) to write. + var idx = findIdx(this.gb18030.uChars, uCode); + if (idx != -1) { + var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; + newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; + newBuf[j++] = 0x30 + dbcsCode; + continue; + } + } + } + + // 3. Write dbcsCode character. + if (dbcsCode === UNASSIGNED) + dbcsCode = this.defaultCharSingleByte; + + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else if (dbcsCode < 0x10000) { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + else { + newBuf[j++] = dbcsCode >> 16; + newBuf[j++] = (dbcsCode >> 8) & 0xFF; + newBuf[j++] = dbcsCode & 0xFF; + } + } + + this.seqObj = seqObj; + this.leadSurrogate = leadSurrogate; + return newBuf.slice(0, j); +} + +DBCSEncoder.prototype.end = function() { + if (this.leadSurrogate === -1 && this.seqObj === undefined) + return; // All clean. Most often case. + + var newBuf = Buffer.alloc(10), j = 0; + + if (this.seqObj) { // We're in the sequence. + var dbcsCode = this.seqObj[DEF_CHAR]; + if (dbcsCode !== undefined) { // Write beginning of the sequence. + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + } else { + // See todo above. + } + this.seqObj = undefined; + } + + if (this.leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + newBuf[j++] = this.defaultCharSingleByte; + this.leadSurrogate = -1; + } + + return newBuf.slice(0, j); +} + +// Export for testing +DBCSEncoder.prototype.findIdx = findIdx; + + +// == Decoder ================================================================== + +function DBCSDecoder(options, codec) { + // Decoder state + this.nodeIdx = 0; + this.prevBuf = Buffer.alloc(0); + + // Static data + this.decodeTables = codec.decodeTables; + this.decodeTableSeq = codec.decodeTableSeq; + this.defaultCharUnicode = codec.defaultCharUnicode; + this.gb18030 = codec.gb18030; +} + +DBCSDecoder.prototype.write = function(buf) { + var newBuf = Buffer.alloc(buf.length*2), + nodeIdx = this.nodeIdx, + prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, + seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence. + uCode; + + if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later. + prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]); + + for (var i = 0, j = 0; i < buf.length; i++) { + var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset]; + + // Lookup in current trie node. + var uCode = this.decodeTables[nodeIdx][curByte]; + + if (uCode >= 0) { + // Normal character, just use it. + } + else if (uCode === UNASSIGNED) { // Unknown char. + // TODO: Callback with seq. + //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle). + uCode = this.defaultCharUnicode.charCodeAt(0); + } + else if (uCode === GB18030_CODE) { + var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30); + var idx = findIdx(this.gb18030.gbChars, ptr); + uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; + } + else if (uCode <= NODE_START) { // Go to next trie node. + nodeIdx = NODE_START - uCode; + continue; + } + else if (uCode <= SEQ_START) { // Output a sequence of chars. + var seq = this.decodeTableSeq[SEQ_START - uCode]; + for (var k = 0; k < seq.length - 1; k++) { + uCode = seq[k]; + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + } + uCode = seq[seq.length-1]; + } + else + throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); + + // Write the character to buffer, handling higher planes using surrogate pair. + if (uCode > 0xFFFF) { + uCode -= 0x10000; + var uCodeLead = 0xD800 + Math.floor(uCode / 0x400); + newBuf[j++] = uCodeLead & 0xFF; + newBuf[j++] = uCodeLead >> 8; + + uCode = 0xDC00 + uCode % 0x400; + } + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + + // Reset trie node. + nodeIdx = 0; seqStart = i+1; + } + + this.nodeIdx = nodeIdx; + this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); + return newBuf.slice(0, j).toString('ucs2'); +} + +DBCSDecoder.prototype.end = function() { + var ret = ''; + + // Try to parse all remaining chars. + while (this.prevBuf.length > 0) { + // Skip 1 character in the buffer. + ret += this.defaultCharUnicode; + var buf = this.prevBuf.slice(1); + + // Parse remaining as usual. + this.prevBuf = Buffer.alloc(0); + this.nodeIdx = 0; + if (buf.length > 0) + ret += this.write(buf); + } + + this.nodeIdx = 0; + return ret; +} + +// Binary search for GB18030. Returns largest i such that table[i] <= val. +function findIdx(table, val) { + if (table[0] > val) + return -1; + + var l = 0, r = table.length; + while (l < r-1) { // always table[l] <= val < table[r] + var mid = l + Math.floor((r-l+1)/2); + if (table[mid] <= val) + l = mid; + else + r = mid; + } + return l; +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-data.js b/deps/npm/node_modules/iconv-lite/encodings/dbcs-data.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-data.js rename to deps/npm/node_modules/iconv-lite/encodings/dbcs-data.js diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/index.js b/deps/npm/node_modules/iconv-lite/encodings/index.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/index.js rename to deps/npm/node_modules/iconv-lite/encodings/index.js diff --git a/deps/npm/node_modules/iconv-lite/encodings/internal.js b/deps/npm/node_modules/iconv-lite/encodings/internal.js new file mode 100644 index 00000000000000..fc23066bc91145 --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/encodings/internal.js @@ -0,0 +1,188 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Export Node.js internal encodings. + +module.exports = { + // Encodings + utf8: { type: "_internal", bomAware: true}, + cesu8: { type: "_internal", bomAware: true}, + unicode11utf8: "utf8", + + ucs2: { type: "_internal", bomAware: true}, + utf16le: "ucs2", + + binary: { type: "_internal" }, + base64: { type: "_internal" }, + hex: { type: "_internal" }, + + // Codec. + _internal: InternalCodec, +}; + +//------------------------------------------------------------------------------ + +function InternalCodec(codecOptions, iconv) { + this.enc = codecOptions.encodingName; + this.bomAware = codecOptions.bomAware; + + if (this.enc === "base64") + this.encoder = InternalEncoderBase64; + else if (this.enc === "cesu8") { + this.enc = "utf8"; // Use utf8 for decoding. + this.encoder = InternalEncoderCesu8; + + // Add decoder for versions of Node not supporting CESU-8 + if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { + this.decoder = InternalDecoderCesu8; + this.defaultCharUnicode = iconv.defaultCharUnicode; + } + } +} + +InternalCodec.prototype.encoder = InternalEncoder; +InternalCodec.prototype.decoder = InternalDecoder; + +//------------------------------------------------------------------------------ + +// We use node.js internal decoder. Its signature is the same as ours. +var StringDecoder = require('string_decoder').StringDecoder; + +if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. + StringDecoder.prototype.end = function() {}; + + +function InternalDecoder(options, codec) { + StringDecoder.call(this, codec.enc); +} + +InternalDecoder.prototype = StringDecoder.prototype; + + +//------------------------------------------------------------------------------ +// Encoder is mostly trivial + +function InternalEncoder(options, codec) { + this.enc = codec.enc; +} + +InternalEncoder.prototype.write = function(str) { + return Buffer.from(str, this.enc); +} + +InternalEncoder.prototype.end = function() { +} + + +//------------------------------------------------------------------------------ +// Except base64 encoder, which must keep its state. + +function InternalEncoderBase64(options, codec) { + this.prevStr = ''; +} + +InternalEncoderBase64.prototype.write = function(str) { + str = this.prevStr + str; + var completeQuads = str.length - (str.length % 4); + this.prevStr = str.slice(completeQuads); + str = str.slice(0, completeQuads); + + return Buffer.from(str, "base64"); +} + +InternalEncoderBase64.prototype.end = function() { + return Buffer.from(this.prevStr, "base64"); +} + + +//------------------------------------------------------------------------------ +// CESU-8 encoder is also special. + +function InternalEncoderCesu8(options, codec) { +} + +InternalEncoderCesu8.prototype.write = function(str) { + var buf = Buffer.alloc(str.length * 3), bufIdx = 0; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + // Naive implementation, but it works because CESU-8 is especially easy + // to convert from UTF-16 (which all JS strings are encoded in). + if (charCode < 0x80) + buf[bufIdx++] = charCode; + else if (charCode < 0x800) { + buf[bufIdx++] = 0xC0 + (charCode >>> 6); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + else { // charCode will always be < 0x10000 in javascript. + buf[bufIdx++] = 0xE0 + (charCode >>> 12); + buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + } + return buf.slice(0, bufIdx); +} + +InternalEncoderCesu8.prototype.end = function() { +} + +//------------------------------------------------------------------------------ +// CESU-8 decoder is not implemented in Node v4.0+ + +function InternalDecoderCesu8(options, codec) { + this.acc = 0; + this.contBytes = 0; + this.accBytes = 0; + this.defaultCharUnicode = codec.defaultCharUnicode; +} + +InternalDecoderCesu8.prototype.write = function(buf) { + var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, + res = ''; + for (var i = 0; i < buf.length; i++) { + var curByte = buf[i]; + if ((curByte & 0xC0) !== 0x80) { // Leading byte + if (contBytes > 0) { // Previous code is invalid + res += this.defaultCharUnicode; + contBytes = 0; + } + + if (curByte < 0x80) { // Single-byte code + res += String.fromCharCode(curByte); + } else if (curByte < 0xE0) { // Two-byte code + acc = curByte & 0x1F; + contBytes = 1; accBytes = 1; + } else if (curByte < 0xF0) { // Three-byte code + acc = curByte & 0x0F; + contBytes = 2; accBytes = 1; + } else { // Four or more are not supported for CESU-8. + res += this.defaultCharUnicode; + } + } else { // Continuation byte + if (contBytes > 0) { // We're waiting for it. + acc = (acc << 6) | (curByte & 0x3f); + contBytes--; accBytes++; + if (contBytes === 0) { + // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) + if (accBytes === 2 && acc < 0x80 && acc > 0) + res += this.defaultCharUnicode; + else if (accBytes === 3 && acc < 0x800) + res += this.defaultCharUnicode; + else + // Actually add character. + res += String.fromCharCode(acc); + } + } else { // Unexpected continuation byte + res += this.defaultCharUnicode; + } + } + } + this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; + return res; +} + +InternalDecoderCesu8.prototype.end = function() { + var res = 0; + if (this.contBytes > 0) + res += this.defaultCharUnicode; + return res; +} diff --git a/deps/npm/node_modules/iconv-lite/encodings/sbcs-codec.js b/deps/npm/node_modules/iconv-lite/encodings/sbcs-codec.js new file mode 100644 index 00000000000000..798497d2d5ca72 --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/encodings/sbcs-codec.js @@ -0,0 +1,72 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that +// correspond to encoded bytes (if 128 - then lower half is ASCII). + +exports._sbcs = SBCSCodec; +function SBCSCodec(codecOptions, iconv) { + if (!codecOptions) + throw new Error("SBCS codec is called without the data.") + + // Prepare char buffer for decoding. + if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) + throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); + + if (codecOptions.chars.length === 128) { + var asciiString = ""; + for (var i = 0; i < 128; i++) + asciiString += String.fromCharCode(i); + codecOptions.chars = asciiString + codecOptions.chars; + } + + this.decodeBuf = new Buffer.from(codecOptions.chars, 'ucs2'); + + // Encoding buffer. + var encodeBuf = new Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); + + for (var i = 0; i < codecOptions.chars.length; i++) + encodeBuf[codecOptions.chars.charCodeAt(i)] = i; + + this.encodeBuf = encodeBuf; +} + +SBCSCodec.prototype.encoder = SBCSEncoder; +SBCSCodec.prototype.decoder = SBCSDecoder; + + +function SBCSEncoder(options, codec) { + this.encodeBuf = codec.encodeBuf; +} + +SBCSEncoder.prototype.write = function(str) { + var buf = Buffer.alloc(str.length); + for (var i = 0; i < str.length; i++) + buf[i] = this.encodeBuf[str.charCodeAt(i)]; + + return buf; +} + +SBCSEncoder.prototype.end = function() { +} + + +function SBCSDecoder(options, codec) { + this.decodeBuf = codec.decodeBuf; +} + +SBCSDecoder.prototype.write = function(buf) { + // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. + var decodeBuf = this.decodeBuf; + var newBuf = Buffer.alloc(buf.length*2); + var idx1 = 0, idx2 = 0; + for (var i = 0; i < buf.length; i++) { + idx1 = buf[i]*2; idx2 = i*2; + newBuf[idx2] = decodeBuf[idx1]; + newBuf[idx2+1] = decodeBuf[idx1+1]; + } + return newBuf.toString('ucs2'); +} + +SBCSDecoder.prototype.end = function() { +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/deps/npm/node_modules/iconv-lite/encodings/sbcs-data-generated.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js rename to deps/npm/node_modules/iconv-lite/encodings/sbcs-data-generated.js diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data.js b/deps/npm/node_modules/iconv-lite/encodings/sbcs-data.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data.js rename to deps/npm/node_modules/iconv-lite/encodings/sbcs-data.js diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/big5-added.json b/deps/npm/node_modules/iconv-lite/encodings/tables/big5-added.json similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/big5-added.json rename to deps/npm/node_modules/iconv-lite/encodings/tables/big5-added.json diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp936.json b/deps/npm/node_modules/iconv-lite/encodings/tables/cp936.json similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp936.json rename to deps/npm/node_modules/iconv-lite/encodings/tables/cp936.json diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp949.json b/deps/npm/node_modules/iconv-lite/encodings/tables/cp949.json similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp949.json rename to deps/npm/node_modules/iconv-lite/encodings/tables/cp949.json diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp950.json b/deps/npm/node_modules/iconv-lite/encodings/tables/cp950.json similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp950.json rename to deps/npm/node_modules/iconv-lite/encodings/tables/cp950.json diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/eucjp.json b/deps/npm/node_modules/iconv-lite/encodings/tables/eucjp.json similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/eucjp.json rename to deps/npm/node_modules/iconv-lite/encodings/tables/eucjp.json diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/deps/npm/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json rename to deps/npm/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json b/deps/npm/node_modules/iconv-lite/encodings/tables/gbk-added.json similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json rename to deps/npm/node_modules/iconv-lite/encodings/tables/gbk-added.json diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json b/deps/npm/node_modules/iconv-lite/encodings/tables/shiftjis.json similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json rename to deps/npm/node_modules/iconv-lite/encodings/tables/shiftjis.json diff --git a/deps/npm/node_modules/iconv-lite/encodings/utf16.js b/deps/npm/node_modules/iconv-lite/encodings/utf16.js new file mode 100644 index 00000000000000..0b183cf9e713a7 --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/encodings/utf16.js @@ -0,0 +1,175 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js + +// == UTF16-BE codec. ========================================================== + +exports.utf16be = Utf16BECodec; +function Utf16BECodec() { +} + +Utf16BECodec.prototype.encoder = Utf16BEEncoder; +Utf16BECodec.prototype.decoder = Utf16BEDecoder; +Utf16BECodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf16BEEncoder() { +} + +Utf16BEEncoder.prototype.write = function(str) { + var buf = Buffer.from(str, 'ucs2'); + for (var i = 0; i < buf.length; i += 2) { + var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; + } + return buf; +} + +Utf16BEEncoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf16BEDecoder() { + this.overflowByte = -1; +} + +Utf16BEDecoder.prototype.write = function(buf) { + if (buf.length == 0) + return ''; + + var buf2 = Buffer.alloc(buf.length + 1), + i = 0, j = 0; + + if (this.overflowByte !== -1) { + buf2[0] = buf[0]; + buf2[1] = this.overflowByte; + i = 1; j = 2; + } + + for (; i < buf.length-1; i += 2, j+= 2) { + buf2[j] = buf[i+1]; + buf2[j+1] = buf[i]; + } + + this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; + + return buf2.slice(0, j).toString('ucs2'); +} + +Utf16BEDecoder.prototype.end = function() { +} + + +// == UTF-16 codec ============================================================= +// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. +// Defaults to UTF-16LE, as it's prevalent and default in Node. +// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le +// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); + +// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). + +exports.utf16 = Utf16Codec; +function Utf16Codec(codecOptions, iconv) { + this.iconv = iconv; +} + +Utf16Codec.prototype.encoder = Utf16Encoder; +Utf16Codec.prototype.decoder = Utf16Decoder; + + +// -- Encoding (pass-through) + +function Utf16Encoder(options, codec) { + options = options || {}; + if (options.addBOM === undefined) + options.addBOM = true; + this.encoder = codec.iconv.getEncoder('utf-16le', options); +} + +Utf16Encoder.prototype.write = function(str) { + return this.encoder.write(str); +} + +Utf16Encoder.prototype.end = function() { + return this.encoder.end(); +} + + +// -- Decoding + +function Utf16Decoder(options, codec) { + this.decoder = null; + this.initialBytes = []; + this.initialBytesLen = 0; + + this.options = options || {}; + this.iconv = codec.iconv; +} + +Utf16Decoder.prototype.write = function(buf) { + if (!this.decoder) { + // Codec is not chosen yet. Accumulate initial bytes. + this.initialBytes.push(buf); + this.initialBytesLen += buf.length; + + if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below) + return ''; + + // We have enough bytes -> detect endianness. + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + this.initialBytes.length = this.initialBytesLen = 0; + } + + return this.decoder.write(buf); +} + +Utf16Decoder.prototype.end = function() { + if (!this.decoder) { + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var res = this.decoder.write(buf), + trail = this.decoder.end(); + + return trail ? (res + trail) : res; + } + return this.decoder.end(); +} + +function detectEncoding(buf, defaultEncoding) { + var enc = defaultEncoding || 'utf-16le'; + + if (buf.length >= 2) { + // Check BOM. + if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM + enc = 'utf-16be'; + else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM + enc = 'utf-16le'; + else { + // No BOM found. Try to deduce encoding from initial content. + // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. + // So, we count ASCII as if it was LE or BE, and decide from that. + var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions + _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even. + + for (var i = 0; i < _len; i += 2) { + if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++; + if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++; + } + + if (asciiCharsBE > asciiCharsLE) + enc = 'utf-16be'; + else if (asciiCharsBE < asciiCharsLE) + enc = 'utf-16le'; + } + } + + return enc; +} diff --git a/deps/npm/node_modules/iconv-lite/encodings/utf7.js b/deps/npm/node_modules/iconv-lite/encodings/utf7.js new file mode 100644 index 00000000000000..3f776a87fa93d5 --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/encodings/utf7.js @@ -0,0 +1,288 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 +// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 + +exports.utf7 = Utf7Codec; +exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 +function Utf7Codec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7Codec.prototype.encoder = Utf7Encoder; +Utf7Codec.prototype.decoder = Utf7Decoder; +Utf7Codec.prototype.bomAware = true; + + +// -- Encoding + +var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; + +function Utf7Encoder(options, codec) { + this.iconv = codec.iconv; +} + +Utf7Encoder.prototype.write = function(str) { + // Naive implementation. + // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". + return Buffer.from(str.replace(nonDirectChars, function(chunk) { + return "+" + (chunk === '+' ? '' : + this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) + + "-"; + }.bind(this))); +} + +Utf7Encoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf7Decoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64Regex = /[A-Za-z0-9\/+]/; +var base64Chars = []; +for (var i = 0; i < 256; i++) + base64Chars[i] = base64Regex.test(String.fromCharCode(i)); + +var plusChar = '+'.charCodeAt(0), + minusChar = '-'.charCodeAt(0), + andChar = '&'.charCodeAt(0); + +Utf7Decoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '+' + if (buf[i] == plusChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64Chars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" + res += "+"; + } else { + var b64str = base64Accum + buf.slice(lastI, i).toString(); + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus is absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + buf.slice(lastI).toString(); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7Decoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + +// UTF-7-IMAP codec. +// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) +// Differences: +// * Base64 part is started by "&" instead of "+" +// * Direct characters are 0x20-0x7E, except "&" (0x26) +// * In Base64, "," is used instead of "/" +// * Base64 must not be used to represent direct characters. +// * No implicit shift back from Base64 (should always end with '-') +// * String must end in non-shifted position. +// * "-&" while in base64 is not allowed. + + +exports.utf7imap = Utf7IMAPCodec; +function Utf7IMAPCodec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; +Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; +Utf7IMAPCodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf7IMAPEncoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = Buffer.alloc(6); + this.base64AccumIdx = 0; +} + +Utf7IMAPEncoder.prototype.write = function(str) { + var inBase64 = this.inBase64, + base64Accum = this.base64Accum, + base64AccumIdx = this.base64AccumIdx, + buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; + + for (var i = 0; i < str.length; i++) { + var uChar = str.charCodeAt(i); + if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. + if (inBase64) { + if (base64AccumIdx > 0) { + bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + inBase64 = false; + } + + if (!inBase64) { + buf[bufIdx++] = uChar; // Write direct character + + if (uChar === andChar) // Ampersand -> '&-' + buf[bufIdx++] = minusChar; + } + + } else { // Non-direct character + if (!inBase64) { + buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. + inBase64 = true; + } + if (inBase64) { + base64Accum[base64AccumIdx++] = uChar >> 8; + base64Accum[base64AccumIdx++] = uChar & 0xFF; + + if (base64AccumIdx == base64Accum.length) { + bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); + base64AccumIdx = 0; + } + } + } + } + + this.inBase64 = inBase64; + this.base64AccumIdx = base64AccumIdx; + + return buf.slice(0, bufIdx); +} + +Utf7IMAPEncoder.prototype.end = function() { + var buf = Buffer.alloc(10), bufIdx = 0; + if (this.inBase64) { + if (this.base64AccumIdx > 0) { + bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + this.base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + this.inBase64 = false; + } + + return buf.slice(0, bufIdx); +} + + +// -- Decoding + +function Utf7IMAPDecoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64IMAPChars = base64Chars.slice(); +base64IMAPChars[','.charCodeAt(0)] = true; + +Utf7IMAPDecoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '&' + if (buf[i] == andChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64IMAPChars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" + res += "&"; + } else { + var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/'); + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus may be absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/'); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7IMAPDecoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js b/deps/npm/node_modules/iconv-lite/lib/bom-handling.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js rename to deps/npm/node_modules/iconv-lite/lib/bom-handling.js diff --git a/deps/npm/node_modules/iconv-lite/lib/extend-node.js b/deps/npm/node_modules/iconv-lite/lib/extend-node.js new file mode 100644 index 00000000000000..3f422f761d2c87 --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/lib/extend-node.js @@ -0,0 +1,217 @@ +"use strict"; +var Buffer = require("buffer").Buffer; +// Note: not polyfilled with safer-buffer on a purpose, as overrides Buffer + +// == Extend Node primitives to use iconv-lite ================================= + +module.exports = function (iconv) { + var original = undefined; // Place to keep original methods. + + // Node authors rewrote Buffer internals to make it compatible with + // Uint8Array and we cannot patch key functions since then. + // Note: this does use older Buffer API on a purpose + iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array); + + iconv.extendNodeEncodings = function extendNodeEncodings() { + if (original) return; + original = {}; + + if (!iconv.supportsNodeEncodingsExtension) { + console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"); + console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility"); + return; + } + + var nodeNativeEncodings = { + 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true, + 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true, + }; + + Buffer.isNativeEncoding = function(enc) { + return enc && nodeNativeEncodings[enc.toLowerCase()]; + } + + // -- SlowBuffer ----------------------------------------------------------- + var SlowBuffer = require('buffer').SlowBuffer; + + original.SlowBufferToString = SlowBuffer.prototype.toString; + SlowBuffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.SlowBufferToString.call(this, encoding, start, end); + + // Otherwise, use our decoding method. + if (typeof start == 'undefined') start = 0; + if (typeof end == 'undefined') end = this.length; + return iconv.decode(this.slice(start, end), encoding); + } + + original.SlowBufferWrite = SlowBuffer.prototype.write; + SlowBuffer.prototype.write = function(string, offset, length, encoding) { + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = undefined; + } + } else { // legacy + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.SlowBufferWrite.call(this, string, offset, length, encoding); + + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError('attempt to write beyond buffer bounds'); + + // Otherwise, use our encoding method. + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + } + + // -- Buffer --------------------------------------------------------------- + + original.BufferIsEncoding = Buffer.isEncoding; + Buffer.isEncoding = function(encoding) { + return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding); + } + + original.BufferByteLength = Buffer.byteLength; + Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferByteLength.call(this, str, encoding); + + // Slow, I know, but we don't have a better way yet. + return iconv.encode(str, encoding).length; + } + + original.BufferToString = Buffer.prototype.toString; + Buffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferToString.call(this, encoding, start, end); + + // Otherwise, use our decoding method. + if (typeof start == 'undefined') start = 0; + if (typeof end == 'undefined') end = this.length; + return iconv.decode(this.slice(start, end), encoding); + } + + original.BufferWrite = Buffer.prototype.write; + Buffer.prototype.write = function(string, offset, length, encoding) { + var _offset = offset, _length = length, _encoding = encoding; + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = undefined; + } + } else { // legacy + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferWrite.call(this, string, _offset, _length, _encoding); + + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError('attempt to write beyond buffer bounds'); + + // Otherwise, use our encoding method. + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + + // TODO: Set _charsWritten. + } + + + // -- Readable ------------------------------------------------------------- + if (iconv.supportsStreams) { + var Readable = require('stream').Readable; + + original.ReadableSetEncoding = Readable.prototype.setEncoding; + Readable.prototype.setEncoding = function setEncoding(enc, options) { + // Use our own decoder, it has the same interface. + // We cannot use original function as it doesn't handle BOM-s. + this._readableState.decoder = iconv.getDecoder(enc, options); + this._readableState.encoding = enc; + } + + Readable.prototype.collect = iconv._collect; + } + } + + // Remove iconv-lite Node primitive extensions. + iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() { + if (!iconv.supportsNodeEncodingsExtension) + return; + if (!original) + throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.") + + delete Buffer.isNativeEncoding; + + var SlowBuffer = require('buffer').SlowBuffer; + + SlowBuffer.prototype.toString = original.SlowBufferToString; + SlowBuffer.prototype.write = original.SlowBufferWrite; + + Buffer.isEncoding = original.BufferIsEncoding; + Buffer.byteLength = original.BufferByteLength; + Buffer.prototype.toString = original.BufferToString; + Buffer.prototype.write = original.BufferWrite; + + if (iconv.supportsStreams) { + var Readable = require('stream').Readable; + + Readable.prototype.setEncoding = original.ReadableSetEncoding; + delete Readable.prototype.collect; + } + + original = undefined; + } +} diff --git a/deps/npm/node_modules/iconv-lite/lib/index.d.ts b/deps/npm/node_modules/iconv-lite/lib/index.d.ts new file mode 100644 index 00000000000000..0547eb346b24f4 --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/lib/index.d.ts @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + * REQUIREMENT: This definition is dependent on the @types/node definition. + * Install with `npm install @types/node --save-dev` + *--------------------------------------------------------------------------------------------*/ + +declare module 'iconv-lite' { + export function decode(buffer: Buffer, encoding: string, options?: Options): string; + + export function encode(content: string, encoding: string, options?: Options): Buffer; + + export function encodingExists(encoding: string): boolean; + + export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; + + export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; +} + +export interface Options { + stripBOM?: boolean; + addBOM?: boolean; + defaultEncoding?: string; +} diff --git a/deps/npm/node_modules/iconv-lite/lib/index.js b/deps/npm/node_modules/iconv-lite/lib/index.js new file mode 100644 index 00000000000000..270c1d86b04c07 --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/lib/index.js @@ -0,0 +1,153 @@ +"use strict"; + +// Some environments don't have global Buffer (e.g. React Native). +// Solution would be installing npm modules "buffer" and "stream" explicitly. +var Buffer = require("safer-buffer").Buffer; + +var bomHandling = require("./bom-handling"), + iconv = module.exports; + +// All codecs and aliases are kept here, keyed by encoding name/alias. +// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. +iconv.encodings = null; + +// Characters emitted in case of error. +iconv.defaultCharUnicode = '�'; +iconv.defaultCharSingleByte = '?'; + +// Public API. +iconv.encode = function encode(str, encoding, options) { + str = "" + (str || ""); // Ensure string. + + var encoder = iconv.getEncoder(encoding, options); + + var res = encoder.write(str); + var trail = encoder.end(); + + return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; +} + +iconv.decode = function decode(buf, encoding, options) { + if (typeof buf === 'string') { + if (!iconv.skipDecodeWarning) { + console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); + iconv.skipDecodeWarning = true; + } + + buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. + } + + var decoder = iconv.getDecoder(encoding, options); + + var res = decoder.write(buf); + var trail = decoder.end(); + + return trail ? (res + trail) : res; +} + +iconv.encodingExists = function encodingExists(enc) { + try { + iconv.getCodec(enc); + return true; + } catch (e) { + return false; + } +} + +// Legacy aliases to convert functions +iconv.toEncoding = iconv.encode; +iconv.fromEncoding = iconv.decode; + +// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. +iconv._codecDataCache = {}; +iconv.getCodec = function getCodec(encoding) { + if (!iconv.encodings) + iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. + + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + var enc = iconv._canonicalizeEncoding(encoding); + + // Traverse iconv.encodings to find actual codec. + var codecOptions = {}; + while (true) { + var codec = iconv._codecDataCache[enc]; + if (codec) + return codec; + + var codecDef = iconv.encodings[enc]; + + switch (typeof codecDef) { + case "string": // Direct alias to other encoding. + enc = codecDef; + break; + + case "object": // Alias with options. Can be layered. + for (var key in codecDef) + codecOptions[key] = codecDef[key]; + + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + enc = codecDef.type; + break; + + case "function": // Codec itself. + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + // The codec function must load all tables and return object with .encoder and .decoder methods. + // It'll be called only once (for each different options object). + codec = new codecDef(codecOptions, iconv); + + iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. + return codec; + + default: + throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); + } + } +} + +iconv._canonicalizeEncoding = function(encoding) { + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); +} + +iconv.getEncoder = function getEncoder(encoding, options) { + var codec = iconv.getCodec(encoding), + encoder = new codec.encoder(options, codec); + + if (codec.bomAware && options && options.addBOM) + encoder = new bomHandling.PrependBOM(encoder, options); + + return encoder; +} + +iconv.getDecoder = function getDecoder(encoding, options) { + var codec = iconv.getCodec(encoding), + decoder = new codec.decoder(options, codec); + + if (codec.bomAware && !(options && options.stripBOM === false)) + decoder = new bomHandling.StripBOM(decoder, options); + + return decoder; +} + + +// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. +var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; +if (nodeVer) { + + // Load streaming support in Node v0.10+ + var nodeVerArr = nodeVer.split(".").map(Number); + if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { + require("./streams")(iconv); + } + + // Load Node primitive extensions. + require("./extend-node")(iconv); +} + +if ("Ā" != "\u0100") { + console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/lib/streams.js b/deps/npm/node_modules/iconv-lite/lib/streams.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/lib/streams.js rename to deps/npm/node_modules/iconv-lite/lib/streams.js diff --git a/deps/npm/node_modules/iconv-lite/package.json b/deps/npm/node_modules/iconv-lite/package.json new file mode 100644 index 00000000000000..07f6f1a8e7af78 --- /dev/null +++ b/deps/npm/node_modules/iconv-lite/package.json @@ -0,0 +1,77 @@ +{ + "_from": "iconv-lite@~0.4.13", + "_id": "iconv-lite@0.4.23", + "_inBundle": false, + "_integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "_location": "/iconv-lite", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "iconv-lite@~0.4.13", + "name": "iconv-lite", + "escapedName": "iconv-lite", + "rawSpec": "~0.4.13", + "saveSpec": null, + "fetchSpec": "~0.4.13" + }, + "_requiredBy": [ + "/encoding", + "/external-editor" + ], + "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "_shasum": "297871f63be507adcfbfca715d0cd0eed84e9a63", + "_spec": "iconv-lite@~0.4.13", + "_where": "/Users/rebecca/code/npm/node_modules/encoding", + "author": { + "name": "Alexander Shtuchkin", + "email": "ashtuchkin@gmail.com" + }, + "browser": { + "./lib/extend-node": false, + "./lib/streams": false + }, + "bugs": { + "url": "https://github.com/ashtuchkin/iconv-lite/issues" + }, + "bundleDependencies": false, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "deprecated": false, + "description": "Convert character encodings in pure javascript.", + "devDependencies": { + "async": "*", + "errto": "*", + "iconv": "*", + "istanbul": "*", + "mocha": "^3.1.0", + "request": "~2.81.0", + "semver": "*", + "unorm": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "homepage": "https://github.com/ashtuchkin/iconv-lite", + "keywords": [ + "iconv", + "convert", + "charset", + "icu" + ], + "license": "MIT", + "main": "./lib/index.js", + "name": "iconv-lite", + "repository": { + "type": "git", + "url": "git://github.com/ashtuchkin/iconv-lite.git" + }, + "scripts": { + "coverage": "istanbul cover _mocha -- --grep .", + "coverage-open": "open coverage/lcov-report/index.html", + "test": "mocha --reporter spec --grep ." + }, + "typings": "./lib/index.d.ts", + "version": "0.4.23" +} diff --git a/deps/npm/node_modules/iferr/iferr.js b/deps/npm/node_modules/iferr/iferr.js new file mode 100644 index 00000000000000..028f0e24a3a9df --- /dev/null +++ b/deps/npm/node_modules/iferr/iferr.js @@ -0,0 +1,23 @@ +// Delegates to `succ` on sucecss or to `fail` on error +// ex: Thing.load(123, iferr(cb, thing => ...)) +const iferr = (fail, succ) => (err, ...a) => err ? fail(err) : succ(...a) + +// Like iferr, but also catches errors thrown from `succ` and passes to `fail` +const tiferr = (fail, succ) => iferr(fail, (...a) => { + try { succ(...a) } + catch (err) { fail(err) } +}) + +// Delegate to the success function on success, throws the error otherwise +// ex: Thing.load(123, throwerr(thing => ...)) +const throwerr = iferr.bind(null, err => { throw err }) + +// Prints errors when one is passed, or does nothing otherwise +// ex: Thing.load(123, printerr) +const printerr = iferr(err => console.error(err), () => {}) + +module.exports = exports = iferr +exports.iferr = iferr +exports.tiferr = tiferr +exports.throwerr = throwerr +exports.printerr = printerr diff --git a/deps/npm/node_modules/iferr/package.json b/deps/npm/node_modules/iferr/package.json index 6a935da8278fd5..69833649d6904b 100644 --- a/deps/npm/node_modules/iferr/package.json +++ b/deps/npm/node_modules/iferr/package.json @@ -1,43 +1,45 @@ { - "_from": "iferr@~0.1.5", - "_id": "iferr@0.1.5", - "_integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "_args": [ + [ + "iferr@1.0.0", + "/Users/rebecca/code/npm" + ] + ], + "_from": "iferr@1.0.0", + "_id": "iferr@1.0.0", + "_inBundle": false, + "_integrity": "sha512-0+ecqiP/cxgnNBIPi+TgJlaxE7sFp2N3kBFg17klQUdf24YKiaEV6b9QgEqOlD5vCVCE0U7OV9lPSN2OfS4zoQ==", "_location": "/iferr", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "iferr@~0.1.5", + "raw": "iferr@1.0.0", "name": "iferr", "escapedName": "iferr", - "rawSpec": "~0.1.5", + "rawSpec": "1.0.0", "saveSpec": null, - "fetchSpec": "~0.1.5" + "fetchSpec": "1.0.0" }, "_requiredBy": [ - "/", - "/fs-write-stream-atomic", - "/move-concurrently/copy-concurrently" + "/" ], - "_resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "_shasum": "c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501", - "_shrinkwrap": null, - "_spec": "iferr@~0.1.5", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/iferr/-/iferr-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Nadav Ivgi" }, - "bin": null, "bugs": { "url": "https://github.com/shesek/iferr/issues" }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, "description": "Higher-order functions for easier error handling", "devDependencies": { - "coffee-script": "^1.7.1", - "mocha": "^1.18.2" + "coffee-script": "^1.12.7", + "mocha": "^4.0.1" + }, + "engines": { + "node": ">=6.0.0" }, "homepage": "https://github.com/shesek/iferr", "keywords": [ @@ -45,17 +47,14 @@ "errors" ], "license": "MIT", - "main": "index.js", + "main": "iferr.js", "name": "iferr", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/shesek/iferr.git" }, "scripts": { - "prepublish": "coffee -c index.coffee", "test": "mocha" }, - "version": "0.1.5" + "version": "1.0.0" } diff --git a/deps/npm/node_modules/lru-cache/node_modules/yallist/LICENSE b/deps/npm/node_modules/ignore-walk/LICENSE similarity index 100% rename from deps/npm/node_modules/lru-cache/node_modules/yallist/LICENSE rename to deps/npm/node_modules/ignore-walk/LICENSE diff --git a/deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/README.md b/deps/npm/node_modules/ignore-walk/README.md similarity index 100% rename from deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/README.md rename to deps/npm/node_modules/ignore-walk/README.md diff --git a/deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/index.js b/deps/npm/node_modules/ignore-walk/index.js similarity index 100% rename from deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/index.js rename to deps/npm/node_modules/ignore-walk/index.js diff --git a/deps/npm/node_modules/ignore-walk/package.json b/deps/npm/node_modules/ignore-walk/package.json new file mode 100644 index 00000000000000..cc041a55e4757d --- /dev/null +++ b/deps/npm/node_modules/ignore-walk/package.json @@ -0,0 +1,71 @@ +{ + "_from": "ignore-walk@^3.0.1", + "_id": "ignore-walk@3.0.1", + "_inBundle": false, + "_integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "_location": "/ignore-walk", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ignore-walk@^3.0.1", + "name": "ignore-walk", + "escapedName": "ignore-walk", + "rawSpec": "^3.0.1", + "saveSpec": null, + "fetchSpec": "^3.0.1" + }, + "_requiredBy": [ + "/npm-packlist" + ], + "_resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "_shasum": "a83e62e7d272ac0e3b551aaa82831a19b69f82f8", + "_spec": "ignore-walk@^3.0.1", + "_where": "/Users/rebecca/code/npm/node_modules/npm-packlist", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/ignore-walk/issues" + }, + "bundleDependencies": false, + "dependencies": { + "minimatch": "^3.0.4" + }, + "deprecated": false, + "description": "Nested/recursive `.gitignore`/`.npmignore` parsing and filtering.", + "devDependencies": { + "mkdirp": "^0.5.1", + "mutate-fs": "^1.1.0", + "rimraf": "^2.6.1", + "tap": "^10.7.2" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/isaacs/ignore-walk#readme", + "keywords": [ + "ignorefile", + "ignore", + "file", + ".gitignore", + ".npmignore", + "glob" + ], + "license": "ISC", + "main": "index.js", + "name": "ignore-walk", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/ignore-walk.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "3.0.1" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/import-lazy/index.js b/deps/npm/node_modules/import-lazy/index.js similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/import-lazy/index.js rename to deps/npm/node_modules/import-lazy/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/p-finally/license b/deps/npm/node_modules/import-lazy/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/p-finally/license rename to deps/npm/node_modules/import-lazy/license diff --git a/deps/npm/node_modules/import-lazy/package.json b/deps/npm/node_modules/import-lazy/package.json new file mode 100644 index 00000000000000..e0a2a3a2c6b427 --- /dev/null +++ b/deps/npm/node_modules/import-lazy/package.json @@ -0,0 +1,76 @@ +{ + "_from": "import-lazy@^2.1.0", + "_id": "import-lazy@2.1.0", + "_inBundle": false, + "_integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "_location": "/import-lazy", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "import-lazy@^2.1.0", + "name": "import-lazy", + "escapedName": "import-lazy", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "_shasum": "05698e3d45c88e8d7e9d92cb0584e77f096f3e43", + "_spec": "import-lazy@^2.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/update-notifier", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/import-lazy/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jorge Bucaran", + "email": "jbucaran@me.com" + } + ], + "deprecated": false, + "description": "Import modules lazily", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/import-lazy#readme", + "keywords": [ + "import", + "require", + "load", + "module", + "modules", + "lazy", + "lazily", + "defer", + "deferred", + "proxy", + "proxies" + ], + "license": "MIT", + "name": "import-lazy", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/import-lazy.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/import-lazy/readme.md b/deps/npm/node_modules/import-lazy/readme.md similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/import-lazy/readme.md rename to deps/npm/node_modules/import-lazy/readme.md diff --git a/deps/npm/node_modules/imurmurhash/package.json b/deps/npm/node_modules/imurmurhash/package.json index 10b98d1e5b7877..b84f0ddf96bd48 100644 --- a/deps/npm/node_modules/imurmurhash/package.json +++ b/deps/npm/node_modules/imurmurhash/package.json @@ -1,42 +1,45 @@ { - "_from": "imurmurhash@*", + "_args": [ + [ + "imurmurhash@0.1.4", + "/Users/rebecca/code/npm" + ] + ], + "_from": "imurmurhash@0.1.4", "_id": "imurmurhash@0.1.4", + "_inBundle": false, "_integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "_location": "/imurmurhash", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "imurmurhash@*", + "raw": "imurmurhash@0.1.4", "name": "imurmurhash", "escapedName": "imurmurhash", - "rawSpec": "*", + "rawSpec": "0.1.4", "saveSpec": null, - "fetchSpec": "*" + "fetchSpec": "0.1.4" }, "_requiredBy": [ "/", + "/eslint", "/fs-write-stream-atomic", - "/unique-filename/unique-slug", + "/unique-slug", "/write-file-atomic" ], "_resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "_shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea", - "_shrinkwrap": null, - "_spec": "imurmurhash@*", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "0.1.4", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Jens Taylor", "email": "jensyt@gmail.com", "url": "https://github.com/homebrewing" }, - "bin": null, "bugs": { "url": "https://github.com/jensyt/imurmurhash-js/issues" }, - "bundleDependencies": false, "dependencies": {}, - "deprecated": false, "description": "An incremental implementation of MurmurHash3", "devDependencies": {}, "engines": { @@ -59,8 +62,6 @@ "license": "MIT", "main": "imurmurhash.js", "name": "imurmurhash", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/jensyt/imurmurhash-js.git" diff --git a/deps/npm/node_modules/inflight/package.json b/deps/npm/node_modules/inflight/package.json index 84199ee5a740d1..d31d230a28b91a 100644 --- a/deps/npm/node_modules/inflight/package.json +++ b/deps/npm/node_modules/inflight/package.json @@ -1,45 +1,45 @@ { - "_from": "inflight@~1.0.6", + "_args": [ + [ + "inflight@1.0.6", + "/Users/rebecca/code/npm" + ] + ], + "_from": "inflight@1.0.6", "_id": "inflight@1.0.6", + "_inBundle": false, "_integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "_location": "/inflight", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "inflight@~1.0.6", + "raw": "inflight@1.0.6", "name": "inflight", "escapedName": "inflight", - "rawSpec": "~1.0.6", + "rawSpec": "1.0.6", "saveSpec": null, - "fetchSpec": "~1.0.6" + "fetchSpec": "1.0.6" }, "_requiredBy": [ "/", - "/glob", - "/standard/eslint/file-entry-cache/flat-cache/del/globby/glob", - "/standard/eslint/glob" + "/glob" ], "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", - "_shrinkwrap": null, - "_spec": "inflight@~1.0.6", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "1.0.6", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "bin": null, "bugs": { "url": "https://github.com/isaacs/inflight/issues" }, - "bundleDependencies": false, "dependencies": { "once": "^1.3.0", "wrappy": "1" }, - "deprecated": false, "description": "Add callbacks to requests in flight to avoid async duplication", "devDependencies": { "tap": "^7.1.2" @@ -51,8 +51,6 @@ "license": "ISC", "main": "inflight.js", "name": "inflight", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/npm/inflight.git" diff --git a/deps/npm/node_modules/inherits/package.json b/deps/npm/node_modules/inherits/package.json index f5304235d39b34..0ae0875ff48746 100644 --- a/deps/npm/node_modules/inherits/package.json +++ b/deps/npm/node_modules/inherits/package.json @@ -1,55 +1,49 @@ { - "_from": "inherits@~2.0.3", + "_args": [ + [ + "inherits@2.0.3", + "/Users/rebecca/code/npm" + ] + ], + "_from": "inherits@2.0.3", "_id": "inherits@2.0.3", + "_inBundle": false, "_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "_location": "/inherits", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "inherits@~2.0.3", + "raw": "inherits@2.0.3", "name": "inherits", "escapedName": "inherits", - "rawSpec": "~2.0.3", + "rawSpec": "2.0.3", "saveSpec": null, - "fetchSpec": "~2.0.3" + "fetchSpec": "2.0.3" }, "_requiredBy": [ "/", + "/block-stream", + "/concat-stream", + "/duplexify", + "/flush-write-stream", + "/from2", "/fstream", - "/fstream-npm", - "/fstream-npm/fstream-ignore", "/glob", - "/mississippi/concat-stream", - "/mississippi/duplexify", - "/mississippi/flush-write-stream", - "/mississippi/from2", - "/mississippi/parallel-transform", - "/mississippi/pumpify", - "/npm-registry-client/concat-stream", - "/npm-registry-couchapp/couchapp/nano/follow/request/bl/readable-stream", + "/node-gyp/tar", + "/parallel-transform", + "/pumpify", "/readable-stream", "/sorted-union-stream/from2", - "/sorted-union-stream/from2/readable-stream", - "/standard/eslint/concat-stream", - "/standard/eslint/file-entry-cache/flat-cache/del/globby/glob", - "/standard/eslint/glob", - "/tar", - "/tar/block-stream" + "/sorted-union-stream/readable-stream" ], "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "_shasum": "633c2c83e3da42a502f52466022480f4208261de", - "_shrinkwrap": null, - "_spec": "inherits@~2.0.3", - "_where": "/Users/zkat/Documents/code/npm", - "bin": null, + "_spec": "2.0.3", + "_where": "/Users/rebecca/code/npm", "browser": "./inherits_browser.js", "bugs": { "url": "https://github.com/isaacs/inherits/issues" }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", "devDependencies": { "tap": "^7.1.0" @@ -72,8 +66,6 @@ "license": "ISC", "main": "./inherits.js", "name": "inherits", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/isaacs/inherits.git" diff --git a/deps/npm/node_modules/ini/ini.js b/deps/npm/node_modules/ini/ini.js index ddf5bd9cc6baed..590195dd31478d 100644 --- a/deps/npm/node_modules/ini/ini.js +++ b/deps/npm/node_modules/ini/ini.js @@ -1,17 +1,18 @@ - exports.parse = exports.decode = decode + exports.stringify = exports.encode = encode exports.safe = safe exports.unsafe = unsafe -var eol = process.platform === "win32" ? "\r\n" : "\n" +var eol = typeof process !== 'undefined' && + process.platform === 'win32' ? '\r\n' : '\n' function encode (obj, opt) { var children = [] - , out = "" + var out = '' - if (typeof opt === "string") { + if (typeof opt === 'string') { opt = { section: opt, whitespace: false @@ -21,16 +22,15 @@ function encode (obj, opt) { opt.whitespace = opt.whitespace === true } - var separator = opt.whitespace ? " = " : "=" + var separator = opt.whitespace ? ' = ' : '=' Object.keys(obj).forEach(function (k, _, __) { var val = obj[k] if (val && Array.isArray(val)) { - val.forEach(function(item) { - out += safe(k + "[]") + separator + safe(item) + "\n" - }) - } - else if (val && typeof val === "object") { + val.forEach(function (item) { + out += safe(k + '[]') + separator + safe(item) + '\n' + }) + } else if (val && typeof val === 'object') { children.push(k) } else { out += safe(k) + separator + safe(val) + eol @@ -38,12 +38,12 @@ function encode (obj, opt) { }) if (opt.section && out.length) { - out = "[" + safe(opt.section) + "]" + eol + out + out = '[' + safe(opt.section) + ']' + eol + out } children.forEach(function (k, _, __) { var nk = dotSplit(k).join('\\.') - var section = (opt.section ? opt.section + "." : "") + nk + var section = (opt.section ? opt.section + '.' : '') + nk var child = encode(obj[k], { section: section, whitespace: opt.whitespace @@ -59,22 +59,20 @@ function encode (obj, opt) { function dotSplit (str) { return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') - .replace(/\\\./g, '\u0001') - .split(/\./).map(function (part) { - return part.replace(/\1/g, '\\.') - .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') - }) + .replace(/\\\./g, '\u0001') + .split(/\./).map(function (part) { + return part.replace(/\1/g, '\\.') + .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') + }) } function decode (str) { var out = {} - , p = out - , section = null - , state = "START" - // section |key = value - , re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i - , lines = str.split(/[\r\n]+/g) - , section = null + var p = out + var section = null + // section |key = value + var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i + var lines = str.split(/[\r\n]+/g) lines.forEach(function (line, _, __) { if (!line || line.match(/^\s*[;#]/)) return @@ -86,7 +84,7 @@ function decode (str) { return } var key = unsafe(match[2]) - , value = match[3] ? unsafe((match[4] || "")) : true + var value = match[3] ? unsafe(match[4]) : true switch (value) { case 'true': case 'false': @@ -94,22 +92,20 @@ function decode (str) { } // Convert keys with '[]' suffix to an array - if (key.length > 2 && key.slice(-2) === "[]") { - key = key.substring(0, key.length - 2) - if (!p[key]) { - p[key] = [] - } - else if (!Array.isArray(p[key])) { - p[key] = [p[key]] - } + if (key.length > 2 && key.slice(-2) === '[]') { + key = key.substring(0, key.length - 2) + if (!p[key]) { + p[key] = [] + } else if (!Array.isArray(p[key])) { + p[key] = [p[key]] + } } // safeguard against resetting a previously defined // array by accidentally forgetting the brackets if (Array.isArray(p[key])) { p[key].push(value) - } - else { + } else { p[key] = value } }) @@ -117,18 +113,24 @@ function decode (str) { // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} // use a filter to return the keys that have to be deleted. Object.keys(out).filter(function (k, _, __) { - if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k])) return false + if (!out[k] || + typeof out[k] !== 'object' || + Array.isArray(out[k])) { + return false + } // see if the parent section is also an object. // if so, add it to that, and mark this one for deletion var parts = dotSplit(k) - , p = out - , l = parts.pop() - , nl = l.replace(/\\\./g, '.') + var p = out + var l = parts.pop() + var nl = l.replace(/\\\./g, '.') parts.forEach(function (part, _, __) { - if (!p[part] || typeof p[part] !== "object") p[part] = {} + if (!p[part] || typeof p[part] !== 'object') p[part] = {} p = p[part] }) - if (p === out && nl === l) return false + if (p === out && nl === l) { + return false + } p[nl] = out[k] return true }).forEach(function (del, _, __) { @@ -139,52 +141,54 @@ function decode (str) { } function isQuoted (val) { - return (val.charAt(0) === "\"" && val.slice(-1) === "\"") - || (val.charAt(0) === "'" && val.slice(-1) === "'") + return (val.charAt(0) === '"' && val.slice(-1) === '"') || + (val.charAt(0) === "'" && val.slice(-1) === "'") } function safe (val) { - return ( typeof val !== "string" - || val.match(/[=\r\n]/) - || val.match(/^\[/) - || (val.length > 1 - && isQuoted(val)) - || val !== val.trim() ) - ? JSON.stringify(val) - : val.replace(/;/g, '\\;').replace(/#/g, "\\#") + return (typeof val !== 'string' || + val.match(/[=\r\n]/) || + val.match(/^\[/) || + (val.length > 1 && + isQuoted(val)) || + val !== val.trim()) + ? JSON.stringify(val) + : val.replace(/;/g, '\\;').replace(/#/g, '\\#') } function unsafe (val, doUnesc) { - val = (val || "").trim() + val = (val || '').trim() if (isQuoted(val)) { // remove the single quotes before calling JSON.parse if (val.charAt(0) === "'") { - val = val.substr(1, val.length - 2); + val = val.substr(1, val.length - 2) } try { val = JSON.parse(val) } catch (_) {} } else { // walk the val to find the first not-escaped ; character var esc = false - var unesc = ""; + var unesc = '' for (var i = 0, l = val.length; i < l; i++) { var c = val.charAt(i) if (esc) { - if ("\\;#".indexOf(c) !== -1) + if ('\\;#'.indexOf(c) !== -1) { unesc += c - else - unesc += "\\" + c + } else { + unesc += '\\' + c + } esc = false - } else if (";#".indexOf(c) !== -1) { + } else if (';#'.indexOf(c) !== -1) { break - } else if (c === "\\") { + } else if (c === '\\') { esc = true } else { unesc += c } } - if (esc) - unesc += "\\" - return unesc + if (esc) { + unesc += '\\' + } + return unesc.trim() } return val } diff --git a/deps/npm/node_modules/ini/package.json b/deps/npm/node_modules/ini/package.json index 8e13a10d4fad41..e2d4423dcf76dd 100644 --- a/deps/npm/node_modules/ini/package.json +++ b/deps/npm/node_modules/ini/package.json @@ -1,45 +1,48 @@ { - "_from": "ini@~1.3.4", - "_id": "ini@1.3.4", - "_integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "_args": [ + [ + "ini@1.3.5", + "/Users/rebecca/code/npm" + ] + ], + "_from": "ini@1.3.5", + "_id": "ini@1.3.5", + "_inBundle": false, + "_integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "_location": "/ini", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "ini@~1.3.4", + "raw": "ini@1.3.5", "name": "ini", "escapedName": "ini", - "rawSpec": "~1.3.4", + "rawSpec": "1.3.5", "saveSpec": null, - "fetchSpec": "~1.3.4" + "fetchSpec": "1.3.5" }, "_requiredBy": [ "/", "/config-chain", - "/update-notifier/latest-version/package-json/registry-auth-token/rc", - "/update-notifier/latest-version/package-json/registry-url/rc" + "/global-dirs", + "/rc" ], - "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "_shasum": "0537cb79daf59b59a1a517dff706c86ec039162e", - "_shrinkwrap": null, - "_spec": "ini@~1.3.4", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "_spec": "1.3.5", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "bin": null, "bugs": { "url": "https://github.com/isaacs/ini/issues" }, - "bundleDependencies": false, "dependencies": {}, - "deprecated": false, "description": "An ini encoder/decoder for node", "devDependencies": { - "tap": "^1.2.0" + "standard": "^10.0.3", + "tap": "^10.7.3 || 11" }, "engines": { "node": "*" @@ -51,14 +54,16 @@ "license": "ISC", "main": "ini.js", "name": "ini", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/isaacs/ini.git" }, "scripts": { - "test": "tap test/*.js" + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "pretest": "standard ini.js", + "preversion": "npm test", + "test": "tap test/*.js --100 -J" }, - "version": "1.3.4" + "version": "1.3.5" } diff --git a/deps/npm/node_modules/init-package-json/CHANGELOG.md b/deps/npm/node_modules/init-package-json/CHANGELOG.md new file mode 100644 index 00000000000000..35096f4abb0c56 --- /dev/null +++ b/deps/npm/node_modules/init-package-json/CHANGELOG.md @@ -0,0 +1,17 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [1.10.3](https://github.com/npm/init-package-json/compare/v1.10.2...v1.10.3) (2018-03-07) + + + + +## [1.10.2](https://github.com/npm/init-package-json/compare/v1.10.1...v1.10.2) (2018-03-07) + + +### Bug Fixes + +* **default-input:** Catch errors from npa ([#71](https://github.com/npm/init-package-json/issues/71)) ([11aee1e](https://github.com/npm/init-package-json/commit/11aee1e)) +* **grammar:** Fix minor style issue in final prompt ([#76](https://github.com/npm/init-package-json/issues/76)) ([ba259ce](https://github.com/npm/init-package-json/commit/ba259ce)) diff --git a/deps/npm/node_modules/init-package-json/default-input.js b/deps/npm/node_modules/init-package-json/default-input.js index 06a3de477efe69..7d859a0d9b105e 100644 --- a/deps/npm/node_modules/init-package-json/default-input.js +++ b/deps/npm/node_modules/init-package-json/default-input.js @@ -12,7 +12,7 @@ function isTestPkg (p) { } function niceName (n) { - return n.replace(/^node-|[.-]js$/g, '').toLowerCase() + return n.replace(/^node-|[.-]js$/g, '').replace(' ', '-').toLowerCase() } function readDeps (test, excluded) { return function (cb) { @@ -46,7 +46,12 @@ function readDeps (test, excluded) { return function (cb) { }} var name = package.name || basename -var spec = npa(name) +var spec +try { + spec = npa(name) +} catch (e) { + spec = {} +} var scope = config.get('scope') if (scope) { if (scope.charAt(0) !== '@') scope = '@' + scope diff --git a/deps/npm/node_modules/init-package-json/init-package-json.js b/deps/npm/node_modules/init-package-json/init-package-json.js index 31758281d6fc07..5b2889e55da6ba 100644 --- a/deps/npm/node_modules/init-package-json/init-package-json.js +++ b/deps/npm/node_modules/init-package-json/init-package-json.js @@ -116,7 +116,7 @@ function init (dir, input, config, cb) { return write(true) } console.log('About to write to %s:\n\n%s\n', packageFile, d) - read({prompt:'Is this ok? ', default: 'yes'}, function (er, ok) { + read({prompt:'Is this OK? ', default: 'yes'}, function (er, ok) { if (er) { return cb(er) } diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/README.md b/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/README.md deleted file mode 100644 index d45032dc74ade8..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# npm-package-arg - -Parses package name and specifier passed to commands like `npm install` or -`npm cache add`, or as found in `package.json` dependency sections. - -## EXAMPLES - -```javascript -var assert = require("assert") -var npa = require("npm-package-arg") - -// Pass in the descriptor, and it'll return an object -try { - var parsed = npa("@bar/foo@1.2") -} catch (ex) { - … -} -``` - -## USING - -`var npa = require('npm-package-arg')` - -### var result = npa(*arg*[, *where*]) - -* *arg* - a string that you might pass to `npm install`, like: -`foo@1.2`, `@bar/foo@1.2`, `foo@user/foo`, `http://x.com/foo.tgz`, -`git+https://github.com/user/foo`, `bitbucket:user/foo`, `foo.tar.gz`, -`../foo/bar/` or `bar`. If the *arg* you provide doesn't have a specifier -part, eg `foo` then the specifier will default to `latest`. -* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()` - -**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported. - -### var result = npa.resolve(*name*, *spec*[, *where*]) - -* *name* - The name of the module you want to install. For example: `foo` or `@bar/foo`. -* *spec* - The specifier indicating where and how you can get this module. Something like: -`1.2`, `^1.7.17`, `http://x.com/foo.tgz`, `git+https://github.com/user/foo`, -`bitbucket:user/foo`, `file:foo.tar.gz` or `file:../foo/bar/`. If not -included then the default is `latest`. -* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()` - -**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported. - -## RESULT OBJECT - -The objects that are returned by npm-package-arg contain the following -keys: - -* `type` - One of the following strings: - * `git` - A git repo - * `tag` - A tagged version, like `"foo@latest"` - * `version` - A specific version number, like `"foo@1.2.3"` - * `range` - A version range, like `"foo@2.x"` - * `file` - A local `.tar.gz`, `.tar` or `.tgz` file. - * `directory` - A local directory. - * `remote` - An http url (presumably to a tgz) -* `registry` - If true this specifier refers to a resource hosted on a - registry. This is true for `tag`, `version` and `range` types. -* `name` - If known, the `name` field expected in the resulting pkg. -* `scope` - If a name is something like `@org/module` then the `scope` - field will be set to `@org`. If it doesn't have a scoped name, then - scope is `null`. -* `escapedName` - A version of `name` escaped to match the npm scoped packages - specification. Mostly used when making requests against a registry. When - `name` is `null`, `escapedName` will also be `null`. -* `rawSpec` - The specifier part that was parsed out in calls to `npa(arg)`, - or the value of `spec` in calls to `npa.resolve(name, spec). -* `saveSpec` - The normalized specifier, for saving to package.json files. - `null` for registry dependencies. -* `fetchSpec` - The version of the specifier to be used to fetch this - resource. `null` for shortcuts to hosted git dependencies as there isn't - just one URL to try with them. -* `gitRange` - If set, this is a semver specifier to match against git tags with -* `gitCommittish` - If set, this is the specific committish to use with a git dependency. -* `hosted` - If `from === 'hosted'` then this will be a `hosted-git-info` - object. This property is not included when serializing the object as - JSON. -* `raw` - The original un-modified string that was provided. If called as - `npa.resolve(name, spec)` then this will be `name + '@' + spec`. diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/npa.js b/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/npa.js deleted file mode 100644 index a61c0574298ab7..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/npa.js +++ /dev/null @@ -1,270 +0,0 @@ -'use strict' -module.exports = npa -module.exports.resolve = resolve -module.exports.Result = Result - -let url -let HostedGit -let semver -let path -let validatePackageName -let osenv - -const isWindows = process.platform === 'win32' || global.FAKE_WINDOWS -const hasSlashes = isWindows ? /\\|[/]/ : /[/]/ -const isURL = /^(?:git[+])?[a-z]+:/i -const isFilename = /[.](?:tgz|tar.gz|tar)$/i - -function npa (arg, where) { - let name - let spec - const nameEndsAt = arg[0] === '@' ? arg.slice(1).indexOf('@') + 1 : arg.indexOf('@') - const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg - if (isURL.test(arg)) { - spec = arg - } else if (namePart[0] !== '@' && (hasSlashes.test(namePart) || isFilename.test(namePart))) { - spec = arg - } else if (nameEndsAt > 0) { - name = namePart - spec = arg.slice(nameEndsAt + 1) - } else { - if (!validatePackageName) validatePackageName = require('validate-npm-package-name') - const valid = validatePackageName(arg) - if (valid.validForOldPackages) { - name = arg - } else { - spec = arg - } - } - return resolve(name, spec, where, arg) -} - -const isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/ - -function resolve (name, spec, where, arg) { - const res = new Result({ - raw: arg, - name: name, - rawSpec: spec, - fromArgument: arg != null - }) - - if (name) res.setName(name) - - if (spec && (isFilespec.test(spec) || /^file:/i.test(spec))) { - return fromFile(res, where) - } - if (!HostedGit) HostedGit = require('hosted-git-info') - const hosted = HostedGit.fromUrl(spec, {noGitPlus: true, noCommittish: true}) - if (hosted) { - return fromHostedGit(res, hosted) - } else if (spec && isURL.test(spec)) { - return fromURL(res) - } else if (spec && (hasSlashes.test(spec) || isFilename.test(spec))) { - return fromFile(res, where) - } else { - return fromRegistry(res) - } -} - -function invalidPackageName (name, valid) { - const err = new Error(`Invalid package name "${name}": ${valid.errors.join('; ')}`) - err.code = 'EINVALIDPACKAGENAME' - return err -} -function invalidTagName (name) { - const err = new Error(`Invalid tag name "${name}": Tags may not have any characters that encodeURIComponent encodes.`) - err.code = 'EINVALIDTAGNAME' - return err -} - -function Result (opts) { - this.type = opts.type - this.registry = opts.registry - this.where = opts.where - if (opts.raw == null) { - this.raw = opts.name ? opts.name + '@' + opts.rawSpec : opts.rawSpec - } else { - this.raw = opts.raw - } - this.name = undefined - this.escapedName = undefined - this.scope = undefined - this.rawSpec = opts.rawSpec == null ? '' : opts.rawSpec - this.saveSpec = opts.saveSpec - this.fetchSpec = opts.fetchSpec - if (opts.name) this.setName(opts.name) - this.gitRange = opts.gitRange - this.gitCommittish = opts.gitCommittish - this.hosted = opts.hosted -} -Result.prototype = {} - -Result.prototype.setName = function (name) { - if (!validatePackageName) validatePackageName = require('validate-npm-package-name') - const valid = validatePackageName(name) - if (!valid.validForOldPackages) { - throw invalidPackageName(name, valid) - } - this.name = name - this.scope = name[0] === '@' ? name.slice(0, name.indexOf('/')) : undefined - // scoped packages in couch must have slash url-encoded, e.g. @foo%2Fbar - this.escapedName = name.replace('/', '%2f') - return this -} - -Result.prototype.toString = function () { - const full = [] - if (this.name != null && this.name !== '') full.push(this.name) - const spec = this.saveSpec || this.fetchSpec || this.rawSpec - if (spec != null && spec !== '') full.push(spec) - return full.length ? full.join('@') : this.raw -} - -Result.prototype.toJSON = function () { - const result = Object.assign({}, this) - delete result.hosted - return result -} - -function setGitCommittish (res, committish) { - if (committish != null && committish.length >= 7 && committish.slice(0, 7) === 'semver:') { - res.gitRange = decodeURIComponent(committish.slice(7)) - res.gitCommittish = null - } else if (committish == null || committish === '') { - res.gitCommittish = 'master' - } else { - res.gitCommittish = committish - } - return res -} - -const isAbsolutePath = /^[/]|^[A-Za-z]:/ - -function resolvePath (where, spec) { - if (isAbsolutePath.test(spec)) return spec - if (!path) path = require('path') - return path.resolve(where, spec) -} - -function isAbsolute (dir) { - if (dir[0] === '/') return true - if (/^[A-Za-z]:/.test(dir)) return true - return false -} - -function fromFile (res, where) { - if (!where) where = process.cwd() - res.type = isFilename.test(res.rawSpec) ? 'file' : 'directory' - res.where = where - - const spec = res.rawSpec.replace(/\\/g, '/') - .replace(/^file:[/]*([A-Za-z]:)/, '$1') // drive name paths on windows - .replace(/^file:(?:[/]*([~./]))?/, '$1') - if (/^~[/]/.test(spec)) { - // this is needed for windows and for file:~/foo/bar - if (!osenv) osenv = require('osenv') - res.fetchSpec = resolvePath(osenv.home(), spec.slice(2)) - res.saveSpec = 'file:' + spec - } else { - res.fetchSpec = resolvePath(where, spec) - if (isAbsolute(spec)) { - res.saveSpec = 'file:' + spec - } else { - if (!path) path = require('path') - res.saveSpec = 'file:' + path.relative(where, res.fetchSpec) - } - } - return res -} - -function fromHostedGit (res, hosted) { - res.type = 'git' - res.hosted = hosted - res.saveSpec = hosted.toString({noGitPlus: false, noCommittish: false}) - res.fetchSpec = hosted.getDefaultRepresentation() === 'shortcut' ? null : hosted.toString() - return setGitCommittish(res, hosted.committish) -} - -function unsupportedURLType (protocol, spec) { - const err = new Error(`Unsupported URL Type "${protocol}": ${spec}`) - err.code = 'EUNSUPPORTEDPROTOCOL' - return err -} - -function matchGitScp (spec) { - // git ssh specifiers are overloaded to also use scp-style git - // specifiers, so we have to parse those out and treat them special. - // They are NOT true URIs, so we can't hand them to `url.parse`. - // - // This regex looks for things that look like: - // git+ssh://git@my.custom.git.com:username/project.git#deadbeef - // - // ...and various combinations. The username in the beginning is *required*. - const matched = spec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i) - return matched && !matched[1].match(/:[0-9]+\/?.*$/i) && { - fetchSpec: matched[1], - gitCommittish: matched[2] || 'master' - } -} - -function fromURL (res) { - if (!url) url = require('url') - const urlparse = url.parse(res.rawSpec) - res.saveSpec = res.rawSpec - // check the protocol, and then see if it's git or not - switch (urlparse.protocol) { - case 'git:': - case 'git+http:': - case 'git+https:': - case 'git+rsync:': - case 'git+ftp:': - case 'git+file:': - case 'git+ssh:': - res.type = 'git' - const match = urlparse.protocol === 'git+ssh:' && matchGitScp(res.rawSpec) - if (match) { - res.fetchSpec = match.fetchSpec - res.gitCommittish = match.gitCommittish - } else { - setGitCommittish(res, urlparse.hash != null ? urlparse.hash.slice(1) : '') - urlparse.protocol = urlparse.protocol.replace(/^git[+]/, '') - delete urlparse.hash - res.fetchSpec = url.format(urlparse) - } - break - case 'http:': - case 'https:': - res.type = 'remote' - res.fetchSpec = res.saveSpec - break - - default: - throw unsupportedURLType(urlparse.protocol, res.rawSpec) - } - - return res -} - -function fromRegistry (res) { - res.registry = true - const spec = res.rawSpec === '' ? 'latest' : res.rawSpec - // no save spec for registry components as we save based on the fetched - // version, not on the argument so this can't compute that. - res.saveSpec = null - res.fetchSpec = spec - if (!semver) semver = require('semver') - const version = semver.valid(spec, true) - const range = semver.validRange(spec, true) - if (version) { - res.type = 'version' - } else if (range) { - res.type = 'range' - } else { - if (encodeURIComponent(spec) !== spec) { - throw invalidTagName(spec) - } - res.type = 'tag' - } - return res -} diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/package.json deleted file mode 100644 index 61a2c444aa6400..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "npm-package-arg@^4.0.0 || ^5.0.0", - "_id": "npm-package-arg@5.1.2", - "_inBundle": false, - "_integrity": "sha512-wJBsrf0qpypPT7A0LART18hCdyhpCMxeTtcb0X4IZO2jsP6Om7EHN1d9KSKiqD+KVH030RVNpWS9thk+pb7wzA==", - "_location": "/init-package-json/npm-package-arg", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "npm-package-arg@^4.0.0 || ^5.0.0", - "name": "npm-package-arg", - "escapedName": "npm-package-arg", - "rawSpec": "^4.0.0 || ^5.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0 || ^5.0.0" - }, - "_requiredBy": [ - "/init-package-json" - ], - "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-5.1.2.tgz", - "_shasum": "fb18d17bb61e60900d6312619919bd753755ab37", - "_spec": "npm-package-arg@^4.0.0 || ^5.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/init-package-json", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/npm-package-arg/issues" - }, - "bundleDependencies": false, - "dependencies": { - "hosted-git-info": "^2.4.2", - "osenv": "^0.1.4", - "semver": "^5.1.0", - "validate-npm-package-name": "^3.0.0" - }, - "deprecated": false, - "description": "Parse the things that can be arguments to `npm install`", - "devDependencies": { - "standard": "9.0.2", - "tap": "^10.3.0" - }, - "directories": { - "test": "test" - }, - "files": [ - "npa.js" - ], - "homepage": "https://github.com/npm/npm-package-arg", - "license": "ISC", - "main": "npa.js", - "name": "npm-package-arg", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/npm-package-arg.git" - }, - "scripts": { - "test": "standard && tap -J --coverage test/*.js" - }, - "version": "5.1.2" -} diff --git a/deps/npm/node_modules/init-package-json/node_modules/promzard/LICENSE b/deps/npm/node_modules/init-package-json/node_modules/promzard/LICENSE deleted file mode 100644 index 05eeeb88c2ef4c..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/promzard/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -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/init-package-json/node_modules/promzard/package.json b/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json deleted file mode 100644 index a7e3521005695d..00000000000000 --- a/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_from": "promzard@^0.3.0", - "_id": "promzard@0.3.0", - "_integrity": "sha1-JqXW7ox97kyxIggwWs+5O6OCqe4=", - "_location": "/init-package-json/promzard", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "promzard@^0.3.0", - "name": "promzard", - "escapedName": "promzard", - "rawSpec": "^0.3.0", - "saveSpec": null, - "fetchSpec": "^0.3.0" - }, - "_requiredBy": [ - "/init-package-json" - ], - "_resolved": "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz", - "_shasum": "26a5d6ee8c7dee4cb12208305acfb93ba382a9ee", - "_shrinkwrap": null, - "_spec": "promzard@^0.3.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/init-package-json", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bin": null, - "bugs": { - "url": "https://github.com/isaacs/promzard/issues" - }, - "bundleDependencies": false, - "dependencies": { - "read": "1" - }, - "deprecated": false, - "description": "prompting wizardly", - "devDependencies": { - "tap": "~0.2.5" - }, - "homepage": "https://github.com/isaacs/promzard#readme", - "license": "ISC", - "main": "promzard.js", - "name": "promzard", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "url": "git://github.com/isaacs/promzard.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "0.3.0" -} diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json index 7a6373a695ab5e..bd1b8743a88651 100644 --- a/deps/npm/node_modules/init-package-json/package.json +++ b/deps/npm/node_modules/init-package-json/package.json @@ -1,42 +1,43 @@ { - "_from": "init-package-json@~1.10.1", - "_id": "init-package-json@1.10.1", - "_integrity": "sha1-zYc6FneWvvuZYSsodioLY5P9j2o=", + "_args": [ + [ + "init-package-json@1.10.3", + "/Users/rebecca/code/npm" + ] + ], + "_from": "init-package-json@1.10.3", + "_id": "init-package-json@1.10.3", + "_inBundle": false, + "_integrity": "sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw==", "_location": "/init-package-json", - "_phantomChildren": { - "read": "1.0.7" - }, + "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "init-package-json@~1.10.1", + "raw": "init-package-json@1.10.3", "name": "init-package-json", "escapedName": "init-package-json", - "rawSpec": "~1.10.1", + "rawSpec": "1.10.3", "saveSpec": null, - "fetchSpec": "~1.10.1" + "fetchSpec": "1.10.3" }, "_requiredBy": [ "/" ], - "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.1.tgz", - "_shasum": "cd873a167796befb99612b28762a0b6393fd8f6a", - "_shrinkwrap": null, - "_spec": "init-package-json@~1.10.1", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.3.tgz", + "_spec": "1.10.3", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "bin": null, "bugs": { "url": "https://github.com/npm/init-package-json/issues" }, - "bundleDependencies": false, "dependencies": { "glob": "^7.1.1", - "npm-package-arg": "^4.0.0 || ^5.0.0", + "npm-package-arg": "^4.0.0 || ^5.0.0 || ^6.0.0", "promzard": "^0.3.0", "read": "~1.0.1", "read-package-json": "1 || 2", @@ -44,13 +45,13 @@ "validate-npm-package-license": "^3.0.1", "validate-npm-package-name": "^3.0.0" }, - "deprecated": false, "description": "A node module to get your node module started", "devDependencies": { "mkdirp": "^0.5.1", - "npm": "^4.3.0", + "npm": "^5.7.1", "rimraf": "^2.1.4", - "tap": "^10.3.0" + "standard-version": "^4.3.0", + "tap": "^11.1.2" }, "files": [ "default-input.js", @@ -70,14 +71,15 @@ "license": "ISC", "main": "init-package-json.js", "name": "init-package-json", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/npm/init-package-json.git" }, "scripts": { - "test": "tap test/*.js" + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "release": "standard-version -s", + "test": "tap --nyc-arg=--all --coverage test" }, - "version": "1.10.1" + "version": "1.10.3" } diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/node_modules/invert-kv/index.js b/deps/npm/node_modules/invert-kv/index.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/node_modules/invert-kv/index.js rename to deps/npm/node_modules/invert-kv/index.js diff --git a/deps/npm/node_modules/invert-kv/package.json b/deps/npm/node_modules/invert-kv/package.json new file mode 100644 index 00000000000000..c38e09e5d91bac --- /dev/null +++ b/deps/npm/node_modules/invert-kv/package.json @@ -0,0 +1,65 @@ +{ + "_from": "invert-kv@^1.0.0", + "_id": "invert-kv@1.0.0", + "_inBundle": false, + "_integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "_location": "/invert-kv", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "invert-kv@^1.0.0", + "name": "invert-kv", + "escapedName": "invert-kv", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/lcid" + ], + "_resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "_shasum": "104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6", + "_spec": "invert-kv@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/lcid", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/invert-kv/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}", + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/invert-kv#readme", + "keywords": [ + "object", + "obj", + "key", + "value", + "val", + "kv", + "invert" + ], + "license": "MIT", + "name": "invert-kv", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/invert-kv.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/node_modules/invert-kv/readme.md b/deps/npm/node_modules/invert-kv/readme.md similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/node_modules/invert-kv/readme.md rename to deps/npm/node_modules/invert-kv/readme.md diff --git a/deps/npm/node_modules/ip-regex/index.js b/deps/npm/node_modules/ip-regex/index.js new file mode 100644 index 00000000000000..973e5f41c28c70 --- /dev/null +++ b/deps/npm/node_modules/ip-regex/index.js @@ -0,0 +1,24 @@ +'use strict'; + +const v4 = '(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}'; + +const v6seg = '[0-9a-fA-F]{1,4}'; +const v6 = ` +( +(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 +(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 +(?:${v6seg}:){5}(?::${v4}|(:${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 +(?:${v6seg}:){4}(?:(:${v6seg}){0,1}:${v4}|(:${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 +(?:${v6seg}:){3}(?:(:${v6seg}){0,2}:${v4}|(:${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 +(?:${v6seg}:){2}(?:(:${v6seg}){0,3}:${v4}|(:${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 +(?:${v6seg}:){1}(?:(:${v6seg}){0,4}:${v4}|(:${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 +(?::((?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 +)(%[0-9a-zA-Z]{1,})? // %eth0 %1 +`.replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim(); + +const ip = module.exports = opts => opts && opts.exact ? + new RegExp(`(?:^${v4}$)|(?:^${v6}$)`) : + new RegExp(`(?:${v4})|(?:${v6})`, 'g'); + +ip.v4 = opts => opts && opts.exact ? new RegExp(`^${v4}$`) : new RegExp(v4, 'g'); +ip.v6 = opts => opts && opts.exact ? new RegExp(`^${v6}$`) : new RegExp(v6, 'g'); diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/strip-eof/license b/deps/npm/node_modules/ip-regex/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/strip-eof/license rename to deps/npm/node_modules/ip-regex/license diff --git a/deps/npm/node_modules/ip-regex/package.json b/deps/npm/node_modules/ip-regex/package.json new file mode 100644 index 00000000000000..4d71de6458e2bb --- /dev/null +++ b/deps/npm/node_modules/ip-regex/package.json @@ -0,0 +1,77 @@ +{ + "_from": "ip-regex@^2.1.0", + "_id": "ip-regex@2.1.0", + "_inBundle": false, + "_integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "_location": "/ip-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ip-regex@^2.1.0", + "name": "ip-regex", + "escapedName": "ip-regex", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/cidr-regex" + ], + "_resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "_shasum": "fa78bf5d2e6913c911ce9f819ee5146bb6d844e9", + "_spec": "ip-regex@^2.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/cidr-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/ip-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching IP addresses (IPv4 & IPv6)", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/ip-regex#readme", + "keywords": [ + "ip", + "ipv6", + "ipv4", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "text", + "pattern", + "internet", + "protocol", + "address", + "validate" + ], + "license": "MIT", + "name": "ip-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/ip-regex.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0", + "xo": { + "esnext": true + } +} diff --git a/deps/npm/node_modules/ip-regex/readme.md b/deps/npm/node_modules/ip-regex/readme.md new file mode 100644 index 00000000000000..66bc7f27317b4e --- /dev/null +++ b/deps/npm/node_modules/ip-regex/readme.md @@ -0,0 +1,63 @@ +# ip-regex [![Build Status](https://travis-ci.org/sindresorhus/ip-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ip-regex) + +> Regular expression for matching IP addresses + + +## Install + +``` +$ npm install --save ip-regex +``` + + +## Usage + +```js +const ipRegex = require('ip-regex'); + +// Contains an IP address? +ipRegex().test('unicorn 192.168.0.1'); +//=> true + +// Is an IP address? +ipRegex({exact: true}).test('unicorn 192.168.0.1'); +//=> false + +ipRegex.v6({exact: true}).test('1:2:3:4:5:6:7:8'); +//=> true + +'unicorn 192.168.0.1 cake 1:2:3:4:5:6:7:8 rainbow'.match(ipRegex()); +//=> ['192.168.0.1', '1:2:3:4:5:6:7:8'] +``` + + +## API + +### ipRegex([options]) + +Returns a regex for matching both IPv4 and IPv6. + +### ipRegex.v4([options]) + +Returns a regex for matching IPv4. + +### ipRegex.v6([options]) + +Returns a regex for matching IPv6. + +#### options.exact + +Type: `boolean`
+Default: `false` *(Matches any IP address in a string)* + +Only match an exact string. Useful with `RegExp#test()` to check if a string is an IP address. + + +## Related + +- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/.jscsrc b/deps/npm/node_modules/ip/.jscsrc similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/.jscsrc rename to deps/npm/node_modules/ip/.jscsrc diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/.npmignore b/deps/npm/node_modules/ip/.npmignore similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/.npmignore rename to deps/npm/node_modules/ip/.npmignore diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/.travis.yml b/deps/npm/node_modules/ip/.travis.yml similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/.travis.yml rename to deps/npm/node_modules/ip/.travis.yml diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/README.md b/deps/npm/node_modules/ip/README.md similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/README.md rename to deps/npm/node_modules/ip/README.md diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/lib/ip.js b/deps/npm/node_modules/ip/lib/ip.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/lib/ip.js rename to deps/npm/node_modules/ip/lib/ip.js diff --git a/deps/npm/node_modules/ip/package.json b/deps/npm/node_modules/ip/package.json new file mode 100644 index 00000000000000..fb58d8c049e97f --- /dev/null +++ b/deps/npm/node_modules/ip/package.json @@ -0,0 +1,55 @@ +{ + "_from": "ip@^1.1.5", + "_id": "ip@1.1.5", + "_inBundle": false, + "_integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "_location": "/ip", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ip@^1.1.5", + "name": "ip", + "escapedName": "ip", + "rawSpec": "^1.1.5", + "saveSpec": null, + "fetchSpec": "^1.1.5" + }, + "_requiredBy": [ + "/npm-profile/socks", + "/npm-registry-fetch/socks", + "/socks" + ], + "_resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "_shasum": "bdded70114290828c0a039e72ef25f5aaec4354a", + "_spec": "ip@^1.1.5", + "_where": "/Users/rebecca/code/npm/node_modules/socks", + "author": { + "name": "Fedor Indutny", + "email": "fedor@indutny.com" + }, + "bugs": { + "url": "https://github.com/indutny/node-ip/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "[![](https://badge.fury.io/js/ip.svg)](https://www.npmjs.com/package/ip)", + "devDependencies": { + "jscs": "^2.1.1", + "jshint": "^2.8.0", + "mocha": "~1.3.2" + }, + "homepage": "https://github.com/indutny/node-ip", + "license": "MIT", + "main": "lib/ip", + "name": "ip", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/indutny/node-ip.git" + }, + "scripts": { + "fix": "jscs lib/*.js test/*.js --fix", + "test": "jscs lib/*.js test/*.js && jshint lib/*.js && mocha --reporter spec test/*-test.js" + }, + "version": "1.1.5" +} diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/test/api-test.js b/deps/npm/node_modules/ip/test/api-test.js similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/test/api-test.js rename to deps/npm/node_modules/ip/test/api-test.js diff --git a/deps/npm/node_modules/normalize-package-data/node_modules/is-builtin-module/index.js b/deps/npm/node_modules/is-builtin-module/index.js similarity index 100% rename from deps/npm/node_modules/normalize-package-data/node_modules/is-builtin-module/index.js rename to deps/npm/node_modules/is-builtin-module/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/license b/deps/npm/node_modules/is-builtin-module/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/license rename to deps/npm/node_modules/is-builtin-module/license diff --git a/deps/npm/node_modules/is-builtin-module/package.json b/deps/npm/node_modules/is-builtin-module/package.json new file mode 100644 index 00000000000000..d1cd899d9ad65d --- /dev/null +++ b/deps/npm/node_modules/is-builtin-module/package.json @@ -0,0 +1,75 @@ +{ + "_from": "is-builtin-module@^1.0.0", + "_id": "is-builtin-module@1.0.0", + "_inBundle": false, + "_integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "_location": "/is-builtin-module", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-builtin-module@^1.0.0", + "name": "is-builtin-module", + "escapedName": "is-builtin-module", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/normalize-package-data" + ], + "_resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "_shasum": "540572d34f7ac3119f8f76c30cbc1b1e037affbe", + "_spec": "is-builtin-module@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/normalize-package-data", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-builtin-module/issues" + }, + "bundleDependencies": false, + "dependencies": { + "builtin-modules": "^1.0.0" + }, + "deprecated": false, + "description": "Check if a string matches the name of a Node.js builtin module", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-builtin-module#readme", + "keywords": [ + "builtin", + "built-in", + "builtins", + "node", + "modules", + "core", + "bundled", + "list", + "array", + "names", + "is", + "detect", + "check", + "match" + ], + "license": "MIT", + "name": "is-builtin-module", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-builtin-module.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/normalize-package-data/node_modules/is-builtin-module/readme.md b/deps/npm/node_modules/is-builtin-module/readme.md similarity index 100% rename from deps/npm/node_modules/normalize-package-data/node_modules/is-builtin-module/readme.md rename to deps/npm/node_modules/is-builtin-module/readme.md diff --git a/deps/npm/node_modules/is-ci/.travis.yml b/deps/npm/node_modules/is-ci/.travis.yml new file mode 100644 index 00000000000000..21f721050948b7 --- /dev/null +++ b/deps/npm/node_modules/is-ci/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: +- '6' +- '5' +- '4' +- '0.12' +- '0.10' diff --git a/deps/npm/node_modules/is-ci/LICENSE b/deps/npm/node_modules/is-ci/LICENSE new file mode 100644 index 00000000000000..67846832ecc306 --- /dev/null +++ b/deps/npm/node_modules/is-ci/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2018 Thomas Watson Steen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/deps/npm/node_modules/is-ci/README.md b/deps/npm/node_modules/is-ci/README.md new file mode 100644 index 00000000000000..0e49db91bbe4ca --- /dev/null +++ b/deps/npm/node_modules/is-ci/README.md @@ -0,0 +1,69 @@ +# is-ci + +Returns `true` if the current environment is a Continuous Integration +server. + +Please [open an issue](https://github.com/watson/is-ci/issues) if your +CI server isn't properly detected :) + +[![Build status](https://travis-ci.org/watson/is-ci.svg?branch=master)](https://travis-ci.org/watson/is-ci) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) + +## Installation + +``` +npm install is-ci --save +``` + +## Programmatic Usage + +```js +const isCI = require('is-ci') + +if (isCI) { + console.log('The code is running on a CI server') +} +``` + +## CLI Usage + +For CLI usage you need to have the `is-ci` executable in your `PATH`. +There's a few ways to do that: + +- Either install the module globally using `npm install is-ci -g` +- Or add the module as a dependency to your app in which case it can be + used inside your package.json scripts as is +- Or provide the full path to the executable, e.g. + `./node_modules/.bin/is-ci` + +``` +is-ci && echo "This is a CI server" +``` + +## Supported CI tools + +Officially supported CI servers: + +- [Travis CI](http://travis-ci.org) +- [CircleCI](http://circleci.com) +- [Jenkins CI](https://jenkins-ci.org) +- [Hudson](http://hudson-ci.org) +- [Bamboo](https://www.atlassian.com/software/bamboo) +- [TeamCity](https://www.jetbrains.com/teamcity/) +- [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx) +- [GitLab CI](https://about.gitlab.com/gitlab-ci/) +- [Codeship](https://codeship.com) +- [Drone.io](https://drone.io) +- [Magnum CI](https://magnum-ci.com) +- [Semaphore](https://semaphoreci.com) +- [AppVeyor](http://www.appveyor.com) +- [Buildkite](https://buildkite.com) +- [TaskCluster](http://docs.taskcluster.net) +- [GoCD](https://www.go.cd/) +- [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) + +Other CI tools using environment variables like `BUILD_ID` or `CI` would be detected as well. + +## License + +MIT diff --git a/deps/npm/node_modules/is-ci/bin.js b/deps/npm/node_modules/is-ci/bin.js new file mode 100755 index 00000000000000..0c56c01f261c86 --- /dev/null +++ b/deps/npm/node_modules/is-ci/bin.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +'use strict' + +process.exit(require('./') ? 0 : 1) diff --git a/deps/npm/node_modules/is-ci/index.js b/deps/npm/node_modules/is-ci/index.js new file mode 100644 index 00000000000000..d4cb67aa9b499e --- /dev/null +++ b/deps/npm/node_modules/is-ci/index.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = require('ci-info').isCI diff --git a/deps/npm/node_modules/is-ci/package.json b/deps/npm/node_modules/is-ci/package.json new file mode 100644 index 00000000000000..e87ba5d7fd903c --- /dev/null +++ b/deps/npm/node_modules/is-ci/package.json @@ -0,0 +1,69 @@ +{ + "_from": "is-ci@^1.0.10", + "_id": "is-ci@1.1.0", + "_inBundle": false, + "_integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", + "_location": "/is-ci", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-ci@^1.0.10", + "name": "is-ci", + "escapedName": "is-ci", + "rawSpec": "^1.0.10", + "saveSpec": null, + "fetchSpec": "^1.0.10" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", + "_shasum": "247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5", + "_spec": "is-ci@^1.0.10", + "_where": "/Users/rebecca/code/npm/node_modules/update-notifier", + "author": { + "name": "Thomas Watson Steen", + "email": "w@tson.dk", + "url": "https://twitter.com/wa7son" + }, + "bin": { + "is-ci": "bin.js" + }, + "bugs": { + "url": "https://github.com/watson/is-ci/issues" + }, + "bundleDependencies": false, + "coordinates": [ + 56.0093252, + 11.9592058 + ], + "dependencies": { + "ci-info": "^1.0.0" + }, + "deprecated": false, + "description": "Detect if your code is running on a CI server", + "devDependencies": { + "clear-require": "^1.0.1", + "standard": "^10.0.3" + }, + "homepage": "https://github.com/watson/is-ci", + "keywords": [ + "ci", + "continuous", + "integration", + "test", + "detect" + ], + "license": "MIT", + "main": "index.js", + "name": "is-ci", + "repository": { + "type": "git", + "url": "git+https://github.com/watson/is-ci.git" + }, + "scripts": { + "test": "standard && node test.js" + }, + "version": "1.1.0" +} diff --git a/deps/npm/node_modules/is-ci/test.js b/deps/npm/node_modules/is-ci/test.js new file mode 100644 index 00000000000000..a9938bbdb8ecfc --- /dev/null +++ b/deps/npm/node_modules/is-ci/test.js @@ -0,0 +1,19 @@ +'use strict' + +var assert = require('assert') +var clearRequire = require('clear-require') + +process.env.CI = 'true' + +var isCI = require('./') +assert(isCI) + +delete process.env.CI +delete process.env.CONTINUOUS_INTEGRATION +delete process.env.BUILD_NUMBER +delete process.env.TRAVIS + +clearRequire('./') +clearRequire('ci-info') +isCI = require('./') +assert(!isCI) diff --git a/deps/npm/node_modules/is-cidr/.npmignore b/deps/npm/node_modules/is-cidr/.npmignore deleted file mode 100644 index 8eba6c8dd4dcaf..00000000000000 --- a/deps/npm/node_modules/is-cidr/.npmignore +++ /dev/null @@ -1 +0,0 @@ -src/ diff --git a/deps/npm/node_modules/is-cidr/.travis.yml b/deps/npm/node_modules/is-cidr/.travis.yml deleted file mode 100644 index 6eeec8aa940963..00000000000000 --- a/deps/npm/node_modules/is-cidr/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false -language: node_js -cache: - directories: - - node_modules -notifications: - email: false -node_js: - - '4' -before_install: - - npm i -g npm@^3.0.0 -before_script: - - npm prune -script: - - npm run test - - npm run build -after_success: - - npm run semantic-release -branches: - except: - - "/^v\\d+\\.\\d+\\.\\d+$/" diff --git a/deps/npm/node_modules/is-cidr/LICENSE b/deps/npm/node_modules/is-cidr/LICENSE new file mode 100644 index 00000000000000..9669c20f85511d --- /dev/null +++ b/deps/npm/node_modules/is-cidr/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) silverwind +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/is-cidr/README.md b/deps/npm/node_modules/is-cidr/README.md index 403071bba8d05b..64ea8f5722eadc 100644 --- a/deps/npm/node_modules/is-cidr/README.md +++ b/deps/npm/node_modules/is-cidr/README.md @@ -1,57 +1,55 @@ # is-cidr -Check if a string is a valid CIDR +[![](https://img.shields.io/npm/v/is-cidr.svg?style=flat)](https://www.npmjs.org/package/is-cidr) [![](https://img.shields.io/npm/dm/is-cidr.svg)](https://www.npmjs.org/package/is-cidr) [![](https://api.travis-ci.org/silverwind/is-cidr.svg?style=flat)](https://travis-ci.org/silverwind/is-cidr) -[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) -[![version](https://img.shields.io/npm/v/is-cidr.svg?style=flat-square)](http://npm.im/is-cidr) -[![MIT License](https://img.shields.io/npm/l/is-cidr.svg?style=flat-square)](http://opensource.org/licenses/MIT) -[![travis build](https://img.shields.io/travis/flipjs/is-cidr.svg?style=flat-square)](https://travis-ci.org/flipjs/is-cidr) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) -[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/) -[![downloads](https://img.shields.io/npm/dm/is-cidr.svg?style=flat-square)](http://npm-stat.com/charts.html?package=is-cidr&from=2016-03-24) +> Check if a string is an IP address in CIDR notation ## Install -```sh +``` $ npm install --save is-cidr ``` + ## Usage ```js -import isCidr from 'is-cidr' // default is isCidrV4 -import { isCidrV4, isCidrV6 } from 'is-cidr' -// OR -var isCidrV4 = require('is-cidr').isCidrV4 -var isCidrV6 = require('is-cidr').isCidrV6 +const isCidr = require('is-cidr'); -// is a CIDR v4 -isCidr('18.101.25.153/24') // true +isCidr('192.168.0.1/24'); +//=> true -// is not a CIDR v4 -isCidrV4('999.999.999.999/12') // false +isCidr('1:2:3:4:5:6:7:8/64'); +//=> true -// is a CIDR v6 -isCidrV6('fe80:0000:0000:0000:0204:61ff:fe9d:f156') // true - -// is not a CIDR v6 -isCidrV6('fe80:0000:0000:0000:0204:61ff:fe9d:f156/a') // false +isCidr.v4('1:2:3:4:5:6:7:8/64'); +//=> false ``` + ## API -### isCidr(string) +### isCidr(input) -Check if a string is CIDR IPv4. +Check if `input` is a IPv4 or IPv6 CIDR address. -### isCidrV4(string) +### isCidr.v4(input) -Check if a string is CIDR IPv4. +Check if `input` is IPv4 CIDR address. -### isCidrV6(string) +### isCidr.v6(input) -Check if a string is CIDR IPv6. +Check if `input` is IPv6 CIDR address. + + +## Related + +- [cidr-regex](https://github.com/silverwind/cidr-regex) - Regular expression for matching IP addresses in CIDR notation +- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address +- [ip-regex](https://github.com/sindresorhus/ip-regex) - Regular expression for matching IP addresses ## License -MIT © [Felipe Apostol](https://github.com/flipjs) +© [silverwind](https://github.com/silverwind), distributed under BSD licence + +Based on previous work by [Felipe Apostol](https://github.com/flipjs) diff --git a/deps/npm/node_modules/is-cidr/example/example.js b/deps/npm/node_modules/is-cidr/example/example.js deleted file mode 100644 index d64bb9176d3228..00000000000000 --- a/deps/npm/node_modules/is-cidr/example/example.js +++ /dev/null @@ -1,13 +0,0 @@ -var r = require('../lib') - -var v4true = r.isCidrV4('1.1.1.1/24') -console.log('cidrv4 true is', v4true) - -var v4false = r.isCidrV4('1.1.1.256/24') -console.log('cidrv4 false is', v4false) - -var v6true = r.isCidrV6('fe80:0000:0000:0000:0204:61ff:fe9d:f156') -console.log('cidrv6 true is', v6true) - -var v6false = r.isCidrV6('fe80:0000:0000:0000:0204:61ff:fe9d:f156/sdfsdfs') -console.log('cidrv6 false is', v6false) diff --git a/deps/npm/node_modules/is-cidr/index.js b/deps/npm/node_modules/is-cidr/index.js new file mode 100644 index 00000000000000..b5a5026439913e --- /dev/null +++ b/deps/npm/node_modules/is-cidr/index.js @@ -0,0 +1,6 @@ +"use strict"; +const cidrRegex = require("cidr-regex"); + +const isCidr = module.exports = string => cidrRegex({exact: true}).test(string); +isCidr.v4 = string => cidrRegex.v4({exact: true}).test(string); +isCidr.v6 = string => cidrRegex.v6({exact: true}).test(string); diff --git a/deps/npm/node_modules/is-cidr/lib/index.js b/deps/npm/node_modules/is-cidr/lib/index.js deleted file mode 100644 index a367060491700f..00000000000000 --- a/deps/npm/node_modules/is-cidr/lib/index.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isCidrV6 = exports.isCidrV4 = undefined; - -var _cidrRegex = require('cidr-regex'); - -var isCidrV4 = exports.isCidrV4 = function isCidrV4(str) { - return _cidrRegex.cidrv4.test(str); -}; - -var isCidrV6 = exports.isCidrV6 = function isCidrV6(str) { - return _cidrRegex.cidrv6.test(str); -}; - -exports.default = isCidrV4; \ No newline at end of file diff --git a/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/.npmignore b/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/.npmignore deleted file mode 100644 index 8eba6c8dd4dcaf..00000000000000 --- a/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/.npmignore +++ /dev/null @@ -1 +0,0 @@ -src/ diff --git a/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/README.md b/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/README.md deleted file mode 100644 index df715efc2b2a1d..00000000000000 --- a/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# cidr-regex -Regular expression for matching CIDR (Classless Inter-Domain Routing) - -## Install - -```sh -$ npm install --save cidr-regex -``` - -## Usage - -```js -import cidr from 'cidr-regex' // default regex is cidr v4 -import { cidrv4, cidrv6 } from 'cidr-regex' -// OR -var cidrv4 = require('cidr-regex').cidrv4 -var cidrv6 = require('cidr-regex').cidrv6 - -// is a CIDR v4 -cidr.test('18.101.25.153/24') // true - -// is not a CIDR v4 -cidrv4.test('999.999.999.999/12') // false - -// is a CIDR v6 -cidrv6.test('fe80:0000:0000:0000:0204:61ff:fe9d:f156') // true - -// is not a CIDR v6 -cidrv6.test('fe80:0000:0000:0000:0204:61ff:fe9d:f156/a') // false -``` - -## API - -### cidr - -A regex for matching CIDR IPv4 - -### cidrv4 - -A regex for matching CIDR IPv4 - -### cidrv6 - -A regex for matching CIDR IPv6 - -## License - -MIT © [Felipe Apostol](https://github.com/flipjs) diff --git a/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/lib/index.js b/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/lib/index.js deleted file mode 100644 index 44533ae3a4e557..00000000000000 --- a/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/lib/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var cidrv4 = exports.cidrv4 = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$/; - -var cidrv6 = exports.cidrv6 = /^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))?$/; - -exports.default = cidrv4; \ No newline at end of file diff --git a/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/package.json b/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/package.json deleted file mode 100644 index 0c23adf20020cf..00000000000000 --- a/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_from": "cidr-regex@1.0.6", - "_id": "cidr-regex@1.0.6", - "_inBundle": false, - "_integrity": "sha1-dKv9YZ3zcLnVSrFEdVaOl91kwME=", - "_location": "/is-cidr/cidr-regex", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "cidr-regex@1.0.6", - "name": "cidr-regex", - "escapedName": "cidr-regex", - "rawSpec": "1.0.6", - "saveSpec": null, - "fetchSpec": "1.0.6" - }, - "_requiredBy": [ - "/is-cidr" - ], - "_resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-1.0.6.tgz", - "_shasum": "74abfd619df370b9d54ab14475568e97dd64c0c1", - "_spec": "cidr-regex@1.0.6", - "_where": "/Users/rebecca/code/npm/node_modules/is-cidr", - "author": { - "name": "Felipe Apostol", - "email": "flipjs.io@gmail.com", - "url": "http://flipjs.io/" - }, - "babel": { - "presets": [ - "es2015" - ] - }, - "bugs": { - "url": "https://github.com/flipjs/cidr-regex/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Regular expression for matching CIDR (Classless Inter-Domain Routing)", - "devDependencies": { - "ava": "0.13.0", - "babel-cli": "6.6.5", - "babel-preset-es2015": "6.6.0", - "babel-register": "6.7.2" - }, - "homepage": "https://github.com/flipjs/cidr-regex#readme", - "keywords": [ - "ip", - "ip address", - "cidr", - "netblock", - "regex" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "cidr-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/flipjs/cidr-regex.git" - }, - "scripts": { - "compile": "babel --presets es2015 -d lib/ src/", - "prepublish": "npm run compile", - "test": "ava --require babel-register" - }, - "version": "1.0.6" -} diff --git a/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/test.js b/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/test.js deleted file mode 100644 index 8442b67ec84937..00000000000000 --- a/deps/npm/node_modules/is-cidr/node_modules/cidr-regex/test.js +++ /dev/null @@ -1,199 +0,0 @@ -'use strict' - -import test from 'ava' -import cidr, { cidrv4, cidrv6 } from './src' - -const v4 = [ - '0.0.0.0/16', - '8.8.8.8/17', - '127.0.0.1/18', - '100.100.100.100/19', - '192.168.0.1/20', - '18.101.25.153/24', - '123.23.34.2/25', - '172.26.168.134/26', - '212.58.241.131/27', - '128.0.0.0/28', - '23.71.254.72/29', - '223.255.255.255/30', - '192.0.2.235/31', - '99.198.122.146/32', - '46.51.197.88/8', - '173.194.34.134/12' -] - -const v4not = [ - '.100.100.100.100/16', - '100..100.100.100./24', - '100.100.100.100./32', - '999.999.999.999/12', - '256.256.256.256/30', - '256.100.100.100.100/26', - '123.123.123/31', - 'http://123.123.123/28', - '1000.2.3.4/14', - '999.2.3.4/8' -] - -const v6 = [ - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/0', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/1', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/2', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/3', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/5', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/6', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/7', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/8', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/9', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/11', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/12', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/13', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/14', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/15', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/16', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/17', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/18', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/19', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/20', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/21', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/22', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/23', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/24', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/25', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/26', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/27', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/28', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/29', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/30', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/31', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/32', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/33', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/34', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/35', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/36', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/37', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/38', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/39', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/40', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/41', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/42', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/43', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/44', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/45', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/46', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/47', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/48', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/49', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/50', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/51', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/52', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/53', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/54', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/55', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/56', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/57', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/58', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/59', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/60', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/61', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/62', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/63', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/64', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/65', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/66', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/67', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/68', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/69', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/70', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/71', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/72', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/73', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/74', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/75', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/76', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/77', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/78', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/79', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/80', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/81', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/82', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/83', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/84', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/85', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/86', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/87', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/88', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/89', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/90', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/91', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/92', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/93', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/94', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/95', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/96', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/97', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/98', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/99', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/100', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/101', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/102', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/103', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/104', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/105', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/106', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/107', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/108', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/109', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/110', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/111', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/112', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/113', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/114', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/115', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/116', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/117', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/118', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/119', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/120', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/121', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/122', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/123', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/124', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/125', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/126', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/127', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/128', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156' -] - -const v6not = [ - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/129', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/a', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/√', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/00', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/03', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/sdfsdfs', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/' -] - -test('cidr v4', (t) => { - v4.forEach((string) => { - t.true(cidr.test(string)) - }) - - v4not.forEach((string) => { - t.false(cidrv4.test(string)) - }) -}) - -test('cidr v6', (t) => { - v6.forEach((string) => { - t.true(cidrv6.test(string)) - }) - - v6not.forEach((string) => { - t.false(cidrv6.test(string)) - }) -}) diff --git a/deps/npm/node_modules/is-cidr/package.json b/deps/npm/node_modules/is-cidr/package.json index 982863d837acad..5499a0dca14325 100644 --- a/deps/npm/node_modules/is-cidr/package.json +++ b/deps/npm/node_modules/is-cidr/package.json @@ -1,94 +1,81 @@ { - "_from": "is-cidr", - "_id": "is-cidr@1.0.0", + "_args": [ + [ + "is-cidr@2.0.5", + "/Users/rebecca/code/npm" + ] + ], + "_from": "is-cidr@2.0.5", + "_id": "is-cidr@2.0.5", "_inBundle": false, - "_integrity": "sha1-+1qs9lklUxA1naMsrgPkDGocKvw=", + "_integrity": "sha512-KUGux04sdwBgpr/YREUyuefs4s1Ib4mRmOCIX1KdPnxjUCZMg13BXEp68Uw5IiDl3N4ZZtStDgPu4MWJxNBpKQ==", "_location": "/is-cidr", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "is-cidr", + "raw": "is-cidr@2.0.5", "name": "is-cidr", "escapedName": "is-cidr", - "rawSpec": "", + "rawSpec": "2.0.5", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "2.0.5" }, "_requiredBy": [ - "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-1.0.0.tgz", - "_shasum": "fb5aacf659255310359da32cae03e40c6a1c2afc", - "_spec": "is-cidr", + "_resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-2.0.5.tgz", + "_spec": "2.0.5", "_where": "/Users/rebecca/code/npm", "author": { - "name": "Felipe Apostol", - "email": "flipjs.io@gmail.com", - "url": "http://flipjs.io/" - }, - "babel": { - "presets": [ - "es2015" - ] + "name": "silverwind", + "email": "me@silverwind.io" }, "bugs": { - "url": "https://github.com/flipjs/is-cidr/issues" + "url": "https://github.com/silverwind/is-cidr/issues" }, - "bundleDependencies": false, - "config": { - "commitizen": { - "path": "node_modules/cz-conventional-changelog" - }, - "ghooks": { - "pre-commit": "npm run test && npm run build" + "contributors": [ + { + "name": "Felipe Apostol", + "email": "flipjs.io@gmail.com", + "url": "http://flipjs.io/" } - }, + ], "dependencies": { - "cidr-regex": "1.0.6" + "cidr-regex": "^2.0.8" }, - "deprecated": false, - "description": "Check if a string is a valid CIDR", + "description": "Check if a string is an IP address in CIDR notation", "devDependencies": { - "ava": "0.13.0", - "babel-cli": "6.6.5", - "babel-preset-es2015": "6.6.0", - "babel-register": "6.7.2", - "commitizen": "2.7.3", - "cz-conventional-changelog": "1.1.5", - "eslint": "2.4.0", - "eslint-config-standard": "5.1.0", - "eslint-plugin-babel": "3.1.0", - "eslint-plugin-promise": "1.1.0", - "eslint-plugin-standard": "1.3.2", - "ghooks": "1.0.3", - "rimraf": "2.5.2", - "semantic-release": "4.3.5" + "ava": "^0.25.0", + "eslint": "^4.18.2", + "eslint-config-silverwind": "^1.0.37", + "updates": "^2.3.1" + }, + "engines": { + "node": ">=4" }, - "homepage": "https://github.com/flipjs/is-cidr#readme", + "files": [ + "index.js" + ], + "homepage": "https://github.com/silverwind/is-cidr#readme", "keywords": [ - "ip", - "ip address", "cidr", - "netblock", - "regex" + "regex", + "notation", + "cidr notation", + "prefix", + "prefixes", + "ip", + "ip address" ], - "license": "MIT", - "main": "lib/index.js", + "license": "BSD-2-Clause", "name": "is-cidr", "repository": { "type": "git", - "url": "git+https://github.com/flipjs/is-cidr.git" + "url": "git+https://github.com/silverwind/is-cidr.git" }, "scripts": { - "build": "babel --presets es2015 -d lib/ src/", - "clean": "rimraf lib && mkdir lib", - "commit": "git-cz", - "lint": "eslint src/ test/", - "prebuild": "npm run lint && npm run clean", - "semantic-release": "semantic-release pre && npm publish && semantic-release post", - "test": "ava --require babel-register" + "test": "make test" }, - "version": "1.0.0" + "version": "2.0.5" } diff --git a/deps/npm/node_modules/is-cidr/test/index.test.js b/deps/npm/node_modules/is-cidr/test/index.test.js deleted file mode 100644 index 4804bb02b46dee..00000000000000 --- a/deps/npm/node_modules/is-cidr/test/index.test.js +++ /dev/null @@ -1,199 +0,0 @@ -'use strict' - -import test from 'ava' -import isCidr, { isCidrV4, isCidrV6 } from '../src' - -const v4 = [ - '0.0.0.0/16', - '8.8.8.8/17', - '127.0.0.1/18', - '100.100.100.100/19', - '192.168.0.1/20', - '18.101.25.153/24', - '123.23.34.2/25', - '172.26.168.134/26', - '212.58.241.131/27', - '128.0.0.0/28', - '23.71.254.72/29', - '223.255.255.255/30', - '192.0.2.235/31', - '99.198.122.146/32', - '46.51.197.88/8', - '173.194.34.134/12' -] - -const v4not = [ - '.100.100.100.100/16', - '100..100.100.100./24', - '100.100.100.100./32', - '999.999.999.999/12', - '256.256.256.256/30', - '256.100.100.100.100/26', - '123.123.123/31', - 'http://123.123.123/28', - '1000.2.3.4/14', - '999.2.3.4/8' -] - -const v6 = [ - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/0', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/1', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/2', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/3', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/5', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/6', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/7', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/8', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/9', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/11', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/12', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/13', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/14', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/15', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/16', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/17', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/18', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/19', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/20', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/21', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/22', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/23', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/24', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/25', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/26', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/27', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/28', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/29', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/30', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/31', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/32', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/33', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/34', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/35', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/36', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/37', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/38', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/39', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/40', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/41', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/42', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/43', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/44', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/45', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/46', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/47', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/48', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/49', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/50', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/51', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/52', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/53', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/54', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/55', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/56', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/57', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/58', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/59', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/60', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/61', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/62', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/63', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/64', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/65', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/66', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/67', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/68', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/69', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/70', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/71', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/72', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/73', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/74', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/75', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/76', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/77', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/78', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/79', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/80', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/81', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/82', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/83', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/84', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/85', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/86', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/87', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/88', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/89', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/90', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/91', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/92', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/93', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/94', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/95', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/96', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/97', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/98', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/99', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/100', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/101', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/102', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/103', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/104', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/105', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/106', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/107', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/108', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/109', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/110', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/111', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/112', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/113', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/114', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/115', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/116', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/117', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/118', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/119', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/120', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/121', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/122', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/123', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/124', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/125', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/126', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/127', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/128', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156' -] - -const v6not = [ - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/129', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/a', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/√', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/00', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/03', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/sdfsdfs', - 'fe80:0000:0000:0000:0204:61ff:fe9d:f156/' -] - -test('cidr v4', (t) => { - v4.forEach((string) => { - t.true(isCidr(string)) - }) - - v4not.forEach((string) => { - t.false(isCidrV4(string)) - }) -}) - -test('cidr v6', (t) => { - v6.forEach((string) => { - t.true(isCidrV6(string)) - }) - - v6not.forEach((string) => { - t.false(isCidrV6(string)) - }) -}) diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/is-fullwidth-code-point/index.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js rename to deps/npm/node_modules/is-fullwidth-code-point/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/license b/deps/npm/node_modules/is-fullwidth-code-point/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/license rename to deps/npm/node_modules/is-fullwidth-code-point/license diff --git a/deps/npm/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 00000000000000..1e2f373437ba48 --- /dev/null +++ b/deps/npm/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,78 @@ +{ + "_from": "is-fullwidth-code-point@^2.0.0", + "_id": "is-fullwidth-code-point@2.0.0", + "_inBundle": false, + "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "_location": "/is-fullwidth-code-point", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-fullwidth-code-point@^2.0.0", + "name": "is-fullwidth-code-point", + "escapedName": "is-fullwidth-code-point", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/slice-ansi", + "/string-width" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f", + "_spec": "is-fullwidth-code-point@^2.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "char", + "string", + "str", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "license": "MIT", + "name": "is-fullwidth-code-point", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/is-fullwidth-code-point/readme.md similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md rename to deps/npm/node_modules/is-fullwidth-code-point/readme.md diff --git a/deps/npm/node_modules/update-notifier/node_modules/is-installed-globally/index.js b/deps/npm/node_modules/is-installed-globally/index.js similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/is-installed-globally/index.js rename to deps/npm/node_modules/is-installed-globally/index.js diff --git a/deps/npm/node_modules/update-notifier/node_modules/boxen/node_modules/term-size/node_modules/execa/license b/deps/npm/node_modules/is-installed-globally/license similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/boxen/node_modules/term-size/node_modules/execa/license rename to deps/npm/node_modules/is-installed-globally/license diff --git a/deps/npm/node_modules/is-installed-globally/package.json b/deps/npm/node_modules/is-installed-globally/package.json new file mode 100644 index 00000000000000..04cdf676ffa4d3 --- /dev/null +++ b/deps/npm/node_modules/is-installed-globally/package.json @@ -0,0 +1,80 @@ +{ + "_from": "is-installed-globally@^0.1.0", + "_id": "is-installed-globally@0.1.0", + "_inBundle": false, + "_integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "_location": "/is-installed-globally", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-installed-globally@^0.1.0", + "name": "is-installed-globally", + "escapedName": "is-installed-globally", + "rawSpec": "^0.1.0", + "saveSpec": null, + "fetchSpec": "^0.1.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "_shasum": "0dfd98f5a9111716dd535dda6492f67bf3d25a80", + "_spec": "is-installed-globally@^0.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/update-notifier", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-installed-globally/issues" + }, + "bundleDependencies": false, + "dependencies": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + }, + "deprecated": false, + "description": "Check if your package was installed globally", + "devDependencies": { + "ava": "*", + "execa": "^0.7.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-installed-globally#readme", + "keywords": [ + "global", + "package", + "globally", + "module", + "install", + "installed", + "npm", + "yarn", + "is", + "check", + "detect", + "local", + "locally", + "cli", + "bin", + "binary" + ], + "license": "MIT", + "name": "is-installed-globally", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-installed-globally.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "0.1.0" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/is-installed-globally/readme.md b/deps/npm/node_modules/is-installed-globally/readme.md similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/is-installed-globally/readme.md rename to deps/npm/node_modules/is-installed-globally/readme.md diff --git a/deps/npm/node_modules/update-notifier/node_modules/is-npm/index.js b/deps/npm/node_modules/is-npm/index.js similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/is-npm/index.js rename to deps/npm/node_modules/is-npm/index.js diff --git a/deps/npm/node_modules/is-npm/package.json b/deps/npm/node_modules/is-npm/package.json new file mode 100644 index 00000000000000..9e2018a1225615 --- /dev/null +++ b/deps/npm/node_modules/is-npm/package.json @@ -0,0 +1,64 @@ +{ + "_from": "is-npm@^1.0.0", + "_id": "is-npm@1.0.0", + "_inBundle": false, + "_integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "_location": "/is-npm", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-npm@^1.0.0", + "name": "is-npm", + "escapedName": "is-npm", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "_shasum": "f2fb63a65e4905b406c86072765a1a4dc793b9f4", + "_spec": "is-npm@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/update-notifier", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-npm/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if your code is running as an npm script", + "devDependencies": { + "ava": "0.0.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-npm#readme", + "keywords": [ + "npm", + "is", + "check", + "detect", + "env", + "environment" + ], + "license": "MIT", + "name": "is-npm", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-npm.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/is-npm/readme.md b/deps/npm/node_modules/is-npm/readme.md similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/is-npm/readme.md rename to deps/npm/node_modules/is-npm/readme.md diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/index.js b/deps/npm/node_modules/is-obj/index.js similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/index.js rename to deps/npm/node_modules/is-obj/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/license b/deps/npm/node_modules/is-obj/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/license rename to deps/npm/node_modules/is-obj/license diff --git a/deps/npm/node_modules/is-obj/package.json b/deps/npm/node_modules/is-obj/package.json new file mode 100644 index 00000000000000..d9180dbab26fad --- /dev/null +++ b/deps/npm/node_modules/is-obj/package.json @@ -0,0 +1,65 @@ +{ + "_from": "is-obj@^1.0.0", + "_id": "is-obj@1.0.1", + "_inBundle": false, + "_integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "_location": "/is-obj", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-obj@^1.0.0", + "name": "is-obj", + "escapedName": "is-obj", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/dot-prop" + ], + "_resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "_shasum": "3e4729ac1f5fde025cd7d83a896dab9f4f67db0f", + "_spec": "is-obj@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/dot-prop", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-obj/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if a value is an object", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-obj#readme", + "keywords": [ + "obj", + "object", + "is", + "check", + "test", + "type" + ], + "license": "MIT", + "name": "is-obj", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-obj.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/readme.md b/deps/npm/node_modules/is-obj/readme.md similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/readme.md rename to deps/npm/node_modules/is-obj/readme.md diff --git a/deps/npm/node_modules/update-notifier/node_modules/is-installed-globally/node_modules/is-path-inside/index.js b/deps/npm/node_modules/is-path-inside/index.js similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/is-installed-globally/node_modules/is-path-inside/index.js rename to deps/npm/node_modules/is-path-inside/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/license b/deps/npm/node_modules/is-path-inside/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/license rename to deps/npm/node_modules/is-path-inside/license diff --git a/deps/npm/node_modules/is-path-inside/package.json b/deps/npm/node_modules/is-path-inside/package.json new file mode 100644 index 00000000000000..c76d7e04df7964 --- /dev/null +++ b/deps/npm/node_modules/is-path-inside/package.json @@ -0,0 +1,70 @@ +{ + "_from": "is-path-inside@^1.0.0", + "_id": "is-path-inside@1.0.1", + "_inBundle": false, + "_integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "_location": "/is-path-inside", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-path-inside@^1.0.0", + "name": "is-path-inside", + "escapedName": "is-path-inside", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/is-installed-globally", + "/is-path-in-cwd" + ], + "_resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "_shasum": "8ef5b7de50437a3fdca6b4e865ef7aa55cb48036", + "_spec": "is-path-inside@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/is-installed-globally", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-path-inside/issues" + }, + "bundleDependencies": false, + "dependencies": { + "path-is-inside": "^1.0.1" + }, + "deprecated": false, + "description": "Check if a path is inside another path", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-path-inside#readme", + "keywords": [ + "path", + "inside", + "folder", + "directory", + "dir", + "file", + "resolve" + ], + "license": "MIT", + "name": "is-path-inside", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-path-inside.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/deps/npm/node_modules/is-path-inside/readme.md b/deps/npm/node_modules/is-path-inside/readme.md new file mode 100644 index 00000000000000..cc5f51625d3e9c --- /dev/null +++ b/deps/npm/node_modules/is-path-inside/readme.md @@ -0,0 +1,34 @@ +# is-path-inside [![Build Status](https://travis-ci.org/sindresorhus/is-path-inside.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-inside) + +> Check if a path is inside another path + + +## Install + +``` +$ npm install --save is-path-inside +``` + + +## Usage + +```js +var isPathInside = require('is-path-inside'); + +isPathInside('a/b/c', 'a/b'); +//=> true + +isPathInside('a/b/c', 'x/y'); +//=> false + +isPathInside('a/b/c', 'a/b/c'); +//=> false + +isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus'); +//=> true +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/is-redirect/index.js b/deps/npm/node_modules/is-redirect/index.js similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/is-redirect/index.js rename to deps/npm/node_modules/is-redirect/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/license b/deps/npm/node_modules/is-redirect/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/license rename to deps/npm/node_modules/is-redirect/license diff --git a/deps/npm/node_modules/is-redirect/package.json b/deps/npm/node_modules/is-redirect/package.json new file mode 100644 index 00000000000000..4cfb34573188e1 --- /dev/null +++ b/deps/npm/node_modules/is-redirect/package.json @@ -0,0 +1,67 @@ +{ + "_from": "is-redirect@^1.0.0", + "_id": "is-redirect@1.0.0", + "_inBundle": false, + "_integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "_location": "/is-redirect", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-redirect@^1.0.0", + "name": "is-redirect", + "escapedName": "is-redirect", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "_shasum": "1d03dded53bd8db0f30c26e4f95d36fc7c87dc24", + "_spec": "is-redirect@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/got", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-redirect/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if a number is a redirect HTTP status code", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-redirect#readme", + "keywords": [ + "redirect", + "http", + "https", + "status", + "code", + "codes", + "is", + "check", + "detect" + ], + "license": "MIT", + "name": "is-redirect", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-redirect.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/is-redirect/readme.md b/deps/npm/node_modules/is-redirect/readme.md similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/is-redirect/readme.md rename to deps/npm/node_modules/is-redirect/readme.md diff --git a/deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/is-retry-allowed/index.js b/deps/npm/node_modules/is-retry-allowed/index.js similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/is-retry-allowed/index.js rename to deps/npm/node_modules/is-retry-allowed/index.js diff --git a/deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/is-retry-allowed/license b/deps/npm/node_modules/is-retry-allowed/license similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/is-retry-allowed/license rename to deps/npm/node_modules/is-retry-allowed/license diff --git a/deps/npm/node_modules/is-retry-allowed/package.json b/deps/npm/node_modules/is-retry-allowed/package.json new file mode 100644 index 00000000000000..e494bb3f7841af --- /dev/null +++ b/deps/npm/node_modules/is-retry-allowed/package.json @@ -0,0 +1,59 @@ +{ + "_from": "is-retry-allowed@^1.0.0", + "_id": "is-retry-allowed@1.1.0", + "_inBundle": false, + "_integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "_location": "/is-retry-allowed", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-retry-allowed@^1.0.0", + "name": "is-retry-allowed", + "escapedName": "is-retry-allowed", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "_shasum": "11a060568b67339444033d0125a61a20d564fb34", + "_spec": "is-retry-allowed@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/got", + "author": { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + }, + "bugs": { + "url": "https://github.com/floatdrop/is-retry-allowed/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "My prime module", + "devDependencies": { + "ava": "^0.8.0", + "xo": "^0.12.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/floatdrop/is-retry-allowed#readme", + "keywords": [], + "license": "MIT", + "name": "is-retry-allowed", + "repository": { + "type": "git", + "url": "git+https://github.com/floatdrop/is-retry-allowed.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/is-retry-allowed/readme.md b/deps/npm/node_modules/is-retry-allowed/readme.md similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/is-retry-allowed/readme.md rename to deps/npm/node_modules/is-retry-allowed/readme.md diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/is-stream/index.js b/deps/npm/node_modules/is-stream/index.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/is-stream/index.js rename to deps/npm/node_modules/is-stream/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/license b/deps/npm/node_modules/is-stream/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/license rename to deps/npm/node_modules/is-stream/license diff --git a/deps/npm/node_modules/is-stream/package.json b/deps/npm/node_modules/is-stream/package.json new file mode 100644 index 00000000000000..b97097f0deb02e --- /dev/null +++ b/deps/npm/node_modules/is-stream/package.json @@ -0,0 +1,72 @@ +{ + "_from": "is-stream@^1.1.0", + "_id": "is-stream@1.1.0", + "_inBundle": false, + "_integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "_location": "/is-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-stream@^1.1.0", + "name": "is-stream", + "escapedName": "is-stream", + "rawSpec": "^1.1.0", + "saveSpec": null, + "fetchSpec": "^1.1.0" + }, + "_requiredBy": [ + "/execa", + "/got", + "/node-fetch" + ], + "_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "_shasum": "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44", + "_spec": "is-stream@^1.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/execa", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-stream/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if something is a Node.js stream", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.0", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-stream#readme", + "keywords": [ + "stream", + "type", + "streams", + "writable", + "readable", + "duplex", + "transform", + "check", + "detect", + "is" + ], + "license": "MIT", + "name": "is-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/is-stream/readme.md b/deps/npm/node_modules/is-stream/readme.md similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/is-stream/readme.md rename to deps/npm/node_modules/is-stream/readme.md diff --git a/deps/npm/node_modules/request/node_modules/is-typedarray/LICENSE.md b/deps/npm/node_modules/is-typedarray/LICENSE.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/is-typedarray/LICENSE.md rename to deps/npm/node_modules/is-typedarray/LICENSE.md diff --git a/deps/npm/node_modules/request/node_modules/is-typedarray/README.md b/deps/npm/node_modules/is-typedarray/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/is-typedarray/README.md rename to deps/npm/node_modules/is-typedarray/README.md diff --git a/deps/npm/node_modules/request/node_modules/is-typedarray/index.js b/deps/npm/node_modules/is-typedarray/index.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/is-typedarray/index.js rename to deps/npm/node_modules/is-typedarray/index.js diff --git a/deps/npm/node_modules/is-typedarray/package.json b/deps/npm/node_modules/is-typedarray/package.json new file mode 100644 index 00000000000000..56e9107077743a --- /dev/null +++ b/deps/npm/node_modules/is-typedarray/package.json @@ -0,0 +1,59 @@ +{ + "_from": "is-typedarray@~1.0.0", + "_id": "is-typedarray@1.0.0", + "_inBundle": false, + "_integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "_location": "/is-typedarray", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-typedarray@~1.0.0", + "name": "is-typedarray", + "escapedName": "is-typedarray", + "rawSpec": "~1.0.0", + "saveSpec": null, + "fetchSpec": "~1.0.0" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "_shasum": "e479c80858df0c1b11ddda6940f96011fcda4a9a", + "_spec": "is-typedarray@~1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/request", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "bugs": { + "url": "https://github.com/hughsk/is-typedarray/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Detect whether or not an object is a Typed Array", + "devDependencies": { + "tape": "^2.13.1" + }, + "homepage": "https://github.com/hughsk/is-typedarray", + "keywords": [ + "typed", + "array", + "detect", + "is", + "util" + ], + "license": "MIT", + "main": "index.js", + "name": "is-typedarray", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/is-typedarray.git" + }, + "scripts": { + "test": "node test" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/request/node_modules/is-typedarray/test.js b/deps/npm/node_modules/is-typedarray/test.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/is-typedarray/test.js rename to deps/npm/node_modules/is-typedarray/test.js diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/.npmignore b/deps/npm/node_modules/isarray/.npmignore similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/.npmignore rename to deps/npm/node_modules/isarray/.npmignore diff --git a/deps/npm/node_modules/mkdirp/node_modules/minimist/.travis.yml b/deps/npm/node_modules/isarray/.travis.yml similarity index 100% rename from deps/npm/node_modules/mkdirp/node_modules/minimist/.travis.yml rename to deps/npm/node_modules/isarray/.travis.yml diff --git a/deps/npm/node_modules/isarray/Makefile b/deps/npm/node_modules/isarray/Makefile new file mode 100644 index 00000000000000..0ecc29c402c243 --- /dev/null +++ b/deps/npm/node_modules/isarray/Makefile @@ -0,0 +1,5 @@ + +test: + @node_modules/.bin/tape test.js + +.PHONY: test diff --git a/deps/npm/node_modules/readable-stream/node_modules/isarray/README.md b/deps/npm/node_modules/isarray/README.md similarity index 100% rename from deps/npm/node_modules/readable-stream/node_modules/isarray/README.md rename to deps/npm/node_modules/isarray/README.md diff --git a/deps/npm/node_modules/readable-stream/node_modules/isarray/component.json b/deps/npm/node_modules/isarray/component.json similarity index 100% rename from deps/npm/node_modules/readable-stream/node_modules/isarray/component.json rename to deps/npm/node_modules/isarray/component.json diff --git a/deps/npm/node_modules/readable-stream/node_modules/isarray/index.js b/deps/npm/node_modules/isarray/index.js similarity index 100% rename from deps/npm/node_modules/readable-stream/node_modules/isarray/index.js rename to deps/npm/node_modules/isarray/index.js diff --git a/deps/npm/node_modules/isarray/package.json b/deps/npm/node_modules/isarray/package.json new file mode 100644 index 00000000000000..f9a5ecd5f37ae2 --- /dev/null +++ b/deps/npm/node_modules/isarray/package.json @@ -0,0 +1,74 @@ +{ + "_from": "isarray@~1.0.0", + "_id": "isarray@1.0.0", + "_inBundle": false, + "_integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "_location": "/isarray", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "isarray@~1.0.0", + "name": "isarray", + "escapedName": "isarray", + "rawSpec": "~1.0.0", + "saveSpec": null, + "fetchSpec": "~1.0.0" + }, + "_requiredBy": [ + "/eslint-plugin-import/doctrine", + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", + "_spec": "isarray@~1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/readable-stream", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tape": "~2.13.4" + }, + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "browser", + "isarray", + "array" + ], + "license": "MIT", + "main": "index.js", + "name": "isarray", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tape test.js" + }, + "testling": { + "files": "test.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/isarray/test.js b/deps/npm/node_modules/isarray/test.js new file mode 100644 index 00000000000000..f7f7bcd19fec56 --- /dev/null +++ b/deps/npm/node_modules/isarray/test.js @@ -0,0 +1,19 @@ +var isArray = require('./'); +var test = require('tape'); + +test('is array', function(t){ + t.ok(isArray([])); + t.notOk(isArray({})); + t.notOk(isArray(null)); + t.notOk(isArray(false)); + + var obj = {}; + obj[0] = true; + t.notOk(isArray(obj)); + + var arr = []; + arr.foo = 'bar'; + t.ok(isArray(arr)); + + t.end(); +}); diff --git a/deps/npm/node_modules/which/node_modules/isexe/.npmignore b/deps/npm/node_modules/isexe/.npmignore similarity index 100% rename from deps/npm/node_modules/which/node_modules/isexe/.npmignore rename to deps/npm/node_modules/isexe/.npmignore diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/LICENSE b/deps/npm/node_modules/isexe/LICENSE similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/LICENSE rename to deps/npm/node_modules/isexe/LICENSE diff --git a/deps/npm/node_modules/which/node_modules/isexe/README.md b/deps/npm/node_modules/isexe/README.md similarity index 100% rename from deps/npm/node_modules/which/node_modules/isexe/README.md rename to deps/npm/node_modules/isexe/README.md diff --git a/deps/npm/node_modules/which/node_modules/isexe/index.js b/deps/npm/node_modules/isexe/index.js similarity index 100% rename from deps/npm/node_modules/which/node_modules/isexe/index.js rename to deps/npm/node_modules/isexe/index.js diff --git a/deps/npm/node_modules/which/node_modules/isexe/mode.js b/deps/npm/node_modules/isexe/mode.js similarity index 100% rename from deps/npm/node_modules/which/node_modules/isexe/mode.js rename to deps/npm/node_modules/isexe/mode.js diff --git a/deps/npm/node_modules/isexe/package.json b/deps/npm/node_modules/isexe/package.json new file mode 100644 index 00000000000000..681a27a49510ee --- /dev/null +++ b/deps/npm/node_modules/isexe/package.json @@ -0,0 +1,61 @@ +{ + "_from": "isexe@^2.0.0", + "_id": "isexe@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "_location": "/isexe", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "isexe@^2.0.0", + "name": "isexe", + "escapedName": "isexe", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/tap", + "/which" + ], + "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "_shasum": "e8fbf374dc556ff8947a10dcb0572d633f2cfa10", + "_spec": "isexe@^2.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/which", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Minimal module to check if a file is executable.", + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/isaacs/isexe#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "isexe", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.0.0" +} diff --git a/deps/npm/node_modules/which/node_modules/isexe/test/basic.js b/deps/npm/node_modules/isexe/test/basic.js similarity index 100% rename from deps/npm/node_modules/which/node_modules/isexe/test/basic.js rename to deps/npm/node_modules/isexe/test/basic.js diff --git a/deps/npm/node_modules/which/node_modules/isexe/windows.js b/deps/npm/node_modules/isexe/windows.js similarity index 100% rename from deps/npm/node_modules/which/node_modules/isexe/windows.js rename to deps/npm/node_modules/isexe/windows.js diff --git a/deps/npm/node_modules/request/node_modules/isstream/.npmignore b/deps/npm/node_modules/isstream/.npmignore similarity index 100% rename from deps/npm/node_modules/request/node_modules/isstream/.npmignore rename to deps/npm/node_modules/isstream/.npmignore diff --git a/deps/npm/node_modules/request/node_modules/isstream/.travis.yml b/deps/npm/node_modules/isstream/.travis.yml similarity index 100% rename from deps/npm/node_modules/request/node_modules/isstream/.travis.yml rename to deps/npm/node_modules/isstream/.travis.yml diff --git a/deps/npm/node_modules/request/node_modules/isstream/LICENSE.md b/deps/npm/node_modules/isstream/LICENSE.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/isstream/LICENSE.md rename to deps/npm/node_modules/isstream/LICENSE.md diff --git a/deps/npm/node_modules/request/node_modules/isstream/README.md b/deps/npm/node_modules/isstream/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/isstream/README.md rename to deps/npm/node_modules/isstream/README.md diff --git a/deps/npm/node_modules/request/node_modules/isstream/isstream.js b/deps/npm/node_modules/isstream/isstream.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/isstream/isstream.js rename to deps/npm/node_modules/isstream/isstream.js diff --git a/deps/npm/node_modules/isstream/package.json b/deps/npm/node_modules/isstream/package.json new file mode 100644 index 00000000000000..2a74102f679664 --- /dev/null +++ b/deps/npm/node_modules/isstream/package.json @@ -0,0 +1,61 @@ +{ + "_from": "isstream@~0.1.2", + "_id": "isstream@0.1.2", + "_inBundle": false, + "_integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "_location": "/isstream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "isstream@~0.1.2", + "name": "isstream", + "escapedName": "isstream", + "rawSpec": "~0.1.2", + "saveSpec": null, + "fetchSpec": "~0.1.2" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "_shasum": "47e63f7af55afa6f92e1500e690eb8b8529c099a", + "_spec": "isstream@~0.1.2", + "_where": "/Users/rebecca/code/npm/node_modules/request", + "author": { + "name": "Rod Vagg", + "email": "rod@vagg.org" + }, + "bugs": { + "url": "https://github.com/rvagg/isstream/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Determine if an object is a Stream", + "devDependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x", + "tape": "~2.12.3" + }, + "homepage": "https://github.com/rvagg/isstream", + "keywords": [ + "stream", + "type", + "streams", + "readable-stream", + "hippo" + ], + "license": "MIT", + "main": "isstream.js", + "name": "isstream", + "repository": { + "type": "git", + "url": "git+https://github.com/rvagg/isstream.git" + }, + "scripts": { + "test": "tar --xform 's/^package/readable-stream-1.0/' -zxf readable-stream-1.0.*.tgz && tar --xform 's/^package/readable-stream-1.1/' -zxf readable-stream-1.1.*.tgz && node test.js; rm -rf readable-stream-1.?/" + }, + "version": "0.1.2" +} diff --git a/deps/npm/node_modules/isstream/test.js b/deps/npm/node_modules/isstream/test.js new file mode 100644 index 00000000000000..881e70b3098ff7 --- /dev/null +++ b/deps/npm/node_modules/isstream/test.js @@ -0,0 +1,165 @@ +var tape = require('tape') + , EE = require('events').EventEmitter + , util = require('util') + + + , isStream = require('./') + , isReadable = require('./').isReadable + , isWritable = require('./').isWritable + , isDuplex = require('./').isDuplex + + , CoreStreams = require('stream') + , ReadableStream10 = require('./readable-stream-1.0/') + , ReadableStream11 = require('./readable-stream-1.1/') + + +function test (pass, type, stream) { + tape('isStream(' + type + ')', function (t) { + t.plan(1) + t.ok(pass === isStream(stream), type) + }) +} + + +function testReadable (pass, type, stream) { + tape('isReadable(' + type + ')', function (t) { + t.plan(1) + t.ok(pass === isReadable(stream), type) + }) +} + + +function testWritable (pass, type, stream) { + tape('isWritable(' + type + ')', function (t) { + t.plan(1) + t.ok(pass === isWritable(stream), type) + }) +} + + +function testDuplex (pass, type, stream) { + tape('isDuplex(' + type + ')', function (t) { + t.plan(1) + t.ok(pass === isDuplex(stream), type) + }) +} + + +[ undefined, null, '', true, false, 0, 1, 1.0, 'string', {}, function foo () {} ].forEach(function (o) { + test(false, 'non-stream / primitive: ' + (JSON.stringify(o) || (o && o.toString()) || o), o) +}) + + +test(false, 'fake stream obj', { pipe: function () {} }) + + +;(function () { + + // looks like a stream! + + function Stream () { + EE.call(this) + } + util.inherits(Stream, EE) + Stream.prototype.pipe = function () {} + Stream.Stream = Stream + + test(false, 'fake stream "new Stream()"', new Stream()) + +}()) + + +test(true, 'CoreStreams.Stream', new (CoreStreams.Stream)()) +test(true, 'CoreStreams.Readable', new (CoreStreams.Readable)()) +test(true, 'CoreStreams.Writable', new (CoreStreams.Writable)()) +test(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)()) +test(true, 'CoreStreams.Transform', new (CoreStreams.Transform)()) +test(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)()) + +test(true, 'ReadableStream10.Readable', new (ReadableStream10.Readable)()) +test(true, 'ReadableStream10.Writable', new (ReadableStream10.Writable)()) +test(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)()) +test(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)()) +test(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)()) + +test(true, 'ReadableStream11.Readable', new (ReadableStream11.Readable)()) +test(true, 'ReadableStream11.Writable', new (ReadableStream11.Writable)()) +test(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)()) +test(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)()) +test(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)()) + + +testReadable(false, 'CoreStreams.Stream', new (CoreStreams.Stream)()) +testReadable(true, 'CoreStreams.Readable', new (CoreStreams.Readable)()) +testReadable(false, 'CoreStreams.Writable', new (CoreStreams.Writable)()) +testReadable(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)()) +testReadable(true, 'CoreStreams.Transform', new (CoreStreams.Transform)()) +testReadable(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)()) + +testReadable(true, 'ReadableStream10.Readable', new (ReadableStream10.Readable)()) +testReadable(false, 'ReadableStream10.Writable', new (ReadableStream10.Writable)()) +testReadable(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)()) +testReadable(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)()) +testReadable(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)()) + +testReadable(true, 'ReadableStream11.Readable', new (ReadableStream11.Readable)()) +testReadable(false, 'ReadableStream11.Writable', new (ReadableStream11.Writable)()) +testReadable(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)()) +testReadable(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)()) +testReadable(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)()) + + +testWritable(false, 'CoreStreams.Stream', new (CoreStreams.Stream)()) +testWritable(false, 'CoreStreams.Readable', new (CoreStreams.Readable)()) +testWritable(true, 'CoreStreams.Writable', new (CoreStreams.Writable)()) +testWritable(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)()) +testWritable(true, 'CoreStreams.Transform', new (CoreStreams.Transform)()) +testWritable(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)()) + +testWritable(false, 'ReadableStream10.Readable', new (ReadableStream10.Readable)()) +testWritable(true, 'ReadableStream10.Writable', new (ReadableStream10.Writable)()) +testWritable(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)()) +testWritable(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)()) +testWritable(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)()) + +testWritable(false, 'ReadableStream11.Readable', new (ReadableStream11.Readable)()) +testWritable(true, 'ReadableStream11.Writable', new (ReadableStream11.Writable)()) +testWritable(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)()) +testWritable(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)()) +testWritable(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)()) + + +testDuplex(false, 'CoreStreams.Stream', new (CoreStreams.Stream)()) +testDuplex(false, 'CoreStreams.Readable', new (CoreStreams.Readable)()) +testDuplex(false, 'CoreStreams.Writable', new (CoreStreams.Writable)()) +testDuplex(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)()) +testDuplex(true, 'CoreStreams.Transform', new (CoreStreams.Transform)()) +testDuplex(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)()) + +testDuplex(false, 'ReadableStream10.Readable', new (ReadableStream10.Readable)()) +testDuplex(false, 'ReadableStream10.Writable', new (ReadableStream10.Writable)()) +testDuplex(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)()) +testDuplex(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)()) +testDuplex(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)()) + +testDuplex(false, 'ReadableStream11.Readable', new (ReadableStream11.Readable)()) +testDuplex(false, 'ReadableStream11.Writable', new (ReadableStream11.Writable)()) +testDuplex(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)()) +testDuplex(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)()) +testDuplex(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)()) + + +;[ CoreStreams, ReadableStream10, ReadableStream11 ].forEach(function (p) { + [ 'Stream', 'Readable', 'Writable', 'Duplex', 'Transform', 'PassThrough' ].forEach(function (k) { + if (!p[k]) + return + + function SubStream () { + p[k].call(this) + } + util.inherits(SubStream, p[k]) + + test(true, 'Stream subclass: ' + p.name + '.' + k, new SubStream()) + + }) +}) diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/.npmignore b/deps/npm/node_modules/jsbn/.npmignore similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/.npmignore rename to deps/npm/node_modules/jsbn/.npmignore diff --git a/deps/npm/node_modules/jsbn/LICENSE b/deps/npm/node_modules/jsbn/LICENSE new file mode 100644 index 00000000000000..7ccbf5073c8650 --- /dev/null +++ b/deps/npm/node_modules/jsbn/LICENSE @@ -0,0 +1,40 @@ +Licensing +--------- + +This software is covered under the following copyright: + +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ + +Address all questions regarding this license to: + + Tom Wu + tjw@cs.Stanford.EDU \ No newline at end of file diff --git a/deps/npm/node_modules/jsbn/README.md b/deps/npm/node_modules/jsbn/README.md new file mode 100644 index 00000000000000..9686611db7f379 --- /dev/null +++ b/deps/npm/node_modules/jsbn/README.md @@ -0,0 +1,173 @@ +# jsbn: javascript big number + +[Tom Wu's Original Website](http://www-cs-students.stanford.edu/~tjw/jsbn/) + +I felt compelled to put this on github and publish to npm. I haven't tested every other big integer library out there, but the few that I have tested in comparison to this one have not even come close in performance. I am aware of the `bi` module on npm, however it has been modified and I wanted to publish the original without modifications. This is jsbn and jsbn2 from Tom Wu's original website above, with the modular pattern applied to prevent global leaks and to allow for use with node.js on the server side. + +## usage + + var BigInteger = require('jsbn'); + + var a = new BigInteger('91823918239182398123'); + alert(a.bitLength()); // 67 + + +## API + +### bi.toString() + +returns the base-10 number as a string + +### bi.negate() + +returns a new BigInteger equal to the negation of `bi` + +### bi.abs + +returns new BI of absolute value + +### bi.compareTo + + + +### bi.bitLength + + + +### bi.mod + + + +### bi.modPowInt + + + +### bi.clone + + + +### bi.intValue + + + +### bi.byteValue + + + +### bi.shortValue + + + +### bi.signum + + + +### bi.toByteArray + + + +### bi.equals + + + +### bi.min + + + +### bi.max + + + +### bi.and + + + +### bi.or + + + +### bi.xor + + + +### bi.andNot + + + +### bi.not + + + +### bi.shiftLeft + + + +### bi.shiftRight + + + +### bi.getLowestSetBit + + + +### bi.bitCount + + + +### bi.testBit + + + +### bi.setBit + + + +### bi.clearBit + + + +### bi.flipBit + + + +### bi.add + + + +### bi.subtract + + + +### bi.multiply + + + +### bi.divide + + + +### bi.remainder + + + +### bi.divideAndRemainder + + + +### bi.modPow + + + +### bi.modInverse + + + +### bi.pow + + + +### bi.gcd + + + +### bi.isProbablePrime diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.html b/deps/npm/node_modules/jsbn/example.html similarity index 91% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.html rename to deps/npm/node_modules/jsbn/example.html index 7c26a5665c1b1a..ea180b8cc4268f 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.html +++ b/deps/npm/node_modules/jsbn/example.html @@ -5,8 +5,8 @@ - - + + \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.js b/deps/npm/node_modules/jsbn/example.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.js rename to deps/npm/node_modules/jsbn/example.js diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/index.js b/deps/npm/node_modules/jsbn/index.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/index.js rename to deps/npm/node_modules/jsbn/index.js diff --git a/deps/npm/node_modules/jsbn/package.json b/deps/npm/node_modules/jsbn/package.json new file mode 100644 index 00000000000000..765736fea674c9 --- /dev/null +++ b/deps/npm/node_modules/jsbn/package.json @@ -0,0 +1,53 @@ +{ + "_from": "jsbn@~0.1.0", + "_id": "jsbn@0.1.1", + "_inBundle": false, + "_integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "_location": "/jsbn", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "jsbn@~0.1.0", + "name": "jsbn", + "escapedName": "jsbn", + "rawSpec": "~0.1.0", + "saveSpec": null, + "fetchSpec": "~0.1.0" + }, + "_requiredBy": [ + "/ecc-jsbn", + "/sshpk" + ], + "_resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "_shasum": "a5e654c2e5a2deb5f201d96cefbca80c0ef2f513", + "_spec": "jsbn@~0.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/sshpk", + "author": { + "name": "Tom Wu" + }, + "bugs": { + "url": "https://github.com/andyperlitch/jsbn/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.", + "homepage": "https://github.com/andyperlitch/jsbn#readme", + "keywords": [ + "biginteger", + "bignumber", + "big", + "integer" + ], + "license": "MIT", + "main": "index.js", + "name": "jsbn", + "repository": { + "type": "git", + "url": "git+https://github.com/andyperlitch/jsbn.git" + }, + "scripts": { + "test": "mocha test.js" + }, + "version": "0.1.1" +} diff --git a/deps/npm/node_modules/json-parse-better-errors/CHANGELOG.md b/deps/npm/node_modules/json-parse-better-errors/CHANGELOG.md new file mode 100644 index 00000000000000..b1d212de439089 --- /dev/null +++ b/deps/npm/node_modules/json-parse-better-errors/CHANGELOG.md @@ -0,0 +1,46 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [1.0.2](https://github.com/zkat/json-parse-better-errors/compare/v1.0.1...v1.0.2) (2018-03-30) + + +### Bug Fixes + +* **messages:** More friendly messages for non-string ([#1](https://github.com/zkat/json-parse-better-errors/issues/1)) ([a476d42](https://github.com/zkat/json-parse-better-errors/commit/a476d42)) + + + + +## [1.0.1](https://github.com/zkat/json-parse-better-errors/compare/v1.0.0...v1.0.1) (2017-08-16) + + +### Bug Fixes + +* **license:** oops. Forgot to update license.md ([efe2958](https://github.com/zkat/json-parse-better-errors/commit/efe2958)) + + + + +# 1.0.0 (2017-08-15) + + +### Features + +* **init:** Initial Commit ([562c977](https://github.com/zkat/json-parse-better-errors/commit/562c977)) + + +### BREAKING CHANGES + +* **init:** This is the first commit! + + + + +# 0.1.0 (2017-08-15) + + +### Features + +* **init:** Initial Commit ([9dd1a19](https://github.com/zkat/json-parse-better-errors/commit/9dd1a19)) diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/LICENSE.md b/deps/npm/node_modules/json-parse-better-errors/LICENSE.md similarity index 100% rename from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/LICENSE.md rename to deps/npm/node_modules/json-parse-better-errors/LICENSE.md diff --git a/deps/npm/node_modules/json-parse-better-errors/README.md b/deps/npm/node_modules/json-parse-better-errors/README.md new file mode 100644 index 00000000000000..a1f0f0a592ad3a --- /dev/null +++ b/deps/npm/node_modules/json-parse-better-errors/README.md @@ -0,0 +1,46 @@ +# json-parse-better-errors [![npm version](https://img.shields.io/npm/v/json-parse-better-errors.svg)](https://npm.im/json-parse-better-errors) [![license](https://img.shields.io/npm/l/json-parse-better-errors.svg)](https://npm.im/json-parse-better-errors) [![Travis](https://img.shields.io/travis/zkat/json-parse-better-errors.svg)](https://travis-ci.org/zkat/json-parse-better-errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/json-parse-better-errors?svg=true)](https://ci.appveyor.com/project/zkat/json-parse-better-errors) [![Coverage Status](https://coveralls.io/repos/github/zkat/json-parse-better-errors/badge.svg?branch=latest)](https://coveralls.io/github/zkat/json-parse-better-errors?branch=latest) + +[`json-parse-better-errors`](https://github.com/zkat/json-parse-better-errors) is a Node.js library for +getting nicer errors out of `JSON.parse()`, including context and position of the parse errors. + +## Install + +`$ npm install --save json-parse-better-errors` + +## Table of Contents + +* [Example](#example) +* [Features](#features) +* [Contributing](#contributing) +* [API](#api) + * [`parse`](#parse) + +### Example + +```javascript +const parseJson = require('json-parse-better-errors') + +parseJson('"foo"') +parseJson('garbage') // more useful error message +``` + +### Features + +* Like JSON.parse, but the errors are better. + +### Contributing + +The npm team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear. + +All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other. + +Please refer to the [Changelog](CHANGELOG.md) for project history details, too. + +Happy hacking! + +### API + +#### `> parse(txt, ?reviver, ?context=20)` + +Works just like `JSON.parse`, but will include a bit more information when an +error happens. diff --git a/deps/npm/node_modules/json-parse-better-errors/index.js b/deps/npm/node_modules/json-parse-better-errors/index.js new file mode 100644 index 00000000000000..14644c2f1a813e --- /dev/null +++ b/deps/npm/node_modules/json-parse-better-errors/index.js @@ -0,0 +1,38 @@ +'use strict' + +module.exports = parseJson +function parseJson (txt, reviver, context) { + context = context || 20 + try { + return JSON.parse(txt, reviver) + } catch (e) { + if (typeof txt !== 'string') { + const isEmptyArray = Array.isArray(txt) && txt.length === 0 + const errorMessage = 'Cannot parse ' + + (isEmptyArray ? 'an empty array' : String(txt)) + throw new TypeError(errorMessage) + } + const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i) + const errIdx = syntaxErr + ? +syntaxErr[1] + : e.message.match(/^Unexpected end of JSON.*/i) + ? txt.length - 1 + : null + if (errIdx != null) { + const start = errIdx <= context + ? 0 + : errIdx - context + const end = errIdx + context >= txt.length + ? txt.length + : errIdx + context + e.message += ` while parsing near '${ + start === 0 ? '' : '...' + }${txt.slice(start, end)}${ + end === txt.length ? '' : '...' + }'` + } else { + e.message += ` while parsing '${txt.slice(0, context * 2)}'` + } + throw e + } +} diff --git a/deps/npm/node_modules/json-parse-better-errors/package.json b/deps/npm/node_modules/json-parse-better-errors/package.json new file mode 100644 index 00000000000000..e63bf6b0bf2c59 --- /dev/null +++ b/deps/npm/node_modules/json-parse-better-errors/package.json @@ -0,0 +1,82 @@ +{ + "_args": [ + [ + "json-parse-better-errors@1.0.2", + "/Users/rebecca/code/npm" + ] + ], + "_from": "json-parse-better-errors@1.0.2", + "_id": "json-parse-better-errors@1.0.2", + "_inBundle": false, + "_integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "_location": "/json-parse-better-errors", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "json-parse-better-errors@1.0.2", + "name": "json-parse-better-errors", + "escapedName": "json-parse-better-errors", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/", + "/node-fetch-npm", + "/pkg-conf/parse-json", + "/read-package-json" + ], + "_resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/Users/rebecca/code/npm", + "author": { + "name": "Kat Marchán", + "email": "kzm@zkat.tech" + }, + "bugs": { + "url": "https://github.com/zkat/json-parse-better-errors/issues" + }, + "config": { + "nyc": { + "exclude": [ + "node_modules/**", + "test/**" + ] + } + }, + "description": "JSON.parse with context information on error", + "devDependencies": { + "nyc": "^10.3.2", + "standard": "^9.0.2", + "standard-version": "^4.1.0", + "tap": "^10.3.3", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.8" + }, + "files": [ + "*.js" + ], + "homepage": "https://github.com/zkat/json-parse-better-errors#readme", + "keywords": [ + "JSON", + "parser" + ], + "license": "MIT", + "main": "index.js", + "name": "json-parse-better-errors", + "repository": { + "type": "git", + "url": "git+https://github.com/zkat/json-parse-better-errors.git" + }, + "scripts": { + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --coverage test/*.js", + "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", + "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" + }, + "version": "1.0.2" +} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.eslintrc.yml b/deps/npm/node_modules/json-schema-traverse/.eslintrc.yml similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.eslintrc.yml rename to deps/npm/node_modules/json-schema-traverse/.eslintrc.yml diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.npmignore b/deps/npm/node_modules/json-schema-traverse/.npmignore similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.npmignore rename to deps/npm/node_modules/json-schema-traverse/.npmignore diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.travis.yml b/deps/npm/node_modules/json-schema-traverse/.travis.yml similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.travis.yml rename to deps/npm/node_modules/json-schema-traverse/.travis.yml diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/LICENSE b/deps/npm/node_modules/json-schema-traverse/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/LICENSE rename to deps/npm/node_modules/json-schema-traverse/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/README.md b/deps/npm/node_modules/json-schema-traverse/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/README.md rename to deps/npm/node_modules/json-schema-traverse/README.md diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/index.js b/deps/npm/node_modules/json-schema-traverse/index.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/index.js rename to deps/npm/node_modules/json-schema-traverse/index.js diff --git a/deps/npm/node_modules/json-schema-traverse/package.json b/deps/npm/node_modules/json-schema-traverse/package.json new file mode 100644 index 00000000000000..70b1256a3cfcad --- /dev/null +++ b/deps/npm/node_modules/json-schema-traverse/package.json @@ -0,0 +1,70 @@ +{ + "_from": "json-schema-traverse@^0.3.0", + "_id": "json-schema-traverse@0.3.1", + "_inBundle": false, + "_integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "_location": "/json-schema-traverse", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "json-schema-traverse@^0.3.0", + "name": "json-schema-traverse", + "escapedName": "json-schema-traverse", + "rawSpec": "^0.3.0", + "saveSpec": null, + "fetchSpec": "^0.3.0" + }, + "_requiredBy": [ + "/ajv" + ], + "_resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "_shasum": "349a6d44c53a51de89b40805c5d5e59b417d3340", + "_spec": "json-schema-traverse@^0.3.0", + "_where": "/Users/rebecca/code/npm/node_modules/ajv", + "author": { + "name": "Evgeny Poberezkin" + }, + "bugs": { + "url": "https://github.com/epoberezkin/json-schema-traverse/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Traverse JSON Schema passing each schema object to callback", + "devDependencies": { + "coveralls": "^2.13.1", + "eslint": "^3.19.0", + "mocha": "^3.4.2", + "nyc": "^11.0.2", + "pre-commit": "^1.2.2" + }, + "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme", + "keywords": [ + "JSON-Schema", + "traverse", + "iterate" + ], + "license": "MIT", + "main": "index.js", + "name": "json-schema-traverse", + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/json-schema-traverse.git" + }, + "scripts": { + "eslint": "eslint index.js spec", + "test": "npm run eslint && nyc npm run test-spec", + "test-spec": "mocha spec -R spec" + }, + "version": "0.3.1" +} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/.eslintrc.yml b/deps/npm/node_modules/json-schema-traverse/spec/.eslintrc.yml similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/.eslintrc.yml rename to deps/npm/node_modules/json-schema-traverse/spec/.eslintrc.yml diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/fixtures/schema.js b/deps/npm/node_modules/json-schema-traverse/spec/fixtures/schema.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/fixtures/schema.js rename to deps/npm/node_modules/json-schema-traverse/spec/fixtures/schema.js diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/index.spec.js b/deps/npm/node_modules/json-schema-traverse/spec/index.spec.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/index.spec.js rename to deps/npm/node_modules/json-schema-traverse/spec/index.spec.js diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md b/deps/npm/node_modules/json-schema/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md rename to deps/npm/node_modules/json-schema/README.md diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema b/deps/npm/node_modules/json-schema/draft-00/hyper-schema similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema rename to deps/npm/node_modules/json-schema/draft-00/hyper-schema diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref b/deps/npm/node_modules/json-schema/draft-00/json-ref similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref rename to deps/npm/node_modules/json-schema/draft-00/json-ref diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links b/deps/npm/node_modules/json-schema/draft-00/links similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links rename to deps/npm/node_modules/json-schema/draft-00/links diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema b/deps/npm/node_modules/json-schema/draft-00/schema similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema rename to deps/npm/node_modules/json-schema/draft-00/schema diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema b/deps/npm/node_modules/json-schema/draft-01/hyper-schema similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema rename to deps/npm/node_modules/json-schema/draft-01/hyper-schema diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref b/deps/npm/node_modules/json-schema/draft-01/json-ref similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref rename to deps/npm/node_modules/json-schema/draft-01/json-ref diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links b/deps/npm/node_modules/json-schema/draft-01/links similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links rename to deps/npm/node_modules/json-schema/draft-01/links diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema b/deps/npm/node_modules/json-schema/draft-01/schema similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema rename to deps/npm/node_modules/json-schema/draft-01/schema diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema b/deps/npm/node_modules/json-schema/draft-02/hyper-schema similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema rename to deps/npm/node_modules/json-schema/draft-02/hyper-schema diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref b/deps/npm/node_modules/json-schema/draft-02/json-ref similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref rename to deps/npm/node_modules/json-schema/draft-02/json-ref diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links b/deps/npm/node_modules/json-schema/draft-02/links similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links rename to deps/npm/node_modules/json-schema/draft-02/links diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema b/deps/npm/node_modules/json-schema/draft-02/schema similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema rename to deps/npm/node_modules/json-schema/draft-02/schema diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/address b/deps/npm/node_modules/json-schema/draft-03/examples/address similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/address rename to deps/npm/node_modules/json-schema/draft-03/examples/address diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar b/deps/npm/node_modules/json-schema/draft-03/examples/calendar similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar rename to deps/npm/node_modules/json-schema/draft-03/examples/calendar diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/card b/deps/npm/node_modules/json-schema/draft-03/examples/card similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/card rename to deps/npm/node_modules/json-schema/draft-03/examples/card diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/geo b/deps/npm/node_modules/json-schema/draft-03/examples/geo similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/geo rename to deps/npm/node_modules/json-schema/draft-03/examples/geo diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces b/deps/npm/node_modules/json-schema/draft-03/examples/interfaces similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces rename to deps/npm/node_modules/json-schema/draft-03/examples/interfaces diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/hyper-schema b/deps/npm/node_modules/json-schema/draft-03/hyper-schema similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/hyper-schema rename to deps/npm/node_modules/json-schema/draft-03/hyper-schema diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref b/deps/npm/node_modules/json-schema/draft-03/json-ref similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref rename to deps/npm/node_modules/json-schema/draft-03/json-ref diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links b/deps/npm/node_modules/json-schema/draft-03/links similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links rename to deps/npm/node_modules/json-schema/draft-03/links diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema b/deps/npm/node_modules/json-schema/draft-03/schema similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema rename to deps/npm/node_modules/json-schema/draft-03/schema diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/hyper-schema b/deps/npm/node_modules/json-schema/draft-04/hyper-schema similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/hyper-schema rename to deps/npm/node_modules/json-schema/draft-04/hyper-schema diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links b/deps/npm/node_modules/json-schema/draft-04/links similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links rename to deps/npm/node_modules/json-schema/draft-04/links diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema b/deps/npm/node_modules/json-schema/draft-04/schema similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema rename to deps/npm/node_modules/json-schema/draft-04/schema diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml b/deps/npm/node_modules/json-schema/draft-zyp-json-schema-03.xml similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml rename to deps/npm/node_modules/json-schema/draft-zyp-json-schema-03.xml diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml b/deps/npm/node_modules/json-schema/draft-zyp-json-schema-04.xml similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml rename to deps/npm/node_modules/json-schema/draft-zyp-json-schema-04.xml diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js b/deps/npm/node_modules/json-schema/lib/links.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js rename to deps/npm/node_modules/json-schema/lib/links.js diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js b/deps/npm/node_modules/json-schema/lib/validate.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js rename to deps/npm/node_modules/json-schema/lib/validate.js diff --git a/deps/npm/node_modules/json-schema/package.json b/deps/npm/node_modules/json-schema/package.json new file mode 100644 index 00000000000000..18e1c75089b904 --- /dev/null +++ b/deps/npm/node_modules/json-schema/package.json @@ -0,0 +1,71 @@ +{ + "_from": "json-schema@0.2.3", + "_id": "json-schema@0.2.3", + "_inBundle": false, + "_integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "_location": "/json-schema", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "json-schema@0.2.3", + "name": "json-schema", + "escapedName": "json-schema", + "rawSpec": "0.2.3", + "saveSpec": null, + "fetchSpec": "0.2.3" + }, + "_requiredBy": [ + "/jsprim" + ], + "_resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "_shasum": "b480c892e59a2f05954ce727bd3f2a4e882f9e13", + "_spec": "json-schema@0.2.3", + "_where": "/Users/rebecca/code/npm/node_modules/jsprim", + "author": { + "name": "Kris Zyp" + }, + "bugs": { + "url": "https://github.com/kriszyp/json-schema/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "JSON Schema validation and specifications", + "devDependencies": { + "vows": "*" + }, + "directories": { + "lib": "./lib" + }, + "homepage": "https://github.com/kriszyp/json-schema#readme", + "keywords": [ + "json", + "schema" + ], + "licenses": [ + { + "type": "AFLv2.1", + "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43" + }, + { + "type": "BSD", + "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13" + } + ], + "main": "./lib/validate.js", + "maintainers": [ + { + "name": "Kris Zyp", + "email": "kriszyp@gmail.com" + } + ], + "name": "json-schema", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/kriszyp/json-schema.git" + }, + "scripts": { + "test": "echo TESTS DISABLED vows --spec test/*.js" + }, + "version": "0.2.3" +} diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/test/tests.js b/deps/npm/node_modules/json-schema/test/tests.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/test/tests.js rename to deps/npm/node_modules/json-schema/test/tests.js diff --git a/deps/npm/node_modules/request/node_modules/json-stringify-safe/.npmignore b/deps/npm/node_modules/json-stringify-safe/.npmignore similarity index 100% rename from deps/npm/node_modules/request/node_modules/json-stringify-safe/.npmignore rename to deps/npm/node_modules/json-stringify-safe/.npmignore diff --git a/deps/npm/node_modules/json-stringify-safe/CHANGELOG.md b/deps/npm/node_modules/json-stringify-safe/CHANGELOG.md new file mode 100644 index 00000000000000..c5147d77f6c943 --- /dev/null +++ b/deps/npm/node_modules/json-stringify-safe/CHANGELOG.md @@ -0,0 +1,14 @@ +## Unreleased +- Fixes stringify to only take ancestors into account when checking + circularity. + It previously assumed every visited object was circular which led to [false + positives][issue9]. + Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago. +- Fixes calling the `replacer` function in the proper context (`thisArg`). +- Fixes calling the `cycleReplacer` function in the proper context (`thisArg`). +- Speeds serializing by a factor of + Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching + only the ancestors for a circular references speeds up things considerably. + +[must]: https://github.com/moll/js-must +[issue9]: https://github.com/isaacs/json-stringify-safe/issues/9 diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/LICENSE b/deps/npm/node_modules/json-stringify-safe/LICENSE similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/fstream/LICENSE rename to deps/npm/node_modules/json-stringify-safe/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/json-stringify-safe/Makefile b/deps/npm/node_modules/json-stringify-safe/Makefile similarity index 100% rename from deps/npm/node_modules/request/node_modules/json-stringify-safe/Makefile rename to deps/npm/node_modules/json-stringify-safe/Makefile diff --git a/deps/npm/node_modules/request/node_modules/json-stringify-safe/README.md b/deps/npm/node_modules/json-stringify-safe/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/json-stringify-safe/README.md rename to deps/npm/node_modules/json-stringify-safe/README.md diff --git a/deps/npm/node_modules/json-stringify-safe/package.json b/deps/npm/node_modules/json-stringify-safe/package.json new file mode 100644 index 00000000000000..cafc4c9a28e053 --- /dev/null +++ b/deps/npm/node_modules/json-stringify-safe/package.json @@ -0,0 +1,66 @@ +{ + "_from": "json-stringify-safe@~5.0.1", + "_id": "json-stringify-safe@5.0.1", + "_inBundle": false, + "_integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "_location": "/json-stringify-safe", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "json-stringify-safe@~5.0.1", + "name": "json-stringify-safe", + "escapedName": "json-stringify-safe", + "rawSpec": "~5.0.1", + "saveSpec": null, + "fetchSpec": "~5.0.1" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "_shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", + "_spec": "json-stringify-safe@~5.0.1", + "_where": "/Users/rebecca/code/npm/node_modules/request", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/json-stringify-safe/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Andri Möll", + "email": "andri@dot.ee", + "url": "http://themoll.com" + } + ], + "deprecated": false, + "description": "Like JSON.stringify, but doesn't blow up on circular refs.", + "devDependencies": { + "mocha": ">= 2.1.0 < 3", + "must": ">= 0.12 < 0.13", + "sinon": ">= 1.12.2 < 2" + }, + "homepage": "https://github.com/isaacs/json-stringify-safe", + "keywords": [ + "json", + "stringify", + "circular", + "safe" + ], + "license": "ISC", + "main": "stringify.js", + "name": "json-stringify-safe", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/json-stringify-safe.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "5.0.1" +} diff --git a/deps/npm/node_modules/request/node_modules/json-stringify-safe/stringify.js b/deps/npm/node_modules/json-stringify-safe/stringify.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/json-stringify-safe/stringify.js rename to deps/npm/node_modules/json-stringify-safe/stringify.js diff --git a/deps/npm/node_modules/request/node_modules/json-stringify-safe/test/mocha.opts b/deps/npm/node_modules/json-stringify-safe/test/mocha.opts similarity index 100% rename from deps/npm/node_modules/request/node_modules/json-stringify-safe/test/mocha.opts rename to deps/npm/node_modules/json-stringify-safe/test/mocha.opts diff --git a/deps/npm/node_modules/request/node_modules/json-stringify-safe/test/stringify_test.js b/deps/npm/node_modules/json-stringify-safe/test/stringify_test.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/json-stringify-safe/test/stringify_test.js rename to deps/npm/node_modules/json-stringify-safe/test/stringify_test.js diff --git a/deps/npm/node_modules/mississippi/.npmignore b/deps/npm/node_modules/jsonparse/.npmignore similarity index 100% rename from deps/npm/node_modules/mississippi/.npmignore rename to deps/npm/node_modules/jsonparse/.npmignore diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/LICENSE b/deps/npm/node_modules/jsonparse/LICENSE similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/LICENSE rename to deps/npm/node_modules/jsonparse/LICENSE diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/README.markdown b/deps/npm/node_modules/jsonparse/README.markdown similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/README.markdown rename to deps/npm/node_modules/jsonparse/README.markdown diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/bench.js b/deps/npm/node_modules/jsonparse/bench.js similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/bench.js rename to deps/npm/node_modules/jsonparse/bench.js diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js b/deps/npm/node_modules/jsonparse/examples/twitterfeed.js similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js rename to deps/npm/node_modules/jsonparse/examples/twitterfeed.js diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js b/deps/npm/node_modules/jsonparse/jsonparse.js similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js rename to deps/npm/node_modules/jsonparse/jsonparse.js diff --git a/deps/npm/node_modules/jsonparse/package.json b/deps/npm/node_modules/jsonparse/package.json new file mode 100644 index 00000000000000..b4136f11e6ebc2 --- /dev/null +++ b/deps/npm/node_modules/jsonparse/package.json @@ -0,0 +1,58 @@ +{ + "_from": "jsonparse@^1.2.0", + "_id": "jsonparse@1.3.1", + "_inBundle": false, + "_integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "_location": "/jsonparse", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "jsonparse@^1.2.0", + "name": "jsonparse", + "escapedName": "jsonparse", + "rawSpec": "^1.2.0", + "saveSpec": null, + "fetchSpec": "^1.2.0" + }, + "_requiredBy": [ + "/JSONStream" + ], + "_resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "_shasum": "3f4dae4a91fac315f71062f8521cc239f1366280", + "_spec": "jsonparse@^1.2.0", + "_where": "/Users/rebecca/code/npm/node_modules/JSONStream", + "author": { + "name": "Tim Caswell", + "email": "tim@creationix.com" + }, + "bugs": { + "url": "http://github.com/creationix/jsonparse/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "This is a pure-js JSON streaming parser for node.js", + "devDependencies": { + "tap": "~0.3.3", + "tape": "~0.1.1" + }, + "engines": [ + "node >= 0.2.0" + ], + "homepage": "https://github.com/creationix/jsonparse#readme", + "license": "MIT", + "main": "jsonparse.js", + "name": "jsonparse", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/creationix/jsonparse.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "tags": [ + "json", + "stream" + ], + "version": "1.3.1" +} diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json b/deps/npm/node_modules/jsonparse/samplejson/basic.json similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json rename to deps/npm/node_modules/jsonparse/samplejson/basic.json diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json b/deps/npm/node_modules/jsonparse/samplejson/basic2.json similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json rename to deps/npm/node_modules/jsonparse/samplejson/basic2.json diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/big-token.js b/deps/npm/node_modules/jsonparse/test/big-token.js similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/big-token.js rename to deps/npm/node_modules/jsonparse/test/big-token.js diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js b/deps/npm/node_modules/jsonparse/test/boundary.js similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js rename to deps/npm/node_modules/jsonparse/test/boundary.js diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/offset.js b/deps/npm/node_modules/jsonparse/test/offset.js similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/offset.js rename to deps/npm/node_modules/jsonparse/test/offset.js diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js b/deps/npm/node_modules/jsonparse/test/primitives.js similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js rename to deps/npm/node_modules/jsonparse/test/primitives.js diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/surrogate.js b/deps/npm/node_modules/jsonparse/test/surrogate.js similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/surrogate.js rename to deps/npm/node_modules/jsonparse/test/surrogate.js diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/unvalid.js b/deps/npm/node_modules/jsonparse/test/unvalid.js similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/unvalid.js rename to deps/npm/node_modules/jsonparse/test/unvalid.js diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js b/deps/npm/node_modules/jsonparse/test/utf8.js similarity index 100% rename from deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js rename to deps/npm/node_modules/jsonparse/test/utf8.js diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md b/deps/npm/node_modules/jsprim/CHANGES.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md rename to deps/npm/node_modules/jsprim/CHANGES.md diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CONTRIBUTING.md b/deps/npm/node_modules/jsprim/CONTRIBUTING.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CONTRIBUTING.md rename to deps/npm/node_modules/jsprim/CONTRIBUTING.md diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/LICENSE b/deps/npm/node_modules/jsprim/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/LICENSE rename to deps/npm/node_modules/jsprim/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md b/deps/npm/node_modules/jsprim/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md rename to deps/npm/node_modules/jsprim/README.md diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js b/deps/npm/node_modules/jsprim/lib/jsprim.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js rename to deps/npm/node_modules/jsprim/lib/jsprim.js diff --git a/deps/npm/node_modules/jsprim/package.json b/deps/npm/node_modules/jsprim/package.json new file mode 100644 index 00000000000000..d83416b2f510a5 --- /dev/null +++ b/deps/npm/node_modules/jsprim/package.json @@ -0,0 +1,49 @@ +{ + "_from": "jsprim@^1.2.2", + "_id": "jsprim@1.4.1", + "_inBundle": false, + "_integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "_location": "/jsprim", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "jsprim@^1.2.2", + "name": "jsprim", + "escapedName": "jsprim", + "rawSpec": "^1.2.2", + "saveSpec": null, + "fetchSpec": "^1.2.2" + }, + "_requiredBy": [ + "/http-signature" + ], + "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "_shasum": "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2", + "_spec": "jsprim@^1.2.2", + "_where": "/Users/rebecca/code/npm/node_modules/http-signature", + "bugs": { + "url": "https://github.com/joyent/node-jsprim/issues" + }, + "bundleDependencies": false, + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "deprecated": false, + "description": "utilities for primitive JavaScript types", + "engines": [ + "node >=0.6.0" + ], + "homepage": "https://github.com/joyent/node-jsprim#readme", + "license": "MIT", + "main": "./lib/jsprim.js", + "name": "jsprim", + "repository": { + "type": "git", + "url": "git://github.com/joyent/node-jsprim.git" + }, + "version": "1.4.1" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/latest-version/index.js b/deps/npm/node_modules/latest-version/index.js similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/latest-version/index.js rename to deps/npm/node_modules/latest-version/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/license b/deps/npm/node_modules/latest-version/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/license rename to deps/npm/node_modules/latest-version/license diff --git a/deps/npm/node_modules/latest-version/package.json b/deps/npm/node_modules/latest-version/package.json new file mode 100644 index 00000000000000..1f663b9867f5aa --- /dev/null +++ b/deps/npm/node_modules/latest-version/package.json @@ -0,0 +1,71 @@ +{ + "_from": "latest-version@^3.0.0", + "_id": "latest-version@3.1.0", + "_inBundle": false, + "_integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "_location": "/latest-version", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "latest-version@^3.0.0", + "name": "latest-version", + "escapedName": "latest-version", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "_shasum": "a205383fea322b33b5ae3b18abee0dc2f356ee15", + "_spec": "latest-version@^3.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/update-notifier", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/latest-version/issues" + }, + "bundleDependencies": false, + "dependencies": { + "package-json": "^4.0.0" + }, + "deprecated": false, + "description": "Get the latest version of an npm package", + "devDependencies": { + "ava": "*", + "semver-regex": "^1.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/latest-version#readme", + "keywords": [ + "latest", + "version", + "npm", + "pkg", + "package", + "package.json", + "current", + "module" + ], + "license": "MIT", + "name": "latest-version", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/latest-version.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.1.0" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/latest-version/readme.md b/deps/npm/node_modules/latest-version/readme.md similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/latest-version/readme.md rename to deps/npm/node_modules/latest-version/readme.md diff --git a/deps/npm/node_modules/lazy-property/package.json b/deps/npm/node_modules/lazy-property/package.json index f921ada2ec5d62..3c36554297e8dc 100644 --- a/deps/npm/node_modules/lazy-property/package.json +++ b/deps/npm/node_modules/lazy-property/package.json @@ -1,37 +1,39 @@ { - "_from": "lazy-property@~1.0.0", + "_args": [ + [ + "lazy-property@1.0.0", + "/Users/rebecca/code/npm" + ] + ], + "_from": "lazy-property@1.0.0", "_id": "lazy-property@1.0.0", + "_inBundle": false, "_integrity": "sha1-hN3Es3Bnm6i9TNz6TAa0PVcREUc=", "_location": "/lazy-property", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "lazy-property@~1.0.0", + "raw": "lazy-property@1.0.0", "name": "lazy-property", "escapedName": "lazy-property", - "rawSpec": "~1.0.0", + "rawSpec": "1.0.0", "saveSpec": null, - "fetchSpec": "~1.0.0" + "fetchSpec": "1.0.0" }, "_requiredBy": [ "/" ], "_resolved": "https://registry.npmjs.org/lazy-property/-/lazy-property-1.0.0.tgz", - "_shasum": "84ddc4b370679ba8bd4cdcfa4c06b43d57111147", - "_shrinkwrap": null, - "_spec": "lazy-property@~1.0.0", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "1.0.0", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Mikola Lysenko" }, - "bin": null, "bugs": { "url": "https://github.com/mikolalysenko/lazy-property/issues" }, - "bundleDependencies": false, "dependencies": {}, - "deprecated": false, "description": "Lazily initialized properties for objects", "devDependencies": { "tape": "^2.12.3" @@ -52,8 +54,6 @@ "license": "MIT", "main": "lazyProperty.js", "name": "lazy-property", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/mikolalysenko/lazy-property.git" diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/index.js b/deps/npm/node_modules/lcid/index.js similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/index.js rename to deps/npm/node_modules/lcid/index.js diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/lcid.json b/deps/npm/node_modules/lcid/lcid.json similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/lcid.json rename to deps/npm/node_modules/lcid/lcid.json diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/license b/deps/npm/node_modules/lcid/license similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/license rename to deps/npm/node_modules/lcid/license diff --git a/deps/npm/node_modules/lcid/package.json b/deps/npm/node_modules/lcid/package.json new file mode 100644 index 00000000000000..6ab09a0881309b --- /dev/null +++ b/deps/npm/node_modules/lcid/package.json @@ -0,0 +1,79 @@ +{ + "_from": "lcid@^1.0.0", + "_id": "lcid@1.0.0", + "_inBundle": false, + "_integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "_location": "/lcid", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "lcid@^1.0.0", + "name": "lcid", + "escapedName": "lcid", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/os-locale", + "/tacks/os-locale" + ], + "_resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "_shasum": "308accafa0bc483a3867b4b6f2b9506251d1b835", + "_spec": "lcid@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/os-locale", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/lcid/issues" + }, + "bundleDependencies": false, + "dependencies": { + "invert-kv": "^1.0.0" + }, + "deprecated": false, + "description": "Mapping between standard locale identifiers and Windows locale identifiers (LCID)", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "lcid.json" + ], + "homepage": "https://github.com/sindresorhus/lcid#readme", + "keywords": [ + "lcid", + "locale", + "string", + "str", + "id", + "identifier", + "windows", + "language", + "lang", + "map", + "mapping", + "convert", + "json", + "bcp47", + "ietf", + "tag" + ], + "license": "MIT", + "name": "lcid", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/lcid.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/readme.md b/deps/npm/node_modules/lcid/readme.md similarity index 100% rename from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/lcid/readme.md rename to deps/npm/node_modules/lcid/readme.md diff --git a/deps/npm/node_modules/libcipm/CHANGELOG.md b/deps/npm/node_modules/libcipm/CHANGELOG.md new file mode 100644 index 00000000000000..28a4189c4d6adf --- /dev/null +++ b/deps/npm/node_modules/libcipm/CHANGELOG.md @@ -0,0 +1,382 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [2.0.0](https://github.com/zkat/cipm/compare/v1.6.3...v2.0.0) (2018-05-24) + + +### meta + +* update node version support ([694b4d3](https://github.com/zkat/cipm/commit/694b4d3)) + + +### BREAKING CHANGES + +* node@4 is no longer supported + + + + +## [1.6.3](https://github.com/zkat/cipm/compare/v1.6.2...v1.6.3) (2018-05-24) + + + + +## [1.6.2](https://github.com/zkat/cipm/compare/v1.6.1...v1.6.2) (2018-04-08) + + +### Bug Fixes + +* **lifecycle:** detect binding.gyp for default install lifecycle ([#46](https://github.com/zkat/cipm/issues/46)) ([9149631](https://github.com/zkat/cipm/commit/9149631)), closes [#45](https://github.com/zkat/cipm/issues/45) + + + + +## [1.6.1](https://github.com/zkat/cipm/compare/v1.6.0...v1.6.1) (2018-03-13) + + +### Bug Fixes + +* **bin:** Set non-zero exit code on error ([#41](https://github.com/zkat/cipm/issues/41)) ([54d0106](https://github.com/zkat/cipm/commit/54d0106)) +* **lifecycle:** defer to lifecycle’s internal logic as to whether or not to execute a run-script ([#42](https://github.com/zkat/cipm/issues/42)) ([7f27a52](https://github.com/zkat/cipm/commit/7f27a52)), closes [npm/npm#19258](https://github.com/npm/npm/issues/19258) +* **prefix:** don't reference prefix before computing it ([#40](https://github.com/zkat/cipm/issues/40)) ([08ed1cc](https://github.com/zkat/cipm/commit/08ed1cc)) +* **prefix:** Resolve to promise when passing --prefix to npm ci ([#43](https://github.com/zkat/cipm/issues/43)) ([401d466](https://github.com/zkat/cipm/commit/401d466)) + + + + +# [1.6.0](https://github.com/zkat/cipm/compare/v1.5.1...v1.6.0) (2018-03-01) + + +### Bug Fixes + +* **bin:** cli.js was being excluded ([d62668e](https://github.com/zkat/cipm/commit/d62668e)) + + +### Features + +* **libcipm:** working standalone cipm release! ([a3383fd](https://github.com/zkat/cipm/commit/a3383fd)) + + + + +## [1.5.1](https://github.com/zkat/cipm/compare/v1.5.0...v1.5.1) (2018-03-01) + + +### Bug Fixes + +* **_from:** do not add _from to directory deps ([7405360](https://github.com/zkat/cipm/commit/7405360)) + + + + +# [1.5.0](https://github.com/zkat/cipm/compare/v1.4.1...v1.5.0) (2018-03-01) + + +### Bug Fixes + +* **errors:** handle aggregate errors better ([6239499](https://github.com/zkat/cipm/commit/6239499)) + + +### Features + +* **logger:** rudimentary progress bar update ([c5d9dc7](https://github.com/zkat/cipm/commit/c5d9dc7)) + + + + +## [1.4.1](https://github.com/zkat/cipm/compare/v1.4.0...v1.4.1) (2018-02-27) + + +### Bug Fixes + +* **buildTree:** linking in parallel causes hoist-clobbering ([5ffbc0e](https://github.com/zkat/cipm/commit/5ffbc0e)), closes [#39](https://github.com/zkat/cipm/issues/39) +* **buildTree:** use checkDepEnv here too ([41a4634](https://github.com/zkat/cipm/commit/41a4634)) +* **perf:** split up updateJson and buildTree ([df5aba0](https://github.com/zkat/cipm/commit/df5aba0)) +* **perf:** stop using the readPackageJson version to update packages ([8da3d5a](https://github.com/zkat/cipm/commit/8da3d5a)) + + + + +# [1.4.0](https://github.com/zkat/cipm/compare/v1.3.3...v1.4.0) (2018-02-21) + + +### Features + +* **extract:** add support for --only and --also ([ad143ae](https://github.com/zkat/cipm/commit/ad143ae)) + + + + +## [1.3.3](https://github.com/zkat/cipm/compare/v1.3.2...v1.3.3) (2018-02-21) + + +### Bug Fixes + +* **extract:** stop extracting deps before parent :\ ([c6847dc](https://github.com/zkat/cipm/commit/c6847dc)) + + + + +## [1.3.2](https://github.com/zkat/cipm/compare/v1.3.1...v1.3.2) (2018-02-15) + + + + +## [1.3.1](https://github.com/zkat/cipm/compare/v1.3.0...v1.3.1) (2018-02-15) + + + + +# [1.3.0](https://github.com/zkat/cipm/compare/v1.2.0...v1.3.0) (2018-02-13) + + +### Features + +* **extract:** link directory deps and install missing bundle deps ([8334e9e](https://github.com/zkat/cipm/commit/8334e9e)) + + + + +# [1.2.0](https://github.com/zkat/cipm/compare/v1.1.2...v1.2.0) (2018-02-07) + + +### Features + +* **metadata:** add _resolved, _integrity, and _from on install ([36642dc](https://github.com/zkat/cipm/commit/36642dc)) + + + + +## [1.1.2](https://github.com/zkat/cipm/compare/v1.1.1...v1.1.2) (2018-01-19) + + + + +## [1.1.1](https://github.com/zkat/cipm/compare/v1.1.0...v1.1.1) (2018-01-19) + + + + +# [1.1.0](https://github.com/zkat/cipm/compare/v1.0.1...v1.1.0) (2018-01-07) + + +### Features + +* **log:** add some helpful log output ([f443f03](https://github.com/zkat/cipm/commit/f443f03)) + + + + +## [1.0.1](https://github.com/zkat/cipm/compare/v1.0.0...v1.0.1) (2018-01-07) + + +### Bug Fixes + +* **deps:** added protoduck to pkgjson ([ecbe719](https://github.com/zkat/cipm/commit/ecbe719)) + + + + +# [1.0.0](https://github.com/zkat/cipm/compare/v0.9.1...v1.0.0) (2018-01-07) + + +### Features + +* **cli:** splitting off CLI into a separate tool ([cff65c1](https://github.com/zkat/cipm/commit/cff65c1)) + + +### BREAKING CHANGES + +* **cli:** libcipm is its own library now, + + + + +## [0.9.1](https://github.com/zkat/cipm/compare/v0.9.0...v0.9.1) (2018-01-07) + + +### Bug Fixes + +* **prefix:** oops @ prefix ([cc5adac](https://github.com/zkat/cipm/commit/cc5adac)) + + + + +# [0.9.0](https://github.com/zkat/cipm/compare/v0.8.0...v0.9.0) (2018-01-07) + + +### Bug Fixes + +* **package:** add pacote to bundleDependencies ([#36](https://github.com/zkat/cipm/issues/36)) ([a69742e](https://github.com/zkat/cipm/commit/a69742e)) + + +### Features + +* **config:** allow injection of npm configs ([#35](https://github.com/zkat/cipm/issues/35)) ([1f5694b](https://github.com/zkat/cipm/commit/1f5694b)) + + + + +# [0.8.0](https://github.com/zkat/cipm/compare/v0.7.2...v0.8.0) (2017-11-28) + + +### Features + +* **gyp:** new npm-lifecycle[@2](https://github.com/2) with included node-gyp ([a4ed938](https://github.com/zkat/cipm/commit/a4ed938)) + + + + +## [0.7.2](https://github.com/zkat/cipm/compare/v0.7.1...v0.7.2) (2017-10-13) + + +### Bug Fixes + +* **extract:** idk why this was breaking. Seriously. ([433a2be](https://github.com/zkat/cipm/commit/433a2be)) +* **tree:** pass through a custom Promise to logiTree ([2d29efb](https://github.com/zkat/cipm/commit/2d29efb)) + + +### Performance Improvements + +* zoomzoom. Even more concurrency! ([db9c2e0](https://github.com/zkat/cipm/commit/db9c2e0)) + + + + +## [0.7.1](https://github.com/zkat/cipm/compare/v0.7.0...v0.7.1) (2017-10-13) + + +### Bug Fixes + +* **scripts:** separate extract and build and fix ordering ([eb072a5](https://github.com/zkat/cipm/commit/eb072a5)) + + + + +# [0.7.0](https://github.com/zkat/cipm/compare/v0.6.0...v0.7.0) (2017-10-12) + + +### Bug Fixes + +* **lockfile:** npm-shrinkwrap takes precedence over package-lock (#28) ([3b98fb3](https://github.com/zkat/cipm/commit/3b98fb3)) + + +### Features + +* **optional:** ignore failed optional deps (#27) ([a654629](https://github.com/zkat/cipm/commit/a654629)) + + + + +# [0.6.0](https://github.com/zkat/cipm/compare/v0.5.1...v0.6.0) (2017-10-09) + + +### Features + +* **scripts:** run prepare and prepublish scripts in the root (#26) ([e0e35a3](https://github.com/zkat/cipm/commit/e0e35a3)) + + + + +## [0.5.1](https://github.com/zkat/cipm/compare/v0.5.0...v0.5.1) (2017-10-09) + + + + +# [0.5.0](https://github.com/zkat/cipm/compare/v0.4.0...v0.5.0) (2017-10-09) + + +### Bug Fixes + +* **output:** npm does not punctuate this ([e7ba976](https://github.com/zkat/cipm/commit/e7ba976)) +* **shutdown:** make sure workers close ([7ab57d0](https://github.com/zkat/cipm/commit/7ab57d0)) + + +### Features + +* **bin:** link bins and run scripts (#25) ([fab74bf](https://github.com/zkat/cipm/commit/fab74bf)) +* **lifecycle:** run scripts in dep order (#23) ([68ecfac](https://github.com/zkat/cipm/commit/68ecfac)) + + + + +# [0.4.0](https://github.com/zkat/cipm/compare/v0.3.2...v0.4.0) (2017-10-04) + + +### Features + +* **opts:** support full range of relevant CLI opts (#19) ([6f2bd51](https://github.com/zkat/cipm/commit/6f2bd51)) + + + + +## [0.3.2](https://github.com/zkat/cipm/compare/v0.3.1...v0.3.2) (2017-09-06) + + +### Bug Fixes + +* **bin:** make cli executable by default (#13) ([14a9a5f](https://github.com/zkat/cipm/commit/14a9a5f)) +* **config:** use npm.cmd on win32 and fix tests (#12) ([d912d16](https://github.com/zkat/cipm/commit/d912d16)), closes [#12](https://github.com/zkat/cipm/issues/12) +* **json:** strip BOM when reading JSON files (#8) ([2529149](https://github.com/zkat/cipm/commit/2529149)) + + + + +## [0.3.1](https://github.com/zkat/cipm/compare/v0.3.0...v0.3.1) (2017-09-05) + + + + +# [0.3.0](https://github.com/zkat/cipm/compare/v0.2.0...v0.3.0) (2017-09-05) + + +### Features + +* **lockfile:** verify that lockfile matches package.json (#5) ([f631203](https://github.com/zkat/cipm/commit/f631203)) +* **scripts:** support --ignore-scripts option (#9) ([213ca02](https://github.com/zkat/cipm/commit/213ca02)) + + + + +# [0.2.0](https://github.com/zkat/cipm/compare/v0.1.1...v0.2.0) (2017-09-01) + + +### Bug Fixes + +* **main:** default --prefix ([ff06a31](https://github.com/zkat/cipm/commit/ff06a31)) + + +### Features + +* **lifecycle:** actually run lifecycle scripts correctly ([7f8933e](https://github.com/zkat/cipm/commit/7f8933e)) + + + + +## [0.1.1](https://github.com/zkat/cipm/compare/v0.1.0...v0.1.1) (2017-08-30) + + +### Bug Fixes + +* **files:** oops. forgot to include new files in tarball ([1ee85c9](https://github.com/zkat/cipm/commit/1ee85c9)) + + + + +# 0.1.0 (2017-08-30) + + +### Bug Fixes + +* **config:** pipe stdout ([08e6af8](https://github.com/zkat/cipm/commit/08e6af8)) +* **extract:** make sure to extract properly ([9643583](https://github.com/zkat/cipm/commit/9643583)) +* **license:** switch to MIT ([0d10d0d](https://github.com/zkat/cipm/commit/0d10d0d)) + + +### Features + +* **impl:** rough prototype ([2970e43](https://github.com/zkat/cipm/commit/2970e43)) +* **lifecycle:** Run lifecycle events, implement prefix option, add unit tests (#1) ([d6629be](https://github.com/zkat/cipm/commit/d6629be)), closes [#1](https://github.com/zkat/cipm/issues/1) +* **opts:** add usage string and --help ([efcc48d](https://github.com/zkat/cipm/commit/efcc48d)) diff --git a/deps/npm/node_modules/libcipm/LICENSE.md b/deps/npm/node_modules/libcipm/LICENSE.md new file mode 100644 index 00000000000000..409d7d5a9c911c --- /dev/null +++ b/deps/npm/node_modules/libcipm/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2017 Kat Marchán and Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/libcipm/README.md b/deps/npm/node_modules/libcipm/README.md new file mode 100644 index 00000000000000..00f9b81619bdbb --- /dev/null +++ b/deps/npm/node_modules/libcipm/README.md @@ -0,0 +1,37 @@ +[![npm](https://img.shields.io/npm/v/libcipm.svg)](https://npm.im/libcipm) [![license](https://img.shields.io/npm/l/libcipm.svg)](https://npm.im/libcipm) [![Travis](https://img.shields.io/travis/zkat/cipm.svg)](https://travis-ci.org/zkat/cipm) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/cipm?svg=true)](https://ci.appveyor.com/project/zkat/cipm) [![Coverage Status](https://coveralls.io/repos/github/zkat/cipm/badge.svg?branch=latest)](https://coveralls.io/github/zkat/cipm?branch=latest) + +[`libcipm`](https://github.com/zkat/cipm) installs npm projects in a way that's +optimized for continuous integration/deployment/etc scenarios. It gives up +the ability to build its own trees or install packages individually, as well +as other user-oriented features, in exchange for speed, and being more strict +about project state. + +For documentation about the associated command-line tool, see +[`cipm`](https://npm.im/cipm). + +## Install + +`$ npm install libcipm` + +## Table of Contents + +* [Features](#features) +* [Contributing](#contributing) +* [API](#api) + +### Features + +* npm-compatible project installation +* lifecycle script support +* blazing fast +* npm-compatible caching +* errors if `package.json` and `package-lock.json` are out of sync, instead of fixing it like npm does. Essentially provides a `--frozen` install. + +### Contributing + +The libcipm team enthusiastically welcomes contributions and project +participation! There's a bunch of things you can do if you want to contribute! +The [Contributor Guide](CONTRIBUTING.md) has all the information you need for +everything from reporting bugs to contributing entire new features. Please don't +hesitate to jump in if you'd like to, or even ask us questions if something +isn't clear. diff --git a/deps/npm/node_modules/libcipm/index.js b/deps/npm/node_modules/libcipm/index.js new file mode 100644 index 00000000000000..9061ec4b18f023 --- /dev/null +++ b/deps/npm/node_modules/libcipm/index.js @@ -0,0 +1,402 @@ +'use strict' + +const BB = require('bluebird') + +const binLink = require('bin-links') +const buildLogicalTree = require('npm-logical-tree') +const extract = require('./lib/extract.js') +const fs = require('graceful-fs') +const getPrefix = require('find-npm-prefix') +const lifecycle = require('npm-lifecycle') +const lockVerify = require('lock-verify') +const mkdirp = BB.promisify(require('mkdirp')) +const npa = require('npm-package-arg') +const path = require('path') +const readPkgJson = BB.promisify(require('read-package-json')) +const rimraf = BB.promisify(require('rimraf')) + +const readFileAsync = BB.promisify(fs.readFile) +const statAsync = BB.promisify(fs.stat) +const symlinkAsync = BB.promisify(fs.symlink) +const writeFileAsync = BB.promisify(fs.writeFile) + +class Installer { + constructor (opts) { + this.opts = opts + this.config = opts.config + + // Stats + this.startTime = Date.now() + this.runTime = 0 + this.timings = { scripts: 0 } + this.pkgCount = 0 + + // Misc + this.log = this.opts.log || require('./lib/silentlog.js') + this.pkg = null + this.tree = null + this.failedDeps = new Set() + } + + timedStage (name) { + const start = Date.now() + return BB.resolve(this[name].apply(this, [].slice.call(arguments, 1))) + .tap(() => { + this.timings[name] = Date.now() - start + this.log.info(name, `Done in ${this.timings[name] / 1000}s`) + }) + } + + run () { + return this.timedStage('prepare') + .then(() => this.timedStage('extractTree', this.tree)) + .then(() => this.timedStage('updateJson', this.tree)) + .then(pkgJsons => this.timedStage('buildTree', this.tree, pkgJsons)) + .then(() => this.timedStage('garbageCollect', this.tree)) + .then(() => this.timedStage('runScript', 'prepublish', this.pkg, this.prefix)) + .then(() => this.timedStage('runScript', 'prepare', this.pkg, this.prefix)) + .then(() => this.timedStage('teardown')) + .then(() => { + this.runTime = Date.now() - this.startTime + this.log.info( + 'run-scripts', + `total script time: ${this.timings.scripts / 1000}s` + ) + this.log.info( + 'run-time', + `total run time: ${this.runTime / 1000}s` + ) + }) + .catch(err => { + this.timedStage('teardown') + if (err.message.match(/aggregate error/)) { + throw err[0] + } else { + throw err + } + }) + .then(() => this) + } + + prepare () { + this.log.info('prepare', 'initializing installer') + this.log.level = this.config.get('loglevel') + this.log.verbose('prepare', 'starting workers') + extract.startWorkers() + + return ( + this.config.get('prefix') && this.config.get('global') + ? BB.resolve(this.config.get('prefix')) + // There's some Special™ logic around the `--prefix` config when it + // comes from a config file or env vs when it comes from the CLI + : process.argv.some(arg => arg.match(/^\s*--prefix\s*/i)) + ? BB.resolve(this.config.get('prefix')) + : getPrefix(process.cwd()) + ) + .then(prefix => { + this.prefix = prefix + this.log.verbose('prepare', 'installation prefix: ' + prefix) + return BB.join( + readJson(prefix, 'package.json'), + readJson(prefix, 'package-lock.json', true), + readJson(prefix, 'npm-shrinkwrap.json', true), + (pkg, lock, shrink) => { + if (shrink) { + this.log.verbose('prepare', 'using npm-shrinkwrap.json') + } else if (lock) { + this.log.verbose('prepare', 'using package-lock.json') + } + pkg._shrinkwrap = shrink || lock + this.pkg = pkg + } + ) + }) + .then(() => statAsync( + path.join(this.prefix, 'node_modules') + ).catch(err => { if (err.code !== 'ENOENT') { throw err } })) + .then(stat => { + stat && this.log.warn( + 'prepare', 'removing existing node_modules/ before installation' + ) + return BB.join( + this.checkLock(), + stat && rimraf(path.join(this.prefix, 'node_modules')) + ) + }).then(() => { + // This needs to happen -after- we've done checkLock() + this.tree = buildLogicalTree(this.pkg, this.pkg._shrinkwrap) + this.log.silly('tree', this.tree) + this.expectedTotal = 0 + this.tree.forEach((dep, next) => { + this.expectedTotal++ + next() + }) + }) + } + + teardown () { + this.log.verbose('teardown', 'shutting down workers.') + return extract.stopWorkers() + } + + checkLock () { + this.log.verbose('checkLock', 'verifying package-lock data') + const pkg = this.pkg + const prefix = this.prefix + if (!pkg._shrinkwrap || !pkg._shrinkwrap.lockfileVersion) { + return BB.reject( + new Error(`cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.`) + ) + } + return lockVerify(prefix).then(result => { + if (result.status) { + result.warnings.forEach(w => this.log.warn('lockfile', w)) + } else { + throw new Error( + 'cipm can only install packages when your package.json and package-lock.json or ' + + 'npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` ' + + 'before continuing.\n\n' + + result.warnings.map(w => 'Warning: ' + w).join('\n') + '\n' + + result.errors.join('\n') + '\n' + ) + } + }).catch(err => { + throw err + }) + } + + extractTree (tree) { + this.log.verbose('extractTree', 'extracting dependencies to node_modules/') + const cg = this.log.newItem('extractTree', this.expectedTotal) + return tree.forEachAsync((dep, next) => { + if (!this.checkDepEnv(dep)) { return } + const depPath = dep.path(this.prefix) + const spec = npa.resolve(dep.name, dep.version, this.prefix) + if (dep.isRoot) { + return next() + } else if (spec.type === 'directory') { + const relative = path.relative(path.dirname(depPath), spec.fetchSpec) + this.log.silly('extractTree', `${dep.name}@${spec.fetchSpec} -> ${depPath} (symlink)`) + return mkdirp(path.dirname(depPath)) + .then(() => symlinkAsync(relative, depPath, 'junction')) + .catch( + () => rimraf(depPath) + .then(() => symlinkAsync(relative, depPath, 'junction')) + ).then(() => next()) + .then(() => { + this.pkgCount++ + cg.completeWork(1) + }) + } else { + this.log.silly('extractTree', `${dep.name}@${dep.version} -> ${depPath}`) + return ( + dep.bundled + ? statAsync(path.join(depPath, 'package.json')).catch(err => { + if (err.code !== 'ENOENT') { throw err } + }) + : BB.resolve(false) + ) + .then(wasBundled => { + // Don't extract if a bundled dep is actually present + if (wasBundled) { + cg.completeWork(1) + return next() + } else { + return BB.resolve(extract.child( + dep.name, dep, depPath, this.config, this.opts + )) + .then(() => cg.completeWork(1)) + .then(() => { this.pkgCount++ }) + .then(next) + } + }) + } + }, {concurrency: 50, Promise: BB}) + .then(() => cg.finish()) + } + + checkDepEnv (dep) { + const includeDev = ( + // Covers --dev and --development (from npm config itself) + this.config.get('dev') || + ( + !/^prod(uction)?$/.test(this.config.get('only')) && + !this.config.get('production') + ) || + /^dev(elopment)?$/.test(this.config.get('only')) || + /^dev(elopment)?$/.test(this.config.get('also')) + ) + const includeProd = !/^dev(elopment)?$/.test(this.config.get('only')) + return (dep.dev && includeDev) || (!dep.dev && includeProd) + } + + updateJson (tree) { + this.log.verbose('updateJson', 'updating json deps to include _from') + const pkgJsons = new Map() + return tree.forEachAsync((dep, next) => { + if (!this.checkDepEnv(dep)) { return } + const spec = npa.resolve(dep.name, dep.version) + const depPath = dep.path(this.prefix) + return next() + .then(() => readJson(depPath, 'package.json')) + .then(pkg => (spec.registry || spec.type === 'directory') + ? pkg + : this.updateFromField(dep, pkg).then(() => pkg) + ) + .then(pkg => (pkg.scripts && pkg.scripts.install) + ? pkg + : this.updateInstallScript(dep, pkg).then(() => pkg) + ) + .tap(pkg => { pkgJsons.set(dep, pkg) }) + }, {concurrency: 100, Promise: BB}) + .then(() => pkgJsons) + } + + buildTree (tree, pkgJsons) { + this.log.verbose('buildTree', 'finalizing tree and running scripts') + return tree.forEachAsync((dep, next) => { + if (!this.checkDepEnv(dep)) { return } + const spec = npa.resolve(dep.name, dep.version) + const depPath = dep.path(this.prefix) + const pkg = pkgJsons.get(dep) + this.log.silly('buildTree', `linking ${spec}`) + return this.runScript('preinstall', pkg, depPath) + .then(next) // build children between preinstall and binLink + // Don't link root bins + .then(() => { + if ( + dep.isRoot || + !(pkg.bin || pkg.man || (pkg.directories && pkg.directories.bin)) + ) { + // We skip the relatively expensive readPkgJson if there's no way + // we'll actually be linking any bins or mans + return + } + return readPkgJson(path.join(depPath, 'package.json')) + .then(pkg => binLink(pkg, depPath, false, { + force: this.config.get('force'), + ignoreScripts: this.config.get('ignore-scripts'), + log: Object.assign({}, this.log, { info: () => {} }), + name: pkg.name, + pkgId: pkg.name + '@' + pkg.version, + prefix: this.prefix, + prefixes: [this.prefix], + umask: this.config.get('umask') + }), e => { + this.log.verbose('buildTree', `error linking ${spec}: ${e.message} ${e.stack}`) + }) + }) + .then(() => this.runScript('install', pkg, depPath)) + .then(() => this.runScript('postinstall', pkg, depPath)) + .then(() => this) + .catch(e => { + if (dep.optional) { + this.failedDeps.add(dep) + } else { + throw e + } + }) + }, {concurrency: 1, Promise: BB}) + } + + updateFromField (dep, pkg) { + const depPath = dep.path(this.prefix) + const depPkgPath = path.join(depPath, 'package.json') + const parent = dep.requiredBy.values().next().value + return readJson(parent.path(this.prefix), 'package.json') + .then(ppkg => + (ppkg.dependencies && ppkg.dependencies[dep.name]) || + (ppkg.devDependencies && ppkg.devDependencies[dep.name]) || + (ppkg.optionalDependencies && ppkg.optionalDependencies[dep.name]) + ) + .then(from => npa.resolve(dep.name, from)) + .then(from => { pkg._from = from.toString() }) + .then(() => writeFileAsync(depPkgPath, JSON.stringify(pkg, null, 2))) + .then(pkg) + } + + updateInstallScript (dep, pkg) { + const depPath = dep.path(this.prefix) + return statAsync(path.join(depPath, 'binding.gyp')) + .catch(err => { if (err.code !== 'ENOENT') { throw err } }) + .then(stat => { + if (stat) { + if (!pkg.scripts) { + pkg.scripts = {} + } + pkg.scripts.install = 'node-gyp rebuild' + } + }) + .then(pkg) + } + + // A cute little mark-and-sweep collector! + garbageCollect (tree) { + if (!this.failedDeps.size) { return } + return sweep( + tree, + this.prefix, + mark(tree, this.failedDeps) + ) + .then(purged => { + this.purgedDeps = purged + this.pkgCount -= purged.size + }) + } + + runScript (stage, pkg, pkgPath) { + const start = Date.now() + if (!this.config.get('ignore-scripts')) { + // TODO(mikesherov): remove pkg._id when npm-lifecycle no longer relies on it + pkg._id = pkg.name + '@' + pkg.version + const opts = this.config.toLifecycle() + return BB.resolve(lifecycle(pkg, stage, pkgPath, opts)) + .tap(() => { this.timings.scripts += Date.now() - start }) + } + return BB.resolve() + } +} +module.exports = Installer +module.exports.CipmConfig = require('./lib/config/npm-config.js').CipmConfig + +function mark (tree, failed) { + const liveDeps = new Set() + tree.forEach((dep, next) => { + if (!failed.has(dep)) { + liveDeps.add(dep) + next() + } + }) + return liveDeps +} + +function sweep (tree, prefix, liveDeps) { + const purged = new Set() + return tree.forEachAsync((dep, next) => { + return next().then(() => { + if ( + !dep.isRoot && // never purge root! 🙈 + !liveDeps.has(dep) && + !purged.has(dep) + ) { + purged.add(dep) + return rimraf(dep.path(prefix)) + } + }) + }, {concurrency: 50, Promise: BB}).then(() => purged) +} + +function stripBOM (str) { + return str.replace(/^\uFEFF/, '') +} + +module.exports._readJson = readJson +function readJson (jsonPath, name, ignoreMissing) { + return readFileAsync(path.join(jsonPath, name), 'utf8') + .then(str => JSON.parse(stripBOM(str))) + .catch({code: 'ENOENT'}, err => { + if (!ignoreMissing) { + throw err + } + }) +} diff --git a/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js b/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js new file mode 100644 index 00000000000000..7d574597798e19 --- /dev/null +++ b/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js @@ -0,0 +1,29 @@ +'use strict' + +const log = require('npmlog') + +module.exports = lifecycleOpts +function lifecycleOpts (opts) { + const objConfig = {} + for (const key of opts.keys()) { + const val = opts.get(key) + if (val != null) { + objConfig[key] = val + } + } + return { + config: objConfig, + scriptShell: opts.get('script-shell'), + force: opts.get('force'), + user: opts.get('user'), + group: opts.get('group'), + ignoreScripts: opts.get('ignore-scripts'), + ignorePrepublish: opts.get('ignore-prepublish'), + scriptsPrependNodePath: opts.get('scripts-prepend-node-path'), + unsafePerm: opts.get('unsafe-perm'), + log, + dir: opts.get('prefix'), + failOk: false, + production: opts.get('production') + } +} diff --git a/deps/npm/node_modules/libcipm/lib/config/npm-config.js b/deps/npm/node_modules/libcipm/lib/config/npm-config.js new file mode 100644 index 00000000000000..76b4054eef3c41 --- /dev/null +++ b/deps/npm/node_modules/libcipm/lib/config/npm-config.js @@ -0,0 +1,72 @@ +'use strict' + +const BB = require('bluebird') +const lifecycleOpts = require('./lifecycle-opts.js') +const pacoteOpts = require('./pacote-opts.js') +const protoduck = require('protoduck') +const spawn = require('child_process').spawn + +class NpmConfig extends Map {} + +const CipmConfig = protoduck.define({ + get: [], + set: [], + toPacote: [], + toLifecycle: [] +}, { + name: 'CipmConfig' +}) +module.exports.CipmConfig = CipmConfig + +CipmConfig.impl(NpmConfig, { + get: Map.prototype.get, + set: Map.prototype.set, + toPacote (opts) { + return pacoteOpts(this, opts) + }, + toLifecycle () { + return lifecycleOpts(this) + } +}) + +module.exports.fromObject = fromObj +function fromObj (obj) { + const map = new NpmConfig() + Object.keys(obj).forEach(k => map.set(k, obj[k])) + return map +} + +module.exports.fromNpm = getNpmConfig +function getNpmConfig (argv) { + return new BB((resolve, reject) => { + const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm' + const child = spawn(npmBin, [ + 'config', 'ls', '--json', '-l' + // We add argv here to get npm to parse those options for us :D + ].concat(argv || []), { + env: process.env, + cwd: process.cwd(), + stdio: [0, 'pipe', 2] + }) + + let stdout = '' + if (child.stdout) { + child.stdout.on('data', (chunk) => { + stdout += chunk + }) + } + + child.on('error', reject) + child.on('close', (code) => { + if (code === 127) { + reject(new Error('`npm` command not found. Please ensure you have npm@5.4.0 or later installed.')) + } else { + try { + resolve(fromObj(JSON.parse(stdout))) + } catch (e) { + reject(new Error('`npm config ls --json` failed to output json. Please ensure you have npm@5.4.0 or later installed.')) + } + } + }) + }) +} diff --git a/deps/npm/node_modules/libcipm/lib/config/pacote-opts.js b/deps/npm/node_modules/libcipm/lib/config/pacote-opts.js new file mode 100644 index 00000000000000..234ed1352a353c --- /dev/null +++ b/deps/npm/node_modules/libcipm/lib/config/pacote-opts.js @@ -0,0 +1,135 @@ +'use strict' + +const Buffer = require('safe-buffer').Buffer + +const crypto = require('crypto') +const path = require('path') + +let effectiveOwner + +const npmSession = crypto.randomBytes(8).toString('hex') + +module.exports = pacoteOpts +function pacoteOpts (npmOpts, moreOpts) { + const ownerStats = calculateOwner() + const opts = { + cache: path.join(npmOpts.get('cache'), '_cacache'), + ca: npmOpts.get('ca'), + cert: npmOpts.get('cert'), + git: npmOpts.get('git'), + key: npmOpts.get('key'), + localAddress: npmOpts.get('local-address'), + loglevel: npmOpts.get('loglevel'), + maxSockets: +(npmOpts.get('maxsockets') || 15), + npmSession: npmSession, + offline: npmOpts.get('offline'), + projectScope: moreOpts.rootPkg && getProjectScope(moreOpts.rootPkg.name), + proxy: npmOpts.get('https-proxy') || npmOpts.get('proxy'), + refer: 'cipm', + registry: npmOpts.get('registry'), + retry: { + retries: npmOpts.get('fetch-retries'), + factor: npmOpts.get('fetch-retry-factor'), + minTimeout: npmOpts.get('fetch-retry-mintimeout'), + maxTimeout: npmOpts.get('fetch-retry-maxtimeout') + }, + strictSSL: npmOpts.get('strict-ssl'), + userAgent: npmOpts.get('user-agent'), + + dmode: parseInt('0777', 8) & (~npmOpts.get('umask')), + fmode: parseInt('0666', 8) & (~npmOpts.get('umask')), + umask: npmOpts.get('umask') + } + + if (ownerStats.uid != null || ownerStats.gid != null) { + Object.assign(opts, ownerStats) + } + + (npmOpts.forEach ? Array.from(npmOpts.keys()) : npmOpts.keys).forEach(k => { + const authMatchGlobal = k.match( + /^(_authToken|username|_password|password|email|always-auth|_auth)$/ + ) + const authMatchScoped = k[0] === '/' && k.match( + /(.*):(_authToken|username|_password|password|email|always-auth|_auth)$/ + ) + + // if it matches scoped it will also match global + if (authMatchGlobal || authMatchScoped) { + let nerfDart = null + let key = null + let val = null + + if (!opts.auth) { opts.auth = {} } + + if (authMatchScoped) { + nerfDart = authMatchScoped[1] + key = authMatchScoped[2] + val = npmOpts.get(k) + if (!opts.auth[nerfDart]) { + opts.auth[nerfDart] = { + alwaysAuth: !!npmOpts.get('always-auth') + } + } + } else { + key = authMatchGlobal[1] + val = npmOpts.get(k) + opts.auth.alwaysAuth = !!npmOpts.get('always-auth') + } + + const auth = authMatchScoped ? opts.auth[nerfDart] : opts.auth + if (key === '_authToken') { + auth.token = val + } else if (key.match(/password$/i)) { + auth.password = + // the config file stores password auth already-encoded. pacote expects + // the actual username/password pair. + Buffer.from(val, 'base64').toString('utf8') + } else if (key === 'always-auth') { + auth.alwaysAuth = val === 'false' ? false : !!val + } else { + auth[key] = val + } + } + + if (k[0] === '@') { + if (!opts.scopeTargets) { opts.scopeTargets = {} } + opts.scopeTargets[k.replace(/:registry$/, '')] = npmOpts.get(k) + } + }) + + Object.keys(moreOpts || {}).forEach((k) => { + opts[k] = moreOpts[k] + }) + + return opts +} + +function calculateOwner () { + if (!effectiveOwner) { + effectiveOwner = { uid: 0, gid: 0 } + + // Pretty much only on windows + if (!process.getuid) { + return effectiveOwner + } + + effectiveOwner.uid = +process.getuid() + effectiveOwner.gid = +process.getgid() + + if (effectiveOwner.uid === 0) { + if (process.env.SUDO_UID) effectiveOwner.uid = +process.env.SUDO_UID + if (process.env.SUDO_GID) effectiveOwner.gid = +process.env.SUDO_GID + } + } + + return effectiveOwner +} + +function getProjectScope (pkgName) { + const sep = pkgName.indexOf('/') + if (sep === -1) { + return '' + } else { + return pkgName.slice(0, sep) + } +} diff --git a/deps/npm/node_modules/libcipm/lib/extract.js b/deps/npm/node_modules/libcipm/lib/extract.js new file mode 100644 index 00000000000000..1967308112deea --- /dev/null +++ b/deps/npm/node_modules/libcipm/lib/extract.js @@ -0,0 +1,53 @@ +'use strict' + +const BB = require('bluebird') + +const npa = require('npm-package-arg') +const workerFarm = require('worker-farm') + +const extractionWorker = require('./worker.js') +const WORKER_PATH = require.resolve('./worker.js') + +module.exports = { + startWorkers () { + this._workers = workerFarm({ + maxConcurrentCallsPerWorker: 20, + maxRetries: 1 + }, WORKER_PATH) + }, + + stopWorkers () { + workerFarm.end(this._workers) + }, + + child (name, child, childPath, config, opts) { + const spec = npa.resolve(name, child.version) + const childOpts = config.toPacote(Object.assign({ + integrity: child.integrity, + resolved: child.resolved + }, { + dirPacker: opts.dirPacker + })) + const args = [spec, childPath, childOpts] + return BB.fromNode((cb) => { + let launcher = extractionWorker + let msg = args + const spec = typeof args[0] === 'string' ? npa(args[0]) : args[0] + childOpts.loglevel = opts.log.level + if (spec.registry || spec.type === 'remote') { + // We can't serialize these options + childOpts.config = null + childOpts.log = null + childOpts.dirPacker = null + // workers will run things in parallel! + launcher = this._workers + try { + msg = JSON.stringify(msg) + } catch (e) { + return cb(e) + } + } + launcher(msg, cb) + }) + } +} diff --git a/deps/npm/node_modules/libcipm/lib/silentlog.js b/deps/npm/node_modules/libcipm/lib/silentlog.js new file mode 100644 index 00000000000000..4c9d6c57e8b7d3 --- /dev/null +++ b/deps/npm/node_modules/libcipm/lib/silentlog.js @@ -0,0 +1,13 @@ +'use strict' + +const noop = Function.prototype +module.exports = { + error: noop, + warn: noop, + info: noop, + verbose: noop, + silly: noop, + http: noop, + pause: noop, + resume: noop +} diff --git a/deps/npm/node_modules/libcipm/lib/worker.js b/deps/npm/node_modules/libcipm/lib/worker.js new file mode 100644 index 00000000000000..ac61b06236b633 --- /dev/null +++ b/deps/npm/node_modules/libcipm/lib/worker.js @@ -0,0 +1,16 @@ +'use strict' + +const BB = require('bluebird') + +const log = require('npmlog') +const pacote = require('pacote') + +module.exports = (args, cb) => { + const parsed = typeof args === 'string' ? JSON.parse(args) : args + const spec = parsed[0] + const extractTo = parsed[1] + const opts = parsed[2] + opts.log = log + log.level = opts.loglevel + return BB.resolve(pacote.extract(spec, extractTo, opts)).nodeify(cb) +} diff --git a/deps/npm/node_modules/libcipm/package.json b/deps/npm/node_modules/libcipm/package.json new file mode 100644 index 00000000000000..53a40741fc2f8e --- /dev/null +++ b/deps/npm/node_modules/libcipm/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + "libcipm@2.0.0", + "/Users/rebecca/code/npm" + ] + ], + "_from": "libcipm@2.0.0", + "_id": "libcipm@2.0.0", + "_inBundle": false, + "_integrity": "sha512-yTWR7Ch7Mg891KZj+1yhcWhztO6tuAcBLdmCvBXv2pbCzV5/DOEDjDQdZmmYn5mFwI96kOSu+OIMRTmLsxrNZw==", + "_location": "/libcipm", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "libcipm@2.0.0", + "name": "libcipm", + "escapedName": "libcipm", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/Users/rebecca/code/npm", + "author": { + "name": "Kat Marchán", + "email": "kzm@sykosomatic.org" + }, + "bugs": { + "url": "https://github.com/zkat/cipm/issues" + }, + "config": { + "nyc": { + "exclude": [ + "node_modules/**", + "test/**" + ] + } + }, + "dependencies": { + "bin-links": "^1.1.2", + "bluebird": "^3.5.1", + "find-npm-prefix": "^1.0.2", + "graceful-fs": "^4.1.11", + "lock-verify": "^2.0.2", + "npm-lifecycle": "^2.0.3", + "npm-logical-tree": "^1.2.1", + "npm-package-arg": "^6.1.0", + "pacote": "^8.1.6", + "protoduck": "^5.0.0", + "read-package-json": "^2.0.13", + "rimraf": "^2.6.2", + "worker-farm": "^1.6.0" + }, + "description": "programmatic API for cipm: a ci-oriented package installer for npm", + "devDependencies": { + "mkdirp": "^0.5.1", + "npmlog": "^4.1.2", + "nyc": "^11.8.0", + "require-inject": "^1.4.3", + "standard": "^11.0.1", + "standard-version": "^4.4.0", + "tacks": "^1.2.6", + "tap": "^12.0.1", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.8" + }, + "files": [ + "*.js", + "lib" + ], + "homepage": "https://github.com/zkat/cipm#readme", + "keywords": [ + "npm", + "package manager", + "caching", + "downloader" + ], + "license": "MIT", + "main": "index.js", + "name": "libcipm", + "repository": { + "type": "git", + "url": "git+https://github.com/zkat/cipm.git" + }, + "scripts": { + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --nyc-arg=--all --coverage test/specs", + "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", + "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" + }, + "version": "2.0.0" +} diff --git a/deps/npm/node_modules/libnpmhook/CHANGELOG.md b/deps/npm/node_modules/libnpmhook/CHANGELOG.md new file mode 100644 index 00000000000000..6fe3e05b5e84e2 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/CHANGELOG.md @@ -0,0 +1,66 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [4.0.1](https://github.com/npm/libnpmhook/compare/v4.0.0...v4.0.1) (2018-04-09) + + + + +# [4.0.0](https://github.com/npm/libnpmhook/compare/v3.0.1...v4.0.0) (2018-04-08) + + +### meta + +* drop support for node 4 and 7 ([f2a301e](https://github.com/npm/libnpmhook/commit/f2a301e)) + + +### BREAKING CHANGES + +* node@4 and node@7 are no longer supported + + + + +## [3.0.1](https://github.com/npm/libnpmhook/compare/v3.0.0...v3.0.1) (2018-04-08) + + + + +# [3.0.0](https://github.com/npm/libnpmhook/compare/v2.0.1...v3.0.0) (2018-04-04) + + +### add + +* guess type based on name ([9418224](https://github.com/npm/libnpmhook/commit/9418224)) + + +### BREAKING CHANGES + +* hook type is now based on name prefix + + + + +## [2.0.1](https://github.com/npm/libnpmhook/compare/v2.0.0...v2.0.1) (2018-03-16) + + +### Bug Fixes + +* **urls:** was hitting the wrong URL endpoints ([10171a9](https://github.com/npm/libnpmhook/commit/10171a9)) + + + + +# [2.0.0](https://github.com/npm/libnpmhook/compare/v1.0.0...v2.0.0) (2018-03-16) + + + + +# 1.0.0 (2018-03-16) + + +### Features + +* **api:** baseline working api ([122658e](https://github.com/npm/npm-hooks/commit/122658e)) diff --git a/deps/npm/node_modules/pacote/node_modules/npm-pick-manifest/LICENSE.md b/deps/npm/node_modules/libnpmhook/LICENSE.md similarity index 100% rename from deps/npm/node_modules/pacote/node_modules/npm-pick-manifest/LICENSE.md rename to deps/npm/node_modules/libnpmhook/LICENSE.md diff --git a/deps/npm/node_modules/libnpmhook/README.md b/deps/npm/node_modules/libnpmhook/README.md new file mode 100644 index 00000000000000..0e2f018f2a038f --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/README.md @@ -0,0 +1,23 @@ +# libnpmhook [![npm version](https://img.shields.io/npm/v/libnpmhook.svg)](https://npm.im/libnpmhook) [![license](https://img.shields.io/npm/l/libnpmhook.svg)](https://npm.im/libnpmhook) [![Travis](https://img.shields.io/travis/npm/libnpmhook.svg)](https://travis-ci.org/npm/libnpmhook) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/libnpmhook?svg=true)](https://ci.appveyor.com/project/npm/libnpmhook) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmhook/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmhook?branch=latest) + +[`libnpmhook`](https://github.com/npm/libnpmhook) is a Node.js library for +programmatically managing the npm registry's server-side hooks. + +## Install + +`$ npm install libnpmhook` + +## Table of Contents + +* [Example](#example) +* [Features](#features) +* [API](#api) + +### Example + +```javascript +``` + +### Features + +### API diff --git a/deps/npm/node_modules/libnpmhook/config.js b/deps/npm/node_modules/libnpmhook/config.js new file mode 100644 index 00000000000000..864e1ede6af6a0 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/config.js @@ -0,0 +1,13 @@ +'use strict' + +const pudding = require('figgy-pudding') + +const NpmHooksConfig = pudding() + +module.exports = config +function config (opts) { + return NpmHooksConfig.apply( + null, + [opts, opts.config].concat([].slice.call(arguments, 1)) + ) +} diff --git a/deps/npm/node_modules/libnpmhook/index.js b/deps/npm/node_modules/libnpmhook/index.js new file mode 100644 index 00000000000000..b59ff842e2545e --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/index.js @@ -0,0 +1,41 @@ +'use strict' + +const config = require('./config') +const fetch = require('npm-registry-fetch') + +module.exports = { + add (name, endpoint, secret, opts) { + let type = 'package' + if (name && name.match(/^@[^/]+$/)) { + type = 'scope' + } + if (name && name[0] === '~') { + type = 'owner' + name = name.substr(1) + } + + opts = config({ + method: 'POST', + body: { type, name, endpoint, secret } + }, opts) + return fetch.json('/-/npm/v1/hooks/hook', opts) + }, + + rm (id, opts) { + return fetch.json(`/-/npm/v1/hooks/hook/${encodeURIComponent(id)}`, config({ + method: 'DELETE' + }, opts)) + }, + + ls (pkg, opts) { + return fetch.json('/-/npm/v1/hooks', config({query: pkg && {package: pkg}}, opts)) + .then(json => json.objects) + }, + + update (id, endpoint, secret, opts) { + return fetch.json(`/-/npm/v1/hooks/hook/${encodeURIComponent(id)}`, config({ + method: 'PUT', + body: {endpoint, secret} + }, opts)) + } +} diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/CHANGELOG.md b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/CHANGELOG.md new file mode 100644 index 00000000000000..8f9366551fb975 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/CHANGELOG.md @@ -0,0 +1,104 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [3.1.1](https://github.com/npm/registry-fetch/compare/v3.1.0...v3.1.1) (2018-04-09) + + + + +# [3.1.0](https://github.com/npm/registry-fetch/compare/v3.0.0...v3.1.0) (2018-04-09) + + +### Features + +* **config:** support no-proxy and https-proxy options ([9aa906b](https://github.com/npm/registry-fetch/commit/9aa906b)) + + + + +# [3.0.0](https://github.com/npm/registry-fetch/compare/v2.1.0...v3.0.0) (2018-04-09) + + +### Bug Fixes + +* **api:** pacote integration-related fixes ([a29de4f](https://github.com/npm/registry-fetch/commit/a29de4f)) +* **config:** stop caring about opts.config ([5856a6f](https://github.com/npm/registry-fetch/commit/5856a6f)) + + +### BREAKING CHANGES + +* **config:** opts.config is no longer supported. Pass the options down in opts itself. + + + + +# [2.1.0](https://github.com/npm/registry-fetch/compare/v2.0.0...v2.1.0) (2018-04-08) + + +### Features + +* **token:** accept opts.token for opts._authToken ([108c9f0](https://github.com/npm/registry-fetch/commit/108c9f0)) + + + + +# [2.0.0](https://github.com/npm/registry-fetch/compare/v1.1.1...v2.0.0) (2018-04-08) + + +### meta + +* drop support for node@4 ([758536e](https://github.com/npm/registry-fetch/commit/758536e)) + + +### BREAKING CHANGES + +* node@4 is no longer supported + + + + +## [1.1.1](https://github.com/npm/registry-fetch/compare/v1.1.0...v1.1.1) (2018-04-06) + + + + +# [1.1.0](https://github.com/npm/registry-fetch/compare/v1.0.1...v1.1.0) (2018-03-16) + + +### Features + +* **specs:** can use opts.spec to trigger pickManifest ([85c4ac9](https://github.com/npm/registry-fetch/commit/85c4ac9)) + + + + +## [1.0.1](https://github.com/npm/registry-fetch/compare/v1.0.0...v1.0.1) (2018-03-16) + + +### Bug Fixes + +* **query:** oops console.log ([870e4f5](https://github.com/npm/registry-fetch/commit/870e4f5)) + + + + +# 1.0.0 (2018-03-16) + + +### Bug Fixes + +* **auth:** get auth working with all the little details ([84b94ba](https://github.com/npm/registry-fetch/commit/84b94ba)) +* **deps:** add bluebird as an actual dep ([1286e31](https://github.com/npm/registry-fetch/commit/1286e31)) +* **errors:** Unknown auth errors use default code ([#1](https://github.com/npm/registry-fetch/issues/1)) ([3d91b93](https://github.com/npm/registry-fetch/commit/3d91b93)) +* **standard:** remove args from invocation ([9620a0a](https://github.com/npm/registry-fetch/commit/9620a0a)) + + +### Features + +* **api:** baseline kinda-working API impl ([bf91f9f](https://github.com/npm/registry-fetch/commit/bf91f9f)) +* **body:** automatic handling of different opts.body values ([f3b97db](https://github.com/npm/registry-fetch/commit/f3b97db)) +* **config:** nicer input config input handling ([b9ce21d](https://github.com/npm/registry-fetch/commit/b9ce21d)) +* **opts:** use figgy-pudding for opts handling ([0abd527](https://github.com/npm/registry-fetch/commit/0abd527)) +* **query:** add query utility support ([65ea8b1](https://github.com/npm/registry-fetch/commit/65ea8b1)) diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/LICENSE.md b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/LICENSE.md new file mode 100644 index 00000000000000..8d28acf866d932 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/LICENSE.md @@ -0,0 +1,16 @@ +ISC License + +Copyright (c) npm, Inc. + +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 COPYRIGHT HOLDER DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +COPYRIGHT HOLDER 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/libnpmhook/node_modules/npm-registry-fetch/README.md b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/README.md new file mode 100644 index 00000000000000..3d55eef6de85b8 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/README.md @@ -0,0 +1,549 @@ +# npm-registry-fetch [![npm version](https://img.shields.io/npm/v/npm-registry-fetch.svg)](https://npm.im/npm-registry-fetch) [![license](https://img.shields.io/npm/l/npm-registry-fetch.svg)](https://npm.im/npm-registry-fetch) [![Travis](https://img.shields.io/travis/npm/npm-registry-fetch/latest.svg)](https://travis-ci.org/npm/npm-registry-fetch) [![AppVeyor](https://img.shields.io/appveyor/ci/zkat/npm-registry-fetch/latest.svg)](https://ci.appveyor.com/project/npm/npm-registry-fetch) [![Coverage Status](https://coveralls.io/repos/github/npm/npm-registry-fetch/badge.svg?branch=latest)](https://coveralls.io/github/npm/npm-registry-fetch?branch=latest) + +[`npm-registry-fetch`](https://github.com/npm/npm-registry-fetch) is a Node.js +library that implements a `fetch`-like API for accessing npm registry APIs +consistently. It's able to consume npm-style configuration values and has all +the necessary logic for picking registries, handling scopes, and dealing with +authentication details built-in. + +This package is meant to replace the older +[`npm-registry-client`](https://npm.im/npm-registry-client). + +## Example + +```javascript +const npmFetch = require('npm-registry-fetch') + +console.log( + await npmFetch.json('/-/ping') +) +``` + +## Table of Contents + +* [Installing](#install) +* [Example](#example) +* [Contributing](#contributing) +* [API](#api) + * [`fetch`](#fetch) + * [`fetch.json`](#fetch-json) + * [`fetch` options](#fetch-opts) + +### Install + +`$ npm install npm-registry-fetch` + +### Contributing + +The npm team enthusiastically welcomes contributions and project participation! +There's a bunch of things you can do if you want to contribute! The [Contributor +Guide](CONTRIBUTING.md) has all the information you need for everything from +reporting bugs to contributing entire new features. Please don't hesitate to +jump in if you'd like to, or even ask us questions if something isn't clear. + +All participants and maintainers in this project are expected to follow [Code of +Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other. + +Please refer to the [Changelog](CHANGELOG.md) for project history details, too. + +Happy hacking! + +### API + +#### `> fetch(url, [opts]) -> Promise` + +Performs a request to a given URL. + +The URL can be either a full URL, or a path to one. The appropriate registry +will be automatically picked if only a URL path is given. + +For available options, please see the section on [`fetch` options](#fetch-opts). + +##### Example + +```javascript +const res = await fetch('/-/ping') +console.log(res.headers) +res.on('data', d => console.log(d.toString('utf8'))) +``` + +#### `> fetch.json(url, [opts]) -> Promise` + +Performs a request to a given registry URL, parses the body of the response as +JSON, and returns it as its final value. This is a utility shorthand for +`fetch(url).then(res => res.json())`. + +For available options, please see the section on [`fetch` options](#fetch-opts). + +##### Example + +```javascript +const res = await fetch.json('/-/ping') +console.log(res) // Body parsed as JSON +``` + +#### `fetch` Options + +Fetch options are optional, and can be passed in as either a Map-like object +(one with a `.get()` method), a plain javascript object, or a +[`figgy-pudding`](https://npm.im/figgy-pudding) instance. + +##### `opts.agent` + +* Type: http.Agent +* Default: an appropriate agent based on URL protocol and proxy settings + +An [`Agent`](https://nodejs.org/api/http.html#http_class_http_agent) instance to +be shared across requests. This allows multiple concurrent `fetch` requests to +happen on the same socket. + +You do _not_ need to provide this option unless you want something particularly +specialized, since proxy configurations and http/https agents are already +automatically managed internally when this option is not passed through. + +##### `opts.body` + +* Type: Buffer | Stream | Object +* Default: null + +Request body to send through the outgoing request. Buffers and Streams will be +passed through as-is, with a default `content-type` of +`application/octet-stream`. Plain JavaScript objects will be `JSON.stringify`ed +and the `content-type` will default to `application/json`. + +Use [`opts.headers`](#opts-headers) to set the content-type to something else. + +##### `opts.ca` + +* Type: String, Array, or null +* Default: null + +The Certificate Authority signing certificate that is trusted for SSL +connections to the registry. Values should be in PEM format (Windows calls it +"Base-64 encoded X.509 (.CER)") with newlines replaced by the string `'\n'`. For +example: + +``` +{ + ca: '-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----' +} +``` + +Set to `null` to only allow "known" registrars, or to a specific CA cert +to trust only that specific signing authority. + +Multiple CAs can be trusted by specifying an array of certificates instead of a +single string. + +See also [`opts.strict-ssl`](#opts-strict-ssl), [`opts.ca`](#opts-ca) and +[`opts.key`](#opts-key) + +##### `opts.cache` + +* Type: path +* Default: null + +The location of the http cache directory. If provided, certain cachable requests +will be cached according to [IETF RFC 7234](https://tools.ietf.org/html/rfc7234) +rules. This will speed up future requests, as well as make the cached data +available offline if necessary/requested. + +See also [`offline`](#opts-offline), [`prefer-offline`](#opts-prefer-offline), +and [`prefer-online`](#opts-prefer-online). + +##### `opts.cert` + +* Type: String +* Default: null + +A client certificate to pass when accessing the registry. Values should be in +PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines +replaced by the string `'\n'`. For example: + +``` +{ + cert: '-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----' +} +``` + +It is _not_ the path to a certificate file (and there is no "certfile" option). + +See also: [`opts.ca`](#opts-ca) and [`opts.key`](#opts-key) + +##### `opts.fetch-retries` + +* Type: Number +* Default: 2 + +The "retries" config for [`retry`](https://npm.im/retry) to use when fetching +packages from the registry. + +See also [`opts.retry`](#opts-retry) to provide all retry options as a single +object. + +##### `opts.fetch-retry-factor` + +* Type: Number +* Default: 10 + +The "factor" config for [`retry`](https://npm.im/retry) to use when fetching +packages. + +See also [`opts.retry`](#opts-retry) to provide all retry options as a single +object. + +##### `opts.fetch-retry-mintimeout` + +* Type: Number +* Default: 10000 (10 seconds) + +The "minTimeout" config for [`retry`](https://npm.im/retry) to use when fetching +packages. + +See also [`opts.retry`](#opts-retry) to provide all retry options as a single +object. + +##### `opts.fetch-retry-maxtimeout` + +* Type: Number +* Default: 60000 (1 minute) + +The "maxTimeout" config for [`retry`](https://npm.im/retry) to use when fetching +packages. + +See also [`opts.retry`](#opts-retry) to provide all retry options as a single +object. + +##### `opts.headers` + +* Type: Object +* Default: null + +Additional headers for the outgoing request. This option can also be used to +override headers automatically generated by `npm-registry-fetch`, such as +`Content-Type`. + +##### `opts.integrity` + +* Type: String | [SRI object](https://npm.im/ssri) +* Default: null + +If provided, the response body's will be verified against this integrity string, +using [`ssri`](https://npm.im/ssri). If verification succeeds, the response will +complete as normal. If verification fails, the response body will error with an +`EINTEGRITY` error. + +Body integrity is only verified if the body is actually consumed to completion -- +that is, if you use `res.json()`/`res.buffer()`, or if you consume the default +`res` stream data to its end. + +Cached data will have its integrity automatically verified using the +previously-generated integrity hash for the saved request information, so +`EINTEGRITY` errors can happen if [`opts.cache`](#opts-cache) is used, even if +`opts.integrity` is not passed in. + +##### `opts.is-from-ci` + +* Alias: `opts.isFromCI` +* Type: Boolean +* Default: Based on environment variables + +This is used to populate the `npm-in-ci` request header sent to the registry. + +##### `opts.key` + +* Type: String +* Default: null + +A client key to pass when accessing the registry. Values should be in PEM +format with newlines replaced by the string `'\n'`. For example: + +``` +{ + key: '-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----' +} +``` + +It is _not_ the path to a key file (and there is no "keyfile" option). + +See also: [`opts.ca`](#opts-ca) and [`opts.cert`](#opts-cert) + +##### `opts.local-address` + +* Type: IP Address String +* Default: null + +The IP address of the local interface to use when making connections +to the registry. + +See also [`opts.proxy`](#opts-proxy) + +##### `opts.log` + +* Type: [`npmlog`](https://npm.im/npmlog)-like +* Default: null + +Logger object to use for logging operation details. Must have the same methods +as `npmlog`. + +##### `opts.maxsockets` + +* Alias: `opts.max-sockets` +* Type: Integer +* Default: 12 + +Maximum number of sockets to keep open during requests. Has no effect if +[`opts.agent`](#opts-agent) is used. + +##### `opts.method` + +* Type: String +* Default: 'GET' + +HTTP method to use for the outgoing request. Case-insensitive. + +##### `opts.noproxy` + +* Type: Boolean +* Default: process.env.NOPROXY + +If true, proxying will be disabled even if [`opts.proxy`](#opts-proxy) is used. + +##### `opts.npm-session` + +* Alias: `opts.npmSession` +* Type: String +* Default: null + +If provided, will be sent in the `npm-session` header. This header is used by +the npm registry to identify individual user sessions (usually individual +invocations of the CLI). + +##### `opts.offline` + +* Type: Boolean +* Default: false + +Force offline mode: no network requests will be done during install. To allow +`npm-registry-fetch` to fill in missing cache data, see +[`opts.prefer-offline`](#opts-prefer-offline). + +This option is only really useful if you're also using +[`opts.cache`](#opts-cache). + +##### `opts.otp` + +* Type: Number | String +* Default: null + +This is a one-time password from a two-factor authenticator. It is required for +certain registry interactions when two-factor auth is enabled for a user +account. + +##### `opts.password` + +* Alias: _password +* Type: String +* Default: null + +Password used for basic authentication. For the more modern authentication +method, please use the (more secure) [`opts.token`](#opts-token) + +Can optionally be scoped to a registry by using a "nerf dart" for that registry. +That is: + +``` +{ + '//registry.npmjs.org/:password': 't0k3nH34r' +} +``` + +See also [`opts.username`](#opts-username) + +##### `opts.prefer-offline` + +* Type: Boolean +* Default: false + +If true, staleness checks for cached data will be bypassed, but missing data +will be requested from the server. To force full offline mode, use +[`opts.offline`](#opts-offline). + +This option is generally only useful if you're also using +[`opts.cache`](#opts-cache). + +##### `opts.prefer-online` + +* Type: Boolean +* Default: false + +If true, staleness checks for cached data will be forced, making the CLI look +for updates immediately even for fresh package data. + +This option is generally only useful if you're also using +[`opts.cache`](#opts-cache). + + +##### `opts.project-scope` + +* Alias: `opts.projectScope` +* Type: String +* Default: null + +If provided, will be sent in the `npm-scope` header. This header is used by the +npm registry to identify the toplevel package scope that a particular project +installation is using. + +##### `opts.proxy` + +* Type: url +* Default: null + +A proxy to use for outgoing http requests. If not passed in, the `HTTP(S)_PROXY` +environment variable will be used. + +##### `opts.query` + +* Type: String | Object +* Default: null + +If provided, the request URI will have a query string appended to it using this +query. If `opts.query` is an object, it will be converted to a query string +using +[`querystring.stringify()`](https://nodejs.org/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options). + +If the request URI already has a query string, it will be merged with +`opts.query`, preferring `opts.query` values. + +##### `opts.refer` + +* Alias: `opts.referer` +* Type: String +* Default: null + +Value to use for the `Referer` header. The npm CLI itself uses this to serialize +the npm command line using the given request. + +##### `opts.registry` + +* Type: URL +* Default: `'https://registry.npmjs.org'` + +Registry configuration for a request. If a request URL only includes the URL +path, this registry setting will be prepended. This configuration is also used +to determine authentication details, so even if the request URL references a +completely different host, `opts.registry` will be used to find the auth details +for that request. + +See also [`opts.scope`](#opts-scope), [`opts.spec`](#opts-spec), and +[`opts.:registry`](#opts-scope-registry) which can all affect the actual +registry URL used by the outgoing request. + +##### `opts.retry` + +* Type: Object +* Default: null + +Single-object configuration for request retry settings. If passed in, will +override individually-passed `fetch-retry-*` settings. + +##### `opts.scope` + +* Type: String +* Default: null + +Associate an operation with a scope for a scoped registry. This option can force +lookup of scope-specific registries and authentication. + +See also [`opts.:registry`](#opts-scope-registry) and +[`opts.spec`](#opts-spec) for interactions with this option. + +##### `opts.:registry` + +* Type: String +* Default: null + +This option type can be used to configure the registry used for requests +involving a particular scope. For example, `opts['@myscope:registry'] = +'https://scope-specific.registry/'` will make it so requests go out to this +registry instead of [`opts.registry`](#opts-registry) when +[`opts.scope`](#opts-scope) is used, or when [`opts.spec`](#opts-spec) is a +scoped package spec. + +The `@` before the scope name is optional, but recommended. + +##### `opts.spec` + +* Type: String | [`npm-registry-arg`](https://npm.im/npm-registry-arg) object. +* Default: null + +If provided, can be used to automatically configure [`opts.scope`](#opts-scope) +based on a specific package name. Non-registry package specs will throw an +error. + +##### `opts.strict-ssl` + +* Type: Boolean +* Default: true + +Whether or not to do SSL key validation when making requests to the +registry via https. + +See also [`opts.ca`](#opts-ca). + +##### `opts.timeout` + +* Type: Milliseconds +* Default: 30000 (30 seconds) + +Time before a hanging request times out. + +##### `opts.token` + +* Alias: `opts._authToken` +* Type: String +* Default: null + +Authentication token string. + +Can be scoped to a registry by using a "nerf dart" for that registry. That is: + +``` +{ + '//registry.npmjs.org/:token': 't0k3nH34r' +} +``` + +##### `opts.user-agent` + +* Type: String +* Default: `'npm-registry-fetch@/node@+ ()'` + +User agent string to send in the `User-Agent` header. + +##### `opts.username` + +* Type: String +* Default: null + +Username used for basic authentication. For the more modern authentication +method, please use the (more secure) [`opts.token`](#opts-token) + +Can optionally be scoped to a registry by using a "nerf dart" for that registry. +That is: + +``` +{ + '//registry.npmjs.org/:username': 't0k3nH34r' +} +``` + +See also [`opts.password`](#opts-password) + +##### `opts._auth` + +* Type: String +* Default: null + +** DEPRECATED ** This is a legacy authentication token supported only for +*compatibility. Please use [`opts.token`](#opts-token) instead. diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/auth.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/auth.js new file mode 100644 index 00000000000000..9532341db14000 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/auth.js @@ -0,0 +1,48 @@ +'use strict' + +const config = require('./config.js') +const url = require('url') + +module.exports = getAuth +function getAuth (registry, opts) { + if (!registry) { throw new Error('registry is required') } + opts = config(opts) + let AUTH = {} + const regKey = registry && registryKey(registry) + const doKey = (key, alias) => addKey(opts, AUTH, regKey, key, alias) + doKey('token') + doKey('_authToken', 'token') + doKey('username') + doKey('password') + doKey('_password', 'password') + doKey('email') + doKey('_auth') + doKey('otp') + doKey('always-auth', 'alwaysAuth') + if (AUTH.password) { + AUTH.password = Buffer.from(AUTH.password, 'base64').toString('utf8') + } + AUTH.alwaysAuth = AUTH.alwaysAuth === 'false' ? false : !!AUTH.alwaysAuth + return AUTH +} + +function addKey (opts, obj, scope, key, objKey) { + if (opts.get(key)) { + obj[objKey || key] = opts.get(key) + } + if (scope && opts.get(`${scope}:${key}`)) { + obj[objKey || key] = opts.get(`${scope}:${key}`) + } +} + +// Called a nerf dart in the main codebase. Used as a "safe" +// key when fetching registry info from config. +function registryKey (registry) { + const parsed = url.parse(registry) + const formatted = url.format({ + host: parsed.host, + pathname: parsed.pathname, + slashes: parsed.slashes + }) + return url.resolve(formatted, '.') +} diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/check-response.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/check-response.js new file mode 100644 index 00000000000000..407a80e4ce38a5 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/check-response.js @@ -0,0 +1,99 @@ +'use strict' + +const config = require('./config.js') +const errors = require('./errors.js') +const LRU = require('lru-cache') + +module.exports = checkResponse +function checkResponse (method, res, registry, startTime, opts) { + opts = config(opts) + if (res.headers.has('npm-notice') && !res.headers.has('x-local-cache')) { + opts.get('log').notice('', res.headers.get('npm-notice')) + } + checkWarnings(res, registry, opts) + if (res.status >= 400) { + logRequest(method, res, startTime, opts) + return checkErrors(method, res, startTime, opts) + } else { + res.body.on('end', () => logRequest(method, res, startTime, opts)) + return res + } +} + +function logRequest (method, res, startTime, opts) { + const elapsedTime = Date.now() - startTime + const attempt = res.headers.get('x-fetch-attempts') + const attemptStr = attempt && attempt > 1 ? ` attempt #${attempt}` : '' + const cacheStr = res.headers.get('x-local-cache') ? ' (from cache)' : '' + opts.get('log').http( + 'fetch', + `${method.toUpperCase()} ${res.status} ${res.url} ${elapsedTime}ms${attemptStr}${cacheStr}` + ) +} + +const WARNING_REGEXP = /^\s*(\d{3})\s+(\S+)\s+"(.*)"\s+"([^"]+)"/ +const BAD_HOSTS = new LRU({ max: 50 }) + +function checkWarnings (res, registry, opts) { + if (res.headers.has('warning') && !BAD_HOSTS.has(registry)) { + const warnings = {} + res.headers.raw()['warning'].forEach(w => { + const match = w.match(WARNING_REGEXP) + if (match) { + warnings[match[1]] = { + code: match[1], + host: match[2], + message: match[3], + date: new Date(match[4]) + } + } + }) + BAD_HOSTS.set(registry, true) + if (warnings['199']) { + if (warnings['199'].message.match(/ENOTFOUND/)) { + opts.get('log').warn('registry', `Using stale data from ${registry} because the host is inaccessible -- are you offline?`) + } else { + opts.get('log').warn('registry', `Unexpected warning for ${registry}: ${warnings['199'].message}`) + } + } + if (warnings['111']) { + // 111 Revalidation failed -- we're using stale data + opts.get('log').warn( + 'registry', + `Using stale data from ${registry} due to a request error during revalidation.` + ) + } + } +} + +function checkErrors (method, res, startTime, opts) { + return res.buffer() + .catch(() => null) + .then(body => { + try { + body = JSON.parse(body.toString('utf8')) + } catch (e) {} + if (res.status === 401 && res.headers.get('www-authenticate')) { + const auth = res.headers.get('www-authenticate') + .split(/,\s*/) + .map(s => s.toLowerCase()) + if (auth.indexOf('ipaddress') !== -1) { + throw new errors.HttpErrorAuthIPAddress( + method, res, body, opts.spec + ) + } else if (auth.indexOf('otp') !== -1) { + throw new errors.HttpErrorAuthOTP( + method, res, body, opts.spec + ) + } else { + throw new errors.HttpErrorAuthUnknown( + method, res, body, opts.spec + ) + } + } else { + throw new errors.HttpErrorGeneral( + method, res, body, opts.spec + ) + } + }) +} diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/config.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/config.js new file mode 100644 index 00000000000000..db08c1e47001f1 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/config.js @@ -0,0 +1,90 @@ +'use strict' + +const pkg = require('./package.json') +const figgyPudding = require('figgy-pudding') +const silentLog = require('./silentlog.js') + +const AUTH_REGEX = /^(?:.*:)?(token|_authToken|username|_password|password|email|always-auth|_auth|otp)$/ +const SCOPE_REGISTRY_REGEX = /@.*:registry$/gi +module.exports = figgyPudding({ + 'agent': {}, + 'algorithms': {}, + 'body': {}, + 'ca': {}, + 'cache': {}, + 'cert': {}, + 'fetch-retries': {}, + 'fetch-retry-factor': {}, + 'fetch-retry-maxtimeout': {}, + 'fetch-retry-mintimeout': {}, + 'gid': {}, + 'headers': {}, + 'https-proxy': {}, + 'integrity': {}, + 'is-from-ci': 'isFromCI', + 'isFromCI': { + default () { + return ( + process.env['CI'] === 'true' || + process.env['TDDIUM'] || + process.env['JENKINS_URL'] || + process.env['bamboo.buildKey'] || + process.env['GO_PIPELINE_NAME'] + ) + } + }, + 'key': {}, + 'local-address': {}, + 'log': { + default: silentLog + }, + 'max-sockets': 'maxsockets', + 'maxsockets': { + default: 12 + }, + 'memoize': {}, + 'method': { + default: 'GET' + }, + 'no-proxy': {}, + 'noproxy': {}, + 'npm-session': 'npmSession', + 'npmSession': {}, + 'offline': {}, + 'otp': {}, + 'prefer-offline': {}, + 'prefer-online': {}, + 'projectScope': {}, + 'project-scope': 'projectScope', + 'Promise': {}, + 'proxy': {}, + 'query': {}, + 'refer': {}, + 'referer': 'refer', + 'registry': { + default: 'https://registry.npmjs.org/' + }, + 'retry': {}, + 'scope': {}, + 'spec': {}, + 'strict-ssl': {}, + 'timeout': {}, + 'uid': {}, + 'user-agent': { + default: `${ + pkg.name + }@${ + pkg.version + }/node@${ + process.version + }+${ + process.arch + } (${ + process.platform + })` + } +}, { + other (key) { + return key.match(AUTH_REGEX) || key.match(SCOPE_REGISTRY_REGEX) + } +}) diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/errors.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/errors.js new file mode 100644 index 00000000000000..217f46f9773a78 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/errors.js @@ -0,0 +1,58 @@ +'use strict' + +class HttpErrorBase extends Error { + constructor (method, res, body, spec) { + super() + this.headers = res.headers.raw() + this.statusCode = res.status + this.code = `E${res.status}` + this.method = method + this.uri = res.url + this.body = body + } +} +module.exports.HttpErrorBase = HttpErrorBase + +class HttpErrorGeneral extends HttpErrorBase { + constructor (method, res, body, spec) { + super(method, res, body, spec) + this.message = `${res.status} ${res.statusText} - ${ + this.method.toUpperCase() + } ${ + this.spec || this.uri + }${ + (body && body.error) ? ' - ' + body.error : '' + }` + Error.captureStackTrace(this, HttpErrorGeneral) + } +} +module.exports.HttpErrorGeneral = HttpErrorGeneral + +class HttpErrorAuthOTP extends HttpErrorBase { + constructor (method, res, body, spec) { + super(method, res, body, spec) + this.message = 'OTP required for authentication' + this.code = 'EOTP' + Error.captureStackTrace(this, HttpErrorAuthOTP) + } +} +module.exports.HttpErrorAuthOTP = HttpErrorAuthOTP + +class HttpErrorAuthIPAddress extends HttpErrorBase { + constructor (method, res, body, spec) { + super(method, res, body, spec) + this.message = 'Login is not allowed from your IP address' + this.code = 'EAUTHIP' + Error.captureStackTrace(this, HttpErrorAuthIPAddress) + } +} +module.exports.HttpErrorAuthIPAddress = HttpErrorAuthIPAddress + +class HttpErrorAuthUnknown extends HttpErrorBase { + constructor (method, res, body, spec) { + super(method, res, body, spec) + this.message = 'Unable to authenticate, need: ' + res.headers.get('www-authenticate') + Error.captureStackTrace(this, HttpErrorAuthUnknown) + } +} +module.exports.HttpErrorAuthUnknown = HttpErrorAuthUnknown diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/index.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/index.js new file mode 100644 index 00000000000000..bb6ddeaee0151d --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/index.js @@ -0,0 +1,160 @@ +'use strict' + +const Buffer = require('safe-buffer').Buffer + +const checkResponse = require('./check-response.js') +const config = require('./config.js') +const getAuth = require('./auth.js') +const fetch = require('make-fetch-happen') +const npa = require('npm-package-arg') +const qs = require('querystring') +const url = require('url') + +module.exports = regFetch +function regFetch (uri, opts) { + opts = config(opts) + const registry = ( + (opts.get('spec') && pickRegistry(opts.get('spec'), opts)) || + opts.get('registry') || + 'https://registry.npmjs.org/' + ) + uri = url.parse(uri).protocol + ? uri + : `${ + registry.trim().replace(/\/?$/g, '') + }/${ + uri.trim().replace(/^\//, '') + }` + // through that takes into account the scope, the prefix of `uri`, etc + const startTime = Date.now() + const headers = getHeaders(registry, uri, opts) + let body = opts.get('body') + const bodyIsStream = body && + typeof body === 'object' && + typeof body.pipe === 'function' + if (body && !bodyIsStream && typeof body !== 'string' && !Buffer.isBuffer(body)) { + headers['content-type'] = headers['content-type'] || 'application/json' + body = JSON.stringify(body) + } else if (body && !headers['content-type']) { + headers['content-type'] = 'application/octet-stream' + } + if (opts.get('query')) { + let q = opts.get('query') + if (typeof q === 'string') { + q = qs.parse(q) + } + const parsed = url.parse(uri) + parsed.search = '?' + qs.stringify( + parsed.query + ? Object.assign(qs.parse(parsed.query), q) + : q + ) + uri = url.format(parsed) + } + return fetch(uri, { + agent: opts.get('agent'), + algorithms: opts.get('algorithms'), + body, + cache: getCacheMode(opts), + cacheManager: opts.get('cache'), + ca: opts.get('ca'), + cert: opts.get('cert'), + headers, + integrity: opts.get('integrity'), + key: opts.get('key'), + localAddress: opts.get('local-address'), + maxSockets: opts.get('maxsockets'), + memoize: opts.get('memoize'), + method: opts.get('method') || 'GET', + noProxy: opts.get('no-proxy') || opts.get('noproxy'), + Promise: opts.get('Promise'), + proxy: opts.get('https-proxy') || opts.get('proxy'), + referer: opts.get('refer'), + retry: opts.get('retry') || { + retries: opts.get('fetch-retries'), + factor: opts.get('fetch-retry-factor'), + minTimeout: opts.get('fetch-retry-mintimeout'), + maxTimeout: opts.get('fetch-retry-maxtimeout') + }, + strictSSL: !!opts.get('strict-ssl'), + timeout: opts.get('timeout'), + uid: opts.get('uid'), + gid: opts.get('gid') + }).then(res => checkResponse( + opts.get('method') || 'GET', res, registry, startTime, opts + )) +} + +module.exports.json = fetchJSON +function fetchJSON (uri, opts) { + return regFetch(uri, opts).then(res => res.json()) +} + +module.exports.pickRegistry = pickRegistry +function pickRegistry (spec, opts) { + spec = npa(spec) + opts = config(opts) + let registry = spec.scope && + opts.get(spec.scope.replace(/^@?/, '@') + ':registry') + + if (!registry && opts.get('scope')) { + registry = opts.get( + opts.get('scope').replace(/^@?/, '@') + ':registry' + ) + } + + if (!registry) { + registry = opts.get('registry') || 'https://registry.npmjs.org/' + } + + return registry +} + +function getCacheMode (opts) { + return opts.get('offline') + ? 'only-if-cached' + : opts.get('prefer-offline') + ? 'force-cache' + : opts.get('prefer-online') + ? 'no-cache' + : 'default' +} + +function getHeaders (registry, uri, opts) { + const headers = Object.assign({ + 'npm-in-ci': !!( + opts.get('is-from-ci') || + process.env['CI'] === 'true' || + process.env['TDDIUM'] || + process.env['JENKINS_URL'] || + process.env['bamboo.buildKey'] || + process.env['GO_PIPELINE_NAME'] + ), + 'npm-scope': opts.get('project-scope'), + 'npm-session': opts.get('npm-session'), + 'user-agent': opts.get('user-agent'), + 'referer': opts.get('refer') + }, opts.get('headers')) + + const auth = getAuth(registry, opts) + // If a tarball is hosted on a different place than the manifest, only send + // credentials on `alwaysAuth` + const shouldAuth = ( + auth.alwaysAuth || + url.parse(uri).host === url.parse(registry).host + ) + if (shouldAuth && auth.token) { + headers.authorization = `Bearer ${auth.token}` + } else if (shouldAuth && auth.username && auth.password) { + const encoded = Buffer.from( + `${auth.username}:${auth.password}`, 'utf8' + ).toString('base64') + headers.authorization = `Basic ${encoded}` + } else if (shouldAuth && auth._auth) { + headers.authorization = `Basic ${auth._auth}` + } + if (shouldAuth && auth.otp) { + headers['npm-otp'] = auth.otp + } + return headers +} diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/package.json b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/package.json new file mode 100644 index 00000000000000..f17636c6cf5e46 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/package.json @@ -0,0 +1,90 @@ +{ + "_from": "npm-registry-fetch@^3.0.0", + "_id": "npm-registry-fetch@3.1.1", + "_inBundle": false, + "_integrity": "sha512-xBobENeenvjIG8PgQ1dy77AXTI25IbYhmA3DusMIfw/4EL5BaQ5e1V9trkPrqHvyjR3/T0cnH6o0Wt/IzcI5Ag==", + "_location": "/libnpmhook/npm-registry-fetch", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "npm-registry-fetch@^3.0.0", + "name": "npm-registry-fetch", + "escapedName": "npm-registry-fetch", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/libnpmhook" + ], + "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.1.1.tgz", + "_shasum": "e96bae698afdd45d4a01aca29e881fc0bc55206c", + "_spec": "npm-registry-fetch@^3.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/libnpmhook", + "author": { + "name": "Kat Marchán", + "email": "kzm@sykosomatic.org" + }, + "bugs": { + "url": "https://github.com/npm/registry-fetch/issues" + }, + "bundleDependencies": false, + "config": { + "nyc": { + "exclude": [ + "node_modules/**", + "test/**" + ] + } + }, + "dependencies": { + "bluebird": "^3.5.1", + "figgy-pudding": "^3.1.0", + "lru-cache": "^4.1.2", + "make-fetch-happen": "^4.0.0", + "npm-package-arg": "^6.0.0" + }, + "deprecated": false, + "description": "Fetch-based http client for use with npm registry APIs", + "devDependencies": { + "cacache": "^11.0.0", + "mkdirp": "^0.5.1", + "nock": "^9.2.3", + "npmlog": "^4.1.2", + "rimraf": "^2.6.2", + "ssri": "^6.0.0", + "standard": "^11.0.1", + "standard-version": "^4.2.0", + "tap": "^11.1.3", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.8" + }, + "files": [ + "*.js", + "lib" + ], + "homepage": "https://github.com/npm/registry-fetch#readme", + "keywords": [ + "npm", + "registry", + "fetch" + ], + "license": "ISC", + "main": "index.js", + "name": "npm-registry-fetch", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/registry-fetch.git" + }, + "scripts": { + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --coverage test/*.js", + "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", + "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" + }, + "version": "3.1.1" +} diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/silentlog.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/silentlog.js new file mode 100644 index 00000000000000..886c5d55b2dbb2 --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/silentlog.js @@ -0,0 +1,14 @@ +'use strict' + +const noop = Function.prototype +module.exports = { + error: noop, + warn: noop, + notice: noop, + info: noop, + verbose: noop, + silly: noop, + http: noop, + pause: noop, + resume: noop +} diff --git a/deps/npm/node_modules/libnpmhook/package.json b/deps/npm/node_modules/libnpmhook/package.json new file mode 100644 index 00000000000000..2f06e7a6b53bfd --- /dev/null +++ b/deps/npm/node_modules/libnpmhook/package.json @@ -0,0 +1,84 @@ +{ + "_args": [ + [ + "libnpmhook@4.0.1", + "/Users/rebecca/code/npm" + ] + ], + "_from": "libnpmhook@4.0.1", + "_id": "libnpmhook@4.0.1", + "_inBundle": false, + "_integrity": "sha512-3qqpfqvBD1712WA6iGe0stkG40WwAeoWcujA6BlC0Be1JArQbqwabnEnZ0CRcD05Tf1fPYJYdCbSfcfedEJCOg==", + "_location": "/libnpmhook", + "_phantomChildren": { + "bluebird": "3.5.1", + "figgy-pudding": "3.1.0", + "lru-cache": "4.1.3", + "make-fetch-happen": "4.0.1", + "npm-package-arg": "6.1.0" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "libnpmhook@4.0.1", + "name": "libnpmhook", + "escapedName": "libnpmhook", + "rawSpec": "4.0.1", + "saveSpec": null, + "fetchSpec": "4.0.1" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-4.0.1.tgz", + "_spec": "4.0.1", + "_where": "/Users/rebecca/code/npm", + "author": { + "name": "Kat Marchán", + "email": "kzm@sykosomatic.org" + }, + "bugs": { + "url": "https://github.com/npm/libnpmhook/issues" + }, + "dependencies": { + "figgy-pudding": "^3.1.0", + "npm-registry-fetch": "^3.0.0" + }, + "description": "programmatic API for managing npm registry hooks", + "devDependencies": { + "nock": "^9.2.3", + "standard": "^11.0.1", + "standard-version": "^4.3.0", + "tap": "^11.1.3", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.8" + }, + "files": [ + "*.js", + "lib" + ], + "homepage": "https://github.com/npm/libnpmhook#readme", + "keywords": [ + "npm", + "hooks", + "registry", + "npm api" + ], + "license": "ISC", + "main": "index.js", + "name": "libnpmhook", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/libnpmhook.git" + }, + "scripts": { + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --coverage test/*.js", + "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", + "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" + }, + "version": "4.0.1" +} diff --git a/deps/npm/node_modules/libnpx/CHANGELOG.md b/deps/npm/node_modules/libnpx/CHANGELOG.md index 802f8406898d5f..5fa91fac96ae70 100644 --- a/deps/npm/node_modules/libnpx/CHANGELOG.md +++ b/deps/npm/node_modules/libnpx/CHANGELOG.md @@ -2,6 +2,69 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +# [10.2.0](https://github.com/zkat/npx/compare/v10.1.1...v10.2.0) (2018-04-13) + + +### Bug Fixes + +* **i18n:** fix korean; 쉘 -> 셸 ([#163](https://github.com/zkat/npx/issues/163)) ([11d9fe0](https://github.com/zkat/npx/commit/11d9fe0)) +* **spawn:** spawn child processes with node without relying on the shebang. ([#174](https://github.com/zkat/npx/issues/174)) ([cba97bb](https://github.com/zkat/npx/commit/cba97bb)) +* **windows:** Allow spaces in the node path when using --node-arg ([#173](https://github.com/zkat/npx/issues/173)) ([fe0d48a](https://github.com/zkat/npx/commit/fe0d48a)), closes [#170](https://github.com/zkat/npx/issues/170) + + +### Features + +* **i18n:** add translation ([#159](https://github.com/zkat/npx/issues/159)) ([5da008b](https://github.com/zkat/npx/commit/5da008b)) + + + + +## [10.1.1](https://github.com/zkat/npx/compare/v10.1.0...v10.1.1) (2018-04-12) + + + + +# [10.1.0](https://github.com/zkat/npx/compare/v10.0.1...v10.1.0) (2018-04-12) + + +### Features + +* **spawn:** add --always-spawn to opt out of process takeover optimization feature ([#172](https://github.com/zkat/npx/issues/172)) ([c0d6abc](https://github.com/zkat/npx/commit/c0d6abc)) + + + + +## [10.0.1](https://github.com/zkat/npx/compare/v10.0.0...v10.0.1) (2018-03-08) + + +### Bug Fixes + +* **i18n:** Improve French localization ([#158](https://github.com/zkat/npx/issues/158)) ([c88823e](https://github.com/zkat/npx/commit/c88823e)) +* **windows:** on Windows, throw useful error when package contains no binaries([#142](https://github.com/zkat/npx/issues/142)) ([a69276e](https://github.com/zkat/npx/commit/a69276e)), closes [#137](https://github.com/zkat/npx/issues/137) + + + + +# [10.0.0](https://github.com/zkat/npx/compare/v9.7.1...v10.0.0) (2018-03-08) + + +### Bug Fixes + +* **i18n:** Fix Korean locale ([#130](https://github.com/zkat/npx/issues/130)) ([752db48](https://github.com/zkat/npx/commit/752db48)) +* **index:** remove extraneous logging on Windows ([#136](https://github.com/zkat/npx/issues/136)) ([357e6ab](https://github.com/zkat/npx/commit/357e6ab)), closes [#131](https://github.com/zkat/npx/issues/131) +* **license:** change npx license to ISC ([a617d7b](https://github.com/zkat/npx/commit/a617d7b)) +* **parse-args:** fix version thing for yargs ([30677ed](https://github.com/zkat/npx/commit/30677ed)) +* **prefix:** Handle node_modules without package.json ([#128](https://github.com/zkat/npx/issues/128)) ([f64ae43](https://github.com/zkat/npx/commit/f64ae43)), closes [/github.com/babel/babel/issues/4066#issuecomment-336705199](https://github.com//github.com/babel/babel/issues/4066/issues/issuecomment-336705199) +* **standard:** get things in line with standard 11 ([6cf8e88](https://github.com/zkat/npx/commit/6cf8e88)) + + +### BREAKING CHANGES + +* **license:** This moves the code over from CC0-1.0 to the ISC license. + + + ## [9.7.1](https://github.com/zkat/npx/compare/v9.7.0...v9.7.1) (2017-10-19) diff --git a/deps/npm/node_modules/libnpx/LICENSE.md b/deps/npm/node_modules/libnpx/LICENSE.md index c05cb09586fccd..8d28acf866d932 100644 --- a/deps/npm/node_modules/libnpx/LICENSE.md +++ b/deps/npm/node_modules/libnpx/LICENSE.md @@ -1,3 +1,16 @@ -To the extent possible under law, maintainers for this project have waived all copyright and related or neighboring rights to this project. +ISC License -For more information on this waiver, see: https://creativecommons.org/publicdomain/zero/1.0/ +Copyright (c) npm, Inc. + +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 COPYRIGHT HOLDER DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +COPYRIGHT HOLDER 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/libnpx/README.md b/deps/npm/node_modules/libnpx/README.md index 436bdd02402466..130f1bc3fdd023 100644 --- a/deps/npm/node_modules/libnpx/README.md +++ b/deps/npm/node_modules/libnpx/README.md @@ -98,6 +98,12 @@ $ npx --node-arg=--inspect cowsay Debugger listening on ws://127.0.0.1:9229/.... ``` +### Specify a node version to run npm scripts (or anything else!) + +``` +npx -p node@8 npm run build +``` + ## SHELL AUTO FALLBACK You can configure `npx` to run as your default fallback command when you type something in the command line with an `@` but the command is not found. This includes installing packages that were not found in the local prefix either. diff --git a/deps/npm/node_modules/libnpx/child.js b/deps/npm/node_modules/libnpx/child.js index 1b7c4c6215bfe6..cabc715d5b6d34 100644 --- a/deps/npm/node_modules/libnpx/child.js +++ b/deps/npm/node_modules/libnpx/child.js @@ -74,13 +74,13 @@ function exec (cmd, args, opts) { module.exports.escapeArg = escapeArg function escapeArg (str, asPath) { return process.platform === 'win32' && asPath - ? path.normalize(str) - .split(/\\/) - .map(s => s.match(/\s+/) ? `"${s}"` : s) - .join('\\') - : process.platform === 'win32' - ? `"${str}"` - : str.match(/[^-_.~/\w]/) - ? `'${str.replace(/'/g, "'\"'\"'")}'` - : str + ? path.normalize(str) + .split(/\\/) + .map(s => s.match(/\s+/) ? `"${s}"` : s) + .join('\\') + : process.platform === 'win32' + ? `"${str}"` + : str.match(/[^-_.~/\w]/) + ? `'${str.replace(/'/g, "'\"'\"'")}'` + : str } diff --git a/deps/npm/node_modules/libnpx/get-prefix.js b/deps/npm/node_modules/libnpx/get-prefix.js index 71bedffc580c88..3fef7f7eb9806d 100644 --- a/deps/npm/node_modules/libnpx/get-prefix.js +++ b/deps/npm/node_modules/libnpx/get-prefix.js @@ -6,20 +6,21 @@ const path = require('path') const statAsync = promisify(require('fs').stat) module.exports = getPrefix -function getPrefix (current, root) { - if (!root) { - const original = root = path.resolve(current) - while (path.basename(root) === 'node_modules') { - root = path.dirname(root) - } - if (original !== root) { - return Promise.resolve(root) - } else { - return getPrefix(root, root) - } +function getPrefix (root) { + const original = root = path.resolve(root) + while (path.basename(root) === 'node_modules') { + root = path.dirname(root) } - if (isRootPath(current, process.platform)) { + if (original !== root) { return Promise.resolve(root) + } else { + return Promise.resolve(getPrefixFromTree(root)) + } +} + +function getPrefixFromTree (current) { + if (isRootPath(current, process.platform)) { + return false } else { return Promise.all([ fileExists(path.join(current, 'package.json')), @@ -30,8 +31,7 @@ function getPrefix (current, root) { if (hasPkg || hasModules) { return current } else { - const parent = path.dirname(current) - return getPrefix(parent, root) + return getPrefixFromTree(path.dirname(current)) } }) } @@ -49,6 +49,6 @@ function fileExists (f) { module.exports._isRootPath = isRootPath function isRootPath (p, platform) { return platform === 'win32' - ? p.match(/^[a-z]+:[/\\]?$/i) - : p === '/' + ? p.match(/^[a-z]+:[/\\]?$/i) + : p === '/' } diff --git a/deps/npm/node_modules/libnpx/index.js b/deps/npm/node_modules/libnpx/index.js index 3033e9cd06a927..21f44b37105675 100644 --- a/deps/npm/node_modules/libnpx/index.js +++ b/deps/npm/node_modules/libnpx/index.js @@ -86,6 +86,9 @@ function npx (argv) { if (process.platform === 'win32') { bins = bins.filter(b => b !== 'etc' && b !== 'node_modules') } + if (bins.length < 1) { + throw new Error(Y()`command not found: ${argv.command}`) + } const cmd = new RegExp(`^${argv.command}(?:\\.cmd)?$`, 'i') const matching = bins.find(b => b.match(cmd)) return path.resolve(results.bin, bins[matching] || bins[0]) @@ -116,11 +119,7 @@ function npx (argv) { module.exports._localBinPath = localBinPath function localBinPath (cwd) { return require('./get-prefix.js')(cwd).then(prefix => { - const pkgjson = path.join(prefix, 'package.json') - return promisify(fs.stat)(pkgjson).then( - () => path.join(prefix, 'node_modules', '.bin'), - err => { if (err.code !== 'ENOENT') throw err } - ) + return prefix && path.join(prefix, 'node_modules', '.bin') }) } @@ -146,8 +145,8 @@ function ensurePackages (specs, opts) { ).then(cache => { const prefix = path.join(cache, '_npx', process.pid.toString()) const bins = process.platform === 'win32' - ? prefix - : path.join(prefix, 'bin') + ? prefix + : path.join(prefix, 'bin') const rimraf = require('rimraf') process.on('exit', () => rimraf.sync(prefix)) return promisify(rimraf)(bins).then(() => { @@ -224,8 +223,8 @@ function installPackages (specs, prefix, opts) { if (npmPath) { args.unshift( process.platform === 'win32' - ? child.escapeArg(opts.npm) - : opts.npm + ? child.escapeArg(opts.npm) + : opts.npm ) return process.argv[0] } else { @@ -254,7 +253,8 @@ function installPackages (specs, prefix, opts) { module.exports._execCommand = execCommand function execCommand (_existing, argv) { return findNodeScript(_existing, argv).then(existing => { - if (existing && !argv.nodeArg && !argv.shell && existing !== process.argv[1]) { + const argvCmdOpts = argv.cmdOpts || [] + if (existing && !argv.alwaysSpawn && !argv.nodeArg && !argv.shell && existing !== process.argv[1]) { const Module = require('module') // let it take over the process. This means we can skip node startup! if (!argv.noYargs) { @@ -264,31 +264,35 @@ function execCommand (_existing, argv) { process.argv = [ process.argv[0], // Current node binary existing // node script path. `runMain()` will set this as the new main - ].concat(argv.cmdOpts) // options for the cmd itself + ].concat(argvCmdOpts) // options for the cmd itself Module.runMain() // ✨MAGIC✨. Sorry-not-sorry } else if (!existing && argv.nodeArg && argv.nodeArg.length) { throw new Error(Y()`ERROR: --node-arg/-n can only be used on packages with node scripts.`) } else { let cmd = existing - let opts = argv - if (existing && argv.nodeArg && argv.nodeArg.length) { + let cmdOpts = argvCmdOpts + if (existing) { + cmd = process.argv[0] + if (process.platform === 'win32') { + cmd = child.escapeArg(cmd, true) + } // If we know we're running a run script and we got a --node-arg, // we need to fudge things a bit to get them working right. - let nargs = argv.nodeArg - if (typeof nargs === 'string') { - nargs = [nargs] + cmdOpts = argv.nodeArg + if (cmdOpts) { + cmdOpts = Array.isArray(cmdOpts) ? cmdOpts : [cmdOpts] + } else { + cmdOpts = [] } // It's valid for a single arg to be a string of multiple // space-separated node args. // Example: `$ npx -n '--inspect --harmony --debug' ...` - nargs = nargs.reduce((acc, arg) => { + cmdOpts = cmdOpts.reduce((acc, arg) => { return acc.concat(arg.split(/\s+/)) }, []) - cmd = process.argv[0] - opts = Object.assign({}, argv, { - cmdOpts: nargs.concat([existing], argv.cmdOpts || []) - }) + cmdOpts = cmdOpts.concat(existing, argvCmdOpts) } + const opts = Object.assign({}, argv, { cmdOpts }) return child.runCommand(cmd, opts).catch(err => { if (err.isOperational && err.exitCode) { // At this point, we want to treat errors from the child as if @@ -355,7 +359,7 @@ function findNodeScript (existing, opts) { return str.match(cmd) || str.match(mingw) }).then(match => { return match && path.join(path.dirname(existing), match[1]) - }).then(x => console.log(x) || x) + }) } }) } diff --git a/deps/npm/node_modules/libnpx/libnpx.1 b/deps/npm/node_modules/libnpx/libnpx.1 index e8049194bcfee6..8fb05f222df0f5 100644 --- a/deps/npm/node_modules/libnpx/libnpx.1 +++ b/deps/npm/node_modules/libnpx/libnpx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "October 2017" "libnpx@9.7.0" "User Commands" +.TH "NPX" "1" "April 2018" "libnpx@10.1.1" "User Commands" .SH "NAME" \fBnpx\fR \- execute npm package binaries .SH SYNOPSIS @@ -101,6 +101,13 @@ $ npx \-\-node\-arg=\-\-inspect cowsay Debugger listening on ws://127\.0\.0\.1:9229/\.\.\.\. .fi .RE +.SS Specify a node version to run npm scripts (or anything else!) +.P +.RS 2 +.nf +npx \-p node@8 npm run build +.fi +.RE .SH SHELL AUTO FALLBACK .P You can configure \fBnpx\fP to run as your default fallback command when you type something in the command line with an \fB@\fP but the command is not found\. This includes installing packages that were not found in the local prefix either\. diff --git a/deps/npm/node_modules/libnpx/locales/ar.json b/deps/npm/node_modules/libnpx/locales/ar.json deleted file mode 100644 index 8ca0fcc66e9bd5..00000000000000 --- a/deps/npm/node_modules/libnpx/locales/ar.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Execute binaries from npm packages.\n%s": ".npm الثنائية من حزم node تنفيذ ملفات \n %s ", - "Package to be installed.": ".الحزمة التي سيتم تثبيتها", - "Location of the npm cache.": ".npm موقع الذاكرة المخبأة ل", - "Skip installation if a package is missing.": "تخطي التثبيت في حال وجود حزمة مفقودة.", - "Path to user npmrc.": "مسار المستخدم إلى npmrc.", - "Execute string as if inside `npm run-script`.": ".`npm run-script` نص الامر التنفيذي كما في", - "Shell to execute the command with, if any.": "واجهة تنفيذ الأوامر المرغوب استخدامها في حال وجودها.", - "Generate shell code to use npx as the \"command not found\" fallback.": ".npx الامرالمتولد لاستدعاء كحل بديل في حالة \"لم يتم العثور على الامر\" من قبل ", - "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": " .npx سيتم قسرياً التثبيت بشكل مؤقت للاصدار الاحدث من قبل .$PATH تجاهل الملفات التنفيذية الثنائية الحالية في المسار ", - "npm binary to use for internal operations.": ".التنفيذي الثنائي الذي سيتم استعماله للعمليات الداخلية npm ملف", - "For the full documentation, see the manual page for npx(1).": ".npx(1) للوصول للمستندات المساعدة الكاملة, ابحث في صفحة الدليل عن", - "Unable to guess a binary name from %s. Please use --package.": ". --package الرجاء استعمال .%s لم يتمكن تخمين اسم التطبيق الثنائي من ", - "\nERROR: You must supply a command.\n": "\n.خطأ : يتوجب على المستخدم ادخال امر\n", - "Command failed: %s %s": "%s %s :فشل الامر ", - "Install for %s failed with code %s": "%s بالكود %s تم فشل تثبيت", - "%s not found. Trying with npx...": "...npx سيتم اعادة المحاولة باستعمال .%s لم يتم العثور على", - "command not found: %s": "%s :لم يتم العثور على الأمر", - "options": "خيارات", - "command": "أمر", - "version": "الإصدار", - "command-arg": "بارامتر الأمر", - "command-string": "نص الأمر", - "shell": "واجهة تنفيذ الأوامر", - "package": "الحزمة", - "npx: installed %s in %ss": "%ss في %s تم تثبيت ", - "Suppress output from npx itself. Subcommands will not be affected.": "الاوامر الفرعية لن تتاثر بالتعديل.npx إخفاءالخرج من", - "Extra node argument when calling a node binary.": ".node البارامتر الاضافي عند استدعاء" -} diff --git a/deps/npm/node_modules/libnpx/locales/en.json b/deps/npm/node_modules/libnpx/locales/en.json index 358e343421c75a..d3463ae315c0be 100644 --- a/deps/npm/node_modules/libnpx/locales/en.json +++ b/deps/npm/node_modules/libnpx/locales/en.json @@ -25,5 +25,6 @@ "package": "package", "npx: installed %s in %ss": "npx: installed %s in %ss", "Suppress output from npx itself. Subcommands will not be affected.": "Suppress output from npx itself. Subcommands will not be affected.", - "Extra node argument when calling a node binary.": "Extra node argument when calling a node binary." + "Extra node argument when calling a node binary.": "Extra node argument when calling a node binary.", + "Always spawn a child process to execute the command.": "Always spawn a child process to execute the command." } \ No newline at end of file diff --git a/deps/npm/node_modules/libnpx/locales/fr.json b/deps/npm/node_modules/libnpx/locales/fr.json index a6ddf60e6f5401..949ba9bb8e6083 100644 --- a/deps/npm/node_modules/libnpx/locales/fr.json +++ b/deps/npm/node_modules/libnpx/locales/fr.json @@ -1,28 +1,28 @@ { - "Execute binaries from npm packages.\n%s": "Exécutez des binaires à partir de paquets de npm.\n%s", + "Execute binaries from npm packages.\n%s": "Exécutez des binaires à partir de paquets npm.\n%s", "Package to be installed.": "Paquet à installer.", - "Location of the npm cache.": "Endroit où est situé le cache de npm.", - "Skip installation if a package is missing.": "Sauter l'installation si un paquet est manquant.", - "Path to user npmrc.": "Chemin du npmrc de l'utilisateur(-trice).", + "Location of the npm cache.": "Chemin où est situé le cache de npm.", + "Skip installation if a package is missing.": "Passer l'installation si un paquet est manquant.", + "Path to user npmrc.": "Chemin du fichier npmrc de l'utilisateur(-trice).", "Execute string as if inside `npm run-script`.": "Exécuter la chaine de caractère comme avec `npm run-script`.", - "Shell to execute the command with, if any.": "Shell a utiliser pour exécuter la commande, s'il y en a un.", - "Generate shell code to use npx as the \"command not found\" fallback.": "Générer le code du shell pour utiliser npx comme solution de rechange à \"command not found\"", - "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignorer les binaires dans le $PATH ou dans le projet local. Cela force npm à faire une installation temporaire et utiliser la dernière version.", + "Shell to execute the command with, if any.": "Shell à utiliser pour exécuter la commande, s'il y en a un.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Générer le code du shell pour utiliser npx comme solution de rechange à \"command not found\".", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignorer les binaires dans le $PATH ou dans le projet local. Cela force npm à réaliser une installation temporaire et à utiliser la dernière version.", "npm binary to use for internal operations.": "Binaire de npm à utiliser pour les opérations internes.", - "For the full documentation, see the manual page for npx(1).": "Pour la documentation complète, regarder la page du manuel pour npx(1).", + "For the full documentation, see the manual page for npx(1).": "Pour la documentation complète, consultez la page du manuel pour npx(1).", "Unable to guess a binary name from %s. Please use --package.": "Impossible de deviner le nom du binaire de %s, utilisez --package s'il vous plaît.", - "\nERROR: You must supply a command.\n": "\nERROR: Vous devez fournir une commande.\n", - "Command failed: %s %s": "La commande a échoué: %s %s", + "\nERROR: You must supply a command.\n": "\nERREUR : Vous devez fournir une commande.\n", + "Command failed: %s %s": "La commande a échoué : %s %s", "Install for %s failed with code %s": "L'installation de %s a échoué avec le code %s", "%s not found. Trying with npx...": "%s n'a pas été trouvé. Essai avec npx...", - "command not found: %s": "Commande non trouvée: %s", + "command not found: %s": "Commande non trouvée : %s", "options": "options", "command": "commande", "version": "version", "command-arg": "arguments-de-la-commande", - "command-string": "chaine-de-caractères-de-la-commande", + "command-string": "chaîne-de-caractères-de-la-commande", "shell": "shell", "package": "paquet", - "npx: installed %s in %ss": "npx: %s installé(s) en %ss", - "Suppress output from npx itself. Subcommands will not be affected.": "Supprimer les sorties générées par npx. Les sous-commandes ne seront pas affectées." + "npx: installed %s in %ss": "npx : %s installé(s) en %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Supprimer la sortie générée par npx. Les sous-commandes ne seront pas affectées." } diff --git a/deps/npm/node_modules/libnpx/locales/ko.json b/deps/npm/node_modules/libnpx/locales/ko.json index 790537a29af2dc..0e9917df99ca55 100644 --- a/deps/npm/node_modules/libnpx/locales/ko.json +++ b/deps/npm/node_modules/libnpx/locales/ko.json @@ -1,29 +1,29 @@ { "Execute binaries from npm packages.\n%s": "npm 패키지에서 바이너리를 실행합니다.\n%s", - "Package to be installed.": "패키지가 설치되었습니다.", + "Package to be installed.": "설치할 패키지.", "Location of the npm cache.": "npm 캐시의 위치.", "Skip installation if a package is missing.": "패키지가 없으면 설치를 건너뜁니다.", "Path to user npmrc.": "사용자 npmrc의 경로.", "Execute string as if inside `npm run-script`.": "문자열이 `npm run-script`안에 있는 것처럼 실행합니다.", - "Shell to execute the command with, if any.": "명령을 실행할 쉘(존재하는 경우).", - "Generate shell code to use npx as the \"command not found\" fallback.": "\"명령을 찾을 수 없습니다\"의 대안으로 npx가 사용하도록 쉘 코드를 생성합니다.", + "Shell to execute the command with, if any.": "명령을 실행할 셸 (존재하는 경우).", + "Generate shell code to use npx as the \"command not found\" fallback.": "\"명령을 찾을 수 없습니다\" 대신 npx가 사용되도록 셸 코드를 생성합니다.", "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "$PATH나 로컬 프로젝트에 있는 바이너리를 무시합니다. 이는 npx가 최신 버전을 임시로 설치해서 사용하도록 강제합니다.", "npm binary to use for internal operations.": "내부 작업에 사용할 npm 바이너리.", "For the full documentation, see the manual page for npx(1).": "전체 문서는 npx(1) 매뉴얼 페이지를 보세요.", - "Unable to guess a binary name from %s. Please use --package.": "%s 에서 바이너리 이름을 추측할 수 없습니다. --package 를 사용해 주세요.", + "Unable to guess a binary name from %s. Please use --package.": "%s에서 바이너리 이름을 추측할 수 없습니다. --package를 사용해 주세요.", "\nERROR: You must supply a command.\n": "\nERROR: 명령을 제공해야 합니다.\n", "Command failed: %s %s": "명령이 실패했습니다: %s %s", - "Install for %s failed with code %s": "%s 설치가 %s 코드로 실패했습니다", - "%s not found. Trying with npx...": "%s 을 찾을 수 없습니다. npx로 시도해 보세요...", + "Install for %s failed with code %s": "%s 설치가 오류 코드 %s로 실패했습니다", + "%s not found. Trying with npx...": "%s 을 찾을 수 없습니다. npx로 시도합니다...", "command not found: %s": "명령을 찾을 수 없습니다: %s", "options": "옵션", "command": "명령", "version": "버전", "command-arg": "명령-인자", "command-string": "명령-문자열", - "shell": "쉘", + "shell": "셸", "package": "패키지", - "npx: installed %s in %ss": "%ss 에 %s 를 설치했습니다", + "npx: installed %s in %ss": "npx: %s개의 패키지를 %s초만에 설치했습니다.", "Suppress output from npx itself. Subcommands will not be affected.": "npx의 출력을 감춥니다. 하위 명령은 영향을 받지 않습니다.", - "Extra node argument when calling a node binary.": "node 바이너리를 호출할 때 사용하는 추가 node 인자" + "Extra node argument when calling a node binary.": "node 바이너리를 호출할 때 사용하는 추가 node 인자." } diff --git a/deps/npm/node_modules/libnpx/locales/pt_BR.json b/deps/npm/node_modules/libnpx/locales/pt_BR.json index d61f8f58f88321..b44f4e0260061b 100644 --- a/deps/npm/node_modules/libnpx/locales/pt_BR.json +++ b/deps/npm/node_modules/libnpx/locales/pt_BR.json @@ -1,28 +1,28 @@ { - "Execute binaries from npm packages.\n%s": "Execute binários de pacotes npm.\n%s", - "Package to be installed.": "Pacote a ser instalado.", - "Location of the npm cache.": "Localização da cache do npm.", - "Skip installation if a package is missing.": "Pule a instalação se estiver faltando um pacote.", - "Path to user npmrc.": "Caminho para o npmrc do usuário.", - "Execute string as if inside `npm run-script`.": "Execute a string como se estivesse dentro de `npm run-script`.", - "Shell to execute the command with, if any.": "Terminal para executar o comando, se houver.", - "Generate shell code to use npx as the \"command not found\" fallback.": "Gere código de terminal para usar o npx quando o comando não existir (\"command not found\").", - "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignora binários existentes no $PATH ou no projeto atual. Isso obriga o npx a fazer uma instalação temporária e usar a última versão.", - "npm binary to use for internal operations.": "Binário npm usado para operações internas.", - "For the full documentation, see the manual page for npx(1).": "Para a documentação completa, veja a página do manual do npx(1).", - "Unable to guess a binary name from %s. Please use --package.": "Não foi possível encontrar um binário a partir de %s. Por favor, use --package.", - "\nERROR: You must supply a command.\n": "\nERRO: Você deve fornecer um comando.\n", - "Command failed: %s %s": "Comando falhou: %s %s", + "Execute binaries from npm packages.\n%s": "Executa comandos de módulos npm.\n%s", + "Package to be installed.": "Pacote para ser instalado.", + "Location of the npm cache.": "Localização da cache npm.", + "Skip installation if a package is missing.": "Pular instalação se um pacote está faltando.", + "Path to user npmrc.": "Localização do npmrc do usuário.", + "Execute string as if inside `npm run-script`.": "Executa string como se estivesse dentro de `npm run-script`.", + "Shell to execute the command with, if any.": "Terminal para executar o comando, se tiver.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Gera código de terminal para usar npx no lugar quando comando não existir (\"command not found\").", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignora comandos no $PATH ou no projeto atual. Isto obriga npx a fazer uma instalação temporária e usar a última versão.", + "npm binary to use for internal operations.": "Comando npm usado para operações internas.", + "For the full documentation, see the manual page for npx(1).": "Para documentação completa, veja a página do manual npx(1).", + "Unable to guess a binary name from %s. Please use --package.": "Não foi possível advinhar o nome do comando usando %s. Por favor, use --package.", + "\nERROR: You must supply a command.\n": "\nERRO: Você deve suprir um comando.\n", + "Command failed: %s %s": "Comando fracassou: %s %s", "Install for %s failed with code %s": "Instalação de %s falhou com código %s", - "%s not found. Trying with npx...": "%s não encontrado. Tentando com npx...", - "command not found: %s": "comando não encontrado: %s", + "%s not found. Trying with npx...": "%s não existe. Tentando com npx...", + "command not found: %s": "comando não existe: %s", "options": "opções", "command": "comando", "version": "versão", - "command-arg": "argumento-do-comando", + "command-arg": "argumento-de-comando", "command-string": "string-de-comando", "shell": "terminal", "package": "pacote", - "npx: installed %s in %ss": "npx: %s instalado em %ss", - "Suppress output from npx itself. Subcommands will not be affected.": "Suprimir resultados de npx. Sub-comandos não serão afetados." + "npx: installed %s in %ss": "npx: instalou %s em %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Omitir resultado de npx. Sub-comandos não serão afetados." } diff --git a/deps/npm/node_modules/libnpx/locales/zh_CN.json b/deps/npm/node_modules/libnpx/locales/zh_CN.json index 6cf64629f16d32..92b61186cb6b32 100644 --- a/deps/npm/node_modules/libnpx/locales/zh_CN.json +++ b/deps/npm/node_modules/libnpx/locales/zh_CN.json @@ -24,5 +24,6 @@ "shell": "命令行解释器", "package": "包", "npx: installed %s in %ss": "npx: %s 安装成功,用时 %s 秒", - "Suppress output from npx itself. Subcommands will not be affected.": "隐藏 npx 的输出,子命令不会受到影响" + "Suppress output from npx itself. Subcommands will not be affected.": "隐藏 npx 的输出,子命令不会受到影响", + "Extra node argument when calling a node binary.": "调用 node 二进制时使用额外的 node 参数。" } diff --git a/deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md b/deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md deleted file mode 100644 index 2fcf56b90228da..00000000000000 --- a/deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md +++ /dev/null @@ -1,76 +0,0 @@ -# Change Log -All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). - -## [Unreleased] - -## [4.0.0] - 2016-12-23 -### Changed - -- Return Object with parsed content or error instead of false ([#165](https://github.com/motdotla/dotenv/pull/165)). - - -### Removed - -- `verbose` option removed in favor of returning result. - - -## [3.0.0] - 2016-12-20 -### Added - -- `verbose` option will log any error messages. Off by default. -- parses email addresses correctly -- allow importing config method directly in ES6 - -### Changed - -- Suppress error messages by default ([#154](https://github.com/motdotla/dotenv/pull/154)) -- Ignoring more files for NPM to make package download smaller - -### Fixed - -- False positive test due to case-sensitive variable ([#124](https://github.com/motdotla/dotenv/pull/124)) - -### Removed - -- `silent` option removed in favor of `verbose` - -## [2.0.0] - 2016-01-20 -### Added -- CHANGELOG to ["make it easier for users and contributors to see precisely what notable changes have been made between each release"](http://keepachangelog.com/). Linked to from README -- LICENSE to be more explicit about what was defined in `package.json`. Linked to from README -- Testing nodejs v4 on travis-ci -- added examples of how to use dotenv in different ways -- return parsed object on success rather than boolean true - -### Changed -- README has shorter description not referencing ruby gem since we don't have or want feature parity - -### Removed -- Variable expansion and escaping so environment variables are encouraged to be fully orthogonal - -## [1.2.0] - 2015-06-20 -### Added -- Preload hook to require dotenv without including it in your code - -### Changed -- clarified license to be "BSD-2-Clause" in `package.json` - -### Fixed -- retain spaces in string vars - -## [1.1.0] - 2015-03-31 -### Added -- Silent option to silence `console.log` when `.env` missing - -## [1.0.0] - 2015-03-13 -### Removed -- support for multiple `.env` files. should always use one `.env` file for the current environment - -[Unreleased]: https://github.com/motdotla/dotenv/compare/v4.0.0...HEAD -[4.0.0]: https://github.com/motdotla/dotenv/compare/v3.0.0...v4.0.0 -[3.0.0]: https://github.com/motdotla/dotenv/compare/v2.0.0...v3.0.0 -[2.0.0]: https://github.com/motdotla/dotenv/compare/v1.2.0...v2.0.0 -[1.2.0]: https://github.com/motdotla/dotenv/compare/v1.1.0...v1.2.0 -[1.1.0]: https://github.com/motdotla/dotenv/compare/v1.0.0...v1.1.0 -[1.0.0]: https://github.com/motdotla/dotenv/compare/v0.4.0...v1.0.0 diff --git a/deps/npm/node_modules/libnpx/node_modules/dotenv/README.md b/deps/npm/node_modules/libnpx/node_modules/dotenv/README.md deleted file mode 100644 index 90836a34b7c321..00000000000000 --- a/deps/npm/node_modules/libnpx/node_modules/dotenv/README.md +++ /dev/null @@ -1,208 +0,0 @@ -# dotenv - -dotenv - -Dotenv is a zero-dependency module that loads environment variables from a `.env` file into [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env). Storing configuration in the environment separate from code is based on [The Twelve-Factor App](http://12factor.net/config) methodology. - -[![BuildStatus](https://img.shields.io/travis/motdotla/dotenv/master.svg?style=flat-square)](https://travis-ci.org/motdotla/dotenv) -[![NPM version](https://img.shields.io/npm/v/dotenv.svg?style=flat-square)](https://www.npmjs.com/package/dotenv) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) -[![Coverage Status](https://img.shields.io/coveralls/motdotla/dotenv/master.svg?style=flat-square)](https://coveralls.io/github/motdotla/dotenv?branch=coverall-intergration) - -## Install - -```bash -npm install dotenv --save -``` - -## Usage - -As early as possible in your application, require and configure dotenv. - -```javascript -require('dotenv').config() -``` - -Create a `.env` file in the root directory of your project. Add -environment-specific variables on new lines in the form of `NAME=VALUE`. -For example: - -``` -DB_HOST=localhost -DB_USER=root -DB_PASS=s1mpl3 -``` - -That's it. - -`process.env` now has the keys and values you defined in your `.env` file. - -```javascript -var db = require('db') -db.connect({ - host: process.env.DB_HOST, - username: process.env.DB_USER, - password: process.env.DB_PASS -}) -``` - -### Preload - -If you are using iojs-v1.6.0 or later, you can use the `--require` (`-r`) command line option to preload dotenv. By doing this, you do not need to require and load dotenv in your application code. - - -```bash -$ node -r dotenv/config your_script.js -``` - -The configuration options below are supported as command line arguments in the format `dotenv_config_