summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cacache
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/cacache')
-rw-r--r--deps/npm/node_modules/cacache/CHANGELOG.md25
-rw-r--r--deps/npm/node_modules/cacache/README.md4
-rw-r--r--deps/npm/node_modules/cacache/lib/content/read.js10
-rw-r--r--deps/npm/node_modules/cacache/lib/entry-index.js7
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/changelog.md7
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/index.js10
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/license7
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/LICENSE24
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/index.js143
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml4
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE35
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js4
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js630
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json83
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown61
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js19
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js10
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/package.json83
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/readme.md102
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/.travis.yml6
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/README.md97
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/example.js21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/index.js241
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore1
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml6
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md25
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js20
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json53
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js48
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/package.json67
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/test.js291
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/README.md52
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/index.js87
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/package.json65
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.npmignore3
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml6
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/README.md59
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/example.js22
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/index.js52
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/package.json54
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/test.js85
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/.travis.yml8
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/LICENSE.md21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/README.md70
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/index.js103
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/package.json69
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/test.js121
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/.npmignore1
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/LICENSE20
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md54
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/index.js105
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore1
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md39
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js33
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json50
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/package.json55
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/.travis.yml5
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/README.md56
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/index.js82
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/package.json60
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-browser.js62
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-node.js53
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/.travis.yml8
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/README.md56
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/index.js56
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/package.json64
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/test.js181
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.npmignore1
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.travis.yml5
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/README.md41
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/collaborators.md7
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/index.js58
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore1
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml6
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md25
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js20
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json53
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js48
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/package.json56
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/test.js122
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/.npmignore3
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.html336
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.md9
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/README.md136
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore1
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE19
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile4
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md32
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js19
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js17
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json86
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js83
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/package.json65
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/through2.js96
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/package.json66
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/readme.md411
-rw-r--r--deps/npm/node_modules/cacache/node_modules/ssri/CHANGELOG.md190
-rw-r--r--deps/npm/node_modules/cacache/node_modules/ssri/LICENSE.md16
-rw-r--r--deps/npm/node_modules/cacache/node_modules/ssri/README.md462
-rw-r--r--deps/npm/node_modules/cacache/node_modules/ssri/index.js334
-rw-r--r--deps/npm/node_modules/cacache/node_modules/ssri/package.json89
-rw-r--r--deps/npm/node_modules/cacache/node_modules/y18n/CHANGELOG.md21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/y18n/README.md18
-rw-r--r--deps/npm/node_modules/cacache/node_modules/y18n/index.js16
-rw-r--r--deps/npm/node_modules/cacache/node_modules/y18n/package.json32
-rw-r--r--deps/npm/node_modules/cacache/package.json42
114 files changed, 6144 insertions, 1132 deletions
diff --git a/deps/npm/node_modules/cacache/CHANGELOG.md b/deps/npm/node_modules/cacache/CHANGELOG.md
index 0903d1d578..5c3e7911db 100644
--- a/deps/npm/node_modules/cacache/CHANGELOG.md
+++ b/deps/npm/node_modules/cacache/CHANGELOG.md
@@ -2,6 +2,31 @@
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.
+<a name="10.0.4"></a>
+## [10.0.4](https://github.com/zkat/cacache/compare/v10.0.3...v10.0.4) (2018-02-16)
+
+
+
+<a name="10.0.3"></a>
+## [10.0.3](https://github.com/zkat/cacache/compare/v10.0.2...v10.0.3) (2018-02-16)
+
+
+### Bug Fixes
+
+* **content:** rethrow aggregate errors as ENOENT ([fa918f5](https://github.com/zkat/cacache/commit/fa918f5))
+
+
+
+<a name="10.0.2"></a>
+## [10.0.2](https://github.com/zkat/cacache/compare/v10.0.1...v10.0.2) (2018-01-07)
+
+
+### Bug Fixes
+
+* **ls:** deleted entries could cause a premature stream EOF ([347dc36](https://github.com/zkat/cacache/commit/347dc36))
+
+
+
<a name="10.0.1"></a>
## [10.0.1](https://github.com/zkat/cacache/compare/v10.0.0...v10.0.1) (2017-11-15)
diff --git a/deps/npm/node_modules/cacache/README.md b/deps/npm/node_modules/cacache/README.md
index ea69b8f540..4b284588a6 100644
--- a/deps/npm/node_modules/cacache/README.md
+++ b/deps/npm/node_modules/cacache/README.md
@@ -6,7 +6,7 @@ concurrency, and it will never give you corrupted data, even if cache files
get corrupted or manipulated.
It was originally written to be used as [npm](https://npm.im)'s local cache, but
-can just as easily be used on its own
+can just as easily be used on its own.
_Translations: [español](README.es.md)_
@@ -117,7 +117,7 @@ translations. To use the English API as documented in this README, use
`require('cacache')`, but may change in the future.
cacache also supports other languages! You can find the list of currently
-supported ones my looking in `./locales` in the source directory. You can use
+supported ones by looking in `./locales` in the source directory. You can use
the API in that language with `require('cacache/<lang>')`.
Want to add support for a new language? Please go ahead! You should be able to
diff --git a/deps/npm/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/cacache/lib/content/read.js
index b09ad5cb40..7a4da3beb8 100644
--- a/deps/npm/node_modules/cacache/lib/content/read.js
+++ b/deps/npm/node_modules/cacache/lib/content/read.js
@@ -95,6 +95,16 @@ function pickContentSri (cache, integrity) {
return BB.any(sri[sri.pickAlgorithm()].map(meta => {
return pickContentSri(cache, meta)
}))
+ .catch(err => {
+ if ([].some.call(err, e => e.code === 'ENOENT')) {
+ throw Object.assign(
+ new Error('No matching content found for ' + sri.toString()),
+ {code: 'ENOENT'}
+ )
+ } else {
+ throw err[0]
+ }
+ })
}
}
diff --git a/deps/npm/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/cacache/lib/entry-index.js
index face0fe79c..fe1cd06457 100644
--- a/deps/npm/node_modules/cacache/lib/entry-index.js
+++ b/deps/npm/node_modules/cacache/lib/entry-index.js
@@ -116,9 +116,10 @@ function lsStream (cache) {
}, new Map())
return getKeyToEntry.then(reduced => {
- return Array.from(reduced.values()).map(
- entry => stream.push(formatEntry(cache, entry))
- )
+ for (let entry of reduced.values()) {
+ const formatted = formatEntry(cache, entry)
+ formatted && stream.push(formatted)
+ }
}).catch({code: 'ENOENT'}, nop)
})
})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/changelog.md b/deps/npm/node_modules/cacache/node_modules/mississippi/changelog.md
new file mode 100644
index 0000000000..93430828f8
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/changelog.md
@@ -0,0 +1,7 @@
+# mississippi Change Log
+All notable changes to this project will be documented in this file.
+This project adheres to [Semantic Versioning](http://semver.org/).
+
+## 2.0.0 - 2018-01-30
+* Update to pump@2.0.1. (Use the individual modules to avoid potentially unnecessary major updates in your project)
+* Pin engines support to >= Node 4.0.0. Run Node LTS or greater.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/index.js
new file mode 100644
index 0000000000..d635b29c56
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/index.js
@@ -0,0 +1,10 @@
+module.exports.pipe = require('pump')
+module.exports.each = require('stream-each')
+module.exports.pipeline = require('pumpify')
+module.exports.duplex = require('duplexify')
+module.exports.through = require('through2')
+module.exports.concat = require('concat-stream')
+module.exports.finished = require('end-of-stream')
+module.exports.from = require('from2')
+module.exports.to = require('flush-write-stream')
+module.exports.parallel = require('parallel-transform')
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/license b/deps/npm/node_modules/cacache/node_modules/mississippi/license
new file mode 100644
index 0000000000..e34763968c
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/license
@@ -0,0 +1,7 @@
+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 HOLDER 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/cacache/node_modules/mississippi/node_modules/concat-stream/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/LICENSE
new file mode 100644
index 0000000000..1e836b4760
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/LICENSE
@@ -0,0 +1,24 @@
+The MIT License
+
+Copyright (c) 2013 Max Ogden
+
+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/cacache/node_modules/mississippi/node_modules/concat-stream/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/index.js
new file mode 100644
index 0000000000..b16ad1343f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/index.js
@@ -0,0 +1,143 @@
+var Writable = require('readable-stream').Writable
+var inherits = require('inherits')
+
+if (typeof Uint8Array === 'undefined') {
+ var U8 = require('typedarray').Uint8Array
+} else {
+ var U8 = Uint8Array
+}
+
+function ConcatStream(opts, cb) {
+ if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb)
+
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+ if (!opts) opts = {}
+
+ var encoding = opts.encoding
+ var shouldInferEncoding = false
+
+ if (!encoding) {
+ shouldInferEncoding = true
+ } else {
+ encoding = String(encoding).toLowerCase()
+ if (encoding === 'u8' || encoding === 'uint8') {
+ encoding = 'uint8array'
+ }
+ }
+
+ Writable.call(this, { objectMode: true })
+
+ this.encoding = encoding
+ this.shouldInferEncoding = shouldInferEncoding
+
+ if (cb) this.on('finish', function () { cb(this.getBody()) })
+ this.body = []
+}
+
+module.exports = ConcatStream
+inherits(ConcatStream, Writable)
+
+ConcatStream.prototype._write = function(chunk, enc, next) {
+ this.body.push(chunk)
+ next()
+}
+
+ConcatStream.prototype.inferEncoding = function (buff) {
+ var firstBuffer = buff === undefined ? this.body[0] : buff;
+ if (Buffer.isBuffer(firstBuffer)) return 'buffer'
+ if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array'
+ if (Array.isArray(firstBuffer)) return 'array'
+ if (typeof firstBuffer === 'string') return 'string'
+ if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object'
+ return 'buffer'
+}
+
+ConcatStream.prototype.getBody = function () {
+ if (!this.encoding && this.body.length === 0) return []
+ if (this.shouldInferEncoding) this.encoding = this.inferEncoding()
+ if (this.encoding === 'array') return arrayConcat(this.body)
+ if (this.encoding === 'string') return stringConcat(this.body)
+ if (this.encoding === 'buffer') return bufferConcat(this.body)
+ if (this.encoding === 'uint8array') return u8Concat(this.body)
+ return this.body
+}
+
+var isArray = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]'
+}
+
+function isArrayish (arr) {
+ return /Array\]$/.test(Object.prototype.toString.call(arr))
+}
+
+function isBufferish (p) {
+ return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function')
+}
+
+function stringConcat (parts) {
+ var strings = []
+ var needsToString = false
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (typeof p === 'string') {
+ strings.push(p)
+ } else if (Buffer.isBuffer(p)) {
+ strings.push(p)
+ } else if (isBufferish(p)) {
+ strings.push(new Buffer(p))
+ } else {
+ strings.push(new Buffer(String(p)))
+ }
+ }
+ if (Buffer.isBuffer(parts[0])) {
+ strings = Buffer.concat(strings)
+ strings = strings.toString('utf8')
+ } else {
+ strings = strings.join('')
+ }
+ return strings
+}
+
+function bufferConcat (parts) {
+ var bufs = []
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (Buffer.isBuffer(p)) {
+ bufs.push(p)
+ } else if (isBufferish(p)) {
+ bufs.push(new Buffer(p))
+ } else {
+ bufs.push(new Buffer(String(p)))
+ }
+ }
+ return Buffer.concat(bufs)
+}
+
+function arrayConcat (parts) {
+ var res = []
+ for (var i = 0; i < parts.length; i++) {
+ res.push.apply(res, parts[i])
+ }
+ return res
+}
+
+function u8Concat (parts) {
+ var len = 0
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof parts[i] === 'string') {
+ parts[i] = new Buffer(parts[i])
+ }
+ len += parts[i].length
+ }
+ var u8 = new U8(len)
+ for (var i = 0, offset = 0; i < parts.length; i++) {
+ var part = parts[i]
+ for (var j = 0; j < part.length; j++) {
+ u8[offset++] = part[j]
+ }
+ }
+ return u8
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml
new file mode 100644
index 0000000000..cc4dba29d9
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE
new file mode 100644
index 0000000000..11adfaec9e
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE
@@ -0,0 +1,35 @@
+/*
+ Copyright (c) 2010, Linden Research, Inc.
+ Copyright (c) 2012, Joshua Bell
+
+ 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.
+ $/LicenseInfo$
+ */
+
+// Original can be found at:
+// https://bitbucket.org/lindenlab/llsd
+// Modifications by Joshua Bell inexorabletash@gmail.com
+// https://github.com/inexorabletash/polyfill
+
+// ES3/ES5 implementation of the Krhonos Typed Array Specification
+// Ref: http://www.khronos.org/registry/typedarray/specs/latest/
+// Date: 2011-02-01
+//
+// Variations:
+// * Allows typed_array.get/set() as alias for subscripts (typed_array[])
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js
new file mode 100644
index 0000000000..8423d7c9b1
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js
@@ -0,0 +1,4 @@
+var Uint8Array = require('../').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js
new file mode 100644
index 0000000000..5e540841f4
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js
@@ -0,0 +1,630 @@
+var undefined = (void 0); // Paranoia
+
+// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to
+// create, and consume so much memory, that the browser appears frozen.
+var MAX_ARRAY_LENGTH = 1e5;
+
+// Approximations of internal ECMAScript conversion functions
+var ECMAScript = (function() {
+ // Stash a copy in case other scripts modify these
+ var opts = Object.prototype.toString,
+ ophop = Object.prototype.hasOwnProperty;
+
+ return {
+ // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues:
+ Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); },
+ HasProperty: function(o, p) { return p in o; },
+ HasOwnProperty: function(o, p) { return ophop.call(o, p); },
+ IsCallable: function(o) { return typeof o === 'function'; },
+ ToInt32: function(v) { return v >> 0; },
+ ToUint32: function(v) { return v >>> 0; }
+ };
+}());
+
+// Snapshot intrinsics
+var LN2 = Math.LN2,
+ abs = Math.abs,
+ floor = Math.floor,
+ log = Math.log,
+ min = Math.min,
+ pow = Math.pow,
+ round = Math.round;
+
+// ES5: lock down object properties
+function configureProperties(obj) {
+ if (getOwnPropNames && defineProp) {
+ var props = getOwnPropNames(obj), i;
+ for (i = 0; i < props.length; i += 1) {
+ defineProp(obj, props[i], {
+ value: obj[props[i]],
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ }
+ }
+}
+
+// emulate ES5 getter/setter API using legacy APIs
+// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx
+// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but
+// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless)
+var defineProp
+if (Object.defineProperty && (function() {
+ try {
+ Object.defineProperty({}, 'x', {});
+ return true;
+ } catch (e) {
+ return false;
+ }
+ })()) {
+ defineProp = Object.defineProperty;
+} else {
+ defineProp = function(o, p, desc) {
+ if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object");
+ if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); }
+ if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); }
+ if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; }
+ return o;
+ };
+}
+
+var getOwnPropNames = Object.getOwnPropertyNames || function (o) {
+ if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object");
+ var props = [], p;
+ for (p in o) {
+ if (ECMAScript.HasOwnProperty(o, p)) {
+ props.push(p);
+ }
+ }
+ return props;
+};
+
+// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value)
+// for index in 0 ... obj.length
+function makeArrayAccessors(obj) {
+ if (!defineProp) { return; }
+
+ if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill");
+
+ function makeArrayAccessor(index) {
+ defineProp(obj, index, {
+ 'get': function() { return obj._getter(index); },
+ 'set': function(v) { obj._setter(index, v); },
+ enumerable: true,
+ configurable: false
+ });
+ }
+
+ var i;
+ for (i = 0; i < obj.length; i += 1) {
+ makeArrayAccessor(i);
+ }
+}
+
+// Internal conversion functions:
+// pack<Type>() - take a number (interpreted as Type), output a byte array
+// unpack<Type>() - take a byte array, output a Type-like number
+
+function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }
+function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; }
+
+function packI8(n) { return [n & 0xff]; }
+function unpackI8(bytes) { return as_signed(bytes[0], 8); }
+
+function packU8(n) { return [n & 0xff]; }
+function unpackU8(bytes) { return as_unsigned(bytes[0], 8); }
+
+function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; }
+
+function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); }
+
+function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); }
+
+function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packIEEE754(v, ebits, fbits) {
+
+ var bias = (1 << (ebits - 1)) - 1,
+ s, e, f, ln,
+ i, bits, str, bytes;
+
+ function roundToEven(n) {
+ var w = floor(n), f = n - w;
+ if (f < 0.5)
+ return w;
+ if (f > 0.5)
+ return w + 1;
+ return w % 2 ? w + 1 : w;
+ }
+
+ // Compute sign, exponent, fraction
+ if (v !== v) {
+ // NaN
+ // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
+ e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0;
+ } else if (v === Infinity || v === -Infinity) {
+ e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0;
+ } else if (v === 0) {
+ e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0;
+ } else {
+ s = v < 0;
+ v = abs(v);
+
+ if (v >= pow(2, 1 - bias)) {
+ e = min(floor(log(v) / LN2), 1023);
+ f = roundToEven(v / pow(2, e) * pow(2, fbits));
+ if (f / pow(2, fbits) >= 2) {
+ e = e + 1;
+ f = 1;
+ }
+ if (e > bias) {
+ // Overflow
+ e = (1 << ebits) - 1;
+ f = 0;
+ } else {
+ // Normalized
+ e = e + bias;
+ f = f - pow(2, fbits);
+ }
+ } else {
+ // Denormalized
+ e = 0;
+ f = roundToEven(v / pow(2, 1 - bias - fbits));
+ }
+ }
+
+ // Pack sign, exponent, fraction
+ bits = [];
+ for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); }
+ for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); }
+ bits.push(s ? 1 : 0);
+ bits.reverse();
+ str = bits.join('');
+
+ // Bits to bytes
+ bytes = [];
+ while (str.length) {
+ bytes.push(parseInt(str.substring(0, 8), 2));
+ str = str.substring(8);
+ }
+ return bytes;
+}
+
+function unpackIEEE754(bytes, ebits, fbits) {
+
+ // Bytes to bits
+ var bits = [], i, j, b, str,
+ bias, s, e, f;
+
+ for (i = bytes.length; i; i -= 1) {
+ b = bytes[i - 1];
+ for (j = 8; j; j -= 1) {
+ bits.push(b % 2 ? 1 : 0); b = b >> 1;
+ }
+ }
+ bits.reverse();
+ str = bits.join('');
+
+ // Unpack sign, exponent, fraction
+ bias = (1 << (ebits - 1)) - 1;
+ s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
+ e = parseInt(str.substring(1, 1 + ebits), 2);
+ f = parseInt(str.substring(1 + ebits), 2);
+
+ // Produce number
+ if (e === (1 << ebits) - 1) {
+ return f !== 0 ? NaN : s * Infinity;
+ } else if (e > 0) {
+ // Normalized
+ return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
+ } else if (f !== 0) {
+ // Denormalized
+ return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
+ } else {
+ return s < 0 ? -0 : 0;
+ }
+}
+
+function unpackF64(b) { return unpackIEEE754(b, 11, 52); }
+function packF64(v) { return packIEEE754(v, 11, 52); }
+function unpackF32(b) { return unpackIEEE754(b, 8, 23); }
+function packF32(v) { return packIEEE754(v, 8, 23); }
+
+
+//
+// 3 The ArrayBuffer Type
+//
+
+(function() {
+
+ /** @constructor */
+ var ArrayBuffer = function ArrayBuffer(length) {
+ length = ECMAScript.ToInt32(length);
+ if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer');
+
+ this.byteLength = length;
+ this._bytes = [];
+ this._bytes.length = length;
+
+ var i;
+ for (i = 0; i < this.byteLength; i += 1) {
+ this._bytes[i] = 0;
+ }
+
+ configureProperties(this);
+ };
+
+ exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
+
+ //
+ // 4 The ArrayBufferView Type
+ //
+
+ // NOTE: this constructor is not exported
+ /** @constructor */
+ var ArrayBufferView = function ArrayBufferView() {
+ //this.buffer = null;
+ //this.byteOffset = 0;
+ //this.byteLength = 0;
+ };
+
+ //
+ // 5 The Typed Array View Types
+ //
+
+ function makeConstructor(bytesPerElement, pack, unpack) {
+ // Each TypedArray type requires a distinct constructor instance with
+ // identical logic, which this produces.
+
+ var ctor;
+ ctor = function(buffer, byteOffset, length) {
+ var array, sequence, i, s;
+
+ if (!arguments.length || typeof arguments[0] === 'number') {
+ // Constructor(unsigned long length)
+ this.length = ECMAScript.ToInt32(arguments[0]);
+ if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer');
+
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+ } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) {
+ // Constructor(TypedArray array)
+ array = arguments[0];
+
+ this.length = array.length;
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ this._setter(i, array._getter(i));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(sequence<type> array)
+ sequence = arguments[0];
+
+ this.length = ECMAScript.ToUint32(sequence.length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ s = sequence[i];
+ this._setter(i, Number(s));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset, optional unsigned long length)
+ this.buffer = buffer;
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (this.byteOffset % this.BYTES_PER_ELEMENT) {
+ // The given byteOffset must be a multiple of the element
+ // size of the specific type, otherwise an exception is raised.
+ throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+
+ if (this.byteLength % this.BYTES_PER_ELEMENT) {
+ throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");
+ }
+ this.length = this.byteLength / this.BYTES_PER_ELEMENT;
+ } else {
+ this.length = ECMAScript.ToUint32(length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+
+ this.constructor = ctor;
+
+ configureProperties(this);
+ makeArrayAccessors(this);
+ };
+
+ ctor.prototype = new ArrayBufferView();
+ ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
+ ctor.prototype._pack = pack;
+ ctor.prototype._unpack = unpack;
+ ctor.BYTES_PER_ELEMENT = bytesPerElement;
+
+ // getter type (unsigned long index);
+ ctor.prototype._getter = function(index) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = [], i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ bytes.push(this.buffer._bytes[o]);
+ }
+ return this._unpack(bytes);
+ };
+
+ // NONSTANDARD: convenience alias for getter: type get(unsigned long index);
+ ctor.prototype.get = ctor.prototype._getter;
+
+ // setter void (unsigned long index, type value);
+ ctor.prototype._setter = function(index, value) {
+ if (arguments.length < 2) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = this._pack(value), i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ this.buffer._bytes[o] = bytes[i];
+ }
+ };
+
+ // void set(TypedArray array, optional unsigned long offset);
+ // void set(sequence<type> array, optional unsigned long offset);
+ ctor.prototype.set = function(index, value) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+ var array, sequence, offset, len,
+ i, s, d,
+ byteOffset, byteLength, tmp;
+
+ if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) {
+ // void set(TypedArray array, optional unsigned long offset);
+ array = arguments[0];
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + array.length > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
+ byteLength = array.length * this.BYTES_PER_ELEMENT;
+
+ if (array.buffer === this.buffer) {
+ tmp = [];
+ for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
+ tmp[i] = array.buffer._bytes[s];
+ }
+ for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) {
+ this.buffer._bytes[d] = tmp[i];
+ }
+ } else {
+ for (i = 0, s = array.byteOffset, d = byteOffset;
+ i < byteLength; i += 1, s += 1, d += 1) {
+ this.buffer._bytes[d] = array.buffer._bytes[s];
+ }
+ }
+ } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') {
+ // void set(sequence<type> array, optional unsigned long offset);
+ sequence = arguments[0];
+ len = ECMAScript.ToUint32(sequence.length);
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + len > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ for (i = 0; i < len; i += 1) {
+ s = sequence[i];
+ this._setter(offset + i, Number(s));
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+ };
+
+ // TypedArray subarray(long begin, optional long end);
+ ctor.prototype.subarray = function(start, end) {
+ function clamp(v, min, max) { return v < min ? min : v > max ? max : v; }
+
+ start = ECMAScript.ToInt32(start);
+ end = ECMAScript.ToInt32(end);
+
+ if (arguments.length < 1) { start = 0; }
+ if (arguments.length < 2) { end = this.length; }
+
+ if (start < 0) { start = this.length + start; }
+ if (end < 0) { end = this.length + end; }
+
+ start = clamp(start, 0, this.length);
+ end = clamp(end, 0, this.length);
+
+ var len = end - start;
+ if (len < 0) {
+ len = 0;
+ }
+
+ return new this.constructor(
+ this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len);
+ };
+
+ return ctor;
+ }
+
+ var Int8Array = makeConstructor(1, packI8, unpackI8);
+ var Uint8Array = makeConstructor(1, packU8, unpackU8);
+ var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8);
+ var Int16Array = makeConstructor(2, packI16, unpackI16);
+ var Uint16Array = makeConstructor(2, packU16, unpackU16);
+ var Int32Array = makeConstructor(4, packI32, unpackI32);
+ var Uint32Array = makeConstructor(4, packU32, unpackU32);
+ var Float32Array = makeConstructor(4, packF32, unpackF32);
+ var Float64Array = makeConstructor(8, packF64, unpackF64);
+
+ exports.Int8Array = exports.Int8Array || Int8Array;
+ exports.Uint8Array = exports.Uint8Array || Uint8Array;
+ exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray;
+ exports.Int16Array = exports.Int16Array || Int16Array;
+ exports.Uint16Array = exports.Uint16Array || Uint16Array;
+ exports.Int32Array = exports.Int32Array || Int32Array;
+ exports.Uint32Array = exports.Uint32Array || Uint32Array;
+ exports.Float32Array = exports.Float32Array || Float32Array;
+ exports.Float64Array = exports.Float64Array || Float64Array;
+}());
+
+//
+// 6 The DataView View Type
+//
+
+(function() {
+ function r(array, index) {
+ return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index];
+ }
+
+ var IS_BIG_ENDIAN = (function() {
+ var u16array = new(exports.Uint16Array)([0x1234]),
+ u8array = new(exports.Uint8Array)(u16array.buffer);
+ return r(u8array, 0) === 0x12;
+ }());
+
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset,
+ // optional unsigned long byteLength)
+ /** @constructor */
+ var DataView = function DataView(buffer, byteOffset, byteLength) {
+ if (arguments.length === 0) {
+ buffer = new exports.ArrayBuffer(0);
+ } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
+ throw new TypeError("TypeError");
+ }
+
+ this.buffer = buffer || new exports.ArrayBuffer(0);
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+ } else {
+ this.byteLength = ECMAScript.ToUint32(byteLength);
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+
+ configureProperties(this);
+ };
+
+ function makeGetter(arrayType) {
+ return function(byteOffset, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+ byteOffset += this.byteOffset;
+
+ var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT),
+ bytes = [], i;
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(uint8Array, i));
+ }
+
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0);
+ };
+ }
+
+ DataView.prototype.getUint8 = makeGetter(exports.Uint8Array);
+ DataView.prototype.getInt8 = makeGetter(exports.Int8Array);
+ DataView.prototype.getUint16 = makeGetter(exports.Uint16Array);
+ DataView.prototype.getInt16 = makeGetter(exports.Int16Array);
+ DataView.prototype.getUint32 = makeGetter(exports.Uint32Array);
+ DataView.prototype.getInt32 = makeGetter(exports.Int32Array);
+ DataView.prototype.getFloat32 = makeGetter(exports.Float32Array);
+ DataView.prototype.getFloat64 = makeGetter(exports.Float64Array);
+
+ function makeSetter(arrayType) {
+ return function(byteOffset, value, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+
+ // Get bytes
+ var typeArray = new arrayType([value]),
+ byteArray = new exports.Uint8Array(typeArray.buffer),
+ bytes = [], i, byteView;
+
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(byteArray, i));
+ }
+
+ // Flip if necessary
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ // Write them
+ byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
+ byteView.set(bytes);
+ };
+ }
+
+ DataView.prototype.setUint8 = makeSetter(exports.Uint8Array);
+ DataView.prototype.setInt8 = makeSetter(exports.Int8Array);
+ DataView.prototype.setUint16 = makeSetter(exports.Uint16Array);
+ DataView.prototype.setInt16 = makeSetter(exports.Int16Array);
+ DataView.prototype.setUint32 = makeSetter(exports.Uint32Array);
+ DataView.prototype.setInt32 = makeSetter(exports.Int32Array);
+ DataView.prototype.setFloat32 = makeSetter(exports.Float32Array);
+ DataView.prototype.setFloat64 = makeSetter(exports.Float64Array);
+
+ exports.DataView = exports.DataView || DataView;
+
+}());
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json
new file mode 100644
index 0000000000..089c4b2074
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "typedarray@^0.0.6",
+ "_id": "typedarray@0.0.6",
+ "_inBundle": false,
+ "_integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
+ "_location": "/cacache/mississippi/concat-stream/typedarray",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "typedarray@^0.0.6",
+ "name": "typedarray",
+ "escapedName": "typedarray",
+ "rawSpec": "^0.0.6",
+ "saveSpec": null,
+ "fetchSpec": "^0.0.6"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi/concat-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777",
+ "_spec": "typedarray@^0.0.6",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/typedarray/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "TypedArray polyfill for old browsers",
+ "devDependencies": {
+ "tape": "~2.3.2"
+ },
+ "homepage": "https://github.com/substack/typedarray",
+ "keywords": [
+ "ArrayBuffer",
+ "DataView",
+ "Float32Array",
+ "Float64Array",
+ "Int8Array",
+ "Int16Array",
+ "Int32Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "Uint16Array",
+ "Uint32Array",
+ "typed",
+ "array",
+ "polyfill"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "typedarray",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/typedarray.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "firefox/16..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": "0.0.6"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown
new file mode 100644
index 0000000000..d18f6f7197
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown
@@ -0,0 +1,61 @@
+# typedarray
+
+TypedArray polyfill ripped from [this
+module](https://raw.github.com/inexorabletash/polyfill).
+
+[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray)
+
+[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray)
+
+# example
+
+``` js
+var Uint8Array = require('typedarray').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
+```
+
+output:
+
+```
+55
+```
+
+# methods
+
+``` js
+var TA = require('typedarray')
+```
+
+The `TA` object has the following constructors:
+
+* TA.ArrayBuffer
+* TA.DataView
+* TA.Float32Array
+* TA.Float64Array
+* TA.Int8Array
+* TA.Int16Array
+* TA.Int32Array
+* TA.Uint8Array
+* TA.Uint8ClampedArray
+* TA.Uint16Array
+* TA.Uint32Array
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install typedarray
+```
+
+To use this module in the browser, compile with
+[browserify](http://browserify.org)
+or download a UMD build from browserify CDN:
+
+http://wzrd.in/standalone/typedarray@latest
+
+# license
+
+MIT
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js
new file mode 100644
index 0000000000..e57dabdceb
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js
@@ -0,0 +1,19 @@
+var test = require('tape');
+var vm = require('vm');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/../../index.js', 'utf8');
+
+test('u8a without globals', function (t) {
+ var c = {
+ module: { exports: {} },
+ };
+ c.exports = c.module.exports;
+ vm.runInNewContext(src, c);
+ var TA = c.module.exports;
+ var ua = new(TA.Uint8Array)(5);
+
+ t.equal(ua.length, 5);
+ ua[1] = 256 + 55;
+ t.equal(ua[1], 55);
+ t.end();
+});
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js
new file mode 100644
index 0000000000..df596a34f2
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js
@@ -0,0 +1,10 @@
+var TA = require('../');
+var test = require('tape');
+
+test('tiny u8a test', function (t) {
+ var ua = new(TA.Uint8Array)(5);
+ t.equal(ua.length, 5);
+ ua[1] = 256 + 55;
+ t.equal(ua[1], 55);
+ t.end();
+});
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/package.json
new file mode 100644
index 0000000000..feb704f2dc
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "concat-stream@^1.5.0",
+ "_id": "concat-stream@1.6.1",
+ "_inBundle": false,
+ "_integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==",
+ "_location": "/cacache/mississippi/concat-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "concat-stream@^1.5.0",
+ "name": "concat-stream",
+ "escapedName": "concat-stream",
+ "rawSpec": "^1.5.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.5.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz",
+ "_shasum": "261b8f518301f1d834e36342b9fea095d2620a26",
+ "_spec": "concat-stream@^1.5.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Max Ogden",
+ "email": "max@maxogden.com"
+ },
+ "bugs": {
+ "url": "http://github.com/maxogden/concat-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.2.2",
+ "typedarray": "^0.0.6"
+ },
+ "deprecated": false,
+ "description": "writable stream that concatenates strings or binary data and calls a callback with the result",
+ "devDependencies": {
+ "tape": "^4.6.3"
+ },
+ "engines": [
+ "node >= 0.8"
+ ],
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/maxogden/concat-stream#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "concat-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/maxogden/concat-stream.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "tags": [
+ "stream",
+ "simple",
+ "util",
+ "utility"
+ ],
+ "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.6.1"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/readme.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/readme.md
new file mode 100644
index 0000000000..9478721990
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/readme.md
@@ -0,0 +1,102 @@
+# concat-stream
+
+Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer.
+
+[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream)
+
+[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/)
+
+### description
+
+Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you.
+
+Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM).
+
+There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details.
+
+## Related
+
+`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
+
+### examples
+
+#### Buffers
+
+```js
+var fs = require('fs')
+var concat = require('concat-stream')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = concat(gotPicture)
+
+readStream.on('error', handleError)
+readStream.pipe(concatStream)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+
+```
+
+#### Arrays
+
+```js
+var write = concat(function(data) {})
+write.write([1,2,3])
+write.write([4,5,6])
+write.end()
+// data will be [1,2,3,4,5,6] in the above callback
+```
+
+#### Uint8Arrays
+
+```js
+var write = concat(function(data) {})
+var a = new Uint8Array(3)
+a[0] = 97; a[1] = 98; a[2] = 99
+write.write(a)
+write.write('!')
+write.end(Buffer('!!1'))
+```
+
+See `test/` for more examples
+
+# methods
+
+```js
+var concat = require('concat-stream')
+```
+
+## var writable = concat(opts={}, cb)
+
+Return a `writable` stream that will fire `cb(data)` with all of the data that
+was written to the stream. Data can be written to `writable` as strings,
+Buffers, arrays of byte integers, and Uint8Arrays.
+
+By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason.
+
+* `string` - get a string
+* `buffer` - get back a Buffer
+* `array` - get an array of byte integers
+* `uint8array`, `u8`, `uint8` - get back a Uint8Array
+* `object`, get back an array of Objects
+
+If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`.
+
+If nothing is written to `writable` then `data` will be an empty array `[]`.
+
+# error handling
+
+`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors.
+
+We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code.
+
+# license
+
+MIT LICENSE
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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/cacache/node_modules/mississippi/node_modules/duplexify/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/README.md
new file mode 100644
index 0000000000..8352900fc6
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/README.md
@@ -0,0 +1,97 @@
+# duplexify
+
+Turn a writeable and readable stream into a single streams2 duplex stream.
+
+Similar to [duplexer2](https://github.com/deoxxa/duplexer2) except it supports both streams2 and streams1 as input
+and it allows you to set the readable and writable part asynchronously using `setReadable(stream)` and `setWritable(stream)`
+
+```
+npm install duplexify
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/duplexify.svg?style=flat)](http://travis-ci.org/mafintosh/duplexify)
+
+## Usage
+
+Use `duplexify(writable, readable, streamOptions)` (or `duplexify.obj(writable, readable)` to create an object stream)
+
+``` js
+var duplexify = require('duplexify')
+
+// turn writableStream and readableStream into a single duplex stream
+var dup = duplexify(writableStream, readableStream)
+
+dup.write('hello world') // will write to writableStream
+dup.on('data', function(data) {
+ // will read from readableStream
+})
+```
+
+You can also set the readable and writable parts asynchronously
+
+``` js
+var dup = duplexify()
+
+dup.write('hello world') // write will buffer until the writable
+ // part has been set
+
+// wait a bit ...
+dup.setReadable(readableStream)
+
+// maybe wait some more?
+dup.setWritable(writableStream)
+```
+
+If you call `setReadable` or `setWritable` multiple times it will unregister the previous readable/writable stream.
+To disable the readable or writable part call `setReadable` or `setWritable` with `null`.
+
+If the readable or writable streams emits an error or close it will destroy both streams and bubble up the event.
+You can also explicitly destroy the streams by calling `dup.destroy()`. The `destroy` method optionally takes an
+error object as argument, in which case the error is emitted as part of the `error` event.
+
+``` js
+dup.on('error', function(err) {
+ console.log('readable or writable emitted an error - close will follow')
+})
+
+dup.on('close', function() {
+ console.log('the duplex stream is destroyed')
+})
+
+dup.destroy() // calls destroy on the readable and writable part (if present)
+```
+
+## HTTP request example
+
+Turn a node core http request into a duplex stream is as easy as
+
+``` js
+var duplexify = require('duplexify')
+var http = require('http')
+
+var request = function(opts) {
+ var req = http.request(opts)
+ var dup = duplexify(req)
+ req.on('response', function(res) {
+ dup.setReadable(res)
+ })
+ return dup
+}
+
+var req = request({
+ method: 'GET',
+ host: 'www.google.com',
+ port: 80
+})
+
+req.end()
+req.pipe(process.stdout)
+```
+
+## License
+
+MIT
+
+## Related
+
+`duplexify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/example.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/example.js
new file mode 100644
index 0000000000..5585c19756
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/example.js
@@ -0,0 +1,21 @@
+var duplexify = require('duplexify')
+var http = require('http')
+
+var request = function(opts) {
+ var req = http.request(opts)
+ var dup = duplexify()
+ dup.setWritable(req)
+ req.on('response', function(res) {
+ dup.setReadable(res)
+ })
+ return dup
+}
+
+var req = request({
+ method: 'GET',
+ host: 'www.google.com',
+ port: 80
+})
+
+req.end()
+req.pipe(process.stdout)
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/index.js
new file mode 100644
index 0000000000..8323e654ac
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/index.js
@@ -0,0 +1,241 @@
+var stream = require('readable-stream')
+var eos = require('end-of-stream')
+var inherits = require('inherits')
+var shift = require('stream-shift')
+
+var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from)
+ ? Buffer.from([0])
+ : new Buffer([0])
+
+var onuncork = function(self, fn) {
+ if (self._corked) self.once('uncork', fn)
+ else fn()
+}
+
+var destroyer = function(self, end) {
+ return function(err) {
+ if (err) self._destroyInterval(err)
+ else if (end && !self._ended) self.end()
+ }
+}
+
+var end = function(ws, fn) {
+ if (!ws) return fn()
+ if (ws._writableState && ws._writableState.finished) return fn()
+ if (ws._writableState) return ws.end(fn)
+ ws.end()
+ fn()
+}
+
+var toStreams2 = function(rs) {
+ return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs)
+}
+
+var Duplexify = function(writable, readable, opts) {
+ if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts)
+ stream.Duplex.call(this, opts)
+
+ this._writable = null
+ this._readable = null
+ this._readable2 = null
+
+ this._forwardDestroy = !opts || opts.destroy !== false
+ this._forwardEnd = !opts || opts.end !== false
+ this._corked = 1 // start corked
+ this._ondrain = null
+ this._drained = false
+ this._forwarding = false
+ this._unwrite = null
+ this._unread = null
+ this._ended = false
+ this._error = null
+ this._preferError = false
+
+ this.destroyed = false
+
+ if (writable) this.setWritable(writable)
+ if (readable) this.setReadable(readable)
+}
+
+inherits(Duplexify, stream.Duplex)
+
+Duplexify.obj = function(writable, readable, opts) {
+ if (!opts) opts = {}
+ opts.objectMode = true
+ opts.highWaterMark = 16
+ return new Duplexify(writable, readable, opts)
+}
+
+Duplexify.prototype.cork = function() {
+ if (++this._corked === 1) this.emit('cork')
+}
+
+Duplexify.prototype.uncork = function() {
+ if (this._corked && --this._corked === 0) this.emit('uncork')
+}
+
+Duplexify.prototype.setWritable = function(writable) {
+ if (this._unwrite) this._unwrite()
+
+ if (this.destroyed) {
+ if (writable && writable.destroy) writable.destroy()
+ return
+ }
+
+ if (writable === null || writable === false) {
+ this.end()
+ return
+ }
+
+ var self = this
+ var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd))
+
+ var ondrain = function() {
+ var ondrain = self._ondrain
+ self._ondrain = null
+ if (ondrain) ondrain()
+ }
+
+ var clear = function() {
+ self._writable.removeListener('drain', ondrain)
+ unend()
+ }
+
+ if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks
+
+ this._writable = writable
+ this._writable.on('drain', ondrain)
+ this._unwrite = clear
+
+ this.uncork() // always uncork setWritable
+}
+
+Duplexify.prototype.setReadable = function(readable) {
+ if (this._unread) this._unread()
+
+ if (this.destroyed) {
+ if (readable && readable.destroy) readable.destroy()
+ return
+ }
+
+ if (readable === null || readable === false) {
+ this.push(null)
+ this.resume()
+ return
+ }
+
+ var self = this
+ var unend = eos(readable, {writable:false, readable:true}, destroyer(this))
+
+ var onreadable = function() {
+ self._forward()
+ }
+
+ var onend = function() {
+ self.push(null)
+ }
+
+ var clear = function() {
+ self._readable2.removeListener('readable', onreadable)
+ self._readable2.removeListener('end', onend)
+ unend()
+ }
+
+ this._drained = true
+ this._readable = readable
+ this._readable2 = readable._readableState ? readable : toStreams2(readable)
+ this._readable2.on('readable', onreadable)
+ this._readable2.on('end', onend)
+ this._unread = clear
+
+ this._forward()
+}
+
+Duplexify.prototype._read = function() {
+ this._drained = true
+ this._forward()
+}
+
+Duplexify.prototype._forward = function() {
+ if (this._forwarding || !this._readable2 || !this._drained) return
+ this._forwarding = true
+
+ var data
+
+ while (this._drained && (data = shift(this._readable2)) !== null) {
+ if (this.destroyed) continue
+ this._drained = this.push(data)
+ }
+
+ this._forwarding = false
+}
+
+Duplexify.prototype.destroy = function(err) {
+ if (this._preferError && !this._error && err) this._error = err
+
+ if (this.destroyed) return
+ this.destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ self._destroy(self._preferError ? self._error : err)
+ })
+}
+
+Duplexify.prototype._destroyInterval = function(err) {
+ if (this.destroyed) return
+ if (err.message !== 'premature close') return this.destroy(err)
+ this._preferError = true
+ this.destroy(null)
+}
+
+Duplexify.prototype._destroy = function(err) {
+ if (err) {
+ var ondrain = this._ondrain
+ this._ondrain = null
+ if (ondrain) ondrain(err)
+ else this.emit('error', err)
+ }
+
+ if (this._forwardDestroy) {
+ if (this._readable && this._readable.destroy) this._readable.destroy()
+ if (this._writable && this._writable.destroy) this._writable.destroy()
+ }
+
+ this.emit('close')
+}
+
+Duplexify.prototype._write = function(data, enc, cb) {
+ if (this.destroyed) return cb()
+ if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb))
+ if (data === SIGNAL_FLUSH) return this._finish(cb)
+ if (!this._writable) return cb()
+
+ if (this._writable.write(data) === false) this._ondrain = cb
+ else cb()
+}
+
+
+Duplexify.prototype._finish = function(cb) {
+ var self = this
+ this.emit('preend')
+ onuncork(this, function() {
+ end(self._forwardEnd && self._writable, function() {
+ // haxx to not emit prefinish twice
+ if (self._writableState.prefinished === false) self._writableState.prefinished = true
+ self.emit('prefinish')
+ onuncork(self, cb)
+ })
+ })
+}
+
+Duplexify.prototype.end = function(data, enc, cb) {
+ if (typeof data === 'function') return this.end(null, null, data)
+ if (typeof enc === 'function') return this.end(data, null, enc)
+ this._ended = true
+ if (data) this.write(data)
+ if (!this._writableState.ending) this.write(SIGNAL_FLUSH)
+ return stream.Writable.prototype.end.call(this, cb)
+}
+
+module.exports = Duplexify
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE
new file mode 100644
index 0000000000..bae9da7bfa
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Mathias Buus
+
+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/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md
new file mode 100644
index 0000000000..d9cc2d945f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md
@@ -0,0 +1,25 @@
+# stream-shift
+
+Returns the next buffer/object in a stream's readable queue
+
+```
+npm install stream-shift
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift)
+
+## Usage
+
+``` js
+var shift = require('stream-shift')
+
+console.log(shift(someStream)) // first item in its buffer
+```
+
+## Credit
+
+Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js
new file mode 100644
index 0000000000..c4b18b9c2a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js
@@ -0,0 +1,20 @@
+module.exports = shift
+
+function shift (stream) {
+ var rs = stream._readableState
+ if (!rs) return null
+ return rs.objectMode ? stream.read() : stream.read(getStateLength(rs))
+}
+
+function getStateLength (state) {
+ if (state.buffer.length) {
+ // Since node 6.3.0 state.buffer is a BufferList not an array
+ if (state.buffer.head) {
+ return state.buffer.head.data.length
+ }
+
+ return state.buffer[0].length
+ }
+
+ return state.length
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json
new file mode 100644
index 0000000000..46bdac375a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json
@@ -0,0 +1,53 @@
+{
+ "_from": "stream-shift@^1.0.0",
+ "_id": "stream-shift@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
+ "_location": "/cacache/mississippi/duplexify/stream-shift",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-shift@^1.0.0",
+ "name": "stream-shift",
+ "escapedName": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi/duplexify"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
+ "_shasum": "d5c752825e5367e786f78e18e445ea223a155952",
+ "_spec": "stream-shift@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-shift/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Returns the next buffer/object in a stream's readable queue",
+ "devDependencies": {
+ "standard": "^7.1.2",
+ "tape": "^4.6.0",
+ "through2": "^2.0.1"
+ },
+ "homepage": "https://github.com/mafintosh/stream-shift",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-shift",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-shift.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js
new file mode 100644
index 0000000000..c0222c37d5
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js
@@ -0,0 +1,48 @@
+var tape = require('tape')
+var through = require('through2')
+var stream = require('stream')
+var shift = require('./')
+
+tape('shifts next', function (t) {
+ var passthrough = through()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with core', function (t) {
+ var passthrough = stream.PassThrough()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with object mode', function (t) {
+ var passthrough = through({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
+
+tape('shifts next with object mode with core', function (t) {
+ var passthrough = stream.PassThrough({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/package.json
new file mode 100644
index 0000000000..a3c86f5c54
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "duplexify@^3.4.2",
+ "_id": "duplexify@3.5.4",
+ "_inBundle": false,
+ "_integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==",
+ "_location": "/cacache/mississippi/duplexify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "duplexify@^3.4.2",
+ "name": "duplexify",
+ "escapedName": "duplexify",
+ "rawSpec": "^3.4.2",
+ "saveSpec": null,
+ "fetchSpec": "^3.4.2"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi",
+ "/cacache/mississippi/pumpify"
+ ],
+ "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz",
+ "_shasum": "4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4",
+ "_spec": "duplexify@^3.4.2",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/duplexify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.0.0",
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.0.0",
+ "stream-shift": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input",
+ "devDependencies": {
+ "concat-stream": "^1.5.2",
+ "tape": "^4.0.0",
+ "through2": "^2.0.0"
+ },
+ "homepage": "https://github.com/mafintosh/duplexify",
+ "keywords": [
+ "duplex",
+ "streams2",
+ "streams",
+ "stream",
+ "writable",
+ "readable",
+ "async"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "duplexify",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/duplexify.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "3.5.4"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/test.js
new file mode 100644
index 0000000000..4330e93cf0
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/test.js
@@ -0,0 +1,291 @@
+var tape = require('tape')
+var through = require('through2')
+var concat = require('concat-stream')
+var net = require('net')
+var duplexify = require('./')
+
+tape('passthrough', function(t) {
+ t.plan(2)
+
+ var pt = through()
+ var dup = duplexify(pt, pt)
+
+ dup.end('hello world')
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('passthrough + double end', function(t) {
+ t.plan(2)
+
+ var pt = through()
+ var dup = duplexify(pt, pt)
+
+ dup.end('hello world')
+ dup.end()
+
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('async passthrough + end', function(t) {
+ t.plan(2)
+
+ var pt = through.obj({highWaterMark:1}, function(data, enc, cb) {
+ setTimeout(function() {
+ cb(null, data)
+ }, 100)
+ })
+
+ var dup = duplexify(pt, pt)
+
+ dup.write('hello ')
+ dup.write('world')
+ dup.end()
+
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('duplex', function(t) {
+ var readExpected = ['read-a', 'read-b', 'read-c']
+ var writeExpected = ['write-a', 'write-b', 'write-c']
+
+ t.plan(readExpected.length+writeExpected.length+2)
+
+ var readable = through.obj()
+ var writable = through.obj(function(data, enc, cb) {
+ t.same(data, writeExpected.shift(), 'onwrite should match')
+ cb()
+ })
+
+ var dup = duplexify.obj(writable, readable)
+
+ readExpected.slice().forEach(function(data) {
+ readable.write(data)
+ })
+ readable.end()
+
+ writeExpected.slice().forEach(function(data) {
+ dup.write(data)
+ })
+ dup.end()
+
+ dup.on('data', function(data) {
+ t.same(data, readExpected.shift(), 'ondata should match')
+ })
+ dup.on('end', function() {
+ t.ok(true, 'should end')
+ })
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+})
+
+tape('async', function(t) {
+ var dup = duplexify()
+ var pt = through()
+
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'i was async', 'same in as out')
+ t.end()
+ }))
+
+ dup.write('i')
+ dup.write(' was ')
+ dup.end('async')
+
+ setTimeout(function() {
+ dup.setWritable(pt)
+ setTimeout(function() {
+ dup.setReadable(pt)
+ }, 50)
+ }, 50)
+})
+
+tape('destroy', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ write.destroy = function() {
+ t.ok(true, 'write destroyed')
+ }
+
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ dup.destroy()
+ dup.destroy() // should only work once
+})
+
+tape('destroy both', function(t) {
+ t.plan(3)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ write.destroy = function() {
+ t.ok(true, 'write destroyed')
+ }
+
+ read.destroy = function() {
+ t.ok(true, 'read destroyed')
+ }
+
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ dup.destroy()
+ dup.destroy() // should only work once
+})
+
+tape('bubble read errors', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ dup.on('error', function(err) {
+ t.same(err.message, 'read-error', 'received read error')
+ })
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ read.emit('error', new Error('read-error'))
+ write.emit('error', new Error('write-error')) // only emit first error
+})
+
+tape('bubble write errors', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ dup.on('error', function(err) {
+ t.same(err.message, 'write-error', 'received write error')
+ })
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ write.emit('error', new Error('write-error'))
+ read.emit('error', new Error('read-error')) // only emit first error
+})
+
+tape('reset writable / readable', function(t) {
+ t.plan(3)
+
+ var toUpperCase = function(data, enc, cb) {
+ cb(null, data.toString().toUpperCase())
+ }
+
+ var passthrough = through()
+ var upper = through(toUpperCase)
+ var dup = duplexify(passthrough, passthrough)
+
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'hello')
+ dup.setWritable(upper)
+ dup.setReadable(upper)
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'HI')
+ t.end()
+ })
+ })
+ dup.write('hello')
+ dup.write('hi')
+ })
+ dup.write('hello')
+})
+
+tape('cork', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+ var ok = false
+
+ dup.on('prefinish', function() {
+ dup.cork()
+ setTimeout(function() {
+ ok = true
+ dup.uncork()
+ }, 100)
+ })
+ dup.on('finish', function() {
+ t.ok(ok)
+ t.end()
+ })
+ dup.end()
+})
+
+tape('prefinish not twice', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+ var prefinished = false
+
+ dup.on('prefinish', function() {
+ t.ok(!prefinished, 'only prefinish once')
+ prefinished = true
+ })
+
+ dup.on('finish', function() {
+ t.end()
+ })
+
+ dup.end()
+})
+
+tape('close', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+
+ passthrough.emit('close')
+ dup.on('close', function() {
+ t.ok(true, 'should forward close')
+ t.end()
+ })
+})
+
+tape('works with node native streams (net)', function(t) {
+ t.plan(1)
+
+ var server = net.createServer(function(socket) {
+ var dup = duplexify(socket, socket)
+
+ dup.once('data', function(chunk) {
+ t.same(chunk, Buffer('hello world'))
+ server.close()
+ socket.end()
+ t.end()
+ })
+ })
+
+ server.listen(0, function () {
+ var socket = net.connect(server.address().port)
+ var dup = duplexify(socket, socket)
+
+ dup.write(Buffer('hello world'))
+ })
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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/cacache/node_modules/mississippi/node_modules/end-of-stream/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/README.md
new file mode 100644
index 0000000000..f2560c939d
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/README.md
@@ -0,0 +1,52 @@
+# end-of-stream
+
+A node module that calls a callback when a readable/writable/duplex stream has completed or failed.
+
+ npm install end-of-stream
+
+## Usage
+
+Simply pass a stream and a callback to the `eos`.
+Both legacy streams, streams2 and stream3 are supported.
+
+``` js
+var eos = require('end-of-stream');
+
+eos(readableStream, function(err) {
+ // this will be set to the stream instance
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended', this === readableStream);
+});
+
+eos(writableStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished', this === writableStream);
+});
+
+eos(duplexStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended and finished', this === duplexStream);
+});
+
+eos(duplexStream, {readable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished but might still be readable');
+});
+
+eos(duplexStream, {writable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended but might still be writable');
+});
+
+eos(readableStream, {error:false}, function(err) {
+ // do not treat emit('error', err) as a end-of-stream
+});
+```
+
+## License
+
+MIT
+
+## Related
+
+`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/index.js
new file mode 100644
index 0000000000..be426c227c
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/index.js
@@ -0,0 +1,87 @@
+var once = require('once');
+
+var noop = function() {};
+
+var isRequest = function(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+};
+
+var isChildProcess = function(stream) {
+ return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
+};
+
+var eos = function(stream, opts, callback) {
+ if (typeof opts === 'function') return eos(stream, null, opts);
+ if (!opts) opts = {};
+
+ callback = once(callback || noop);
+
+ var ws = stream._writableState;
+ var rs = stream._readableState;
+ var readable = opts.readable || (opts.readable !== false && stream.readable);
+ var writable = opts.writable || (opts.writable !== false && stream.writable);
+
+ var onlegacyfinish = function() {
+ if (!stream.writable) onfinish();
+ };
+
+ var onfinish = function() {
+ writable = false;
+ if (!readable) callback.call(stream);
+ };
+
+ var onend = function() {
+ readable = false;
+ if (!writable) callback.call(stream);
+ };
+
+ var onexit = function(exitCode) {
+ callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
+ };
+
+ var onerror = function(err) {
+ callback.call(stream, err);
+ };
+
+ var onclose = function() {
+ if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));
+ if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));
+ };
+
+ var onrequest = function() {
+ stream.req.on('finish', onfinish);
+ };
+
+ if (isRequest(stream)) {
+ stream.on('complete', onfinish);
+ stream.on('abort', onclose);
+ if (stream.req) onrequest();
+ else stream.on('request', onrequest);
+ } else if (writable && !ws) { // legacy streams
+ stream.on('end', onlegacyfinish);
+ stream.on('close', onlegacyfinish);
+ }
+
+ if (isChildProcess(stream)) stream.on('exit', onexit);
+
+ stream.on('end', onend);
+ stream.on('finish', onfinish);
+ if (opts.error !== false) stream.on('error', onerror);
+ stream.on('close', onclose);
+
+ return function() {
+ stream.removeListener('complete', onfinish);
+ stream.removeListener('abort', onclose);
+ stream.removeListener('request', onrequest);
+ if (stream.req) stream.req.removeListener('finish', onfinish);
+ stream.removeListener('end', onlegacyfinish);
+ stream.removeListener('close', onlegacyfinish);
+ stream.removeListener('finish', onfinish);
+ stream.removeListener('exit', onexit);
+ stream.removeListener('end', onend);
+ stream.removeListener('error', onerror);
+ stream.removeListener('close', onclose);
+ };
+};
+
+module.exports = eos;
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/package.json
new file mode 100644
index 0000000000..f00849beb1
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "end-of-stream@^1.1.0",
+ "_id": "end-of-stream@1.4.1",
+ "_inBundle": false,
+ "_integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
+ "_location": "/cacache/mississippi/end-of-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "end-of-stream@^1.1.0",
+ "name": "end-of-stream",
+ "escapedName": "end-of-stream",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi",
+ "/cacache/mississippi/duplexify",
+ "/cacache/mississippi/pump",
+ "/cacache/mississippi/stream-each"
+ ],
+ "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
+ "_shasum": "ed29634d19baba463b6ce6b80a37213eab71ec43",
+ "_spec": "end-of-stream@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/end-of-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "once": "^1.4.0"
+ },
+ "deprecated": false,
+ "description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/mafintosh/end-of-stream",
+ "keywords": [
+ "stream",
+ "streams",
+ "callback",
+ "finish",
+ "close",
+ "end",
+ "wait"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "end-of-stream",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/end-of-stream.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.4.1"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.npmignore
new file mode 100644
index 0000000000..3e70011a19
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.npmignore
@@ -0,0 +1,3 @@
+node_modules
+bundle.js
+test.html
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml
new file mode 100644
index 0000000000..c042821703
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - '4.0'
+ - '5.0'
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/LICENSE
new file mode 100644
index 0000000000..66a4d2a149
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Mathias Buus
+
+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/cacache/node_modules/mississippi/node_modules/flush-write-stream/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/README.md
new file mode 100644
index 0000000000..7ea7b699b8
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/README.md
@@ -0,0 +1,59 @@
+# flush-write-stream
+
+A write stream constructor that supports a flush function that is called before `finish` is emitted
+
+```
+npm install flush-write-stream
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/flush-write-stream.svg?style=flat)](http://travis-ci.org/mafintosh/flush-write-stream)
+
+## Usage
+
+``` js
+var writer = require('flush-write-stream')
+
+var ws = writer(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
+```
+
+If you run the above it will produce the following output
+
+```
+writing hello
+writing world
+(nothing happens for 1 sec)
+finished
+```
+
+## API
+
+#### `var ws = writer([options], write, [flush])`
+
+Create a new writable stream. Options are forwarded to the stream constructor.
+
+#### `var ws = writer.obj([options], write, [flush])`
+
+Same as the above except `objectMode` is set to `true` per default.
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/example.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/example.js
new file mode 100644
index 0000000000..fa6b5dab25
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/example.js
@@ -0,0 +1,22 @@
+var writer = require('./')
+
+var ws = writer(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/index.js
new file mode 100644
index 0000000000..e82e126126
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/index.js
@@ -0,0 +1,52 @@
+var stream = require('readable-stream')
+var inherits = require('inherits')
+
+var SIGNAL_FLUSH = 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/cacache/node_modules/mississippi/node_modules/flush-write-stream/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/package.json
new file mode 100644
index 0000000000..0fc9c77ed5
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/package.json
@@ -0,0 +1,54 @@
+{
+ "_from": "flush-write-stream@^1.0.0",
+ "_id": "flush-write-stream@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=",
+ "_location": "/cacache/mississippi/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": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz",
+ "_shasum": "c81b90d8746766f1a609a46809946c45dd8ae417",
+ "_spec": "flush-write-stream@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/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.2"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/test.js
new file mode 100644
index 0000000000..6cd0c20e1f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/test.js
@@ -0,0 +1,85 @@
+var tape = require('tape')
+var writer = require('./')
+
+tape('is a write stream', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var ws = writer.obj(write)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+})
+
+tape('is flushable', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var flushed = false
+
+ var ws = writer.obj(write, flush)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.ok(flushed, 'was flushed')
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+
+ function flush (cb) {
+ flushed = true
+ process.nextTick(cb)
+ }
+})
+
+tape('can pass options', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var flushed = false
+
+ var ws = writer({objectMode: true}, write, flush)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.ok(flushed, 'was flushed')
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+
+ function flush (cb) {
+ flushed = true
+ process.nextTick(cb)
+ }
+})
+
+tape('emits error on destroy', function (t) {
+ var expected = new Error()
+
+ var ws = writer({objectMode: true}, function () {})
+
+ ws.on('error', function (err) {
+ t.equal(err, expected)
+ })
+ ws.on('close', t.end)
+
+ ws.destroy(expected)
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/.travis.yml
new file mode 100644
index 0000000000..b03ffabcab
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+before_install:
+ - npm install -g npm
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+ - "iojs"
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/LICENSE.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/LICENSE.md
new file mode 100644
index 0000000000..146cb32a7d
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/LICENSE.md
@@ -0,0 +1,21 @@
+## The MIT License (MIT) ##
+
+Copyright (c) 2014 Hugh Kennedy
+
+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/cacache/node_modules/mississippi/node_modules/from2/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/README.md
new file mode 100644
index 0000000000..3e041a412a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/README.md
@@ -0,0 +1,70 @@
+# from2 [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/from2&title=from2&description=hughsk/from2%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
+
+`from2` is a high-level module for creating readable streams that properly handle backpressure.
+
+Convience wrapper for
+[readable-stream](http://github.com/isaacs/readable-stream)'s `ReadableStream`
+base class, with an API lifted from
+[from](http://github.com/dominictarr/from) and
+[through2](http://github.com/rvagg/through2).
+
+## Usage ##
+
+[![from2](https://nodei.co/npm/from2.png?mini=true)](https://nodei.co/npm/from2)
+
+### `stream = from2([opts], read)` ###
+
+Where `opts` are the options to pass on to the `ReadableStream` constructor,
+and `read(size, next)` is called when data is requested from the stream.
+
+* `size` is the recommended amount of data (in bytes) to retrieve.
+* `next(err)` should be called when you're ready to emit more data.
+
+For example, here's a readable stream that emits the contents of a given
+string:
+
+``` javascript
+var from = require('from2')
+
+function fromString(string) {
+ return from(function(size, next) {
+ // if there's no more content
+ // left in the string, close the stream.
+ if (string.length <= 0) return next(null, null)
+
+ // Pull in a new chunk of text,
+ // removing it from the string.
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+
+ // Emit "chunk" from the stream.
+ next(null, chunk)
+ })
+}
+
+// pipe "hello world" out
+// to stdout.
+fromString('hello world').pipe(process.stdout)
+```
+
+### `stream = from2.obj([opts], read)` ###
+
+Shorthand for `from2({ objectMode: true }, read)`.
+
+### `createStream = from2.ctor([opts], read)` ###
+
+If you're creating similar streams in quick succession you can improve
+performance by generating a stream **constructor** that you can reuse instead
+of creating one-off streams on each call.
+
+Takes the same options as `from2`, instead returning a constructor which you
+can use to create new streams.
+
+### See Also
+
+- [from2-array](https://github.com/binocarlos/from2-array) - Create a from2 stream based on an array of source values.
+- [from2-string](https://github.com/yoshuawuyts/from2-string) - Create a stream from a string. Sugary wrapper around from2.
+
+## License ##
+
+MIT. See [LICENSE.md](http://github.com/hughsk/from2/blob/master/LICENSE.md) for details.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/index.js
new file mode 100644
index 0000000000..cb200c610a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/index.js
@@ -0,0 +1,103 @@
+var Readable = require('readable-stream').Readable
+var inherits = require('inherits')
+
+module.exports = from2
+
+from2.ctor = ctor
+from2.obj = obj
+
+var Proto = ctor()
+
+function toFunction(list) {
+ list = list.slice()
+ return function (_, cb) {
+ var err = null
+ var item = list.length ? list.shift() : null
+ if (item instanceof Error) {
+ err = item
+ item = null
+ }
+
+ cb(err, item)
+ }
+}
+
+function from2(opts, read) {
+ if (typeof opts !== 'object' || Array.isArray(opts)) {
+ read = opts
+ opts = {}
+ }
+
+ var rs = new Proto(opts)
+ rs._from = Array.isArray(read) ? toFunction(read) : (read || noop)
+ return rs
+}
+
+function ctor(opts, read) {
+ if (typeof opts === 'function') {
+ read = opts
+ opts = {}
+ }
+
+ opts = defaults(opts)
+
+ inherits(Class, Readable)
+ function Class(override) {
+ if (!(this instanceof Class)) return new Class(override)
+ this._reading = false
+ this._callback = check
+ this.destroyed = false
+ Readable.call(this, override || opts)
+
+ var self = this
+ var hwm = this._readableState.highWaterMark
+
+ function check(err, data) {
+ if (self.destroyed) return
+ if (err) return self.destroy(err)
+ if (data === null) return self.push(null)
+ self._reading = false
+ if (self.push(data)) self._read(hwm)
+ }
+ }
+
+ Class.prototype._from = read || noop
+ Class.prototype._read = function(size) {
+ if (this._reading || this.destroyed) return
+ this._reading = true
+ this._from(size, this._callback)
+ }
+
+ Class.prototype.destroy = function(err) {
+ if (this.destroyed) return
+ this.destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ if (err) self.emit('error', err)
+ self.emit('close')
+ })
+ }
+
+ return Class
+}
+
+function obj(opts, read) {
+ if (typeof opts === 'function' || Array.isArray(opts)) {
+ read = opts
+ opts = {}
+ }
+
+ opts = defaults(opts)
+ opts.objectMode = true
+ opts.highWaterMark = 16
+
+ return from2(opts, read)
+}
+
+function noop () {}
+
+function defaults(opts) {
+ opts = opts || {}
+ return opts
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/package.json
new file mode 100644
index 0000000000..ff6f879e33
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "from2@^2.1.0",
+ "_id": "from2@2.3.0",
+ "_inBundle": false,
+ "_integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
+ "_location": "/cacache/mississippi/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": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz",
+ "_shasum": "8bfb5502bde4a4d36cfdeea007fcca21d7e382af",
+ "_spec": "from2@^2.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/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/cacache/node_modules/mississippi/node_modules/from2/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/test.js
new file mode 100644
index 0000000000..150429b0f7
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/test.js
@@ -0,0 +1,121 @@
+var test = require('tape')
+var path = require('path')
+var from = require('./')
+var fs = require('fs')
+
+var tmp = path.resolve(
+ __dirname, 'tmp.txt'
+)
+
+function fromString(string) {
+ return from(function(size, next) {
+ if (string.length <= 0) return next(null, null)
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+ next(null, chunk)
+ })
+}
+
+test('from2', function(t) {
+ var contents = fs.readFileSync(__filename, 'utf8')
+ var stream = fromString(contents)
+
+ stream
+ .pipe(fs.createWriteStream(tmp))
+ .on('close', function() {
+ t.equal(fs.readFileSync(tmp, 'utf8'), contents)
+ fs.unlinkSync(tmp)
+ t.end()
+ })
+})
+
+test('old mode', function(t) {
+ var contents = fs.readFileSync(__filename, 'utf8')
+ var stream = fromString(contents)
+ var buffer = ''
+
+ stream.on('data', function(data) {
+ buffer += data
+ }).on('end', function() {
+ t.equal(buffer, contents)
+ t.end()
+ })
+})
+
+test('destroy', function(t) {
+ var stream = from(function(size, next) {
+ process.nextTick(function() {
+ next(null, 'no')
+ })
+ })
+
+ stream.on('data', function(data) {
+ t.ok(false)
+ }).on('close', function() {
+ t.ok(true)
+ t.end()
+ })
+
+ stream.destroy()
+})
+
+test('arrays', function (t) {
+ var input = ['a', 'b', 'c']
+ var stream = from(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter.toString())
+ })
+ stream.on('end', function () {
+ t.deepEqual(input, output)
+ t.end()
+ })
+})
+
+test('obj arrays', function (t) {
+ var input = [{foo:'a'}, {foo:'b'}, {foo:'c'}]
+ var stream = from.obj(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter)
+ })
+ stream.on('end', function () {
+ t.deepEqual(input, output)
+ t.end()
+ })
+})
+
+
+test('arrays can emit errors', function (t) {
+ var input = ['a', 'b', new Error('ooops'), 'c']
+ var stream = from(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter.toString())
+ })
+ stream.on('error', function(e){
+ t.deepEqual(['a', 'b'], output)
+ t.equal('ooops', e.message)
+ t.end()
+ })
+ stream.on('end', function () {
+ t.fail('the stream should have errored')
+ })
+})
+
+test('obj arrays can emit errors', function (t) {
+ var input = [{foo:'a'}, {foo:'b'}, new Error('ooops'), {foo:'c'}]
+ var stream = from.obj(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter)
+ })
+ stream.on('error', function(e){
+ t.deepEqual([{foo:'a'}, {foo:'b'}], output)
+ t.equal('ooops', e.message)
+ t.end()
+ })
+ stream.on('end', function () {
+ t.fail('the stream should have errored')
+ })
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/LICENSE
new file mode 100644
index 0000000000..4b30ed5d95
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/LICENSE
@@ -0,0 +1,20 @@
+Copyright 2013 Mathias Buus
+
+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/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md
new file mode 100644
index 0000000000..f53e130849
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md
@@ -0,0 +1,54 @@
+# parallel-transform
+
+[Transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform_1) for Node.js that allows you to run your transforms
+in parallel without changing the order of the output.
+
+ npm install parallel-transform
+
+It is easy to use
+
+``` js
+var transform = require('parallel-transform');
+
+var stream = transform(10, function(data, callback) { // 10 is the parallism level
+ setTimeout(function() {
+ callback(null, data);
+ }, Math.random() * 1000);
+});
+
+for (var i = 0; i < 10; i++) {
+ stream.write(''+i);
+}
+stream.end();
+
+stream.on('data', function(data) {
+ console.log(data); // prints 0,1,2,...
+});
+stream.on('end', function() {
+ console.log('stream has ended');
+});
+```
+
+If you run the above example you'll notice that it runs in parallel
+(does not take ~1 second between each print) and that the order is preserved
+
+## Stream options
+
+All transforms are Node 0.10 streams. Per default they are created with the options `{objectMode:true}`.
+If you want to use your own stream options pass them as the second parameter
+
+``` js
+var stream = transform(10, {objectMode:false}, function(data, callback) {
+ // data is now a buffer
+ callback(null, data);
+});
+
+fs.createReadStream('filename').pipe(stream).pipe(process.stdout);
+```
+
+### Unordered
+Passing the option `{ordered:false}` will output the data as soon as it's processed by a transform, without waiting to respect the order.
+
+## License
+
+MIT \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/index.js
new file mode 100644
index 0000000000..77329e4ccf
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/index.js
@@ -0,0 +1,105 @@
+var Transform = require('readable-stream').Transform;
+var inherits = require('inherits');
+var cyclist = require('cyclist');
+var util = require('util');
+
+var ParallelTransform = function(maxParallel, opts, ontransform) {
+ if (!(this instanceof ParallelTransform)) return new ParallelTransform(maxParallel, opts, ontransform);
+
+ if (typeof maxParallel === 'function') {
+ ontransform = maxParallel;
+ opts = null;
+ maxParallel = 1;
+ }
+ if (typeof opts === 'function') {
+ ontransform = opts;
+ opts = null;
+ }
+
+ if (!opts) opts = {};
+ if (!opts.highWaterMark) opts.highWaterMark = Math.max(maxParallel, 16);
+ if (opts.objectMode !== false) opts.objectMode = true;
+
+ Transform.call(this, opts);
+
+ this._maxParallel = maxParallel;
+ this._ontransform = ontransform;
+ this._destroyed = false;
+ this._flushed = false;
+ this._ordered = opts.ordered !== false;
+ this._buffer = this._ordered ? cyclist(maxParallel) : [];
+ this._top = 0;
+ this._bottom = 0;
+ this._ondrain = null;
+};
+
+inherits(ParallelTransform, Transform);
+
+ParallelTransform.prototype.destroy = function() {
+ if (this._destroyed) return;
+ this._destroyed = true;
+ this.emit('close');
+};
+
+ParallelTransform.prototype._transform = function(chunk, enc, callback) {
+ var self = this;
+ var pos = this._top++;
+
+ this._ontransform(chunk, function(err, data) {
+ if (self._destroyed) return;
+ if (err) {
+ self.emit('error', err);
+ self.push(null);
+ self.destroy();
+ return;
+ }
+ if (self._ordered) {
+ self._buffer.put(pos, (data === undefined || data === null) ? null : data);
+ }
+ else {
+ self._buffer.push(data);
+ }
+ self._drain();
+ });
+
+ if (this._top - this._bottom < this._maxParallel) return callback();
+ this._ondrain = callback;
+};
+
+ParallelTransform.prototype._flush = function(callback) {
+ this._flushed = true;
+ this._ondrain = callback;
+ this._drain();
+};
+
+ParallelTransform.prototype._drain = function() {
+ if (this._ordered) {
+ while (this._buffer.get(this._bottom) !== undefined) {
+ var data = this._buffer.del(this._bottom++);
+ if (data === null) continue;
+ this.push(data);
+ }
+ }
+ else {
+ while (this._buffer.length > 0) {
+ var data = this._buffer.pop();
+ this._bottom++;
+ if (data === null) continue;
+ this.push(data);
+ }
+ }
+
+
+ if (!this._drained() || !this._ondrain) return;
+
+ var ondrain = this._ondrain;
+ this._ondrain = null;
+ ondrain();
+};
+
+ParallelTransform.prototype._drained = function() {
+ var diff = this._top - this._bottom;
+ return this._flushed ? !diff : diff < this._maxParallel;
+};
+
+module.exports = ParallelTransform;
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore
new file mode 100644
index 0000000000..ba99195bae
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore
@@ -0,0 +1 @@
+bench
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md
new file mode 100644
index 0000000000..50c35cc5fd
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md
@@ -0,0 +1,39 @@
+# Cyclist
+
+Cyclist is an efficient [cyclic list](http://en.wikipedia.org/wiki/Circular_buffer) implemention for Javascript.
+It is available through npm
+
+ npm install cyclist
+
+## What?
+
+Cyclist allows you to create a list of fixed size that is cyclic.
+In a cyclist list the element following the last one is the first one.
+This property can be really useful when for example trying to order data
+packets that can arrive out of order over a network stream.
+
+## Usage
+
+``` js
+var cyclist = require('cyclist');
+var list = cyclist(4); // if size (4) is not a power of 2 it will be the follwing power of 2
+ // this buffer can now hold 4 elements in total
+
+list.put(42, 'hello 42'); // store something and index 42
+list.put(43, 'hello 43'); // store something and index 43
+
+console.log(list.get(42)); // prints hello 42
+console.log(list.get(46)); // prints hello 42 again since 46 - 42 == list.size
+```
+
+## API
+
+* `cyclist(size)` creates a new buffer
+* `cyclist#get(index)` get an object stored in the buffer
+* `cyclist#put(index,value)` insert an object into the buffer
+* `cyclist#del(index)` delete an object from an index
+* `cyclist#size` property containing current size of buffer
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js
new file mode 100644
index 0000000000..baf710c3a9
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js
@@ -0,0 +1,33 @@
+var ensureTwoPower = function(n) {
+ if (n && !(n & (n - 1))) return n;
+ var p = 1;
+ while (p < n) p <<= 1;
+ return p;
+};
+
+var Cyclist = function(size) {
+ if (!(this instanceof Cyclist)) return new Cyclist(size);
+ size = ensureTwoPower(size);
+ this.mask = size-1;
+ this.size = size;
+ this.values = new Array(size);
+};
+
+Cyclist.prototype.put = function(index, val) {
+ var pos = index & this.mask;
+ this.values[pos] = val;
+ return pos;
+};
+
+Cyclist.prototype.get = function(index) {
+ return this.values[index & this.mask];
+};
+
+Cyclist.prototype.del = function(index) {
+ var pos = index & this.mask;
+ var val = this.values[pos];
+ this.values[pos] = undefined;
+ return val;
+};
+
+module.exports = Cyclist; \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json
new file mode 100644
index 0000000000..aa45e955df
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json
@@ -0,0 +1,50 @@
+{
+ "_from": "cyclist@~0.2.2",
+ "_id": "cyclist@0.2.2",
+ "_inBundle": false,
+ "_integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=",
+ "_location": "/cacache/mississippi/parallel-transform/cyclist",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "cyclist@~0.2.2",
+ "name": "cyclist",
+ "escapedName": "cyclist",
+ "rawSpec": "~0.2.2",
+ "saveSpec": null,
+ "fetchSpec": "~0.2.2"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi/parallel-transform"
+ ],
+ "_resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz",
+ "_shasum": "1b33792e11e914a2fd6d6ed6447464444e5fa640",
+ "_spec": "cyclist@~0.2.2",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/cyclist/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Cyclist is an efficient cyclic list implemention.",
+ "homepage": "https://github.com/mafintosh/cyclist#readme",
+ "keywords": [
+ "circular",
+ "buffer",
+ "ring",
+ "cyclic",
+ "data"
+ ],
+ "name": "cyclist",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/cyclist.git"
+ },
+ "version": "0.2.2"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/package.json
new file mode 100644
index 0000000000..f3d04cc934
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/package.json
@@ -0,0 +1,55 @@
+{
+ "_from": "parallel-transform@^1.1.0",
+ "_id": "parallel-transform@1.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=",
+ "_location": "/cacache/mississippi/parallel-transform",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "parallel-transform@^1.1.0",
+ "name": "parallel-transform",
+ "escapedName": "parallel-transform",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz",
+ "_shasum": "d410f065b05da23081fcd10f28854c29bda33b06",
+ "_spec": "parallel-transform@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/parallel-transform/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "cyclist": "~0.2.2",
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.1.5"
+ },
+ "deprecated": false,
+ "description": "Transform stream that allows you to run your transforms in parallel without changing the order",
+ "homepage": "https://github.com/mafintosh/parallel-transform#readme",
+ "keywords": [
+ "transform",
+ "stream",
+ "parallel",
+ "preserve",
+ "order"
+ ],
+ "license": "MIT",
+ "name": "parallel-transform",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/parallel-transform.git"
+ },
+ "version": "1.1.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/.travis.yml
new file mode 100644
index 0000000000..17f94330e7
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+
+script: "npm test"
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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/cacache/node_modules/mississippi/node_modules/pump/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/README.md
new file mode 100644
index 0000000000..5029b27d68
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/README.md
@@ -0,0 +1,56 @@
+# pump
+
+pump is a small node module that pipes streams together and destroys all of them if one of them closes.
+
+```
+npm install pump
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
+
+## What problem does it solve?
+
+When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
+You are also not able to provide a callback to tell when then pipe has finished.
+
+pump does these two things for you
+
+## Usage
+
+Simply pass the streams you want to pipe together to pump and add an optional callback
+
+``` js
+var pump = require('pump')
+var fs = require('fs')
+
+var source = fs.createReadStream('/dev/random')
+var dest = fs.createWriteStream('/dev/null')
+
+pump(source, dest, function(err) {
+ console.log('pipe finished', err)
+})
+
+setTimeout(function() {
+ dest.destroy() // when dest is closed pump will destroy source
+}, 1000)
+```
+
+You can use pump to pipe more than two streams together as well
+
+``` js
+var transform = someTransformStream()
+
+pump(source, transform, anotherTransform, dest, function(err) {
+ console.log('pipe finished', err)
+})
+```
+
+If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
+
+## License
+
+MIT
+
+## Related
+
+`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/index.js
new file mode 100644
index 0000000000..d9ca0335cb
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/index.js
@@ -0,0 +1,82 @@
+var once = require('once')
+var eos = require('end-of-stream')
+var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
+
+var noop = function () {}
+var ancient = /^v?\.0/.test(process.version)
+
+var isFn = function (fn) {
+ return typeof fn === 'function'
+}
+
+var isFS = function (stream) {
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
+ if (!fs) return false // browser
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
+}
+
+var isRequest = function (stream) {
+ return stream.setHeader && isFn(stream.abort)
+}
+
+var destroyer = function (stream, reading, writing, callback) {
+ callback = once(callback)
+
+ var closed = false
+ stream.on('close', function () {
+ closed = true
+ })
+
+ eos(stream, {readable: reading, writable: writing}, function (err) {
+ if (err) return callback(err)
+ closed = true
+ callback()
+ })
+
+ var destroyed = false
+ return function (err) {
+ if (closed) return
+ if (destroyed) return
+ destroyed = true
+
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+
+ if (isFn(stream.destroy)) return stream.destroy()
+
+ callback(err || new Error('stream was destroyed'))
+ }
+}
+
+var call = function (fn) {
+ fn()
+}
+
+var pipe = function (from, to) {
+ return from.pipe(to)
+}
+
+var pump = function () {
+ var streams = Array.prototype.slice.call(arguments)
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+
+ if (Array.isArray(streams[0])) streams = streams[0]
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+
+ var error
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1
+ var writing = i > 0
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err
+ if (err) destroys.forEach(call)
+ if (reading) return
+ destroys.forEach(call)
+ callback(error)
+ })
+ })
+
+ streams.reduce(pipe)
+}
+
+module.exports = pump
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/package.json
new file mode 100644
index 0000000000..5839908b06
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/package.json
@@ -0,0 +1,60 @@
+{
+ "_from": "pump@^2.0.1",
+ "_id": "pump@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
+ "_location": "/cacache/mississippi/pump",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pump@^2.0.1",
+ "name": "pump",
+ "escapedName": "pump",
+ "rawSpec": "^2.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.1"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi",
+ "/cacache/mississippi/pumpify"
+ ],
+ "_resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
+ "_shasum": "12399add6e4cf7526d973cbc8b5ce2e2908b3909",
+ "_spec": "pump@^2.0.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "browser": {
+ "fs": false
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pump/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ },
+ "deprecated": false,
+ "description": "pipe streams together and close all of them if one of them closes",
+ "homepage": "https://github.com/mafintosh/pump#readme",
+ "keywords": [
+ "streams",
+ "pipe",
+ "destroy",
+ "callback"
+ ],
+ "license": "MIT",
+ "name": "pump",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pump.git"
+ },
+ "scripts": {
+ "test": "node test-browser.js && node test-node.js"
+ },
+ "version": "2.0.1"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-browser.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-browser.js
new file mode 100644
index 0000000000..75ea4a292e
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-browser.js
@@ -0,0 +1,62 @@
+var stream = require('stream')
+var pump = require('./index')
+
+var rs = new stream.Readable()
+var ws = new stream.Writable()
+
+rs._read = function (size) {
+ this.push(Buffer(size).fill('abc'))
+}
+
+ws._write = function (chunk, encoding, cb) {
+ setTimeout(function () {
+ cb()
+ }, 100)
+}
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-browser.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('finish', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('end', function () {
+ rsClosed = true
+ check()
+})
+
+pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+setTimeout(function () {
+ rs.push(null)
+ rs.emit('close')
+}, 1000)
+
+var timeout = setTimeout(function () {
+ check()
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-node.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-node.js
new file mode 100644
index 0000000000..034a65414d
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-node.js
@@ -0,0 +1,53 @@
+var pump = require('./index')
+
+var rs = require('fs').createReadStream('/dev/random')
+var ws = require('fs').createWriteStream('/dev/null')
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-node.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('close', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('close', function () {
+ rsClosed = true
+ check()
+})
+
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+if (res) {
+ process.exit(1)
+}
+
+setTimeout(function () {
+ rs.destroy()
+}, 1000)
+
+var timeout = setTimeout(function () {
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/.travis.yml
new file mode 100644
index 0000000000..32e71a6b55
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+
+node_js:
+ - "0.10"
+ - "4"
+ - "5"
+
+sudo: false
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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/cacache/node_modules/mississippi/node_modules/pumpify/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/README.md
new file mode 100644
index 0000000000..4988f7b126
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/README.md
@@ -0,0 +1,56 @@
+# pumpify
+
+Combine an array of streams into a single duplex stream using [pump](https://github.com/mafintosh/pump) and [duplexify](https://github.com/mafintosh/duplexify).
+If one of the streams closes/errors all streams in the pipeline will be destroyed.
+
+```
+npm install pumpify
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pumpify.svg?style=flat)](http://travis-ci.org/mafintosh/pumpify)
+
+## Usage
+
+Pass the streams you want to pipe together to pumpify `pipeline = pumpify(s1, s2, s3, ...)`.
+`pipeline` is a duplex stream that writes to the first streams and reads from the last one.
+Streams are piped together using [pump](https://github.com/mafintosh/pump) so if one of them closes
+all streams will be destroyed.
+
+``` js
+var pumpify = require('pumpify')
+var tar = require('tar-fs')
+var zlib = require('zlib')
+var fs = require('fs')
+
+var untar = pumpify(zlib.createGunzip(), tar.extract('output-folder'))
+// you can also pass an array instead
+// var untar = pumpify([zlib.createGunzip(), tar.extract('output-folder')])
+
+fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)
+```
+
+If you are pumping object streams together use `pipeline = pumpify.obj(s1, s2, ...)`.
+Call `pipeline.destroy()` to destroy the pipeline (including the streams passed to pumpify).
+
+### Using `setPipeline(s1, s2, ...)`
+
+Similar to [duplexify](https://github.com/mafintosh/duplexify) you can also define the pipeline asynchronously using `setPipeline(s1, s2, ...)`
+
+``` js
+var untar = pumpify()
+
+setTimeout(function() {
+ // will start draining the input now
+ untar.setPipeline(zlib.createGunzip(), tar.extract('output-folder'))
+}, 1000)
+
+fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)
+```
+
+## License
+
+MIT
+
+## Related
+
+`pumpify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/index.js
new file mode 100644
index 0000000000..45bb987e85
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/index.js
@@ -0,0 +1,56 @@
+var pump = require('pump')
+var inherits = require('inherits')
+var Duplexify = require('duplexify')
+
+var toArray = function(args) {
+ if (!args.length) return []
+ return Array.isArray(args[0]) ? args[0] : Array.prototype.slice.call(args)
+}
+
+var define = function(opts) {
+ var Pumpify = function() {
+ var streams = toArray(arguments)
+ if (!(this instanceof Pumpify)) return new Pumpify(streams)
+ Duplexify.call(this, null, null, opts)
+ if (streams.length) this.setPipeline(streams)
+ }
+
+ inherits(Pumpify, Duplexify)
+
+ Pumpify.prototype.setPipeline = function() {
+ var streams = toArray(arguments)
+ var self = this
+ var ended = false
+ var w = streams[0]
+ var r = streams[streams.length-1]
+
+ r = r.readable ? r : null
+ w = w.writable ? w : null
+
+ var onclose = function() {
+ streams[0].emit('error', new Error('stream was destroyed'))
+ }
+
+ this.on('close', onclose)
+ this.on('prefinish', function() {
+ if (!ended) self.cork()
+ })
+
+ pump(streams, function(err) {
+ self.removeListener('close', onclose)
+ if (err) return self.destroy(err)
+ ended = true
+ self.uncork()
+ })
+
+ if (this.destroyed) return onclose()
+ this.setWritable(w)
+ this.setReadable(r)
+ }
+
+ return Pumpify
+}
+
+module.exports = define({destroy:false})
+module.exports.obj = define({destroy:false, objectMode:true, highWaterMark:16})
+module.exports.ctor = define
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/package.json
new file mode 100644
index 0000000000..a678869bc1
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "pumpify@^1.3.3",
+ "_id": "pumpify@1.4.0",
+ "_inBundle": false,
+ "_integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==",
+ "_location": "/cacache/mississippi/pumpify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pumpify@^1.3.3",
+ "name": "pumpify",
+ "escapedName": "pumpify",
+ "rawSpec": "^1.3.3",
+ "saveSpec": null,
+ "fetchSpec": "^1.3.3"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz",
+ "_shasum": "80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb",
+ "_spec": "pumpify@^1.3.3",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pumpify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "duplexify": "^3.5.3",
+ "inherits": "^2.0.3",
+ "pump": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Combine an array of streams into a single duplex stream using pump and duplexify",
+ "devDependencies": {
+ "tape": "^4.8.0",
+ "through2": "^2.0.3"
+ },
+ "homepage": "https://github.com/mafintosh/pumpify",
+ "keywords": [
+ "pump",
+ "duplexify",
+ "duplex",
+ "streams",
+ "stream",
+ "pipeline",
+ "combine"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "pumpify",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pumpify.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "1.4.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/test.js
new file mode 100644
index 0000000000..de6b16e346
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/test.js
@@ -0,0 +1,181 @@
+var tape = require('tape')
+var through = require('through2')
+var pumpify = require('./')
+var stream = require('stream')
+
+tape('basic', function(t) {
+ t.plan(3)
+
+ var pipeline = pumpify(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ })
+ )
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'hello')
+ t.end()
+ })
+})
+
+tape('3 times', function(t) {
+ t.plan(4)
+
+ var pipeline = pumpify(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ })
+ )
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ t.end()
+ })
+})
+
+tape('destroy', function(t) {
+ var test = through()
+ test.destroy = function() {
+ t.ok(true)
+ t.end()
+ }
+
+ var pipeline = pumpify(through(), test)
+
+ pipeline.destroy()
+})
+
+tape('close', function(t) {
+ var test = through()
+ var pipeline = pumpify(through(), test)
+
+ pipeline.on('error', function(err) {
+ t.same(err.message, 'lol')
+ t.end()
+ })
+
+ test.emit('error', new Error('lol'))
+})
+
+tape('end waits for last one', function(t) {
+ var ran = false
+
+ var a = through()
+ var b = through()
+ var c = through(function(data, enc, cb) {
+ setTimeout(function() {
+ ran = true
+ cb()
+ }, 100)
+ })
+
+ var pipeline = pumpify(a, b, c)
+
+ pipeline.write('foo')
+ pipeline.end(function() {
+ t.ok(ran)
+ t.end()
+ })
+
+ t.ok(!ran)
+})
+
+tape('always wait for finish', function(t) {
+ var a = new stream.Readable()
+ a._read = function() {}
+ a.push('hello')
+
+ var pipeline = pumpify(a, through(), through())
+ var ran = false
+
+ pipeline.on('finish', function() {
+ t.ok(ran)
+ t.end()
+ })
+
+ setTimeout(function() {
+ ran = true
+ a.push(null)
+ }, 100)
+})
+
+tape('async', function(t) {
+ var pipeline = pumpify()
+
+ t.plan(4)
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ t.end()
+ })
+
+ setTimeout(function() {
+ pipeline.setPipeline(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ })
+ )
+ }, 100)
+})
+
+tape('early destroy', function(t) {
+ var a = through()
+ var b = through()
+ var c = through()
+
+ b.destroy = function() {
+ t.ok(true)
+ t.end()
+ }
+
+ var pipeline = pumpify()
+
+ pipeline.destroy()
+ setTimeout(function() {
+ pipeline.setPipeline(a, b, c)
+ }, 100)
+})
+
+tape('preserves error', function (t) {
+ var a = through()
+ var b = through(function (data, enc, cb) {
+ cb(new Error('stop'))
+ })
+ var c = through()
+ var s = pumpify()
+
+ s.on('error', function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+
+ s.setPipeline(a, b, c)
+ s.resume()
+ s.write('hi')
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.travis.yml
new file mode 100644
index 0000000000..aa89858a8a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - 'stable'
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/LICENSE
new file mode 100644
index 0000000000..66a4d2a149
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Mathias Buus
+
+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/cacache/node_modules/mississippi/node_modules/stream-each/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/README.md
new file mode 100644
index 0000000000..e0832d55bd
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/README.md
@@ -0,0 +1,41 @@
+# stream-each
+
+Iterate all the data in a stream
+
+```
+npm install stream-each
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-each.svg?style=flat)](http://travis-ci.org/mafintosh/stream-each)
+
+## Usage
+
+``` js
+var each = require('stream-each')
+
+each(stream, function (data, next) {
+ console.log('data from stream', data)
+ // when ready to consume next chunk
+ next()
+}, function (err) {
+ console.log('no more data')
+})
+```
+
+## API
+
+#### `each(stream, iterator, cb)`
+
+Iterate the data in the stream by calling the iterator function with `(data, next)`
+where data is a data chunk and next is a callback. Call next when you are ready to
+consume the next chunk. Optionally you can call next with an error to destroy the stream
+
+When the stream ends/errors the callback is called if provided
+
+## License
+
+MIT
+
+## Related
+
+`stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/collaborators.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/collaborators.md
new file mode 100644
index 0000000000..fc16de25f9
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/collaborators.md
@@ -0,0 +1,7 @@
+## Collaborators
+
+stream-each is only possible due to the excellent work of the following collaborators:
+
+<table><tbody><tr><th align="left">maxogden</th><td><a href="https://github.com/maxogden">GitHub/maxogden</a></td></tr>
+<tr><th align="left">mafintosh</th><td><a href="https://github.com/mafintosh">GitHub/mafintosh</a></td></tr>
+</tbody></table>
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/index.js
new file mode 100644
index 0000000000..7e67f7337a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/index.js
@@ -0,0 +1,58 @@
+var eos = require('end-of-stream')
+var shift = require('stream-shift')
+
+module.exports = each
+
+function each (stream, fn, cb) {
+ var want = true
+ var error = null
+ var ended = false
+ var running = false
+ var calling = false
+
+ stream.on('readable', onreadable)
+ onreadable()
+
+ if (cb) eos(stream, {readable: true, writable: false}, done)
+ return stream
+
+ function done (err) {
+ if (!error) error = err
+ ended = true
+ if (!running) cb(error)
+ }
+
+ function onreadable () {
+ if (want) read()
+ }
+
+ function afterRead (err) {
+ running = false
+
+ if (err) {
+ error = err
+ if (ended) return cb(error)
+ stream.destroy(err)
+ return
+ }
+ if (ended) return cb(error)
+ if (!calling) read()
+ }
+
+ function read () {
+ while (!running && !ended) {
+ want = false
+
+ var data = shift(stream)
+ if (data === null) {
+ want = true
+ return
+ }
+
+ running = true
+ calling = true
+ fn(data, afterRead)
+ calling = false
+ }
+ }
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
new file mode 100644
index 0000000000..bae9da7bfa
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Mathias Buus
+
+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/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
new file mode 100644
index 0000000000..d9cc2d945f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
@@ -0,0 +1,25 @@
+# stream-shift
+
+Returns the next buffer/object in a stream's readable queue
+
+```
+npm install stream-shift
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift)
+
+## Usage
+
+``` js
+var shift = require('stream-shift')
+
+console.log(shift(someStream)) // first item in its buffer
+```
+
+## Credit
+
+Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
new file mode 100644
index 0000000000..c4b18b9c2a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
@@ -0,0 +1,20 @@
+module.exports = shift
+
+function shift (stream) {
+ var rs = stream._readableState
+ if (!rs) return null
+ return rs.objectMode ? stream.read() : stream.read(getStateLength(rs))
+}
+
+function getStateLength (state) {
+ if (state.buffer.length) {
+ // Since node 6.3.0 state.buffer is a BufferList not an array
+ if (state.buffer.head) {
+ return state.buffer.head.data.length
+ }
+
+ return state.buffer[0].length
+ }
+
+ return state.length
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
new file mode 100644
index 0000000000..6ae1937fa1
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
@@ -0,0 +1,53 @@
+{
+ "_from": "stream-shift@^1.0.0",
+ "_id": "stream-shift@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
+ "_location": "/cacache/mississippi/stream-each/stream-shift",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-shift@^1.0.0",
+ "name": "stream-shift",
+ "escapedName": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi/stream-each"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
+ "_shasum": "d5c752825e5367e786f78e18e445ea223a155952",
+ "_spec": "stream-shift@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-shift/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Returns the next buffer/object in a stream's readable queue",
+ "devDependencies": {
+ "standard": "^7.1.2",
+ "tape": "^4.6.0",
+ "through2": "^2.0.1"
+ },
+ "homepage": "https://github.com/mafintosh/stream-shift",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-shift",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-shift.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
new file mode 100644
index 0000000000..c0222c37d5
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
@@ -0,0 +1,48 @@
+var tape = require('tape')
+var through = require('through2')
+var stream = require('stream')
+var shift = require('./')
+
+tape('shifts next', function (t) {
+ var passthrough = through()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with core', function (t) {
+ var passthrough = stream.PassThrough()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with object mode', function (t) {
+ var passthrough = through({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
+
+tape('shifts next with object mode with core', function (t) {
+ var passthrough = stream.PassThrough({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/package.json
new file mode 100644
index 0000000000..2dbe92f79b
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/package.json
@@ -0,0 +1,56 @@
+{
+ "_from": "stream-each@^1.1.0",
+ "_id": "stream-each@1.2.2",
+ "_inBundle": false,
+ "_integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==",
+ "_location": "/cacache/mississippi/stream-each",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-each@^1.1.0",
+ "name": "stream-each",
+ "escapedName": "stream-each",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz",
+ "_shasum": "8e8c463f91da8991778765873fe4d960d8f616bd",
+ "_spec": "stream-each@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-each/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "stream-shift": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Iterate all the data in a stream",
+ "devDependencies": {
+ "standard": "^5.3.1",
+ "tape": "^4.2.1",
+ "through2": "^2.0.0"
+ },
+ "homepage": "https://github.com/mafintosh/stream-each",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-each",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-each.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.2.2"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/test.js
new file mode 100644
index 0000000000..277634cd05
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/test.js
@@ -0,0 +1,122 @@
+var tape = require('tape')
+var through = require('through2')
+var each = require('./')
+
+tape('each', function (t) {
+ var s = through.obj()
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ })
+})
+
+tape('each and callback', function (t) {
+ var s = through.obj()
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ }, function () {
+ t.end()
+ })
+})
+
+tape('each (write after)', function (t) {
+ var s = through.obj()
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ })
+
+ setTimeout(function () {
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+ }, 100)
+})
+
+tape('each error', function (t) {
+ var s = through.obj()
+ s.write('hello')
+ s.on('error', function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+
+ each(s, function (data, next) {
+ next(new Error('stop'))
+ })
+})
+
+tape('each error and callback', function (t) {
+ var s = through.obj()
+ s.write('hello')
+
+ each(s, function (data, next) {
+ next(new Error('stop'))
+ }, function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+})
+
+tape('each with falsey values', function (t) {
+ var s = through.obj()
+ s.write(0)
+ s.write(false)
+ s.write(undefined)
+ s.end()
+
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = [0, false]
+ var count = 0
+ each(s, function (data, next) {
+ count++
+ t.same(data, expected.shift())
+ next()
+ }, function () {
+ t.same(count, 2)
+ })
+})
+
+tape('huge stack', function (t) {
+ var s = through.obj()
+
+ for (var i = 0; i < 5000; i++) {
+ s.write('foo')
+ }
+
+ s.end()
+
+ each(s, function (data, cb) {
+ if (data !== 'foo') t.fail('bad data')
+ cb()
+ }, function (err) {
+ t.error(err, 'no error')
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/.npmignore
new file mode 100644
index 0000000000..1e1dcab34c
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/.npmignore
@@ -0,0 +1,3 @@
+test
+.jshintrc
+.travis.yml \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.html b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.html
new file mode 100644
index 0000000000..ac478189ea
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.html
@@ -0,0 +1,336 @@
+<!doctype html>
+<!-- Created with GFM2HTML: https://github.com/rvagg/gfm2html -->
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title></title>
+ <meta name="description" content="">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="created-with" content="https://github.com/rvagg/gfm2html">
+
+ <style type="text/css">
+/* most of normalize.css */
+article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}[hidden],template{display:none;}html{font-family:sans-serif;/*1*/-ms-text-size-adjust:100%;/*2*/-webkit-text-size-adjust:100%;/*2*/}body{margin:0;}a{background:transparent;}a:focus{outline:thindotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em0;}abbr[title]{border-bottom:1pxdotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C""\201D""\2018""\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}table{border-collapse:collapse;border-spacing:0;}
+
+html {
+ font: 14px 'Helvetica Neue', Helvetica, arial, freesans, clean, sans-serif;
+}
+
+.container {
+ line-height: 1.6;
+ color: #333;
+ background: #eee;
+ border-radius: 3px;
+ padding: 3px;
+ width: 790px;
+ margin: 10px auto;
+}
+
+.body-content {
+ background-color: #fff;
+ border: 1px solid #CACACA;
+ padding: 30px;
+}
+
+.body-content > *:first-child {
+ margin-top: 0 !important;
+}
+
+a, a:visited {
+ color: #4183c4;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+p, blockquote, ul, ol, dl, table, pre {
+ margin: 15px 0;
+}
+
+ .markdown-body h1
+, .markdown-body h2
+, .markdown-body h3
+, .markdown-body h4
+, .markdown-body h5
+, .markdown-body h6 {
+ margin: 20px 0 10px;
+ padding: 0;
+ font-weight: bold;
+}
+
+h1 {
+ font-size: 2.5em;
+ color: #000;
+ border-bottom: 1px solid #ddd;
+}
+
+h2 {
+ font-size: 2em;
+ border-bottom: 1px solid #eee;
+ color: #000;
+}
+
+img {
+ max-width: 100%;
+}
+
+hr {
+ background: transparent url("/img/hr.png") repeat-x 0 0;
+ border: 0 none;
+ color: #ccc;
+ height: 4px;
+ padding: 0;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+tr:nth-child(2n) {
+ background-color: #f8f8f8;
+}
+
+.markdown-body tr {
+ border-top: 1px solid #ccc;
+ background-color: #fff;
+}
+
+td, th {
+ border: 1px solid #ccc;
+ padding: 6px 13px;
+}
+
+th {
+ font-weight: bold;
+}
+
+blockquote {
+ border-left: 4px solid #ddd;
+ padding: 0 15px;
+ color: #777;
+}
+
+blockquote > :last-child, blockquote > :first-child {
+ margin-bottom: 0px;
+}
+
+pre, code {
+ font-size: 13px;
+ font-family: 'UbuntuMono', monospace;
+ white-space: nowrap;
+ margin: 0 2px;
+ padding: 0px 5px;
+ border: 1px solid #eaeaea;
+ background-color: #f8f8f8;
+ border-radius: 3px;
+}
+
+pre > code {
+ white-space: pre;
+}
+
+pre {
+ overflow-x: auto;
+ white-space: pre;
+ padding: 10px;
+ line-height: 150%;
+ background-color: #f8f8f8;
+ border-color: #ccc;
+}
+
+pre code, pre tt {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ background-color: transparent;
+ border: none;
+}
+
+ .highlight .c
+, .highlight .cm
+, .highlight .cp
+, .highlight .c1 {
+ color:#999988;
+ font-style:italic;
+}
+
+.highlight .err {
+ color:#a61717;
+ background-color:#e3d2d2
+}
+
+ .highlight .o
+, .highlight .gs
+, .highlight .kc
+, .highlight .kd
+, .highlight .kn
+, .highlight .kp
+, .highlight .kr {
+ font-weight:bold
+}
+
+.highlight .cs {
+ color:#999999;
+ font-weight:bold;
+ font-style:italic
+}
+
+.highlight .gd {
+ color:#000000;
+ background-color:#ffdddd
+}
+
+.highlight .gd .x {
+ color:#000000;
+ background-color:#ffaaaa
+}
+
+.highlight .ge {
+ font-style:italic
+}
+
+ .highlight .gr
+, .highlight .gt {
+ color:#aa0000
+}
+
+ .highlight .gh
+, .highlight .bp {
+ color:#999999
+}
+
+.highlight .gi {
+ color:#000000;
+ background-color:#ddffdd
+}
+
+.highlight .gi .x {
+ color:#000000;
+ background-color:#aaffaa
+}
+
+.highlight .go {
+ color:#888888
+}
+
+ .highlight .gp
+, .highlight .nn {
+ color:#555555
+}
+
+
+.highlight .gu {
+ color:#800080;
+ font-weight:bold
+}
+
+
+.highlight .kt {
+ color:#445588;
+ font-weight:bold
+}
+
+ .highlight .m
+, .highlight .mf
+, .highlight .mh
+, .highlight .mi
+, .highlight .mo
+, .highlight .il {
+ color:#009999
+}
+
+ .highlight .s
+, .highlight .sb
+, .highlight .sc
+, .highlight .sd
+, .highlight .s2
+, .highlight .se
+, .highlight .sh
+, .highlight .si
+, .highlight .sx
+, .highlight .s1 {
+ color:#d14
+}
+
+.highlight .n {
+ color:#333333
+}
+
+ .highlight .na
+, .highlight .no
+, .highlight .nv
+, .highlight .vc
+, .highlight .vg
+, .highlight .vi
+, .highlight .nb {
+ color:#0086B3
+}
+
+.highlight .nc {
+ color:#445588;
+ font-weight:bold
+}
+
+.highlight .ni {
+ color:#800080
+}
+
+ .highlight .ne
+, .highlight .nf {
+ color:#990000;
+ font-weight:bold
+}
+
+.highlight .nt {
+ color:#000080
+}
+
+.highlight .ow {
+ font-weight:bold
+}
+
+.highlight .w {
+ color:#bbbbbb
+}
+
+.highlight .sr {
+ color:#009926
+}
+
+.highlight .ss {
+ color:#990073
+}
+
+.highlight .gc {
+ color:#999;
+ background-color:#EAF2F5
+}
+
+@media print {
+ .container {
+ background: transparent;
+ border-radius: 0;
+ padding: 0;
+ }
+
+ .body-content {
+ border: none;
+ }
+}
+</style>
+ </head>
+ <body>
+ <div class="container">
+ <div class="body-content"><h1 id="the-mit-license-mit-">The MIT License (MIT)</h1>
+<p><strong>Copyright (c) 2016 Rod Vagg (the &quot;Original Author&quot;) and additional contributors</strong></p>
+<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), 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:</p>
+<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
+<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, 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.</p>
+</div>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.md
new file mode 100644
index 0000000000..7f0b93daaa
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.md
@@ -0,0 +1,9 @@
+# The MIT License (MIT)
+
+**Copyright (c) 2016 Rod Vagg (the "Original Author") and additional 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. \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/README.md
new file mode 100644
index 0000000000..a916f15ef5
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/README.md
@@ -0,0 +1,136 @@
+# through2
+
+[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/)
+
+**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**
+
+Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
+
+Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.
+
+```js
+fs.createReadStream('ex.txt')
+ .pipe(through2(function (chunk, enc, callback) {
+ for (var i = 0; i < chunk.length; i++)
+ if (chunk[i] == 97)
+ chunk[i] = 122 // swap 'a' for 'z'
+
+ this.push(chunk)
+
+ callback()
+ }))
+ .pipe(fs.createWriteStream('out.txt'))
+ .on('finish', function () {
+ doSomethingSpecial()
+ })
+```
+
+Or object streams:
+
+```js
+var all = []
+
+fs.createReadStream('data.csv')
+ .pipe(csv2())
+ .pipe(through2.obj(function (chunk, enc, callback) {
+ var data = {
+ name : chunk[0]
+ , address : chunk[3]
+ , phone : chunk[10]
+ }
+ this.push(data)
+
+ callback()
+ }))
+ .on('data', function (data) {
+ all.push(data)
+ })
+ .on('end', function () {
+ doSomethingSpecial(all)
+ })
+```
+
+Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
+
+## API
+
+<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
+
+Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
+
+### options
+
+The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
+
+The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2({ objectMode: true, allowHalfOpen: false },
+ function (chunk, enc, cb) {
+ cb(null, 'wut?') // note we can use the second argument on the callback
+ // to provide data as an alternative to this.push('wut?')
+ }
+ )
+ .pipe(fs.createWriteStream('/tmp/wut.txt'))
+```
+
+### transformFunction
+
+The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
+
+To queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
+
+Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
+
+If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
+
+### flushFunction
+
+The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2(
+ function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop
+ function (cb) { // flush function
+ this.push('tacking on an extra buffer to the end');
+ cb();
+ }
+ ))
+ .pipe(fs.createWriteStream('/tmp/wut.txt'));
+```
+
+<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
+
+Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
+
+```js
+var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
+ if (record.temp != null && record.unit == "F") {
+ record.temp = ( ( record.temp - 32 ) * 5 ) / 9
+ record.unit = "C"
+ }
+ this.push(record)
+ callback()
+})
+
+// Create instances of FToC like so:
+var converter = new FToC()
+// Or:
+var converter = FToC()
+// Or specify/override options when you instantiate, if you prefer:
+var converter = FToC({objectMode: true})
+```
+
+## See Also
+
+ - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
+ - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
+ - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
+ - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
+ - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one
+
+## License
+
+**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE
new file mode 100644
index 0000000000..1a14b437e8
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2012-2014 Raynos.
+
+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/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile
new file mode 100644
index 0000000000..d583fcf49d
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile
@@ -0,0 +1,4 @@
+browser:
+ node ./support/compile
+
+.PHONY: browser \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md
new file mode 100644
index 0000000000..093cb2978e
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md
@@ -0,0 +1,32 @@
+# xtend
+
+[![browser support][3]][4]
+
+[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
+
+Extend like a boss
+
+xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
+
+## Examples
+
+```js
+var extend = require("xtend")
+
+// extend returns a new object. Does not mutate arguments
+var combination = extend({
+ a: "a",
+ b: 'c'
+}, {
+ b: "b"
+})
+// { a: "a", b: "b" }
+```
+
+## Stability status: Locked
+
+## MIT Licenced
+
+
+ [3]: http://ci.testling.com/Raynos/xtend.png
+ [4]: http://ci.testling.com/Raynos/xtend
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js
new file mode 100644
index 0000000000..94889c9de1
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js
@@ -0,0 +1,19 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend() {
+ var target = {}
+
+ for (var i = 0; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js
new file mode 100644
index 0000000000..72debede6c
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js
@@ -0,0 +1,17 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json
new file mode 100644
index 0000000000..c682294f2c
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "xtend@~4.0.1",
+ "_id": "xtend@4.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+ "_location": "/cacache/mississippi/through2/xtend",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "xtend@~4.0.1",
+ "name": "xtend",
+ "escapedName": "xtend",
+ "rawSpec": "~4.0.1",
+ "saveSpec": null,
+ "fetchSpec": "~4.0.1"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi/through2"
+ ],
+ "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
+ "_spec": "xtend@~4.0.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2",
+ "author": {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/Raynos/xtend/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jake Verbaten"
+ },
+ {
+ "name": "Matt Esch"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "extend like a boss",
+ "devDependencies": {
+ "tape": "~1.1.0"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "homepage": "https://github.com/Raynos/xtend",
+ "keywords": [
+ "extend",
+ "merge",
+ "options",
+ "opts",
+ "object",
+ "array"
+ ],
+ "license": "MIT",
+ "main": "immutable",
+ "name": "xtend",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Raynos/xtend.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/7..latest",
+ "firefox/16..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"
+ ]
+ },
+ "version": "4.0.1"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js
new file mode 100644
index 0000000000..093a2b061e
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js
@@ -0,0 +1,83 @@
+var test = require("tape")
+var extend = require("./")
+var mutableExtend = require("./mutable")
+
+test("merge", function(assert) {
+ var a = { a: "foo" }
+ var b = { b: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("replace", function(assert) {
+ var a = { a: "foo" }
+ var b = { a: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "bar" })
+ assert.end()
+})
+
+test("undefined", function(assert) {
+ var a = { a: undefined }
+ var b = { b: "foo" }
+
+ assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
+ assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
+ assert.end()
+})
+
+test("handle 0", function(assert) {
+ var a = { a: "default" }
+ var b = { a: 0 }
+
+ assert.deepEqual(extend(a, b), { a: 0 })
+ assert.deepEqual(extend(b, a), { a: "default" })
+ assert.end()
+})
+
+test("is immutable", function (assert) {
+ var record = {}
+
+ extend(record, { foo: "bar" })
+ assert.equal(record.foo, undefined)
+ assert.end()
+})
+
+test("null as argument", function (assert) {
+ var a = { foo: "bar" }
+ var b = null
+ var c = void 0
+
+ assert.deepEqual(extend(b, a, c), { foo: "bar" })
+ assert.end()
+})
+
+test("mutable", function (assert) {
+ var a = { foo: "bar" }
+
+ mutableExtend(a, { bar: "baz" })
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
+
+test("null prototype", function(assert) {
+ var a = { a: "foo" }
+ var b = Object.create(null)
+ b.b = "bar";
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("null prototype mutable", function (assert) {
+ var a = { foo: "bar" }
+ var b = Object.create(null)
+ b.bar = "baz";
+
+ mutableExtend(a, b)
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/package.json
new file mode 100644
index 0000000000..5a9aee5ec7
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "through2@^2.0.0",
+ "_id": "through2@2.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
+ "_location": "/cacache/mississippi/through2",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "through2@^2.0.0",
+ "name": "through2",
+ "escapedName": "through2",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
+ "_shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be",
+ "_spec": "through2@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Rod Vagg",
+ "email": "r@va.gg",
+ "url": "https://github.com/rvagg"
+ },
+ "bugs": {
+ "url": "https://github.com/rvagg/through2/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "readable-stream": "^2.1.5",
+ "xtend": "~4.0.1"
+ },
+ "deprecated": false,
+ "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
+ "devDependencies": {
+ "bl": "~1.1.2",
+ "faucet": "0.0.1",
+ "stream-spigot": "~3.0.5",
+ "tape": "~4.6.2"
+ },
+ "homepage": "https://github.com/rvagg/through2#readme",
+ "keywords": [
+ "stream",
+ "streams2",
+ "through",
+ "transform"
+ ],
+ "license": "MIT",
+ "main": "through2.js",
+ "name": "through2",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/rvagg/through2.git"
+ },
+ "scripts": {
+ "test": "node test/test.js | faucet",
+ "test-local": "brtapsauce-local test/basic-test.js"
+ },
+ "version": "2.0.3"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/through2.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/through2.js
new file mode 100644
index 0000000000..ef13980d7b
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/through2.js
@@ -0,0 +1,96 @@
+var Transform = require('readable-stream/transform')
+ , inherits = require('util').inherits
+ , xtend = require('xtend')
+
+function DestroyableTransform(opts) {
+ Transform.call(this, opts)
+ this._destroyed = false
+}
+
+inherits(DestroyableTransform, Transform)
+
+DestroyableTransform.prototype.destroy = function(err) {
+ if (this._destroyed) return
+ this._destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ if (err)
+ self.emit('error', err)
+ self.emit('close')
+ })
+}
+
+// a noop _transform function
+function noop (chunk, enc, callback) {
+ callback(null, chunk)
+}
+
+
+// create a new export function, used by both the main export and
+// the .ctor export, contains common logic for dealing with arguments
+function through2 (construct) {
+ return function (options, transform, flush) {
+ if (typeof options == 'function') {
+ flush = transform
+ transform = options
+ options = {}
+ }
+
+ if (typeof transform != 'function')
+ transform = noop
+
+ if (typeof flush != 'function')
+ flush = null
+
+ return construct(options, transform, flush)
+ }
+}
+
+
+// main export, just make me a transform stream!
+module.exports = through2(function (options, transform, flush) {
+ var t2 = new DestroyableTransform(options)
+
+ t2._transform = transform
+
+ if (flush)
+ t2._flush = flush
+
+ return t2
+})
+
+
+// make me a reusable prototype that I can `new`, or implicitly `new`
+// with a constructor call
+module.exports.ctor = through2(function (options, transform, flush) {
+ function Through2 (override) {
+ if (!(this instanceof Through2))
+ return new Through2(override)
+
+ this.options = xtend(options, override)
+
+ DestroyableTransform.call(this, this.options)
+ }
+
+ inherits(Through2, DestroyableTransform)
+
+ Through2.prototype._transform = transform
+
+ if (flush)
+ Through2.prototype._flush = flush
+
+ return Through2
+})
+
+
+module.exports.obj = through2(function (options, transform, flush) {
+ var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options))
+
+ t2._transform = transform
+
+ if (flush)
+ t2._flush = flush
+
+ return t2
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/package.json
new file mode 100644
index 0000000000..505c1ba830
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "mississippi@^2.0.0",
+ "_id": "mississippi@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==",
+ "_location": "/cacache/mississippi",
+ "_phantomChildren": {
+ "inherits": "2.0.3",
+ "once": "1.4.0",
+ "readable-stream": "2.3.5"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "mississippi@^2.0.0",
+ "name": "mississippi",
+ "escapedName": "mississippi",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/cacache"
+ ],
+ "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz",
+ "_shasum": "3442a508fafc28500486feea99409676e4ee5a6f",
+ "_spec": "mississippi@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache",
+ "author": {
+ "name": "max ogden"
+ },
+ "bugs": {
+ "url": "https://github.com/maxogden/mississippi/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "concat-stream": "^1.5.0",
+ "duplexify": "^3.4.2",
+ "end-of-stream": "^1.1.0",
+ "flush-write-stream": "^1.0.0",
+ "from2": "^2.1.0",
+ "parallel-transform": "^1.1.0",
+ "pump": "^2.0.1",
+ "pumpify": "^1.3.3",
+ "stream-each": "^1.1.0",
+ "through2": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "a collection of useful streams",
+ "devDependencies": {},
+ "engines": {
+ "node": ">=4.0.0"
+ },
+ "homepage": "https://github.com/maxogden/mississippi#readme",
+ "license": "BSD-2-Clause",
+ "main": "index.js",
+ "name": "mississippi",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/maxogden/mississippi.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "2.0.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/readme.md b/deps/npm/node_modules/cacache/node_modules/mississippi/readme.md
new file mode 100644
index 0000000000..5fa6d66c89
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/readme.md
@@ -0,0 +1,411 @@
+# mississippi
+
+a collection of useful stream utility modules. learn how the modules work using this and then pick the ones you want and use them individually
+
+the goal of the modules included in mississippi is to make working with streams easy without sacrificing speed, error handling or composability.
+
+## usage
+
+```js
+var miss = require('mississippi')
+```
+
+## methods
+
+- [pipe](#pipe)
+- [each](#each)
+- [pipeline](#pipeline)
+- [duplex](#duplex)
+- [through](#through)
+- [from](#from)
+- [to](#to)
+- [concat](#concat)
+- [finished](#finished)
+- [parallel](#parallel)
+
+### pipe
+
+##### `miss.pipe(stream1, stream2, stream3, ..., cb)`
+
+Pipes streams together and destroys all of them if one of them closes. Calls `cb` with `(error)` if there was an error in any of the streams.
+
+When using standard `source.pipe(destination)` the source will _not_ be destroyed if the destination emits close or error. You are also not able to provide a callback to tell when the pipe has finished.
+
+`miss.pipe` does these two things for you, ensuring you handle stream errors 100% of the time (unhandled errors are probably the most common bug in most node streams code)
+
+#### original module
+
+`miss.pipe` is provided by [`require('pump')`](https://www.npmjs.com/package/pump)
+
+#### example
+
+```js
+// lets do a simple file copy
+var fs = require('fs')
+
+var read = fs.createReadStream('./original.zip')
+var write = fs.createWriteStream('./copy.zip')
+
+// use miss.pipe instead of read.pipe(write)
+miss.pipe(read, write, function (err) {
+ if (err) return console.error('Copy error!', err)
+ console.log('Copied successfully')
+})
+```
+
+### each
+
+##### `miss.each(stream, each, [done])`
+
+Iterate the data in `stream` one chunk at a time. Your `each` function will be called with `(data, next)` where data is a data chunk and next is a callback. Call `next` when you are ready to consume the next chunk.
+
+Optionally you can call `next` with an error to destroy the stream. You can also pass the optional third argument, `done`, which is a function that will be called with `(err)` when the stream ends. The `err` argument will be populated with an error if the stream emitted an error.
+
+#### original module
+
+`miss.each` is provided by [`require('stream-each')`](https://www.npmjs.com/package/stream-each)
+
+#### example
+
+```js
+var fs = require('fs')
+var split = require('split2')
+
+var newLineSeparatedNumbers = fs.createReadStream('numbers.txt')
+
+var pipeline = miss.pipeline(newLineSeparatedNumbers, split())
+miss.each(pipeline, eachLine, done)
+var sum = 0
+
+function eachLine (line, next) {
+ sum += parseInt(line.toString())
+ next()
+}
+
+function done (err) {
+ if (err) throw err
+ console.log('sum is', sum)
+}
+```
+
+### pipeline
+
+##### `var pipeline = miss.pipeline(stream1, stream2, stream3, ...)`
+
+Builds a pipeline from all the transform streams passed in as arguments by piping them together and returning a single stream object that lets you write to the first stream and read from the last stream.
+
+If you are pumping object streams together use `pipeline = miss.pipeline.obj(s1, s2, ...)`.
+
+If any of the streams in the pipeline emits an error or gets destroyed, or you destroy the stream it returns, all of the streams will be destroyed and cleaned up for you.
+
+#### original module
+
+`miss.pipeline` is provided by [`require('pumpify')`](https://www.npmjs.com/package/pumpify)
+
+#### example
+
+```js
+// first create some transform streams (note: these two modules are fictional)
+var imageResize = require('image-resizer-stream')({width: 400})
+var pngOptimizer = require('png-optimizer-stream')({quality: 60})
+
+// instead of doing a.pipe(b), use pipelin
+var resizeAndOptimize = miss.pipeline(imageResize, pngOptimizer)
+// `resizeAndOptimize` is a transform stream. when you write to it, it writes
+// to `imageResize`. when you read from it, it reads from `pngOptimizer`.
+// it handles piping all the streams together for you
+
+// use it like any other transform stream
+var fs = require('fs')
+
+var read = fs.createReadStream('./image.png')
+var write = fs.createWriteStream('./resized-and-optimized.png')
+
+miss.pipe(read, resizeAndOptimize, write, function (err) {
+ if (err) return console.error('Image processing error!', err)
+ console.log('Image processed successfully')
+})
+```
+
+### duplex
+
+##### `var duplex = miss.duplex([writable, readable, opts])`
+
+Take two separate streams, a writable and a readable, and turn them into a single [duplex (readable and writable) stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
+
+The returned stream will emit data from the readable. When you write to it it writes to the writable.
+
+You can either choose to supply the writable and the readable at the time you create the stream, or you can do it later using the `.setWritable` and `.setReadable` methods and data written to the stream in the meantime will be buffered for you.
+
+#### original module
+
+`miss.duplex` is provided by [`require('duplexify')`](https://www.npmjs.com/package/duplexify)
+
+#### example
+
+```js
+// lets spawn a process and take its stdout and stdin and combine them into 1 stream
+var child = require('child_process')
+
+// @- tells it to read from stdin, --data-binary sets 'raw' binary mode
+var curl = child.spawn('curl -X POST --data-binary @- http://foo.com')
+
+// duplexCurl will write to stdin and read from stdout
+var duplexCurl = miss.duplex(curl.stdin, curl.stdout)
+```
+
+### through
+
+##### `var transformer = miss.through([options, transformFunction, flushFunction])`
+
+Make a custom [transform stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform).
+
+The `options` object is passed to the internal transform stream and can be used to create an `objectMode` stream (or use the shortcut `miss.through.obj([...])`)
+
+The `transformFunction` is called when data is available for the writable side and has the signature `(chunk, encoding, cb)`. Within the function, add data to the readable side any number of times with `this.push(data)`. Call `cb()` to indicate processing of the `chunk` is complete. Or to easily emit a single error or chunk, call `cb(err, chunk)`
+
+The `flushFunction`, with signature `(cb)`, is called just before the stream is complete and should be used to wrap up stream processing.
+
+#### original module
+
+`miss.through` is provided by [`require('through2')`](https://www.npmjs.com/package/through2)
+
+#### example
+
+```js
+var fs = require('fs')
+
+var read = fs.createReadStream('./boring_lowercase.txt')
+var write = fs.createWriteStream('./AWESOMECASE.TXT')
+
+// Leaving out the options object
+var uppercaser = miss.through(
+ function (chunk, enc, cb) {
+ cb(null, chunk.toString().toUpperCase())
+ },
+ function (cb) {
+ cb(null, 'ONE LAST BIT OF UPPERCASE')
+ }
+)
+
+miss.pipe(read, uppercaser, write, function (err) {
+ if (err) return console.error('Trouble uppercasing!')
+ console.log('Splendid uppercasing!')
+})
+```
+
+### from
+
+##### `miss.from([opts], read)`
+
+Make a custom [readable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_readable).
+
+`opts` contains the options to pass on to the ReadableStream constructor e.g. for creating a readable object stream (or use the shortcut `miss.from.obj([...])`).
+
+Returns a readable stream that calls `read(size, next)` when data is requested from the stream.
+
+- `size` is the recommended amount of data (in bytes) to retrieve.
+- `next(err, chunk)` should be called when you're ready to emit more data.
+
+#### original module
+
+`miss.from` is provided by [`require('from2')`](https://www.npmjs.com/package/from2)
+
+#### example
+
+```js
+
+
+function fromString(string) {
+ return miss.from(function(size, next) {
+ // if there's no more content
+ // left in the string, close the stream.
+ if (string.length <= 0) return next(null, null)
+
+ // Pull in a new chunk of text,
+ // removing it from the string.
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+
+ // Emit "chunk" from the stream.
+ next(null, chunk)
+ })
+}
+
+// pipe "hello world" out
+// to stdout.
+fromString('hello world').pipe(process.stdout)
+```
+
+### to
+
+##### `miss.to([options], write, [flush])`
+
+Make a custom [writable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_writable).
+
+`opts` contains the options to pass on to the WritableStream constructor e.g. for creating a writable object stream (or use the shortcut `miss.to.obj([...])`).
+
+Returns a writable stream that calls `write(data, enc, cb)` when data is written to the stream.
+
+- `data` is the received data to write the destination.
+- `enc` encoding of the piece of data received.
+- `cb(err, data)` should be called when you're ready to write more data, or encountered an error.
+
+`flush(cb)` is called before `finish` is emitted and allows for cleanup steps to occur.
+
+#### original module
+
+`miss.to` is provided by [`require('flush-write-stream')`](https://www.npmjs.com/package/flush-write-stream)
+
+#### example
+
+```js
+var ws = miss.to(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
+```
+
+If you run the above it will produce the following output
+
+```
+writing hello
+writing world
+(nothing happens for 1 sec)
+finished
+```
+
+### concat
+
+##### `var concat = miss.concat(cb)`
+
+Returns a writable stream that concatenates all data written to the stream and calls a callback with the single result.
+
+Calling `miss.concat(cb)` returns a writable stream. `cb` is called when the writable stream is finished, e.g. when all data is done being written to it. `cb` is called with a single argument, `(data)`, which will contain the result of concatenating all the data written to the stream.
+
+Note that `miss.concat` will not handle stream errors for you. To handle errors, use `miss.pipe` or handle the `error` event manually.
+
+#### original module
+
+`miss.concat` is provided by [`require('concat-stream')`](https://www.npmjs.com/package/concat-stream)
+
+#### example
+
+```js
+var fs = require('fs')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = miss.concat(gotPicture)
+
+function callback (err) {
+ if (err) {
+ console.error(err)
+ process.exit(1)
+ }
+}
+
+miss.pipe(readStream, concatStream, callback)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+```
+
+### finished
+
+##### `miss.finished(stream, cb)`
+
+Waits for `stream` to finish or error and then calls `cb` with `(err)`. `cb` will only be called once. `err` will be null if the stream finished without error, or else it will be populated with the error from the streams `error` event.
+
+This function is useful for simplifying stream handling code as it lets you handle success or error conditions in a single code path. It's used internally `miss.pipe`.
+
+#### original module
+
+`miss.finished` is provided by [`require('end-of-stream')`](https://www.npmjs.com/package/end-of-stream)
+
+#### example
+
+```js
+var copySource = fs.createReadStream('./movie.mp4')
+var copyDest = fs.createWriteStream('./movie-copy.mp4')
+
+copySource.pipe(copyDest)
+
+miss.finished(copyDest, function(err) {
+ if (err) return console.log('write failed', err)
+ console.log('write success')
+})
+```
+
+### parallel
+
+##### `miss.parallel(concurrency, each)`
+
+This works like `through` except you can process items in parallel, while still preserving the original input order.
+
+This is handy if you wanna take advantage of node's async I/O and process streams of items in batches. With this module you can build your very own streaming parallel job queue.
+
+Note that `miss.parallel` preserves input ordering, if you don't need that then you can use [through2-concurrent](https://github.com/almost/through2-concurrent) instead, which is very similar to this otherwise.
+
+#### original module
+
+`miss.parallel` is provided by [`require('parallel-transform')`](https://npmjs.org/parallel-transform)
+
+#### example
+
+This example fetches the GET HTTP headers for a stream of input URLs 5 at a time in parallel.
+
+```js
+function getResponse (item, cb) {
+ var r = request(item.url)
+ r.on('error', function (err) {
+ cb(err)
+ })
+ r.on('response', function (re) {
+ cb(null, {url: item.url, date: new Date(), status: re.statusCode, headers: re.headers})
+ r.abort()
+ })
+}
+
+miss.pipe(
+ fs.createReadStream('./urls.txt'), // one url per line
+ split(),
+ miss.parallel(5, getResponse),
+ miss.through(function (row, enc, next) {
+ console.log(JSON.stringify(row))
+ next()
+ })
+)
+```
+
+## see also
+
+- [substack/stream-handbook](https://github.com/substack/stream-handbook)
+- [nodejs.org/api/stream.html](https://nodejs.org/api/stream.html)
+- [awesome-nodejs-streams](https://github.com/thejmazz/awesome-nodejs-streams)
+
+## license
+
+Licensed under the BSD 2-clause license.
diff --git a/deps/npm/node_modules/cacache/node_modules/ssri/CHANGELOG.md b/deps/npm/node_modules/cacache/node_modules/ssri/CHANGELOG.md
deleted file mode 100644
index 7ae2b000dc..0000000000
--- a/deps/npm/node_modules/cacache/node_modules/ssri/CHANGELOG.md
+++ /dev/null
@@ -1,190 +0,0 @@
-# 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.
-
-<a name="5.0.0"></a>
-# [5.0.0](https://github.com/zkat/ssri/compare/v4.1.6...v5.0.0) (2017-10-23)
-
-
-### Features
-
-* **license:** relicense to ISC (#9) ([c82983a](https://github.com/zkat/ssri/commit/c82983a))
-
-
-### BREAKING CHANGES
-
-* **license:** the license has been changed from CC0-1.0 to ISC.
-
-
-
-<a name="4.1.6"></a>
-## [4.1.6](https://github.com/zkat/ssri/compare/v4.1.5...v4.1.6) (2017-06-07)
-
-
-### Bug Fixes
-
-* **checkStream:** make sure to pass all opts through ([0b1bcbe](https://github.com/zkat/ssri/commit/0b1bcbe))
-
-
-
-<a name="4.1.5"></a>
-## [4.1.5](https://github.com/zkat/ssri/compare/v4.1.4...v4.1.5) (2017-06-05)
-
-
-### Bug Fixes
-
-* **integrityStream:** stop crashing if opts.algorithms and opts.integrity have an algo mismatch ([fb1293e](https://github.com/zkat/ssri/commit/fb1293e))
-
-
-
-<a name="4.1.4"></a>
-## [4.1.4](https://github.com/zkat/ssri/compare/v4.1.3...v4.1.4) (2017-05-31)
-
-
-### Bug Fixes
-
-* **node:** older versions of node[@4](https://github.com/4) do not support base64buffer string parsing ([513df4e](https://github.com/zkat/ssri/commit/513df4e))
-
-
-
-<a name="4.1.3"></a>
-## [4.1.3](https://github.com/zkat/ssri/compare/v4.1.2...v4.1.3) (2017-05-24)
-
-
-### Bug Fixes
-
-* **check:** handle various bad hash corner cases better ([c2c262b](https://github.com/zkat/ssri/commit/c2c262b))
-
-
-
-<a name="4.1.2"></a>
-## [4.1.2](https://github.com/zkat/ssri/compare/v4.1.1...v4.1.2) (2017-04-18)
-
-
-### Bug Fixes
-
-* **stream:** _flush can be called multiple times. use on("end") ([b1c4805](https://github.com/zkat/ssri/commit/b1c4805))
-
-
-
-<a name="4.1.1"></a>
-## [4.1.1](https://github.com/zkat/ssri/compare/v4.1.0...v4.1.1) (2017-04-12)
-
-
-### Bug Fixes
-
-* **pickAlgorithm:** error if pickAlgorithm() is used in an empty Integrity ([fab470e](https://github.com/zkat/ssri/commit/fab470e))
-
-
-
-<a name="4.1.0"></a>
-# [4.1.0](https://github.com/zkat/ssri/compare/v4.0.0...v4.1.0) (2017-04-07)
-
-
-### Features
-
-* adding ssri.create for a crypto style interface (#2) ([96f52ad](https://github.com/zkat/ssri/commit/96f52ad))
-
-
-
-<a name="4.0.0"></a>
-# [4.0.0](https://github.com/zkat/ssri/compare/v3.0.2...v4.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **integrity:** should have changed the error code before. oops ([8381afa](https://github.com/zkat/ssri/commit/8381afa))
-
-
-### BREAKING CHANGES
-
-* **integrity:** EBADCHECKSUM -> EINTEGRITY for verification errors
-
-
-
-<a name="3.0.2"></a>
-## [3.0.2](https://github.com/zkat/ssri/compare/v3.0.1...v3.0.2) (2017-04-03)
-
-
-
-<a name="3.0.1"></a>
-## [3.0.1](https://github.com/zkat/ssri/compare/v3.0.0...v3.0.1) (2017-04-03)
-
-
-### Bug Fixes
-
-* **package.json:** really should have these in the keywords because search ([a6ac6d0](https://github.com/zkat/ssri/commit/a6ac6d0))
-
-
-
-<a name="3.0.0"></a>
-# [3.0.0](https://github.com/zkat/ssri/compare/v2.0.0...v3.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **hashes:** IntegrityMetadata -> Hash ([d04aa1f](https://github.com/zkat/ssri/commit/d04aa1f))
-
-
-### Features
-
-* **check:** return IntegrityMetadata on check success ([2301e74](https://github.com/zkat/ssri/commit/2301e74))
-* **fromHex:** ssri.fromHex to make it easier to generate them from hex valus ([049b89e](https://github.com/zkat/ssri/commit/049b89e))
-* **hex:** utility function for getting hex version of digest ([a9f021c](https://github.com/zkat/ssri/commit/a9f021c))
-* **hexDigest:** added hexDigest method to Integrity objects too ([85208ba](https://github.com/zkat/ssri/commit/85208ba))
-* **integrity:** add .isIntegrity and .isIntegrityMetadata ([1b29e6f](https://github.com/zkat/ssri/commit/1b29e6f))
-* **integrityStream:** new stream that can both generate and check streamed data ([fd23e1b](https://github.com/zkat/ssri/commit/fd23e1b))
-* **parse:** allow parsing straight into a single IntegrityMetadata object ([c8ddf48](https://github.com/zkat/ssri/commit/c8ddf48))
-* **pickAlgorithm:** Intergrity#pickAlgorithm() added ([b97a796](https://github.com/zkat/ssri/commit/b97a796))
-* **size:** calculate and update stream sizes ([02ed1ad](https://github.com/zkat/ssri/commit/02ed1ad))
-
-
-### BREAKING CHANGES
-
-* **hashes:** `.isIntegrityMetadata` is now `.isHash`. Also, any references to `IntegrityMetadata` now refer to `Hash`.
-* **integrityStream:** createCheckerStream has been removed and replaced with a general-purpose integrityStream.
-
-To convert existing createCheckerStream code, move the `sri` argument into `opts.integrity` in integrityStream. All other options should be the same.
-* **check:** `checkData`, `checkStream`, and `createCheckerStream` now yield a whole IntegrityMetadata instance representing the first successful hash match.
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/zkat/ssri/compare/v1.0.0...v2.0.0) (2017-03-24)
-
-
-### Bug Fixes
-
-* **strict-mode:** make regexes more rigid ([122a32c](https://github.com/zkat/ssri/commit/122a32c))
-
-
-### Features
-
-* **api:** added serialize alias for unparse ([999b421](https://github.com/zkat/ssri/commit/999b421))
-* **concat:** add Integrity#concat() ([cae12c7](https://github.com/zkat/ssri/commit/cae12c7))
-* **pickAlgo:** pick the strongest algorithm provided, by default ([58c18f7](https://github.com/zkat/ssri/commit/58c18f7))
-* **strict-mode:** strict SRI support ([3f0b64c](https://github.com/zkat/ssri/commit/3f0b64c))
-* **stringify:** replaced unparse/serialize with stringify ([4acad30](https://github.com/zkat/ssri/commit/4acad30))
-* **verification:** add opts.pickAlgorithm ([f72e658](https://github.com/zkat/ssri/commit/f72e658))
-
-
-### BREAKING CHANGES
-
-* **pickAlgo:** ssri will prioritize specific hashes now
-* **stringify:** serialize and unparse have been removed. Use ssri.stringify instead.
-* **strict-mode:** functions that accepted an optional `sep` argument now expect `opts.sep`.
-
-
-
-<a name="1.0.0"></a>
-# 1.0.0 (2017-03-23)
-
-
-### Features
-
-* **api:** implemented initial api ([4fbb16b](https://github.com/zkat/ssri/commit/4fbb16b))
-
-
-### BREAKING CHANGES
-
-* **api:** Initial API established.
diff --git a/deps/npm/node_modules/cacache/node_modules/ssri/LICENSE.md b/deps/npm/node_modules/cacache/node_modules/ssri/LICENSE.md
deleted file mode 100644
index 8d28acf866..0000000000
--- a/deps/npm/node_modules/cacache/node_modules/ssri/LICENSE.md
+++ /dev/null
@@ -1,16 +0,0 @@
-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/cacache/node_modules/ssri/README.md b/deps/npm/node_modules/cacache/node_modules/ssri/README.md
deleted file mode 100644
index f2fc035da5..0000000000
--- a/deps/npm/node_modules/cacache/node_modules/ssri/README.md
+++ /dev/null
@@ -1,462 +0,0 @@
-# ssri [![npm version](https://img.shields.io/npm/v/ssri.svg)](https://npm.im/ssri) [![license](https://img.shields.io/npm/l/ssri.svg)](https://npm.im/ssri) [![Travis](https://img.shields.io/travis/zkat/ssri.svg)](https://travis-ci.org/zkat/ssri) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/ssri?svg=true)](https://ci.appveyor.com/project/zkat/ssri) [![Coverage Status](https://coveralls.io/repos/github/zkat/ssri/badge.svg?branch=latest)](https://coveralls.io/github/zkat/ssri?branch=latest)
-
-[`ssri`](https://github.com/zkat/ssri), short for Standard Subresource
-Integrity, is a Node.js utility for parsing, manipulating, serializing,
-generating, and verifying [Subresource
-Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) hashes.
-
-## Install
-
-`$ npm install --save ssri`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * Parsing & Serializing
- * [`parse`](#parse)
- * [`stringify`](#stringify)
- * [`Integrity#concat`](#integrity-concat)
- * [`Integrity#toString`](#integrity-to-string)
- * [`Integrity#toJSON`](#integrity-to-json)
- * [`Integrity#pickAlgorithm`](#integrity-pick-algorithm)
- * [`Integrity#hexDigest`](#integrity-hex-digest)
- * Integrity Generation
- * [`fromHex`](#from-hex)
- * [`fromData`](#from-data)
- * [`fromStream`](#from-stream)
- * [`create`](#create)
- * Integrity Verification
- * [`checkData`](#check-data)
- * [`checkStream`](#check-stream)
- * [`integrityStream`](#integrity-stream)
-
-### Example
-
-```javascript
-const ssri = require('ssri')
-
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-// Parsing and serializing
-const parsed = ssri.parse(integrity)
-ssri.stringify(parsed) // === integrity (works on non-Integrity objects)
-parsed.toString() // === integrity
-
-// Async stream functions
-ssri.checkStream(fs.createReadStream('./my-file'), integrity).then(...)
-ssri.fromStream(fs.createReadStream('./my-file')).then(sri => {
- sri.toString() === integrity
-})
-fs.createReadStream('./my-file').pipe(ssri.createCheckerStream(sri))
-
-// Sync data functions
-ssri.fromData(fs.readFileSync('./my-file')) // === parsed
-ssri.checkData(fs.readFileSync('./my-file'), integrity) // => 'sha512'
-```
-
-### Features
-
-* Parses and stringifies SRI strings.
-* Generates SRI strings from raw data or Streams.
-* Strict standard compliance.
-* `?foo` metadata option support.
-* Multiple entries for the same algorithm.
-* Object-based integrity hash manipulation.
-* Small footprint: no dependencies, concise implementation.
-* Full test coverage.
-* Customizable algorithm picker.
-
-### Contributing
-
-The ssri 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.
-
-### API
-
-#### <a name="parse"></a> `> ssri.parse(sri, [opts]) -> Integrity`
-
-Parses `sri` into an `Integrity` data structure. `sri` can be an integrity
-string, an `Hash`-like with `digest` and `algorithm` fields and an optional
-`options` field, or an `Integrity`-like object. The resulting object will be an
-`Integrity` instance that has this shape:
-
-```javascript
-{
- 'sha1': [{algorithm: 'sha1', digest: 'deadbeef', options: []}],
- 'sha512': [
- {algorithm: 'sha512', digest: 'c0ffee', options: []},
- {algorithm: 'sha512', digest: 'bad1dea', options: ['foo']}
- ],
-}
-```
-
-If `opts.single` is truthy, a single `Hash` object will be returned. That is, a
-single object that looks like `{algorithm, digest, options}`, as opposed to a
-larger object with multiple of these.
-
-If `opts.strict` is truthy, the resulting object will be filtered such that
-it strictly follows the Subresource Integrity spec, throwing away any entries
-with any invalid components. This also means a restricted set of algorithms
-will be used -- the spec limits them to `sha256`, `sha384`, and `sha512`.
-
-Strict mode is recommended if the integrity strings are intended for use in
-browsers, or in other situations where strict adherence to the spec is needed.
-
-##### Example
-
-```javascript
-ssri.parse('sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo') // -> Integrity object
-```
-
-#### <a name="stringify"></a> `> ssri.stringify(sri, [opts]) -> String`
-
-This function is identical to [`Integrity#toString()`](#integrity-to-string),
-except it can be used on _any_ object that [`parse`](#parse) can handle -- that
-is, a string, an `Hash`-like, or an `Integrity`-like.
-
-The `opts.sep` option defines the string to use when joining multiple entries
-together. To be spec-compliant, this _must_ be whitespace. The default is a
-single space (`' '`).
-
-If `opts.strict` is true, the integrity string will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-// Useful for cleaning up input SRI strings:
-ssri.stringify('\n\rsha512-foo\n\t\tsha384-bar')
-// -> 'sha512-foo sha384-bar'
-
-// Hash-like: only a single entry.
-ssri.stringify({
- algorithm: 'sha512',
- digest:'9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==',
- options: ['foo']
-})
-// ->
-// 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-// Integrity-like: full multi-entry syntax. Similar to output of `ssri.parse`
-ssri.stringify({
- 'sha512': [
- {
- algorithm: 'sha512',
- digest:'9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==',
- options: ['foo']
- }
- ]
-})
-// ->
-// 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-```
-
-#### <a name="integrity-concat"></a> `> Integrity#concat(otherIntegrity, [opts]) -> Integrity`
-
-Concatenates an `Integrity` object with another IntegrityLike, or an integrity
-string.
-
-This is functionally equivalent to concatenating the string format of both
-integrity arguments, and calling [`ssri.parse`](#ssri-parse) on the new string.
-
-If `opts.strict` is true, the new `Integrity` will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-// This will combine the integrity checks for two different versions of
-// your index.js file so you can use a single integrity string and serve
-// either of these to clients, from a single `<script>` tag.
-const desktopIntegrity = ssri.fromData(fs.readFileSync('./index.desktop.js'))
-const mobileIntegrity = ssri.fromData(fs.readFileSync('./index.mobile.js'))
-
-// Note that browsers (and ssri) will succeed as long as ONE of the entries
-// for the *prioritized* algorithm succeeds. That is, in order for this fallback
-// to work, both desktop and mobile *must* use the same `algorithm` values.
-desktopIntegrity.concat(mobileIntegrity)
-```
-
-#### <a name="integrity-to-string"></a> `> Integrity#toString([opts]) -> String`
-
-Returns the string representation of an `Integrity` object. All hash entries
-will be concatenated in the string by `opts.sep`, which defaults to `' '`.
-
-If you want to serialize an object that didn't from from an `ssri` function,
-use [`ssri.stringify()`](#stringify).
-
-If `opts.strict` is true, the integrity string will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-ssri.parse(integrity).toString() === integrity
-```
-
-#### <a name="integrity-to-json"></a> `> Integrity#toJSON() -> String`
-
-Returns the string representation of an `Integrity` object. All hash entries
-will be concatenated in the string by `' '`.
-
-This is a convenience method so you can pass an `Integrity` object directly to `JSON.stringify`.
-For more info check out [toJSON() behavior on mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior).
-
-##### Example
-
-```javascript
-const integrity = '"sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo"'
-
-JSON.stringify(ssri.parse(integrity)) === integrity
-```
-
-#### <a name="integrity-pick-algorithm"></a> `> Integrity#pickAlgorithm([opts]) -> String`
-
-Returns the "best" algorithm from those available in the integrity object.
-
-If `opts.pickAlgorithm` is provided, it will be passed two algorithms as
-arguments. ssri will prioritize whichever of the two algorithms is returned by
-this function. Note that the function may be called multiple times, and it
-**must** return one of the two algorithms provided. By default, ssri will make
-a best-effort to pick the strongest/most reliable of the given algorithms. It
-may intentionally deprioritize algorithms with known vulnerabilities.
-
-##### Example
-
-```javascript
-ssri.parse('sha1-WEakDigEST sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1').pickAlgorithm() // sha512
-```
-
-#### <a name="integrity-hex-digest"></a> `> Integrity#hexDigest() -> String`
-
-`Integrity` is assumed to be either a single-hash `Integrity` instance, or a
-`Hash` instance. Returns its `digest`, converted to a hex representation of the
-base64 data.
-
-##### Example
-
-```javascript
-ssri.parse('sha1-deadbeef').hexDigest() // '75e69d6de79f'
-```
-
-#### <a name="from-hex"></a> `> ssri.fromHex(hexDigest, algorithm, [opts]) -> Integrity`
-
-Creates an `Integrity` object with a single entry, based on a hex-formatted
-hash. This is a utility function to help convert existing shasums to the
-Integrity format, and is roughly equivalent to something like:
-
-```javascript
-algorithm + '-' + Buffer.from(hexDigest, 'hex').toString('base64')
-```
-
-`opts.options` may optionally be passed in: it must be an array of option
-strings that will be added to all generated integrity hashes generated by
-`fromData`. This is a loosely-specified feature of SRIs, and currently has no
-specified semantics besides being `?`-separated. Use at your own risk, and
-probably avoid if your integrity strings are meant to be used with browsers.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-If `opts.single` is true, a single `Hash` object will be returned.
-
-##### Example
-
-```javascript
-ssri.fromHex('75e69d6de79f', 'sha1').toString() // 'sha1-deadbeef'
-```
-
-#### <a name="from-data"></a> `> ssri.fromData(data, [opts]) -> Integrity`
-
-Creates an `Integrity` object from either string or `Buffer` data, calculating
-all the requested hashes and adding any specified options to the object.
-
-`opts.algorithms` determines which algorithms to generate hashes for. All
-results will be included in a single `Integrity` object. The default value for
-`opts.algorithms` is `['sha512']`. All algorithm strings must be hashes listed
-in `crypto.getHashes()` for the host Node.js platform.
-
-`opts.options` may optionally be passed in: it must be an array of option
-strings that will be added to all generated integrity hashes generated by
-`fromData`. This is a loosely-specified feature of SRIs, and currently has no
-specified semantics besides being `?`-separated. Use at your own risk, and
-probably avoid if your integrity strings are meant to be used with browsers.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrityObj = ssri.fromData('foobarbaz', {
- algorithms: ['sha256', 'sha384', 'sha512']
-})
-integrity.toString('\n')
-// ->
-// sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0=
-// sha384-irnCxQ0CfQhYGlVAUdwTPC9bF3+YWLxlaDGM4xbYminxpbXEq+D+2GCEBTxcjES9
-// sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1+9vBnypkYWg==
-```
-
-#### <a name="from-stream"></a> `> ssri.fromStream(stream, [opts]) -> Promise<Integrity>`
-
-Returns a Promise of an Integrity object calculated by reading data from
-a given `stream`.
-
-It accepts both `opts.algorithms` and `opts.options`, which are documented as
-part of [`ssri.fromData`](#from-data).
-
-Additionally, `opts.Promise` may be passed in to inject a Promise library of
-choice. By default, ssri will use Node's built-in Promises.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-ssri.fromStream(fs.createReadStream('index.js'), {
- algorithms: ['sha1', 'sha512']
-}).then(integrity => {
- return ssri.checkStream(fs.createReadStream('index.js'), integrity)
-}) // succeeds
-```
-
-#### <a name="create"></a> `> ssri.create([opts]) -> <Hash>`
-
-Returns a Hash object with `update(<Buffer or string>[,enc])` and `digest()` methods.
-
-
-The Hash object provides the same methods as [crypto class Hash](https://nodejs.org/dist/latest-v6.x/docs/api/crypto.html#crypto_class_hash).
-`digest()` accepts no arguments and returns an Integrity object calculated by reading data from
-calls to update.
-
-It accepts both `opts.algorithms` and `opts.options`, which are documented as
-part of [`ssri.fromData`](#from-data).
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrity = ssri.create().update('foobarbaz').digest()
-integrity.toString()
-// ->
-// sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1+9vBnypkYWg==
-```
-
-#### <a name="check-data"></a> `> ssri.checkData(data, sri, [opts]) -> Hash|false`
-
-Verifies `data` integrity against an `sri` argument. `data` may be either a
-`String` or a `Buffer`, and `sri` can be any subresource integrity
-representation that [`ssri.parse`](#parse) can handle.
-
-If verification succeeds, `checkData` will return the name of the algorithm that
-was used for verification (a truthy value). Otherwise, it will return `false`.
-
-If `opts.pickAlgorithm` is provided, it will be used by
-[`Integrity#pickAlgorithm`](#integrity-pick-algorithm) when deciding which of
-the available digests to match against.
-
-##### Example
-
-```javascript
-const data = fs.readFileSync('index.js')
-ssri.checkData(data, ssri.fromData(data)) // -> 'sha512'
-ssri.checkData(data, 'sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0')
-ssri.checkData(data, 'sha1-BaDDigEST') // -> false
-```
-
-#### <a name="check-stream"></a> `> ssri.checkStream(stream, sri, [opts]) -> Promise<Hash>`
-
-Verifies the contents of `stream` against an `sri` argument. `stream` will be
-consumed in its entirety by this process. `sri` can be any subresource integrity
-representation that [`ssri.parse`](#parse) can handle.
-
-`checkStream` will return a Promise that either resolves to the
-`Hash` that succeeded verification, or, if the verification fails
-or an error happens with `stream`, the Promise will be rejected.
-
-If the Promise is rejected because verification failed, the returned error will
-have `err.code` as `EINTEGRITY`.
-
-If `opts.size` is given, it will be matched against the stream size. An error
-with `err.code` `EBADSIZE` will be returned by a rejection if the expected size
-and actual size fail to match.
-
-If `opts.pickAlgorithm` is provided, it will be used by
-[`Integrity#pickAlgorithm`](#integrity-pick-algorithm) when deciding which of
-the available digests to match against.
-
-##### Example
-
-```javascript
-const integrity = ssri.fromData(fs.readFileSync('index.js'))
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- integrity
-)
-// ->
-// Promise<{
-// algorithm: 'sha512',
-// digest: 'sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1'
-// }>
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- 'sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0'
-) // -> Promise<Hash>
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- 'sha1-BaDDigEST'
-) // -> Promise<Error<{code: 'EINTEGRITY'}>>
-```
-
-#### <a name="integrity-stream"></a> `> integrityStream(sri, [opts]) -> IntegrityStream`
-
-Returns a `Transform` stream that data can be piped through in order to generate
-and optionally check data integrity for piped data. When the stream completes
-successfully, it emits `size` and `integrity` events, containing the total
-number of bytes processed and a calculated `Integrity` instance based on stream
-data, respectively.
-
-If `opts.algorithms` is passed in, the listed algorithms will be calculated when
-generating the final `Integrity` instance. The default is `['sha512']`.
-
-If `opts.single` is passed in, a single `Hash` instance will be returned.
-
-If `opts.integrity` is passed in, it should be an `integrity` value understood
-by [`parse`](#parse) that the stream will check the data against. If
-verification succeeds, the integrity stream will emit a `verified` event whose
-value is a single `Hash` object that is the one that succeeded verification. If
-verification fails, the stream will error with an `EINTEGRITY` error code.
-
-If `opts.size` is given, it will be matched against the stream size. An error
-with `err.code` `EBADSIZE` will be emitted by the stream if the expected size
-and actual size fail to match.
-
-If `opts.pickAlgorithm` is provided, it will be passed two algorithms as
-arguments. ssri will prioritize whichever of the two algorithms is returned by
-this function. Note that the function may be called multiple times, and it
-**must** return one of the two algorithms provided. By default, ssri will make
-a best-effort to pick the strongest/most reliable of the given algorithms. It
-may intentionally deprioritize algorithms with known vulnerabilities.
-
-##### Example
-
-```javascript
-const integrity = ssri.fromData(fs.readFileSync('index.js'))
-fs.createReadStream('index.js')
-.pipe(ssri.checkStream(integrity))
-```
diff --git a/deps/npm/node_modules/cacache/node_modules/ssri/index.js b/deps/npm/node_modules/cacache/node_modules/ssri/index.js
deleted file mode 100644
index 8ece662ba6..0000000000
--- a/deps/npm/node_modules/cacache/node_modules/ssri/index.js
+++ /dev/null
@@ -1,334 +0,0 @@
-'use strict'
-
-const Buffer = require('safe-buffer').Buffer
-
-const crypto = require('crypto')
-const Transform = require('stream').Transform
-
-const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512']
-
-const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i
-const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/
-const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/]+(?:=?=?))([?\x21-\x7E]*)$/
-const VCHAR_REGEX = /^[\x21-\x7E]+$/
-
-class Hash {
- get isHash () { return true }
- constructor (hash, opts) {
- const strict = !!(opts && opts.strict)
- this.source = hash.trim()
- // 3.1. Integrity metadata (called "Hash" by ssri)
- // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description
- const match = this.source.match(
- strict
- ? STRICT_SRI_REGEX
- : SRI_REGEX
- )
- if (!match) { return }
- if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { return }
- this.algorithm = match[1]
- this.digest = match[2]
-
- const rawOpts = match[3]
- this.options = rawOpts ? rawOpts.slice(1).split('?') : []
- }
- hexDigest () {
- return this.digest && Buffer.from(this.digest, 'base64').toString('hex')
- }
- toJSON () {
- return this.toString()
- }
- toString (opts) {
- if (opts && opts.strict) {
- // Strict mode enforces the standard as close to the foot of the
- // letter as it can.
- if (!(
- // The spec has very restricted productions for algorithms.
- // https://www.w3.org/TR/CSP2/#source-list-syntax
- SPEC_ALGORITHMS.some(x => x === this.algorithm) &&
- // Usually, if someone insists on using a "different" base64, we
- // leave it as-is, since there's multiple standards, and the
- // specified is not a URL-safe variant.
- // https://www.w3.org/TR/CSP2/#base64_value
- this.digest.match(BASE64_REGEX) &&
- // Option syntax is strictly visual chars.
- // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression
- // https://tools.ietf.org/html/rfc5234#appendix-B.1
- (this.options || []).every(opt => opt.match(VCHAR_REGEX))
- )) {
- return ''
- }
- }
- const options = this.options && this.options.length
- ? `?${this.options.join('?')}`
- : ''
- return `${this.algorithm}-${this.digest}${options}`
- }
-}
-
-class Integrity {
- get isIntegrity () { return true }
- toJSON () {
- return this.toString()
- }
- toString (opts) {
- opts = opts || {}
- let sep = opts.sep || ' '
- if (opts.strict) {
- // Entries must be separated by whitespace, according to spec.
- sep = sep.replace(/\S+/g, ' ')
- }
- return Object.keys(this).map(k => {
- return this[k].map(hash => {
- return Hash.prototype.toString.call(hash, opts)
- }).filter(x => x.length).join(sep)
- }).filter(x => x.length).join(sep)
- }
- concat (integrity, opts) {
- const other = typeof integrity === 'string'
- ? integrity
- : stringify(integrity, opts)
- return parse(`${this.toString(opts)} ${other}`, opts)
- }
- hexDigest () {
- return parse(this, {single: true}).hexDigest()
- }
- pickAlgorithm (opts) {
- const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash
- const keys = Object.keys(this)
- if (!keys.length) {
- throw new Error(`No algorithms available for ${
- JSON.stringify(this.toString())
- }`)
- }
- return keys.reduce((acc, algo) => {
- return pickAlgorithm(acc, algo) || acc
- })
- }
-}
-
-module.exports.parse = parse
-function parse (sri, opts) {
- opts = opts || {}
- if (typeof sri === 'string') {
- return _parse(sri, opts)
- } else if (sri.algorithm && sri.digest) {
- const fullSri = new Integrity()
- fullSri[sri.algorithm] = [sri]
- return _parse(stringify(fullSri, opts), opts)
- } else {
- return _parse(stringify(sri, opts), opts)
- }
-}
-
-function _parse (integrity, opts) {
- // 3.4.3. Parse metadata
- // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
- if (opts.single) {
- return new Hash(integrity, opts)
- }
- return integrity.trim().split(/\s+/).reduce((acc, string) => {
- const hash = new Hash(string, opts)
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-}
-
-module.exports.stringify = stringify
-function stringify (obj, opts) {
- if (obj.algorithm && obj.digest) {
- return Hash.prototype.toString.call(obj, opts)
- } else if (typeof obj === 'string') {
- return stringify(parse(obj, opts), opts)
- } else {
- return Integrity.prototype.toString.call(obj, opts)
- }
-}
-
-module.exports.fromHex = fromHex
-function fromHex (hexDigest, algorithm, opts) {
- const optString = (opts && opts.options && opts.options.length)
- ? `?${opts.options.join('?')}`
- : ''
- return parse(
- `${algorithm}-${
- Buffer.from(hexDigest, 'hex').toString('base64')
- }${optString}`, opts
- )
-}
-
-module.exports.fromData = fromData
-function fromData (data, opts) {
- opts = opts || {}
- const algorithms = opts.algorithms || ['sha512']
- const optString = opts.options && opts.options.length
- ? `?${opts.options.join('?')}`
- : ''
- return algorithms.reduce((acc, algo) => {
- const digest = crypto.createHash(algo).update(data).digest('base64')
- const hash = new Hash(
- `${algo}-${digest}${optString}`,
- opts
- )
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-}
-
-module.exports.fromStream = fromStream
-function fromStream (stream, opts) {
- opts = opts || {}
- const P = opts.Promise || Promise
- const istream = integrityStream(opts)
- return new P((resolve, reject) => {
- stream.pipe(istream)
- stream.on('error', reject)
- istream.on('error', reject)
- let sri
- istream.on('integrity', s => { sri = s })
- istream.on('end', () => resolve(sri))
- istream.on('data', () => {})
- })
-}
-
-module.exports.checkData = checkData
-function checkData (data, sri, opts) {
- opts = opts || {}
- sri = parse(sri, opts)
- if (!Object.keys(sri).length) { return false }
- const algorithm = sri.pickAlgorithm(opts)
- const digests = sri[algorithm] || []
- const digest = crypto.createHash(algorithm).update(data).digest('base64')
- return digests.find(hash => hash.digest === digest) || false
-}
-
-module.exports.checkStream = checkStream
-function checkStream (stream, sri, opts) {
- opts = opts || {}
- const P = opts.Promise || Promise
- const checker = integrityStream(Object.assign({}, opts, {
- integrity: sri
- }))
- return new P((resolve, reject) => {
- stream.pipe(checker)
- stream.on('error', reject)
- checker.on('error', reject)
- let sri
- checker.on('verified', s => { sri = s })
- checker.on('end', () => resolve(sri))
- checker.on('data', () => {})
- })
-}
-
-module.exports.integrityStream = integrityStream
-function integrityStream (opts) {
- opts = opts || {}
- // For verification
- const sri = opts.integrity && parse(opts.integrity, opts)
- const goodSri = sri && Object.keys(sri).length
- const algorithm = goodSri && sri.pickAlgorithm(opts)
- const digests = goodSri && sri[algorithm]
- // Calculating stream
- const algorithms = opts.algorithms || [algorithm || 'sha512']
- const hashes = algorithms.map(crypto.createHash)
- let streamSize = 0
- const stream = new Transform({
- transform (chunk, enc, cb) {
- streamSize += chunk.length
- hashes.forEach(h => h.update(chunk, enc))
- cb(null, chunk, enc)
- }
- }).on('end', () => {
- const optString = (opts.options && opts.options.length)
- ? `?${opts.options.join('?')}`
- : ''
- const newSri = parse(hashes.map((h, i) => {
- return `${algorithms[i]}-${h.digest('base64')}${optString}`
- }).join(' '), opts)
- const match = (
- // Integrity verification mode
- opts.integrity &&
- newSri[algorithm] &&
- digests &&
- digests.find(hash => {
- return newSri[algorithm].find(newhash => {
- return hash.digest === newhash.digest
- })
- })
- )
- if (typeof opts.size === 'number' && streamSize !== opts.size) {
- const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`)
- err.code = 'EBADSIZE'
- err.found = streamSize
- err.expected = opts.size
- err.sri = sri
- stream.emit('error', err)
- } else if (opts.integrity && !match) {
- const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`)
- err.code = 'EINTEGRITY'
- err.found = newSri
- err.expected = digests
- err.algorithm = algorithm
- err.sri = sri
- stream.emit('error', err)
- } else {
- stream.emit('size', streamSize)
- stream.emit('integrity', newSri)
- match && stream.emit('verified', match)
- }
- })
- return stream
-}
-
-module.exports.create = createIntegrity
-function createIntegrity (opts) {
- opts = opts || {}
- const algorithms = opts.algorithms || ['sha512']
- const optString = opts.options && opts.options.length
- ? `?${opts.options.join('?')}`
- : ''
-
- const hashes = algorithms.map(crypto.createHash)
-
- return {
- update: function (chunk, enc) {
- hashes.forEach(h => h.update(chunk, enc))
- return this
- },
- digest: function (enc) {
- const integrity = algorithms.reduce((acc, algo) => {
- const digest = hashes.shift().digest('base64')
- const hash = new Hash(
- `${algo}-${digest}${optString}`,
- opts
- )
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-
- return integrity
- }
- }
-}
-
-// This is a Best Effortâ„¢ at a reasonable priority for hash algos
-const DEFAULT_PRIORITY = [
- 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'
-]
-function getPrioritizedHash (algo1, algo2) {
- return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase())
- ? algo1
- : algo2
-}
diff --git a/deps/npm/node_modules/cacache/node_modules/ssri/package.json b/deps/npm/node_modules/cacache/node_modules/ssri/package.json
deleted file mode 100644
index 15b3b5648a..0000000000
--- a/deps/npm/node_modules/cacache/node_modules/ssri/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "_from": "ssri@^5.0.0",
- "_id": "ssri@5.0.0",
- "_inBundle": false,
- "_integrity": "sha512-728D4yoQcQm1ooZvSbywLkV1RjfITZXh0oWrhM/lnsx3nAHx7LsRGJWB/YyvoceAYRq98xqbstiN4JBv1/wNHg==",
- "_location": "/cacache/ssri",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ssri@^5.0.0",
- "name": "ssri",
- "escapedName": "ssri",
- "rawSpec": "^5.0.0",
- "saveSpec": null,
- "fetchSpec": "^5.0.0"
- },
- "_requiredBy": [
- "/cacache"
- ],
- "_resolved": "https://registry.npmjs.org/ssri/-/ssri-5.0.0.tgz",
- "_shasum": "13c19390b606c821f2a10d02b351c1729b94d8cf",
- "_spec": "ssri@^5.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache",
- "author": {
- "name": "Kat Marchán",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/zkat/ssri/issues"
- },
- "bundleDependencies": false,
- "config": {
- "nyc": {
- "exclude": [
- "node_modules/**",
- "test/**"
- ]
- }
- },
- "dependencies": {
- "safe-buffer": "^5.1.0"
- },
- "deprecated": false,
- "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",
- "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/ssri#readme",
- "keywords": [
- "w3c",
- "web",
- "security",
- "integrity",
- "checksum",
- "hashing",
- "subresource integrity",
- "sri",
- "sri hash",
- "sri string",
- "sri generator",
- "html"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "ssri",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zkat/ssri.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": "5.0.0"
-}
diff --git a/deps/npm/node_modules/cacache/node_modules/y18n/CHANGELOG.md b/deps/npm/node_modules/cacache/node_modules/y18n/CHANGELOG.md
new file mode 100644
index 0000000000..c259076ad6
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/y18n/CHANGELOG.md
@@ -0,0 +1,21 @@
+# 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.
+
+<a name="4.0.0"></a>
+# [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10)
+
+
+### Bug Fixes
+
+* allow support for falsy values like 0 in tagged literal ([#45](https://github.com/yargs/y18n/issues/45)) ([c926123](https://github.com/yargs/y18n/commit/c926123))
+
+
+### Features
+
+* **__:** added tagged template literal support ([#44](https://github.com/yargs/y18n/issues/44)) ([0598daf](https://github.com/yargs/y18n/commit/0598daf))
+
+
+### BREAKING CHANGES
+
+* **__:** dropping Node 0.10/Node 0.12 support
diff --git a/deps/npm/node_modules/cacache/node_modules/y18n/README.md b/deps/npm/node_modules/cacache/node_modules/y18n/README.md
index 9859458f20..826474f209 100644
--- a/deps/npm/node_modules/cacache/node_modules/y18n/README.md
+++ b/deps/npm/node_modules/cacache/node_modules/y18n/README.md
@@ -4,6 +4,7 @@
[![Coverage Status][coveralls-image]][coveralls-url]
[![NPM version][npm-image]][npm-url]
[![js-standard-style][standard-image]][standard-url]
+[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
The bare-bones internationalization library used by yargs.
@@ -23,6 +24,19 @@ output:
`my awesome string foo`
+_using tagged template literals_
+
+```js
+var __ = require('y18n').__
+var str = 'foo'
+
+console.log(__`my awesome string ${str}`)
+```
+
+output:
+
+`my awesome string foo`
+
_pluralization support:_
```js
@@ -60,6 +74,10 @@ Create an instance of y18n with the config provided, options include:
Print a localized string, `%s` will be replaced with `arg`s.
+This function can also be used as a tag for a template literal. You can use it
+like this: <code>__&#96;hello ${'world'}&#96;</code>. This will be equivalent to
+`__('hello %s', 'world')`.
+
### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg)
Print a localized string with appropriate pluralization. If `%d` is provided
diff --git a/deps/npm/node_modules/cacache/node_modules/y18n/index.js b/deps/npm/node_modules/cacache/node_modules/y18n/index.js
index 91b159e342..d720681628 100644
--- a/deps/npm/node_modules/cacache/node_modules/y18n/index.js
+++ b/deps/npm/node_modules/cacache/node_modules/y18n/index.js
@@ -16,6 +16,9 @@ function Y18N (opts) {
}
Y18N.prototype.__ = function () {
+ if (typeof arguments[0] !== 'string') {
+ return this._taggedLiteral.apply(this, arguments)
+ }
var args = Array.prototype.slice.call(arguments)
var str = args.shift()
var cb = function () {} // start with noop.
@@ -40,6 +43,19 @@ Y18N.prototype.__ = function () {
return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args))
}
+Y18N.prototype._taggedLiteral = function (parts) {
+ var args = arguments
+ var str = ''
+ parts.forEach(function (part, i) {
+ var arg = args[i + 1]
+ str += part
+ if (typeof arg !== 'undefined') {
+ str += '%s'
+ }
+ })
+ return this.__.apply(null, [str].concat([].slice.call(arguments, 1)))
+}
+
Y18N.prototype._enqueueWrite = function (work) {
this.writeQueue.push(work)
if (this.writeQueue.length === 1) this._processWriteQueue()
diff --git a/deps/npm/node_modules/cacache/node_modules/y18n/package.json b/deps/npm/node_modules/cacache/node_modules/y18n/package.json
index a96457708a..a106ff8f0f 100644
--- a/deps/npm/node_modules/cacache/node_modules/y18n/package.json
+++ b/deps/npm/node_modules/cacache/node_modules/y18n/package.json
@@ -1,26 +1,26 @@
{
- "_from": "y18n@^3.2.1",
- "_id": "y18n@3.2.1",
+ "_from": "y18n@^4.0.0",
+ "_id": "y18n@4.0.0",
"_inBundle": false,
- "_integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
+ "_integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
"_location": "/cacache/y18n",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "y18n@^3.2.1",
+ "raw": "y18n@^4.0.0",
"name": "y18n",
"escapedName": "y18n",
- "rawSpec": "^3.2.1",
+ "rawSpec": "^4.0.0",
"saveSpec": null,
- "fetchSpec": "^3.2.1"
+ "fetchSpec": "^4.0.0"
},
"_requiredBy": [
"/cacache"
],
- "_resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "_shasum": "6d15fba884c08679c0d77e88e7759e811e07fa41",
- "_spec": "y18n@^3.2.1",
+ "_resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
+ "_shasum": "95ef94f85ecc81d007c264e190a120f0a3c8566b",
+ "_spec": "y18n@^4.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/cacache",
"author": {
"name": "Ben Coe",
@@ -33,12 +33,13 @@
"deprecated": false,
"description": "the bare-bones internationalization library used by yargs",
"devDependencies": {
- "chai": "^3.4.1",
- "coveralls": "^2.11.6",
- "mocha": "^2.3.4",
- "nyc": "^6.1.1",
+ "chai": "^4.0.1",
+ "coveralls": "^3.0.0",
+ "mocha": "^4.0.1",
+ "nyc": "^11.0.1",
"rimraf": "^2.5.0",
- "standard": "^5.4.1"
+ "standard": "^10.0.0-beta.0",
+ "standard-version": "^4.2.0"
},
"files": [
"index.js"
@@ -59,7 +60,8 @@
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"pretest": "standard",
+ "release": "standard-version",
"test": "nyc mocha"
},
- "version": "3.2.1"
+ "version": "4.0.0"
}
diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json
index 221c605109..64a6de6078 100644
--- a/deps/npm/node_modules/cacache/package.json
+++ b/deps/npm/node_modules/cacache/package.json
@@ -1,12 +1,10 @@
{
"_from": "cacache@latest",
- "_id": "cacache@10.0.1",
+ "_id": "cacache@10.0.4",
"_inBundle": false,
- "_integrity": "sha512-dRHYcs9LvG9cHgdPzjiI+/eS7e1xRhULrcyOx04RZQsszNJXU2SL9CyG60yLnge282Qq5nwTv+ieK2fH+WPZmA==",
+ "_integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==",
"_location": "/cacache",
- "_phantomChildren": {
- "safe-buffer": "5.1.1"
- },
+ "_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
@@ -19,10 +17,12 @@
},
"_requiredBy": [
"#USER",
- "/"
+ "/",
+ "/pacote",
+ "/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.1.tgz",
- "_shasum": "3e05f6e616117d9b54665b1b20c8aeb93ea5d36f",
+ "_resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz",
+ "_shasum": "6452367999eff9d4188aefd9a14e9d7c6a263460",
"_spec": "cacache@latest",
"_where": "/Users/zkat/Documents/code/npm",
"author": {
@@ -56,33 +56,33 @@
}
],
"dependencies": {
- "bluebird": "^3.5.0",
+ "bluebird": "^3.5.1",
"chownr": "^1.0.1",
"glob": "^7.1.2",
"graceful-fs": "^4.1.11",
"lru-cache": "^4.1.1",
- "mississippi": "^1.3.0",
+ "mississippi": "^2.0.0",
"mkdirp": "^0.5.1",
"move-concurrently": "^1.0.1",
"promise-inflight": "^1.0.1",
- "rimraf": "^2.6.1",
- "ssri": "^5.0.0",
+ "rimraf": "^2.6.2",
+ "ssri": "^5.2.4",
"unique-filename": "^1.1.0",
- "y18n": "^3.2.1"
+ "y18n": "^4.0.0"
},
"deprecated": false,
"description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",
"devDependencies": {
"benchmark": "^2.1.4",
- "chalk": "^2.0.1",
- "cross-env": "^5.0.1",
- "nyc": "^11.1.0",
+ "chalk": "^2.3.1",
+ "cross-env": "^5.1.3",
+ "nyc": "^11.4.1",
"require-inject": "^1.4.2",
"safe-buffer": "^5.1.1",
- "standard": "^10.0.2",
- "standard-version": "^4.2.0",
+ "standard": "^10.0.3",
+ "standard-version": "^4.3.0",
"tacks": "^1.2.2",
- "tap": "^10.7.0",
+ "tap": "^11.1.0",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
@@ -118,12 +118,12 @@
"benchmarks": "node test/benchmarks",
"postrelease": "npm publish && git push --follow-tags",
"prerelease": "npm t",
- "pretest": "standard lib test *.js",
+ "pretest": "standard",
"release": "standard-version -s",
"test": "cross-env CACACHE_UPDATE_LOCALE_FILES=true nyc --all -- tap -J test/*.js",
"test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test",
"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": "10.0.1"
+ "version": "10.0.4"
}