summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules')
-rwxr-xr-xdeps/npm/node_modules/JSONStream/index.js4
-rw-r--r--deps/npm/node_modules/JSONStream/package.json27
-rw-r--r--deps/npm/node_modules/JSONStream/test/parsejson.js6
-rw-r--r--deps/npm/node_modules/JSONStream/test/run.js13
-rw-r--r--deps/npm/node_modules/aproba/CHANGELOG.md4
-rw-r--r--deps/npm/node_modules/aproba/index.js66
-rw-r--r--deps/npm/node_modules/aproba/package.json44
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/.travis.yml (renamed from deps/npm/node_modules/readable-stream/.travis.yml)0
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE47
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/README.md58
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md (renamed from deps/npm/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md)2
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/duplex-browser.js (renamed from deps/npm/node_modules/readable-stream/duplex-browser.js)0
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/duplex.js (renamed from deps/npm/node_modules/readable-stream/duplex.js)0
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/BufferList.js (renamed from deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js)0
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/package.json81
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/passthrough.js (renamed from deps/npm/node_modules/readable-stream/passthrough.js)0
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/readable-browser.js7
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/readable.js19
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/transform.js (renamed from deps/npm/node_modules/readable-stream/transform.js)0
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/writable-browser.js (renamed from deps/npm/node_modules/readable-stream/writable-browser.js)0
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/writable.js (renamed from deps/npm/node_modules/readable-stream/writable.js)0
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/.travis.yml (renamed from deps/npm/node_modules/string_decoder/.travis.yml)0
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/LICENSE47
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/README.md47
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/package.json59
-rw-r--r--deps/npm/node_modules/byte-size/README.hbs28
-rw-r--r--deps/npm/node_modules/byte-size/README.md30
-rw-r--r--deps/npm/node_modules/byte-size/dist/index.js152
-rw-r--r--deps/npm/node_modules/byte-size/index.mjs (renamed from deps/npm/node_modules/byte-size/index.js)15
-rw-r--r--deps/npm/node_modules/byte-size/package.json49
-rw-r--r--deps/npm/node_modules/cacache/CHANGELOG.md30
-rw-r--r--deps/npm/node_modules/cacache/get.js51
-rw-r--r--deps/npm/node_modules/cacache/lib/entry-index.js107
-rw-r--r--deps/npm/node_modules/cacache/lib/util/fix-owner.js46
-rw-r--r--deps/npm/node_modules/cacache/locales/en.js3
-rw-r--r--deps/npm/node_modules/cacache/locales/es.js3
-rw-r--r--deps/npm/node_modules/cacache/node_modules/chownr/LICENSE (renamed from deps/npm/node_modules/npm-registry-client/LICENSE)0
-rw-r--r--deps/npm/node_modules/cacache/node_modules/chownr/README.md3
-rw-r--r--deps/npm/node_modules/cacache/node_modules/chownr/chownr.js88
-rw-r--r--deps/npm/node_modules/cacache/node_modules/chownr/package.json59
-rw-r--r--deps/npm/node_modules/cacache/node_modules/lru-cache/LICENSE15
-rw-r--r--deps/npm/node_modules/cacache/node_modules/lru-cache/README.md166
-rw-r--r--deps/npm/node_modules/cacache/node_modules/lru-cache/index.js334
-rw-r--r--deps/npm/node_modules/cacache/node_modules/lru-cache/package.json67
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/LICENSE5
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/README.md33
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.html73
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.js.html69
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/base.css182
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/index.html73
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.css1
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.js1
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sort-arrow-sprite.pngbin0 -> 209 bytes
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sorter.js156
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/index.js8
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/package.json56
-rw-r--r--deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js23
-rw-r--r--deps/npm/node_modules/cacache/node_modules/yallist/LICENSE15
-rw-r--r--deps/npm/node_modules/cacache/node_modules/yallist/README.md204
-rw-r--r--deps/npm/node_modules/cacache/node_modules/yallist/iterator.js8
-rw-r--r--deps/npm/node_modules/cacache/node_modules/yallist/package.json62
-rw-r--r--deps/npm/node_modules/cacache/node_modules/yallist/yallist.js376
-rw-r--r--deps/npm/node_modules/cacache/package.json44
-rw-r--r--deps/npm/node_modules/chownr/chownr.js112
-rw-r--r--deps/npm/node_modules/chownr/package.json43
-rw-r--r--deps/npm/node_modules/ci-info/CHANGELOG.md16
-rw-r--r--deps/npm/node_modules/ci-info/README.md73
-rw-r--r--deps/npm/node_modules/ci-info/index.js2
-rw-r--r--deps/npm/node_modules/ci-info/package.json29
-rw-r--r--deps/npm/node_modules/ci-info/vendors.json27
-rw-r--r--deps/npm/node_modules/cidr-regex/index.js6
-rw-r--r--deps/npm/node_modules/cidr-regex/package.json39
-rw-r--r--deps/npm/node_modules/cli-table3/CHANGELOG.md12
-rw-r--r--deps/npm/node_modules/cli-table3/index.d.ts95
-rw-r--r--deps/npm/node_modules/cli-table3/package.json33
-rw-r--r--deps/npm/node_modules/colors/LICENSE4
-rw-r--r--deps/npm/node_modules/colors/README.md10
-rw-r--r--deps/npm/node_modules/colors/examples/normal-usage.js55
-rw-r--r--deps/npm/node_modules/colors/examples/safe-string.js50
-rw-r--r--deps/npm/node_modules/colors/index.d.ts136
-rw-r--r--deps/npm/node_modules/colors/lib/colors.js130
-rw-r--r--deps/npm/node_modules/colors/lib/custom/trap.js71
-rw-r--r--deps/npm/node_modules/colors/lib/custom/zalgo.js81
-rw-r--r--deps/npm/node_modules/colors/lib/extendStringPrototype.js91
-rw-r--r--deps/npm/node_modules/colors/lib/index.js7
-rw-r--r--deps/npm/node_modules/colors/lib/maps/america.js18
-rw-r--r--deps/npm/node_modules/colors/lib/maps/rainbow.js13
-rw-r--r--deps/npm/node_modules/colors/lib/maps/random.js14
-rw-r--r--deps/npm/node_modules/colors/lib/maps/zebra.js10
-rw-r--r--deps/npm/node_modules/colors/lib/styles.js6
-rw-r--r--deps/npm/node_modules/colors/lib/system/has-flag.js35
-rw-r--r--deps/npm/node_modules/colors/lib/system/supports-colors.js128
-rw-r--r--deps/npm/node_modules/colors/package.json49
-rw-r--r--deps/npm/node_modules/colors/safe.d.ts48
-rw-r--r--deps/npm/node_modules/colors/safe.js7
-rw-r--r--deps/npm/node_modules/colors/themes/generic-logging.js4
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/.travis.yml55
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/LICENSE47
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/README.md58
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md58
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/package.json81
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js7
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/readable.js19
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/writable-browser.js1
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/readable-stream/writable.js8
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/string_decoder/.travis.yml50
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/string_decoder/LICENSE47
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/string_decoder/README.md47
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--deps/npm/node_modules/concat-stream/node_modules/string_decoder/package.json59
-rw-r--r--deps/npm/node_modules/copy-concurrently/node_modules/aproba/LICENSE13
-rw-r--r--deps/npm/node_modules/copy-concurrently/node_modules/aproba/README.md93
-rw-r--r--deps/npm/node_modules/copy-concurrently/node_modules/aproba/index.js105
-rw-r--r--deps/npm/node_modules/copy-concurrently/node_modules/aproba/package.json62
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/.travis.yml55
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/LICENSE47
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/README.md58
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md58
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/package.json81
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/readable-browser.js7
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/readable.js19
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/writable-browser.js1
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/readable-stream/writable.js8
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/string_decoder/.travis.yml50
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/string_decoder/LICENSE47
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/string_decoder/README.md47
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--deps/npm/node_modules/duplexify/node_modules/string_decoder/package.json59
-rw-r--r--deps/npm/node_modules/execa/node_modules/get-stream/buffer-stream.js51
-rw-r--r--deps/npm/node_modules/execa/node_modules/get-stream/index.js51
-rw-r--r--deps/npm/node_modules/execa/node_modules/get-stream/license (renamed from deps/npm/node_modules/npm-registry-fetch/node_modules/pump/LICENSE)4
-rw-r--r--deps/npm/node_modules/execa/node_modules/get-stream/package.json80
-rw-r--r--deps/npm/node_modules/execa/node_modules/get-stream/readme.md117
-rw-r--r--deps/npm/node_modules/figgy-pudding/package.json5
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/.travis.yml55
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/LICENSE47
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/README.md58
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md58
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/package.json81
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/readable-browser.js7
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/readable.js19
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/writable-browser.js1
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/writable.js8
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/.travis.yml50
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/LICENSE47
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/README.md47
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/package.json59
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/.travis.yml55
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/LICENSE47
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/README.md58
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md58
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/package.json81
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/readable-browser.js7
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/readable.js19
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/writable-browser.js1
-rw-r--r--deps/npm/node_modules/from2/node_modules/readable-stream/writable.js8
-rw-r--r--deps/npm/node_modules/from2/node_modules/string_decoder/.travis.yml50
-rw-r--r--deps/npm/node_modules/from2/node_modules/string_decoder/LICENSE47
-rw-r--r--deps/npm/node_modules/from2/node_modules/string_decoder/README.md47
-rw-r--r--deps/npm/node_modules/from2/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--deps/npm/node_modules/from2/node_modules/string_decoder/package.json59
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/.travis.yml55
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/LICENSE47
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/README.md58
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md58
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/package.json81
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/readable-browser.js7
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/readable.js19
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/writable-browser.js1
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/writable.js8
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/.travis.yml50
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/LICENSE47
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/README.md47
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/package.json59
-rw-r--r--deps/npm/node_modules/gauge/node_modules/aproba/LICENSE13
-rw-r--r--deps/npm/node_modules/gauge/node_modules/aproba/README.md93
-rw-r--r--deps/npm/node_modules/gauge/node_modules/aproba/index.js105
-rw-r--r--deps/npm/node_modules/gauge/node_modules/aproba/package.json62
-rw-r--r--deps/npm/node_modules/genfun/CHANGELOG.md17
-rw-r--r--deps/npm/node_modules/genfun/LICENSE20
-rw-r--r--deps/npm/node_modules/genfun/lib/method.js10
-rw-r--r--deps/npm/node_modules/genfun/package.json24
-rw-r--r--deps/npm/node_modules/gentle-fs/node_modules/aproba/LICENSE13
-rw-r--r--deps/npm/node_modules/gentle-fs/node_modules/aproba/README.md93
-rw-r--r--deps/npm/node_modules/gentle-fs/node_modules/aproba/index.js105
-rw-r--r--deps/npm/node_modules/gentle-fs/node_modules/aproba/package.json62
-rw-r--r--deps/npm/node_modules/get-stream/buffer-stream.js10
-rw-r--r--deps/npm/node_modules/get-stream/index.js61
-rw-r--r--deps/npm/node_modules/get-stream/license20
-rw-r--r--deps/npm/node_modules/get-stream/package.json46
-rw-r--r--deps/npm/node_modules/get-stream/readme.md26
-rw-r--r--deps/npm/node_modules/got/node_modules/get-stream/buffer-stream.js51
-rw-r--r--deps/npm/node_modules/got/node_modules/get-stream/index.js51
-rw-r--r--deps/npm/node_modules/got/node_modules/get-stream/license21
-rw-r--r--deps/npm/node_modules/got/node_modules/get-stream/package.json80
-rw-r--r--deps/npm/node_modules/got/node_modules/get-stream/readme.md117
-rw-r--r--deps/npm/node_modules/is-ci/node_modules/ci-info/CHANGELOG.md62
-rw-r--r--deps/npm/node_modules/is-ci/node_modules/ci-info/LICENSE21
-rw-r--r--deps/npm/node_modules/is-ci/node_modules/ci-info/README.md107
-rw-r--r--deps/npm/node_modules/is-ci/node_modules/ci-info/index.js66
-rw-r--r--deps/npm/node_modules/is-ci/node_modules/ci-info/package.json65
-rw-r--r--deps/npm/node_modules/is-ci/node_modules/ci-info/vendors.json152
-rw-r--r--deps/npm/node_modules/is-cidr/README.md20
-rw-r--r--deps/npm/node_modules/is-cidr/index.js13
-rw-r--r--deps/npm/node_modules/is-cidr/package.json37
-rw-r--r--deps/npm/node_modules/libcipm/CHANGELOG.md45
-rw-r--r--deps/npm/node_modules/libcipm/index.js82
-rw-r--r--deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js29
-rw-r--r--deps/npm/node_modules/libcipm/lib/config/npm-config.js72
-rw-r--r--deps/npm/node_modules/libcipm/lib/config/pacote-opts.js135
-rw-r--r--deps/npm/node_modules/libcipm/lib/extract.js51
-rw-r--r--deps/npm/node_modules/libcipm/lib/worker.js6
-rw-r--r--deps/npm/node_modules/libcipm/package.json27
-rw-r--r--deps/npm/node_modules/libnpm/CHANGELOG.md95
-rw-r--r--deps/npm/node_modules/libnpm/LICENSE.md (renamed from deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/LICENSE.md)0
-rw-r--r--deps/npm/node_modules/libnpm/README.md57
-rw-r--r--deps/npm/node_modules/libnpm/access.js3
-rw-r--r--deps/npm/node_modules/libnpm/adduser.js3
-rw-r--r--deps/npm/node_modules/libnpm/config.js3
-rw-r--r--deps/npm/node_modules/libnpm/extract.js3
-rw-r--r--deps/npm/node_modules/libnpm/fetch.js3
-rw-r--r--deps/npm/node_modules/libnpm/get-prefix.js3
-rw-r--r--deps/npm/node_modules/libnpm/hook.js3
-rw-r--r--deps/npm/node_modules/libnpm/index.js29
-rw-r--r--deps/npm/node_modules/libnpm/link-bin.js3
-rw-r--r--deps/npm/node_modules/libnpm/log.js3
-rw-r--r--deps/npm/node_modules/libnpm/logical-tree.js3
-rw-r--r--deps/npm/node_modules/libnpm/login.js3
-rw-r--r--deps/npm/node_modules/libnpm/manifest.js3
-rw-r--r--deps/npm/node_modules/libnpm/org.js3
-rw-r--r--deps/npm/node_modules/libnpm/package.json94
-rw-r--r--deps/npm/node_modules/libnpm/packument.js3
-rw-r--r--deps/npm/node_modules/libnpm/parse-arg.js3
-rw-r--r--deps/npm/node_modules/libnpm/profile.js3
-rw-r--r--deps/npm/node_modules/libnpm/publish.js3
-rw-r--r--deps/npm/node_modules/libnpm/read-json.js3
-rw-r--r--deps/npm/node_modules/libnpm/run-script.js3
-rw-r--r--deps/npm/node_modules/libnpm/search.js3
-rw-r--r--deps/npm/node_modules/libnpm/stringify-package.js3
-rw-r--r--deps/npm/node_modules/libnpm/tarball.js3
-rw-r--r--deps/npm/node_modules/libnpm/team.js3
-rw-r--r--deps/npm/node_modules/libnpm/unpublish.js3
-rw-r--r--deps/npm/node_modules/libnpm/verify-lock.js3
-rw-r--r--deps/npm/node_modules/libnpmaccess/.travis.yml7
-rw-r--r--deps/npm/node_modules/libnpmaccess/CHANGELOG.md124
-rw-r--r--deps/npm/node_modules/libnpmaccess/CODE_OF_CONDUCT.md151
-rw-r--r--deps/npm/node_modules/libnpmaccess/CONTRIBUTING.md256
-rw-r--r--deps/npm/node_modules/libnpmaccess/LICENSE13
-rw-r--r--deps/npm/node_modules/libnpmaccess/PULL_REQUEST_TEMPLATE7
-rw-r--r--deps/npm/node_modules/libnpmaccess/README.md258
-rw-r--r--deps/npm/node_modules/libnpmaccess/appveyor.yml22
-rw-r--r--deps/npm/node_modules/libnpmaccess/index.js201
-rw-r--r--deps/npm/node_modules/libnpmaccess/node_modules/aproba/CHANGELOG.md4
-rw-r--r--deps/npm/node_modules/libnpmaccess/node_modules/aproba/LICENSE13
-rw-r--r--deps/npm/node_modules/libnpmaccess/node_modules/aproba/README.md93
-rw-r--r--deps/npm/node_modules/libnpmaccess/node_modules/aproba/index.js105
-rw-r--r--deps/npm/node_modules/libnpmaccess/node_modules/aproba/package.json66
-rw-r--r--deps/npm/node_modules/libnpmaccess/package.json66
-rw-r--r--deps/npm/node_modules/libnpmaccess/test/index.js347
-rw-r--r--deps/npm/node_modules/libnpmaccess/test/util/tnock.js12
-rw-r--r--deps/npm/node_modules/libnpmconfig/CHANGELOG.md51
-rw-r--r--deps/npm/node_modules/libnpmconfig/CODE_OF_CONDUCT.md151
-rw-r--r--deps/npm/node_modules/libnpmconfig/CONTRIBUTING.md256
-rw-r--r--deps/npm/node_modules/libnpmconfig/LICENSE13
-rw-r--r--deps/npm/node_modules/libnpmconfig/PULL_REQUEST_TEMPLATE7
-rw-r--r--deps/npm/node_modules/libnpmconfig/README.md40
-rw-r--r--deps/npm/node_modules/libnpmconfig/index.js107
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/find-up/index.js46
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/find-up/license9
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/find-up/package.json82
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/find-up/readme.md87
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/locate-path/index.js24
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/locate-path/license9
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/locate-path/package.json76
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/locate-path/readme.md99
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js49
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-limit/license9
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json81
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md90
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-locate/index.js34
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-locate/license9
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-locate/package.json83
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-locate/readme.md88
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.js5
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-try/license9
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-try/package.json72
-rw-r--r--deps/npm/node_modules/libnpmconfig/node_modules/p-try/readme.md47
-rw-r--r--deps/npm/node_modules/libnpmconfig/package.json66
-rw-r--r--deps/npm/node_modules/libnpmhook/CHANGELOG.md30
-rw-r--r--deps/npm/node_modules/libnpmhook/README.md254
-rw-r--r--deps/npm/node_modules/libnpmhook/config.js13
-rw-r--r--deps/npm/node_modules/libnpmhook/index.js107
-rw-r--r--deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/CHANGELOG.md104
-rw-r--r--deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/README.md549
-rw-r--r--deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/auth.js48
-rw-r--r--deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/check-response.js99
-rw-r--r--deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/config.js90
-rw-r--r--deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/errors.js58
-rw-r--r--deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/index.js160
-rw-r--r--deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/package.json90
-rw-r--r--deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/silentlog.js14
-rw-r--r--deps/npm/node_modules/libnpmhook/package.json52
-rw-r--r--deps/npm/node_modules/libnpmorg/CHANGELOG.md11
-rw-r--r--deps/npm/node_modules/libnpmorg/CODE_OF_CONDUCT.md151
-rw-r--r--deps/npm/node_modules/libnpmorg/CONTRIBUTING.md256
-rw-r--r--deps/npm/node_modules/libnpmorg/LICENSE13
-rw-r--r--deps/npm/node_modules/libnpmorg/PULL_REQUEST_TEMPLATE7
-rw-r--r--deps/npm/node_modules/libnpmorg/README.md144
-rw-r--r--deps/npm/node_modules/libnpmorg/index.js71
-rw-r--r--deps/npm/node_modules/libnpmorg/node_modules/aproba/CHANGELOG.md4
-rw-r--r--deps/npm/node_modules/libnpmorg/node_modules/aproba/LICENSE13
-rw-r--r--deps/npm/node_modules/libnpmorg/node_modules/aproba/README.md93
-rw-r--r--deps/npm/node_modules/libnpmorg/node_modules/aproba/index.js105
-rw-r--r--deps/npm/node_modules/libnpmorg/node_modules/aproba/package.json66
-rw-r--r--deps/npm/node_modules/libnpmorg/package.json77
-rw-r--r--deps/npm/node_modules/libnpmorg/test/index.js81
-rw-r--r--deps/npm/node_modules/libnpmorg/test/util/tnock.js12
-rw-r--r--deps/npm/node_modules/libnpmpublish/.travis.yml7
-rw-r--r--deps/npm/node_modules/libnpmpublish/CHANGELOG.md50
-rw-r--r--deps/npm/node_modules/libnpmpublish/CODE_OF_CONDUCT.md151
-rw-r--r--deps/npm/node_modules/libnpmpublish/CONTRIBUTING.md256
-rw-r--r--deps/npm/node_modules/libnpmpublish/LICENSE13
-rw-r--r--deps/npm/node_modules/libnpmpublish/PULL_REQUEST_TEMPLATE7
-rw-r--r--deps/npm/node_modules/libnpmpublish/README.md111
-rw-r--r--deps/npm/node_modules/libnpmpublish/appveyor.yml22
-rw-r--r--deps/npm/node_modules/libnpmpublish/index.js4
-rw-r--r--deps/npm/node_modules/libnpmpublish/package.json73
-rw-r--r--deps/npm/node_modules/libnpmpublish/publish.js218
-rw-r--r--deps/npm/node_modules/libnpmpublish/test/publish.js919
-rw-r--r--deps/npm/node_modules/libnpmpublish/test/unpublish.js249
-rw-r--r--deps/npm/node_modules/libnpmpublish/test/util/mock-tarball.js47
-rw-r--r--deps/npm/node_modules/libnpmpublish/test/util/tnock.js12
-rw-r--r--deps/npm/node_modules/libnpmpublish/unpublish.js86
-rw-r--r--deps/npm/node_modules/libnpmsearch/CHANGELOG.md26
-rw-r--r--deps/npm/node_modules/libnpmsearch/CODE_OF_CONDUCT.md151
-rw-r--r--deps/npm/node_modules/libnpmsearch/CONTRIBUTING.md256
-rw-r--r--deps/npm/node_modules/libnpmsearch/LICENSE13
-rw-r--r--deps/npm/node_modules/libnpmsearch/PULL_REQUEST_TEMPLATE7
-rw-r--r--deps/npm/node_modules/libnpmsearch/README.md169
-rw-r--r--deps/npm/node_modules/libnpmsearch/index.js79
-rw-r--r--deps/npm/node_modules/libnpmsearch/package.json74
-rw-r--r--deps/npm/node_modules/libnpmsearch/test/index.js268
-rw-r--r--deps/npm/node_modules/libnpmsearch/test/util/tnock.js12
-rw-r--r--deps/npm/node_modules/libnpmteam/.travis.yml7
-rw-r--r--deps/npm/node_modules/libnpmteam/CHANGELOG.md18
-rw-r--r--deps/npm/node_modules/libnpmteam/CODE_OF_CONDUCT.md151
-rw-r--r--deps/npm/node_modules/libnpmteam/CONTRIBUTING.md256
-rw-r--r--deps/npm/node_modules/libnpmteam/LICENSE13
-rw-r--r--deps/npm/node_modules/libnpmteam/PULL_REQUEST_TEMPLATE7
-rw-r--r--deps/npm/node_modules/libnpmteam/README.md185
-rw-r--r--deps/npm/node_modules/libnpmteam/appveyor.yml22
-rw-r--r--deps/npm/node_modules/libnpmteam/index.js106
-rw-r--r--deps/npm/node_modules/libnpmteam/node_modules/aproba/CHANGELOG.md4
-rw-r--r--deps/npm/node_modules/libnpmteam/node_modules/aproba/LICENSE13
-rw-r--r--deps/npm/node_modules/libnpmteam/node_modules/aproba/README.md93
-rw-r--r--deps/npm/node_modules/libnpmteam/node_modules/aproba/index.js105
-rw-r--r--deps/npm/node_modules/libnpmteam/node_modules/aproba/package.json66
-rw-r--r--deps/npm/node_modules/libnpmteam/package.json69
-rw-r--r--deps/npm/node_modules/libnpmteam/test/index.js138
-rw-r--r--deps/npm/node_modules/libnpmteam/test/util/tnock.js12
-rw-r--r--deps/npm/node_modules/lru-cache/index.js5
-rw-r--r--deps/npm/node_modules/lru-cache/package.json48
-rw-r--r--deps/npm/node_modules/move-concurrently/node_modules/aproba/LICENSE13
-rw-r--r--deps/npm/node_modules/move-concurrently/node_modules/aproba/README.md93
-rw-r--r--deps/npm/node_modules/move-concurrently/node_modules/aproba/index.js105
-rw-r--r--deps/npm/node_modules/move-concurrently/node_modules/aproba/package.json62
-rw-r--r--deps/npm/node_modules/npm-audit-report/CHANGELOG.md12
-rw-r--r--deps/npm/node_modules/npm-audit-report/package.json22
-rw-r--r--deps/npm/node_modules/npm-audit-report/reporters/detail.js4
-rw-r--r--deps/npm/node_modules/npm-audit-report/reporters/parseable.js25
-rw-r--r--deps/npm/node_modules/npm-packlist/index.js6
-rw-r--r--deps/npm/node_modules/npm-packlist/package.json22
-rw-r--r--deps/npm/node_modules/npm-pick-manifest/CHANGELOG.md40
-rw-r--r--deps/npm/node_modules/npm-pick-manifest/README.md8
-rw-r--r--deps/npm/node_modules/npm-pick-manifest/index.js62
-rw-r--r--deps/npm/node_modules/npm-pick-manifest/package.json40
-rw-r--r--deps/npm/node_modules/npm-profile/CHANGELOG.md11
-rw-r--r--deps/npm/node_modules/npm-profile/README.md216
-rw-r--r--deps/npm/node_modules/npm-profile/index.js389
-rw-r--r--deps/npm/node_modules/npm-profile/package.json27
-rw-r--r--deps/npm/node_modules/npm-registry-client/CHANGELOG.md21
-rw-r--r--deps/npm/node_modules/npm-registry-client/README.md357
-rw-r--r--deps/npm/node_modules/npm-registry-client/index.js74
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/access.js168
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/adduser.js128
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/attempt.js20
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/authify.js26
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/deprecate.js42
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/add.js43
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js37
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/rm.js38
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/set.js39
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/update.js39
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/fetch.js85
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/get.js22
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/initialize.js91
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/logout.js23
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/org.js62
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/ping.js21
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/publish.js194
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/request.js336
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/send-anonymous-CLI-metrics.js19
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/star.js51
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/stars.js18
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/tag.js23
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/team.js105
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/unpublish.js120
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/whoami.js21
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/.npmignore2
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/License21
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/Makefile21
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md215
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/equation.gifbin1209 -> 0 bytes
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js31
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/example/stop.js40
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/index.js1
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js99
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js143
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json56
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/test/common.js10
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-forever.js24
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js176
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-wrap.js77
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-timeouts.js69
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/retry/test/runner.js5
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/ssri/CHANGELOG.md256
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/ssri/LICENSE.md16
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/ssri/README.md488
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/ssri/index.js379
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/ssri/package.json89
-rw-r--r--deps/npm/node_modules/npm-registry-client/package.json85
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md156
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/README.md93
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/auth.js12
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/check-response.js30
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/config.js24
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/errors.js21
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/index.js149
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/CHANGELOG.md478
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/LICENSE.md16
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/README.es.md628
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/README.md624
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/en.js3
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/es.js3
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/get.js190
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/index.js3
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/path.js26
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/read.js125
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/rm.js21
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/write.js162
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/entry-index.js225
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/memoization.js69
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/fix-owner.js44
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/hash-to-segments.js11
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/move-file.js51
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/tmp.js32
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/y.js25
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/verify.js213
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/en.js44
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/en.json6
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/es.js46
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/es.json6
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/ls.js6
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/changelog.md7
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/index.js10
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/license7
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/package.json62
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/readme.md411
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/package.json137
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/put.js71
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/rm.js28
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/verify.js3
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/CHANGELOG.md29
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/LICENSE.md16
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/README.md121
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/index.js60
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/package.json70
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/CHANGELOG.md525
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/LICENSE16
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/README.md404
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/agent.js171
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/cache.js257
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/index.js482
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/package.json95
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/warning.js24
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/pump/.travis.yml5
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/pump/README.md56
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/pump/index.js82
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/pump/package.json59
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/pump/test-browser.js62
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/pump/test-node.js53
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/.npmignore5
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/.travis.yml11
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/LICENSE20
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/README.md307
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/build/smartbuffer.js726
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/build/smartbuffer.js.map1
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/lib/smart-buffer.js371
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/package.json70
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/test/smart-buffer.test.js410
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/typings/index.d.ts383
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/.npmignore1
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/.travis.yml22
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/History.md96
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/README.md134
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/index.js141
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/package.json66
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key15
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem12
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/test.js144
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks/.npmignore4
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks/LICENSE20
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks/README.md339
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/associate.js33
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/bind.js30
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/connect.js31
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks/index.js6
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks/lib/socks-agent.js108
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks/lib/socks-client.js306
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/socks/package.json68
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/CHANGELOG.md256
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/LICENSE.md16
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/README.md488
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/index.js379
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/package.json90
-rw-r--r--deps/npm/node_modules/npm-registry-fetch/package.json92
-rw-r--r--deps/npm/node_modules/pacote/CHANGELOG.md106
-rw-r--r--deps/npm/node_modules/pacote/README.md127
-rw-r--r--deps/npm/node_modules/pacote/index.js1
-rw-r--r--deps/npm/node_modules/pacote/lib/extract-stream.js1
-rw-r--r--deps/npm/node_modules/pacote/lib/fetch.js12
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/alias.js24
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/directory.js21
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/file.js10
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/git.js8
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js39
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js109
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/index.js7
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/manifest.js117
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/packument.js92
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/pick-registry.js17
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/registry-key.js16
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js11
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/remote.js4
-rw-r--r--deps/npm/node_modules/pacote/lib/finalize-manifest.js19
-rw-r--r--deps/npm/node_modules/pacote/lib/util/git.js29
-rw-r--r--deps/npm/node_modules/pacote/lib/util/opt-check.js105
-rw-r--r--deps/npm/node_modules/pacote/lib/util/pack-dir.js2
-rw-r--r--deps/npm/node_modules/pacote/lib/util/proclog.js23
-rw-r--r--deps/npm/node_modules/pacote/lib/util/silentlog.js13
-rw-r--r--deps/npm/node_modules/pacote/lib/with-tarball-stream.js10
-rw-r--r--deps/npm/node_modules/pacote/node_modules/lru-cache/LICENSE15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/lru-cache/README.md166
-rw-r--r--deps/npm/node_modules/pacote/node_modules/lru-cache/index.js334
-rw-r--r--deps/npm/node_modules/pacote/node_modules/lru-cache/package.json67
-rw-r--r--deps/npm/node_modules/pacote/node_modules/minipass/LICENSE15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/minipass/README.md124
-rw-r--r--deps/npm/node_modules/pacote/node_modules/minipass/index.js375
-rw-r--r--deps/npm/node_modules/pacote/node_modules/minipass/package.json67
-rw-r--r--deps/npm/node_modules/pacote/node_modules/yallist/LICENSE15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/yallist/README.md204
-rw-r--r--deps/npm/node_modules/pacote/node_modules/yallist/iterator.js8
-rw-r--r--deps/npm/node_modules/pacote/node_modules/yallist/package.json62
-rw-r--r--deps/npm/node_modules/pacote/node_modules/yallist/yallist.js376
-rw-r--r--deps/npm/node_modules/pacote/package.json79
-rw-r--r--deps/npm/node_modules/pacote/packument.js29
-rw-r--r--deps/npm/node_modules/pacote/prefetch.js2
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/.travis.yml55
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/LICENSE47
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/README.md58
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md58
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/package.json81
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/readable-browser.js7
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/readable.js19
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/writable-browser.js1
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/readable-stream/writable.js8
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/string_decoder/.travis.yml50
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/string_decoder/LICENSE47
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/string_decoder/README.md47
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--deps/npm/node_modules/parallel-transform/node_modules/string_decoder/package.json59
-rw-r--r--deps/npm/node_modules/protoduck/CHANGELOG.md11
-rw-r--r--deps/npm/node_modules/protoduck/index.js26
-rw-r--r--deps/npm/node_modules/protoduck/package.json33
-rw-r--r--deps/npm/node_modules/query-string/index.js27
-rw-r--r--deps/npm/node_modules/query-string/package.json36
-rw-r--r--deps/npm/node_modules/query-string/readme.md2
-rw-r--r--deps/npm/node_modules/readable-stream/README.md79
-rw-r--r--deps/npm/node_modules/readable-stream/errors-browser.js127
-rw-r--r--deps/npm/node_modules/readable-stream/errors.js116
-rw-r--r--deps/npm/node_modules/readable-stream/experimentalWarning.js17
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_duplex.js96
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js10
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_readable.js710
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_transform.js71
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_writable.js364
-rw-r--r--deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js204
-rw-r--r--deps/npm/node_modules/readable-stream/lib/internal/streams/buffer_list.js189
-rw-r--r--deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js39
-rw-r--r--deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js91
-rw-r--r--deps/npm/node_modules/readable-stream/lib/internal/streams/pipeline.js97
-rw-r--r--deps/npm/node_modules/readable-stream/lib/internal/streams/state.js27
-rw-r--r--deps/npm/node_modules/readable-stream/package.json92
-rw-r--r--deps/npm/node_modules/readable-stream/readable.js2
-rw-r--r--deps/npm/node_modules/readable-stream/yarn.lock6423
-rw-r--r--deps/npm/node_modules/rimraf/package.json42
-rw-r--r--deps/npm/node_modules/run-queue/node_modules/aproba/LICENSE13
-rw-r--r--deps/npm/node_modules/run-queue/node_modules/aproba/README.md93
-rw-r--r--deps/npm/node_modules/run-queue/node_modules/aproba/index.js105
-rw-r--r--deps/npm/node_modules/run-queue/node_modules/aproba/package.json62
-rw-r--r--deps/npm/node_modules/semver/README.md21
-rwxr-xr-xdeps/npm/node_modules/semver/bin/semver18
-rw-r--r--deps/npm/node_modules/semver/package.json26
-rw-r--r--deps/npm/node_modules/semver/semver.js236
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml55
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE47
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/README.md58
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md58
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/package.json81
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js7
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/readable.js19
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js1
-rw-r--r--deps/npm/node_modules/sha/node_modules/readable-stream/writable.js8
-rw-r--r--deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml50
-rw-r--r--deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE47
-rw-r--r--deps/npm/node_modules/sha/node_modules/string_decoder/README.md47
-rw-r--r--deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--deps/npm/node_modules/sha/node_modules/string_decoder/package.json59
-rw-r--r--deps/npm/node_modules/spdx-license-ids/README.md4
-rw-r--r--deps/npm/node_modules/spdx-license-ids/deprecated.json11
-rw-r--r--deps/npm/node_modules/spdx-license-ids/index.json204
-rw-r--r--deps/npm/node_modules/spdx-license-ids/package.json43
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/.travis.yml55
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/LICENSE47
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/README.md58
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md58
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/package.json81
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/readable-browser.js7
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/readable.js19
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/writable-browser.js1
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/readable-stream/writable.js8
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/string_decoder/.travis.yml50
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/string_decoder/LICENSE47
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/string_decoder/README.md47
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--deps/npm/node_modules/stream-iterate/node_modules/string_decoder/package.json59
-rw-r--r--deps/npm/node_modules/string_decoder/package.json25
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/.travis.yml55
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/LICENSE47
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/README.md58
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md58
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/package.json81
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/readable-browser.js7
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/readable.js19
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/writable-browser.js1
-rw-r--r--deps/npm/node_modules/through2/node_modules/readable-stream/writable.js8
-rw-r--r--deps/npm/node_modules/through2/node_modules/string_decoder/.travis.yml50
-rw-r--r--deps/npm/node_modules/through2/node_modules/string_decoder/LICENSE47
-rw-r--r--deps/npm/node_modules/through2/node_modules/string_decoder/README.md47
-rw-r--r--deps/npm/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--deps/npm/node_modules/through2/node_modules/string_decoder/package.json59
-rw-r--r--deps/npm/node_modules/unique-filename/.npmignore5
-rw-r--r--deps/npm/node_modules/unique-filename/LICENSE5
-rw-r--r--deps/npm/node_modules/unique-filename/package.json36
-rw-r--r--deps/npm/node_modules/write-file-atomic/CHANGELOG.md20
-rw-r--r--deps/npm/node_modules/write-file-atomic/README.md19
-rw-r--r--deps/npm/node_modules/write-file-atomic/index.js110
-rw-r--r--deps/npm/node_modules/write-file-atomic/package.json36
816 files changed, 60577 insertions, 20531 deletions
diff --git a/deps/npm/node_modules/JSONStream/index.js b/deps/npm/node_modules/JSONStream/index.js
index a92967f568..8c587af769 100755
--- a/deps/npm/node_modules/JSONStream/index.js
+++ b/deps/npm/node_modules/JSONStream/index.js
@@ -3,6 +3,8 @@
var Parser = require('jsonparse')
, through = require('through')
+var bufferFrom = Buffer.from && Buffer.from !== Uint8Array.from
+
/*
the value of this.stack that creationix's jsonparse has is weird.
@@ -17,7 +19,7 @@ exports.parse = function (path, map) {
var parser = new Parser()
var stream = through(function (chunk) {
if('string' === typeof chunk)
- chunk = new Buffer(chunk)
+ chunk = bufferFrom ? Buffer.from(chunk) : new Buffer(chunk)
parser.write(chunk)
},
function (data) {
diff --git a/deps/npm/node_modules/JSONStream/package.json b/deps/npm/node_modules/JSONStream/package.json
index 23588d31b1..91783af0b0 100644
--- a/deps/npm/node_modules/JSONStream/package.json
+++ b/deps/npm/node_modules/JSONStream/package.json
@@ -1,28 +1,29 @@
{
- "_from": "JSONStream@1.3.4",
- "_id": "JSONStream@1.3.4",
+ "_from": "JSONStream@1.3.5",
+ "_id": "JSONStream@1.3.5",
"_inBundle": false,
- "_integrity": "sha512-Y7vfi3I5oMOYIr+WxV8NZxDSwcbNgzdKYsTNInmycOq9bUYwGg9ryu57Wg5NLmCjqdFPNUmpMBo3kSJN9tCbXg==",
+ "_integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
"_location": "/JSONStream",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "JSONStream@1.3.4",
+ "raw": "JSONStream@1.3.5",
"name": "JSONStream",
"escapedName": "JSONStream",
- "rawSpec": "1.3.4",
+ "rawSpec": "1.3.5",
"saveSpec": null,
- "fetchSpec": "1.3.4"
+ "fetchSpec": "1.3.5"
},
"_requiredBy": [
"#USER",
- "/"
+ "/",
+ "/npm-registry-fetch"
],
- "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.4.tgz",
- "_shasum": "615bb2adb0cd34c8f4c447b5f6512fa1d8f16a2e",
- "_spec": "JSONStream@1.3.4",
- "_where": "/Users/zkat/Documents/code/work/npm",
+ "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
+ "_shasum": "3208c1f08d3a4d99261ab64f92302bc15e111ca0",
+ "_spec": "JSONStream@1.3.5",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Dominic Tarr",
"email": "dominic.tarr@gmail.com",
@@ -69,7 +70,7 @@
"url": "git://github.com/dominictarr/JSONStream.git"
},
"scripts": {
- "test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done"
+ "test": "node test/run.js"
},
- "version": "1.3.4"
+ "version": "1.3.5"
}
diff --git a/deps/npm/node_modules/JSONStream/test/parsejson.js b/deps/npm/node_modules/JSONStream/test/parsejson.js
index 7f157175f5..df4fbbe73a 100644
--- a/deps/npm/node_modules/JSONStream/test/parsejson.js
+++ b/deps/npm/node_modules/JSONStream/test/parsejson.js
@@ -9,6 +9,9 @@ var r = Math.random()
, p = new Parser()
, assert = require('assert')
, times = 20
+ , bufferFrom = Buffer.from && Buffer.from !== Uint8Array.from
+ , str
+
while (times --) {
assert.equal(JSON.parse(JSON.stringify(r)), r, 'core JSON')
@@ -18,7 +21,8 @@ while (times --) {
assert.equal(v,r)
}
console.error('correct', r)
- p.write (new Buffer(JSON.stringify([r])))
+ str = JSON.stringify([r])
+ p.write (bufferFrom ? Buffer.from(str) : new Buffer(str))
diff --git a/deps/npm/node_modules/JSONStream/test/run.js b/deps/npm/node_modules/JSONStream/test/run.js
new file mode 100644
index 0000000000..7d62e7385b
--- /dev/null
+++ b/deps/npm/node_modules/JSONStream/test/run.js
@@ -0,0 +1,13 @@
+var readdirSync = require('fs').readdirSync
+var spawnSync = require('child_process').spawnSync
+var extname = require('path').extname
+
+var files = readdirSync(__dirname)
+files.forEach(function(file){
+ if (extname(file) !== '.js' || file === 'run.js')
+ return
+ console.log(`*** ${file} ***`)
+ var result = spawnSync(process.argv0, [file], { stdio: 'inherit', cwd: __dirname} )
+ if (result.status !== 0)
+ process.exit(result.status)
+})
diff --git a/deps/npm/node_modules/aproba/CHANGELOG.md b/deps/npm/node_modules/aproba/CHANGELOG.md
new file mode 100644
index 0000000000..bab30ecb7e
--- /dev/null
+++ b/deps/npm/node_modules/aproba/CHANGELOG.md
@@ -0,0 +1,4 @@
+2.0.0
+ * Drop support for 0.10 and 0.12. They haven't been in travis but still,
+ since we _know_ we'll break with them now it's only polite to do a
+ major bump.
diff --git a/deps/npm/node_modules/aproba/index.js b/deps/npm/node_modules/aproba/index.js
index 6f3f797c09..fd947481ba 100644
--- a/deps/npm/node_modules/aproba/index.js
+++ b/deps/npm/node_modules/aproba/index.js
@@ -1,38 +1,39 @@
'use strict'
+module.exports = validate
function isArguments (thingy) {
return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
}
-var types = {
- '*': {label: 'any', check: function () { return true }},
- A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
- S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
- N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
- F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
- O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
- B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
- E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
- Z: {label: 'null', check: function (thingy) { return thingy == null }}
+const types = {
+ '*': {label: 'any', check: () => true},
+ A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)},
+ S: {label: 'string', check: _ => typeof _ === 'string'},
+ N: {label: 'number', check: _ => typeof _ === 'number'},
+ F: {label: 'function', check: _ => typeof _ === 'function'},
+ O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)},
+ B: {label: 'boolean', check: _ => typeof _ === 'boolean'},
+ E: {label: 'error', check: _ => _ instanceof Error},
+ Z: {label: 'null', check: _ => _ == null}
}
function addSchema (schema, arity) {
- var group = arity[schema.length] = arity[schema.length] || []
+ const group = arity[schema.length] = arity[schema.length] || []
if (group.indexOf(schema) === -1) group.push(schema)
}
-var validate = module.exports = function (rawSchemas, args) {
+function validate (rawSchemas, args) {
if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
if (!args) throw missingRequiredArg(1, 'args')
if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
if (!types.A.check(args)) throw invalidType(1, ['array'], args)
- var schemas = rawSchemas.split('|')
- var arity = {}
+ const schemas = rawSchemas.split('|')
+ const arity = {}
- schemas.forEach(function (schema) {
- for (var ii = 0; ii < schema.length; ++ii) {
- var type = schema[ii]
+ schemas.forEach(schema => {
+ for (let ii = 0; ii < schema.length; ++ii) {
+ const type = schema[ii]
if (!types[type]) throw unknownType(ii, type)
}
if (/E.*E/.test(schema)) throw moreThanOneError(schema)
@@ -43,20 +44,18 @@ var validate = module.exports = function (rawSchemas, args) {
if (schema.length === 1) addSchema('', arity)
}
})
- var matching = arity[args.length]
+ let matching = arity[args.length]
if (!matching) {
throw wrongNumberOfArgs(Object.keys(arity), args.length)
}
- for (var ii = 0; ii < args.length; ++ii) {
- var newMatching = matching.filter(function (schema) {
- var type = schema[ii]
- var typeCheck = types[type].check
+ for (let ii = 0; ii < args.length; ++ii) {
+ let newMatching = matching.filter(schema => {
+ const type = schema[ii]
+ const typeCheck = types[type].check
return typeCheck(args[ii])
})
if (!newMatching.length) {
- var labels = matching.map(function (schema) {
- return types[schema[ii]].label
- }).filter(function (schema) { return schema != null })
+ const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null)
throw invalidType(ii, labels, args[ii])
}
matching = newMatching
@@ -72,8 +71,8 @@ function unknownType (num, type) {
}
function invalidType (num, expectedTypes, value) {
- var valueType
- Object.keys(types).forEach(function (typeCode) {
+ let valueType
+ Object.keys(types).forEach(typeCode => {
if (types[typeCode].check(value)) valueType = types[typeCode].label
})
return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
@@ -85,8 +84,8 @@ function englishList (list) {
}
function wrongNumberOfArgs (expected, got) {
- var english = englishList(expected)
- var args = expected.every(function (ex) { return ex.length === 1 })
+ const english = englishList(expected)
+ const args = expected.every(ex => ex.length === 1)
? 'argument'
: 'arguments'
return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
@@ -98,8 +97,9 @@ function moreThanOneError (schema) {
}
function newException (code, msg) {
- var e = new Error(msg)
- e.code = code
- if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
- return e
+ const err = new Error(msg)
+ err.code = code
+ /* istanbul ignore else */
+ if (Error.captureStackTrace) Error.captureStackTrace(err, validate)
+ return err
}
diff --git a/deps/npm/node_modules/aproba/package.json b/deps/npm/node_modules/aproba/package.json
index 534c6beb57..42a7798b0e 100644
--- a/deps/npm/node_modules/aproba/package.json
+++ b/deps/npm/node_modules/aproba/package.json
@@ -1,38 +1,29 @@
{
- "_args": [
- [
- "aproba@1.2.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "aproba@1.2.0",
- "_id": "aproba@1.2.0",
+ "_from": "aproba@2.0.0",
+ "_id": "aproba@2.0.0",
"_inBundle": false,
- "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "_integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
"_location": "/aproba",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "aproba@1.2.0",
+ "raw": "aproba@2.0.0",
"name": "aproba",
"escapedName": "aproba",
- "rawSpec": "1.2.0",
+ "rawSpec": "2.0.0",
"saveSpec": null,
- "fetchSpec": "1.2.0"
+ "fetchSpec": "2.0.0"
},
"_requiredBy": [
+ "#USER",
"/",
- "/copy-concurrently",
- "/gauge",
- "/gentle-fs",
- "/move-concurrently",
- "/npm-profile",
- "/run-queue"
+ "/npm-profile"
],
- "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "_spec": "1.2.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
+ "_shasum": "52520b8ae5b569215b354efc0caa3fe1e45a8adc",
+ "_spec": "aproba@2.0.0",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org"
@@ -40,11 +31,13 @@
"bugs": {
"url": "https://github.com/iarna/aproba/issues"
},
+ "bundleDependencies": false,
"dependencies": {},
+ "deprecated": false,
"description": "A ridiculously light-weight argument validator (now browser friendly)",
"devDependencies": {
- "standard": "^10.0.3",
- "tap": "^10.0.2"
+ "standard": "^11.0.1",
+ "tap": "^12.0.1"
},
"directories": {
"test": "test"
@@ -65,7 +58,8 @@
"url": "git+https://github.com/iarna/aproba.git"
},
"scripts": {
- "test": "standard && tap -j3 test/*.js"
+ "pretest": "standard",
+ "test": "tap --100 -J test/*.js"
},
- "version": "1.2.0"
+ "version": "2.0.0"
}
diff --git a/deps/npm/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/.travis.yml
index 40992555bf..40992555bf 100644
--- a/deps/npm/node_modules/readable-stream/.travis.yml
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/.travis.yml
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000000..f478d58dca
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/are-we-there-yet/node_modules/readable-stream/README.md b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..23fe3f3e30
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
index 83275f192e..c141a99c26 100644
--- a/deps/npm/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -56,5 +56,3 @@ simpler stream creation
* add isPaused/isFlowing
* add new docs section
* move isPaused to that section
-
-
diff --git a/deps/npm/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/duplex-browser.js
index f8b2db83db..f8b2db83db 100644
--- a/deps/npm/node_modules/readable-stream/duplex-browser.js
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/duplex-browser.js
diff --git a/deps/npm/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/duplex.js
index 46924cbfdf..46924cbfdf 100644
--- a/deps/npm/node_modules/readable-stream/duplex.js
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/duplex.js
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..a1ca813e5a
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..bf34ac65e1
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..5d1f8b876d
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..b3f4e85a2f
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/BufferList.js
index aefc68bd90..aefc68bd90 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/BufferList.js
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..5a0a0d88ce
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/package.json b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..387f98ab91
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "readable-stream@^2.0.6",
+ "_id": "readable-stream@2.3.6",
+ "_inBundle": false,
+ "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_location": "/are-we-there-yet/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@^2.0.6",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "^2.0.6",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.6"
+ },
+ "_requiredBy": [
+ "/are-we-there-yet"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
+ "_spec": "readable-stream@^2.0.6",
+ "_where": "/Users/aeschright/code/cli/node_modules/are-we-there-yet",
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ },
+ "version": "2.3.6"
+}
diff --git a/deps/npm/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/passthrough.js
index ffd791d7ff..ffd791d7ff 100644
--- a/deps/npm/node_modules/readable-stream/passthrough.js
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/passthrough.js
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/readable.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/deps/npm/node_modules/readable-stream/transform.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/transform.js
index b1baba26da..b1baba26da 100644
--- a/deps/npm/node_modules/readable-stream/transform.js
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/transform.js
diff --git a/deps/npm/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/writable-browser.js
index ebdde6a85d..ebdde6a85d 100644
--- a/deps/npm/node_modules/readable-stream/writable-browser.js
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/writable-browser.js
diff --git a/deps/npm/node_modules/readable-stream/writable.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/writable.js
index 3211a6f80d..3211a6f80d 100644
--- a/deps/npm/node_modules/readable-stream/writable.js
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/writable.js
diff --git a/deps/npm/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/.travis.yml
index 3347a72546..3347a72546 100644
--- a/deps/npm/node_modules/string_decoder/.travis.yml
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/.travis.yml
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/are-we-there-yet/node_modules/string_decoder/README.md b/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..5fd58315ed
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..2e89e63f79
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/package.json b/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..1e76b8bffe
--- /dev/null
+++ b/deps/npm/node_modules/are-we-there-yet/node_modules/string_decoder/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "string_decoder@~1.1.1",
+ "_id": "string_decoder@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_location": "/are-we-there-yet/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.1.1",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.1"
+ },
+ "_requiredBy": [
+ "/are-we-there-yet/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
+ "_spec": "string_decoder@~1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/are-we-there-yet/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/byte-size/README.hbs b/deps/npm/node_modules/byte-size/README.hbs
index ebf5101b37..8a57e4a9c7 100644
--- a/deps/npm/node_modules/byte-size/README.hbs
+++ b/deps/npm/node_modules/byte-size/README.hbs
@@ -7,6 +7,34 @@
{{>main}}
+### Load anywhere
+
+This library is compatible with Node.js, the Web and any style of module loader. It can be loaded anywhere, natively without transpilation.
+
+Node.js:
+
+```js
+const byteSize = require('byte-size')
+```
+
+Within Node.js with ECMAScript Module support enabled:
+
+```js
+import byteSize from 'byte-size'
+```
+
+Within a modern browser ECMAScript Module:
+
+```js
+import byteSize from './node_modules/byte-size/index.mjs'
+```
+
+Old browser (adds `window.byteSize`):
+
+```html
+<script nomodule src="./node_modules/byte-size/dist/index.js"></script>
+```
+
* * *
&copy; 2014-18 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).
diff --git a/deps/npm/node_modules/byte-size/README.md b/deps/npm/node_modules/byte-size/README.md
index 768f21d347..4d383ad76b 100644
--- a/deps/npm/node_modules/byte-size/README.md
+++ b/deps/npm/node_modules/byte-size/README.md
@@ -8,7 +8,7 @@
<a name="module_byte-size"></a>
## byte-size
-Convert a bytes value to a more human-readable format. Choose between [metric or IEC units](https://en.wikipedia.org/wiki/Gigabyte), summarised below.
+An isomorphic, load-anywhere function to convert a bytes value into a more human-readable format. Choose between [metric or IEC units](https://en.wikipedia.org/wiki/Gigabyte), summarised below.
Value | Metric
----- | -------------
@@ -100,6 +100,34 @@ const byteSize = require('byte-size')
'1.5 Kio'
```
+### Load anywhere
+
+This library is compatible with Node.js, the Web and any style of module loader. It can be loaded anywhere, natively without transpilation.
+
+Node.js:
+
+```js
+const byteSize = require('byte-size')
+```
+
+Within Node.js with ECMAScript Module support enabled:
+
+```js
+import byteSize from 'byte-size'
+```
+
+Within a modern browser ECMAScript Module:
+
+```js
+import byteSize from './node_modules/byte-size/index.mjs'
+```
+
+Old browser (adds `window.byteSize`):
+
+```html
+<script nomodule src="./node_modules/byte-size/dist/index.js"></script>
+```
+
* * *
&copy; 2014-18 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).
diff --git a/deps/npm/node_modules/byte-size/dist/index.js b/deps/npm/node_modules/byte-size/dist/index.js
new file mode 100644
index 0000000000..8253a63545
--- /dev/null
+++ b/deps/npm/node_modules/byte-size/dist/index.js
@@ -0,0 +1,152 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = global || self, global.byteSize = factory());
+}(this, function () { 'use strict';
+
+ /**
+ * An isomorphic, load-anywhere function to convert a bytes value into a more human-readable format. Choose between [metric or IEC units](https://en.wikipedia.org/wiki/Gigabyte), summarised below.
+ *
+ * Value | Metric
+ * ----- | -------------
+ * 1000 | kB kilobyte
+ * 1000^2 | MB megabyte
+ * 1000^3 | GB gigabyte
+ * 1000^4 | TB terabyte
+ * 1000^5 | PB petabyte
+ * 1000^6 | EB exabyte
+ * 1000^7 | ZB zettabyte
+ * 1000^8 | YB yottabyte
+ *
+ * Value | IEC
+ * ----- | ------------
+ * 1024 | KiB kibibyte
+ * 1024^2 | MiB mebibyte
+ * 1024^3 | GiB gibibyte
+ * 1024^4 | TiB tebibyte
+ * 1024^5 | PiB pebibyte
+ * 1024^6 | EiB exbibyte
+ * 1024^7 | ZiB zebibyte
+ * 1024^8 | YiB yobibyte
+ *
+ * Value | Metric (octet)
+ * ----- | -------------
+ * 1000 | ko kilooctet
+ * 1000^2 | Mo megaoctet
+ * 1000^3 | Go gigaoctet
+ * 1000^4 | To teraoctet
+ * 1000^5 | Po petaoctet
+ * 1000^6 | Eo exaoctet
+ * 1000^7 | Zo zettaoctet
+ * 1000^8 | Yo yottaoctet
+ *
+ * Value | IEC (octet)
+ * ----- | ------------
+ * 1024 | Kio kilooctet
+ * 1024^2 | Mio mebioctet
+ * 1024^3 | Gio gibioctet
+ * 1024^4 | Tio tebioctet
+ * 1024^5 | Pio pebioctet
+ * 1024^6 | Eio exbioctet
+ * 1024^7 | Zio zebioctet
+ * 1024^8 | Yio yobioctet
+ *
+ * @module byte-size
+ * @example
+ * ```js
+ * const byteSize = require('byte-size')
+ * ```
+ */
+
+ class ByteSize {
+ constructor (bytes, options) {
+ options = options || {};
+ options.units = options.units || 'metric';
+ options.precision = typeof options.precision === 'undefined' ? 1 : options.precision;
+
+ const table = [
+ { expFrom: 0, expTo: 1, metric: 'B', iec: 'B', metric_octet: 'o', iec_octet: 'o' },
+ { expFrom: 1, expTo: 2, metric: 'kB', iec: 'KiB', metric_octet: 'ko', iec_octet: 'Kio' },
+ { expFrom: 2, expTo: 3, metric: 'MB', iec: 'MiB', metric_octet: 'Mo', iec_octet: 'Mio' },
+ { expFrom: 3, expTo: 4, metric: 'GB', iec: 'GiB', metric_octet: 'Go', iec_octet: 'Gio' },
+ { expFrom: 4, expTo: 5, metric: 'TB', iec: 'TiB', metric_octet: 'To', iec_octet: 'Tio' },
+ { expFrom: 5, expTo: 6, metric: 'PB', iec: 'PiB', metric_octet: 'Po', iec_octet: 'Pio' },
+ { expFrom: 6, expTo: 7, metric: 'EB', iec: 'EiB', metric_octet: 'Eo', iec_octet: 'Eio' },
+ { expFrom: 7, expTo: 8, metric: 'ZB', iec: 'ZiB', metric_octet: 'Zo', iec_octet: 'Zio' },
+ { expFrom: 8, expTo: 9, metric: 'YB', iec: 'YiB', metric_octet: 'Yo', iec_octet: 'Yio' }
+ ];
+
+ const base = options.units === 'metric' || options.units === 'metric_octet' ? 1000 : 1024;
+ const prefix = bytes < 0 ? '-' : '';
+ bytes = Math.abs(bytes);
+
+ for (let i = 0; i < table.length; i++) {
+ const lower = Math.pow(base, table[i].expFrom);
+ const upper = Math.pow(base, table[i].expTo);
+ if (bytes >= lower && bytes < upper) {
+ const units = table[i][options.units];
+ if (i === 0) {
+ this.value = prefix + bytes;
+ this.unit = units;
+ return
+ } else {
+ this.value = prefix + (bytes / lower).toFixed(options.precision);
+ this.unit = units;
+ return
+ }
+ }
+ }
+
+ this.value = prefix + bytes;
+ this.unit = '';
+ }
+
+ toString () {
+ return `${this.value} ${this.unit}`.trim()
+ }
+ }
+
+ /**
+ * @param {number} - the bytes value to convert.
+ * @param [options] {object} - optional config.
+ * @param [options.precision=1] {number} - number of decimal places.
+ * @param [options.units=metric] {string} - select `'metric'`, `'iec'`, `'metric_octet'` or `'iec_octet'` units.
+ * @returns {{ value: string, unit: string}}
+ * @alias module:byte-size
+ * @example
+ * ```js
+ * > const byteSize = require('byte-size')
+ *
+ * > byteSize(1580)
+ * { value: '1.6', unit: 'kB' }
+ *
+ * > byteSize(1580, { units: 'iec' })
+ * { value: '1.5', unit: 'KiB' }
+ *
+ * > byteSize(1580, { units: 'iec', precision: 3 })
+ * { value: '1.543', unit: 'KiB' }
+ *
+ * > byteSize(1580, { units: 'iec', precision: 0 })
+ * { value: '2', unit: 'KiB' }
+ *
+ * > byteSize(1580, { units: 'metric_octet' })
+ * { value: '1.6', unit: 'ko' }
+ *
+ * > byteSize(1580, { units: 'iec_octet' })
+ * { value: '1.5', unit: 'Kio' }
+ *
+ * > byteSize(1580, { units: 'iec_octet' }).toString()
+ * '1.5 Kio'
+ *
+ * > const { value, unit } = byteSize(1580, { units: 'iec_octet' })
+ * > `${value} ${unit}`
+ * '1.5 Kio'
+ * ```
+ */
+ function byteSize (bytes, options) {
+ return new ByteSize(bytes, options)
+ }
+
+ return byteSize;
+
+}));
diff --git a/deps/npm/node_modules/byte-size/index.js b/deps/npm/node_modules/byte-size/index.mjs
index ec1a029389..2de3e205b0 100644
--- a/deps/npm/node_modules/byte-size/index.js
+++ b/deps/npm/node_modules/byte-size/index.mjs
@@ -1,7 +1,5 @@
-'use strict'
-
/**
- * Convert a bytes value to a more human-readable format. Choose between [metric or IEC units](https://en.wikipedia.org/wiki/Gigabyte), summarised below.
+ * An isomorphic, load-anywhere function to convert a bytes value into a more human-readable format. Choose between [metric or IEC units](https://en.wikipedia.org/wiki/Gigabyte), summarised below.
*
* Value | Metric
* ----- | -------------
@@ -53,7 +51,6 @@
* const byteSize = require('byte-size')
* ```
*/
-module.exports = byteSize
class ByteSize {
constructor (bytes, options) {
@@ -74,6 +71,8 @@ class ByteSize {
]
const base = options.units === 'metric' || options.units === 'metric_octet' ? 1000 : 1024
+ const prefix = bytes < 0 ? '-' : '';
+ bytes = Math.abs(bytes);
for (let i = 0; i < table.length; i++) {
const lower = Math.pow(base, table[i].expFrom)
@@ -81,18 +80,18 @@ class ByteSize {
if (bytes >= lower && bytes < upper) {
const units = table[i][options.units]
if (i === 0) {
- this.value = String(bytes)
+ this.value = prefix + bytes
this.unit = units
return
} else {
- this.value = (bytes / lower).toFixed(options.precision)
+ this.value = prefix + (bytes / lower).toFixed(options.precision)
this.unit = units
return
}
}
}
- this.value = String(bytes)
+ this.value = prefix + bytes
this.unit = ''
}
@@ -141,3 +140,5 @@ class ByteSize {
function byteSize (bytes, options) {
return new ByteSize(bytes, options)
}
+
+export default byteSize
diff --git a/deps/npm/node_modules/byte-size/package.json b/deps/npm/node_modules/byte-size/package.json
index f69fc683f3..57e46ba988 100644
--- a/deps/npm/node_modules/byte-size/package.json
+++ b/deps/npm/node_modules/byte-size/package.json
@@ -1,32 +1,28 @@
{
- "_args": [
- [
- "byte-size@4.0.3",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "byte-size@4.0.3",
- "_id": "byte-size@4.0.3",
+ "_from": "byte-size@5.0.1",
+ "_id": "byte-size@5.0.1",
"_inBundle": false,
- "_integrity": "sha512-JGC3EV2bCzJH/ENSh3afyJrH4vwxbHTuO5ljLoI5+2iJOcEpMgP8T782jH9b5qGxf2mSUIp1lfGnfKNrRHpvVg==",
+ "_integrity": "sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw==",
"_location": "/byte-size",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "byte-size@4.0.3",
+ "raw": "byte-size@5.0.1",
"name": "byte-size",
"escapedName": "byte-size",
- "rawSpec": "4.0.3",
+ "rawSpec": "5.0.1",
"saveSpec": null,
- "fetchSpec": "4.0.3"
+ "fetchSpec": "5.0.1"
},
"_requiredBy": [
+ "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/byte-size/-/byte-size-4.0.3.tgz",
- "_spec": "4.0.3",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/byte-size/-/byte-size-5.0.1.tgz",
+ "_shasum": "4b651039a5ecd96767e71a3d7ed380e48bed4191",
+ "_spec": "byte-size@5.0.1",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Lloyd Brookes",
"email": "75pound@gmail.com"
@@ -34,6 +30,7 @@
"bugs": {
"url": "https://github.com/75lb/byte-size/issues"
},
+ "bundleDependencies": false,
"contributors": [
{
"name": "Raul Perez",
@@ -41,14 +38,20 @@
"url": "http://repejota.com"
}
],
+ "deprecated": false,
"description": "Convert a bytes (and octets) value to a more human-readable format. Choose between metric or IEC units.",
"devDependencies": {
- "coveralls": "^3.0.1",
+ "coveralls": "^3.0.2",
"jsdoc-to-markdown": "^4.0.1",
- "test-runner": "^0.5.0"
+ "rollup": "^0.68.1",
+ "test-runner": "^0.5.1"
+ },
+ "engines": {
+ "node": ">=6.0.0"
},
"files": [
- "index.js"
+ "index.mjs",
+ "dist/index.js"
],
"homepage": "https://github.com/75lb/byte-size#readme",
"keywords": [
@@ -62,6 +65,7 @@
"IEC"
],
"license": "MIT",
+ "main": "dist/index.js",
"name": "byte-size",
"repository": {
"type": "git",
@@ -69,8 +73,11 @@
},
"scripts": {
"cover": "istanbul cover ./node_modules/.bin/test-runner test.js && cat coverage/lcov.info | ./node_modules/.bin/coveralls",
- "docs": "jsdoc2md -t README.hbs index.js > README.md; echo",
- "test": "test-runner test.js"
+ "dist": "rollup -c dist/index.config.js",
+ "docs": "jsdoc2md -t README.hbs dist/index.js > README.md; echo",
+ "test": "npm run test:js && npm run test:mjs",
+ "test:js": "rollup -c dist/test.config.js && node dist/test.js",
+ "test:mjs": "node --experimental-modules test/test.mjs"
},
- "version": "4.0.3"
+ "version": "5.0.1"
}
diff --git a/deps/npm/node_modules/cacache/CHANGELOG.md b/deps/npm/node_modules/cacache/CHANGELOG.md
index ec9174f80d..847174be70 100644
--- a/deps/npm/node_modules/cacache/CHANGELOG.md
+++ b/deps/npm/node_modules/cacache/CHANGELOG.md
@@ -2,6 +2,36 @@
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="11.3.2"></a>
+## [11.3.2](https://github.com/zkat/cacache/compare/v11.3.1...v11.3.2) (2018-12-21)
+
+
+### Bug Fixes
+
+* **get:** make sure to handle errors in the .then ([b10bcd0](https://github.com/zkat/cacache/commit/b10bcd0))
+
+
+
+<a name="11.3.1"></a>
+## [11.3.1](https://github.com/zkat/cacache/compare/v11.3.0...v11.3.1) (2018-11-05)
+
+
+### Bug Fixes
+
+* **get:** export hasContent.sync properly ([d76c920](https://github.com/zkat/cacache/commit/d76c920))
+
+
+
+<a name="11.3.0"></a>
+# [11.3.0](https://github.com/zkat/cacache/compare/v11.2.0...v11.3.0) (2018-11-05)
+
+
+### Features
+
+* **get:** add sync API for reading ([db1e094](https://github.com/zkat/cacache/commit/db1e094))
+
+
+
<a name="11.2.0"></a>
# [11.2.0](https://github.com/zkat/cacache/compare/v11.1.0...v11.2.0) (2018-08-08)
diff --git a/deps/npm/node_modules/cacache/get.js b/deps/npm/node_modules/cacache/get.js
index 7bafe128e4..008cb83a9e 100644
--- a/deps/npm/node_modules/cacache/get.js
+++ b/deps/npm/node_modules/cacache/get.js
@@ -63,6 +63,55 @@ function getData (byDigest, cache, key, opts) {
})
}
+module.exports.sync = function get (cache, key, opts) {
+ return getDataSync(false, cache, key, opts)
+}
+module.exports.sync.byDigest = function getByDigest (cache, digest, opts) {
+ return getDataSync(true, cache, digest, opts)
+}
+function getDataSync (byDigest, cache, key, opts) {
+ opts = GetOpts(opts)
+ const memoized = (
+ byDigest
+ ? memo.get.byDigest(cache, key, opts)
+ : memo.get(cache, key, opts)
+ )
+ if (memoized && opts.memoize !== false) {
+ return byDigest ? memoized : {
+ metadata: memoized.entry.metadata,
+ data: memoized.data,
+ integrity: memoized.entry.integrity,
+ size: memoized.entry.size
+ }
+ }
+ const entry = !byDigest && index.find.sync(cache, key, opts)
+ if (!entry && !byDigest) {
+ throw new index.NotFoundError(cache, key)
+ }
+ const data = read.sync(
+ cache,
+ byDigest ? key : entry.integrity,
+ {
+ integrity: opts.integrity,
+ size: opts.size
+ }
+ )
+ const res = byDigest
+ ? data
+ : {
+ metadata: entry.metadata,
+ data: data,
+ size: entry.size,
+ integrity: entry.integrity
+ }
+ if (opts.memoize && byDigest) {
+ memo.put.byDigest(cache, key, res, opts)
+ } else if (opts.memoize) {
+ memo.put(cache, entry, res.data, opts)
+ }
+ return res
+}
+
module.exports.stream = getStream
function getStream (cache, key, opts) {
opts = GetOpts(opts)
@@ -113,7 +162,7 @@ function getStream (cache, key, opts) {
memoStream,
stream
)
- }, err => stream.emit('error', err))
+ }).catch(err => stream.emit('error', err))
return stream
}
diff --git a/deps/npm/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/cacache/lib/entry-index.js
index 43fa7b95b1..29a688eea2 100644
--- a/deps/npm/node_modules/cacache/lib/entry-index.js
+++ b/deps/npm/node_modules/cacache/lib/entry-index.js
@@ -75,10 +75,36 @@ function insert (cache, key, integrity, opts) {
})
}
+module.exports.insert.sync = insertSync
+function insertSync (cache, key, integrity, opts) {
+ opts = IndexOpts(opts)
+ const bucket = bucketPath(cache, key)
+ const entry = {
+ key,
+ integrity: integrity && ssri.stringify(integrity),
+ time: Date.now(),
+ size: opts.size,
+ metadata: opts.metadata
+ }
+ fixOwner.mkdirfix.sync(path.dirname(bucket), opts.uid, opts.gid)
+ const stringified = JSON.stringify(entry)
+ fs.appendFileSync(
+ bucket, `\n${hashEntry(stringified)}\t${stringified}`
+ )
+ try {
+ fixOwner.chownr.sync(bucket, opts.uid, opts.gid)
+ } catch (err) {
+ if (err.code !== 'ENOENT') {
+ throw err
+ }
+ }
+ return formatEntry(cache, entry)
+}
+
module.exports.find = find
function find (cache, key) {
const bucket = bucketPath(cache, key)
- return bucketEntries(cache, bucket).then(entries => {
+ return bucketEntries(bucket).then(entries => {
return entries.reduce((latest, next) => {
if (next && next.key === key) {
return formatEntry(cache, next)
@@ -95,11 +121,36 @@ function find (cache, key) {
})
}
+module.exports.find.sync = findSync
+function findSync (cache, key) {
+ const bucket = bucketPath(cache, key)
+ try {
+ return bucketEntriesSync(bucket).reduce((latest, next) => {
+ if (next && next.key === key) {
+ return formatEntry(cache, next)
+ } else {
+ return latest
+ }
+ }, null)
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ return null
+ } else {
+ throw err
+ }
+ }
+}
+
module.exports.delete = del
function del (cache, key, opts) {
return insert(cache, key, null, opts)
}
+module.exports.delete.sync = delSync
+function delSync (cache, key, opts) {
+ return insertSync(cache, key, null, opts)
+}
+
module.exports.lsStream = lsStream
function lsStream (cache) {
const indexDir = bucketDir(cache)
@@ -116,7 +167,6 @@ function lsStream (cache) {
// "/cachename/<bucket 0xFF>/<bucket 0xFF>/*"
return readdirOrEmpty(subbucketPath).map(entry => {
const getKeyToEntry = bucketEntries(
- cache,
path.join(subbucketPath, entry)
).reduce((acc, entry) => {
acc.set(entry.key, entry)
@@ -152,32 +202,39 @@ function ls (cache) {
})
}
-function bucketEntries (cache, bucket, filter) {
+function bucketEntries (bucket, filter) {
return readFileAsync(
bucket, 'utf8'
- ).then(data => {
- let entries = []
- data.split('\n').forEach(entry => {
- if (!entry) { return }
- const pieces = entry.split('\t')
- if (!pieces[1] || hashEntry(pieces[1]) !== pieces[0]) {
- // Hash is no good! Corruption or malice? Doesn't matter!
- // EJECT EJECT
- return
- }
- let obj
- try {
- obj = JSON.parse(pieces[1])
- } catch (e) {
- // Entry is corrupted!
- return
- }
- if (obj) {
- entries.push(obj)
- }
- })
- return entries
+ ).then(data => _bucketEntries(data, filter))
+}
+
+function bucketEntriesSync (bucket, filter) {
+ const data = fs.readFileSync(bucket, 'utf8')
+ return _bucketEntries(data, filter)
+}
+
+function _bucketEntries (data, filter) {
+ let entries = []
+ data.split('\n').forEach(entry => {
+ if (!entry) { return }
+ const pieces = entry.split('\t')
+ if (!pieces[1] || hashEntry(pieces[1]) !== pieces[0]) {
+ // Hash is no good! Corruption or malice? Doesn't matter!
+ // EJECT EJECT
+ return
+ }
+ let obj
+ try {
+ obj = JSON.parse(pieces[1])
+ } catch (e) {
+ // Entry is corrupted!
+ return
+ }
+ if (obj) {
+ entries.push(obj)
+ }
})
+ return entries
}
module.exports._bucketDir = bucketDir
diff --git a/deps/npm/node_modules/cacache/lib/util/fix-owner.js b/deps/npm/node_modules/cacache/lib/util/fix-owner.js
index 7000bff048..0c8f9f8753 100644
--- a/deps/npm/node_modules/cacache/lib/util/fix-owner.js
+++ b/deps/npm/node_modules/cacache/lib/util/fix-owner.js
@@ -31,6 +31,34 @@ function fixOwner (filepath, uid, gid) {
)
}
+module.exports.chownr.sync = fixOwnerSync
+function fixOwnerSync (filepath, uid, gid) {
+ if (!process.getuid) {
+ // This platform doesn't need ownership fixing
+ return
+ }
+ if (typeof uid !== 'number' && typeof gid !== 'number') {
+ // There's no permissions override. Nothing to do here.
+ return
+ }
+ if ((typeof uid === 'number' && process.getuid() === uid) &&
+ (typeof gid === 'number' && process.getgid() === gid)) {
+ // No need to override if it's already what we used.
+ return
+ }
+ try {
+ chownr.sync(
+ filepath,
+ typeof uid === 'number' ? uid : process.getuid(),
+ typeof gid === 'number' ? gid : process.getgid()
+ )
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ return null
+ }
+ }
+}
+
module.exports.mkdirfix = mkdirfix
function mkdirfix (p, uid, gid, cb) {
return mkdirp(p).then(made => {
@@ -42,3 +70,21 @@ function mkdirfix (p, uid, gid, cb) {
return fixOwner(p, uid, gid).then(() => null)
})
}
+
+module.exports.mkdirfix.sync = mkdirfixSync
+function mkdirfixSync (p, uid, gid) {
+ try {
+ const made = mkdirp.sync(p)
+ if (made) {
+ fixOwnerSync(made, uid, gid)
+ return made
+ }
+ } catch (err) {
+ if (err.code === 'EEXIST') {
+ fixOwnerSync(p, uid, gid)
+ return null
+ } else {
+ throw err
+ }
+ }
+}
diff --git a/deps/npm/node_modules/cacache/locales/en.js b/deps/npm/node_modules/cacache/locales/en.js
index 22025cf0e8..1715fdb53c 100644
--- a/deps/npm/node_modules/cacache/locales/en.js
+++ b/deps/npm/node_modules/cacache/locales/en.js
@@ -18,12 +18,15 @@ x.ls.stream = cache => ls.stream(cache)
x.get = (cache, key, opts) => get(cache, key, opts)
x.get.byDigest = (cache, hash, opts) => get.byDigest(cache, hash, opts)
+x.get.sync = (cache, key, opts) => get.sync(cache, key, opts)
+x.get.sync.byDigest = (cache, key, opts) => get.sync.byDigest(cache, key, opts)
x.get.stream = (cache, key, opts) => get.stream(cache, key, opts)
x.get.stream.byDigest = (cache, hash, opts) => get.stream.byDigest(cache, hash, opts)
x.get.copy = (cache, key, dest, opts) => get.copy(cache, key, dest, opts)
x.get.copy.byDigest = (cache, hash, dest, opts) => get.copy.byDigest(cache, hash, dest, opts)
x.get.info = (cache, key) => get.info(cache, key)
x.get.hasContent = (cache, hash) => get.hasContent(cache, hash)
+x.get.hasContent.sync = (cache, hash) => get.hasContent.sync(cache, hash)
x.put = (cache, key, data, opts) => put(cache, key, data, opts)
x.put.stream = (cache, key, opts) => put.stream(cache, key, opts)
diff --git a/deps/npm/node_modules/cacache/locales/es.js b/deps/npm/node_modules/cacache/locales/es.js
index 9a27de6585..ac4e4cfe7d 100644
--- a/deps/npm/node_modules/cacache/locales/es.js
+++ b/deps/npm/node_modules/cacache/locales/es.js
@@ -18,12 +18,15 @@ x.ls.flujo = cache => ls.stream(cache)
x.saca = (cache, clave, ops) => get(cache, clave, ops)
x.saca.porHacheo = (cache, hacheo, ops) => get.byDigest(cache, hacheo, ops)
+x.saca.sinc = (cache, clave, ops) => get.sync(cache, clave, ops)
+x.saca.sinc.porHacheo = (cache, hacheo, ops) => get.sync.byDigest(cache, hacheo, ops)
x.saca.flujo = (cache, clave, ops) => get.stream(cache, clave, ops)
x.saca.flujo.porHacheo = (cache, hacheo, ops) => get.stream.byDigest(cache, hacheo, ops)
x.sava.copia = (cache, clave, destino, opts) => get.copy(cache, clave, destino, opts)
x.sava.copia.porHacheo = (cache, hacheo, destino, opts) => get.copy.byDigest(cache, hacheo, destino, opts)
x.saca.info = (cache, clave) => get.info(cache, clave)
x.saca.tieneDatos = (cache, hacheo) => get.hasContent(cache, hacheo)
+x.saca.tieneDatos.sinc = (cache, hacheo) => get.hasContent.sync(cache, hacheo)
x.mete = (cache, clave, datos, ops) => put(cache, clave, datos, ops)
x.mete.flujo = (cache, clave, ops) => put.stream(cache, clave, ops)
diff --git a/deps/npm/node_modules/npm-registry-client/LICENSE b/deps/npm/node_modules/cacache/node_modules/chownr/LICENSE
index 19129e315f..19129e315f 100644
--- a/deps/npm/node_modules/npm-registry-client/LICENSE
+++ b/deps/npm/node_modules/cacache/node_modules/chownr/LICENSE
diff --git a/deps/npm/node_modules/cacache/node_modules/chownr/README.md b/deps/npm/node_modules/cacache/node_modules/chownr/README.md
new file mode 100644
index 0000000000..70e9a54a32
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/chownr/README.md
@@ -0,0 +1,3 @@
+Like `chown -R`.
+
+Takes the same arguments as `fs.chown()`
diff --git a/deps/npm/node_modules/cacache/node_modules/chownr/chownr.js b/deps/npm/node_modules/cacache/node_modules/chownr/chownr.js
new file mode 100644
index 0000000000..7e63928827
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/chownr/chownr.js
@@ -0,0 +1,88 @@
+'use strict'
+const fs = require('fs')
+const path = require('path')
+
+/* istanbul ignore next */
+const LCHOWN = fs.lchown ? 'lchown' : 'chown'
+/* istanbul ignore next */
+const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
+
+// fs.readdir could only accept an options object as of node v6
+const nodeVersion = process.version
+let readdir = (path, options, cb) => fs.readdir(path, options, cb)
+let readdirSync = (path, options) => fs.readdirSync(path, options)
+/* istanbul ignore next */
+if (/^v4\./.test(nodeVersion))
+ readdir = (path, options, cb) => fs.readdir(path, cb)
+
+const chownrKid = (p, child, uid, gid, cb) => {
+ if (typeof child === 'string')
+ return fs.lstat(path.resolve(p, child), (er, stats) => {
+ if (er)
+ return cb(er)
+ stats.name = child
+ chownrKid(p, stats, uid, gid, cb)
+ })
+
+ if (child.isDirectory()) {
+ chownr(path.resolve(p, child.name), uid, gid, er => {
+ if (er)
+ return cb(er)
+ fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb)
+ })
+ } else
+ fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb)
+}
+
+
+const chownr = (p, uid, gid, cb) => {
+ readdir(p, { withFileTypes: true }, (er, children) => {
+ // any error other than ENOTDIR or ENOTSUP means it's not readable,
+ // or doesn't exist. give up.
+ if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
+ return cb(er)
+ if (er || !children.length) return fs[LCHOWN](p, uid, gid, cb)
+
+ let len = children.length
+ let errState = null
+ const then = er => {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (-- len === 0) return fs[LCHOWN](p, uid, gid, cb)
+ }
+
+ children.forEach(child => chownrKid(p, child, uid, gid, then))
+ })
+}
+
+const chownrKidSync = (p, child, uid, gid) => {
+ if (typeof child === 'string') {
+ const stats = fs.lstatSync(path.resolve(p, child))
+ stats.name = child
+ child = stats
+ }
+
+ if (child.isDirectory())
+ chownrSync(path.resolve(p, child.name), uid, gid)
+
+ fs[LCHOWNSYNC](path.resolve(p, child.name), uid, gid)
+}
+
+const chownrSync = (p, uid, gid) => {
+ let children
+ try {
+ children = readdirSync(p, { withFileTypes: true })
+ } catch (er) {
+ if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP')
+ return fs[LCHOWNSYNC](p, uid, gid)
+ throw er
+ }
+
+ if (children.length)
+ children.forEach(child => chownrKidSync(p, child, uid, gid))
+
+ return fs[LCHOWNSYNC](p, uid, gid)
+}
+
+module.exports = chownr
+chownr.sync = chownrSync
diff --git a/deps/npm/node_modules/cacache/node_modules/chownr/package.json b/deps/npm/node_modules/cacache/node_modules/chownr/package.json
new file mode 100644
index 0000000000..4871f94bf3
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/chownr/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "chownr@^1.1.1",
+ "_id": "chownr@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
+ "_location": "/cacache/chownr",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "chownr@^1.1.1",
+ "name": "chownr",
+ "escapedName": "chownr",
+ "rawSpec": "^1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.1"
+ },
+ "_requiredBy": [
+ "/cacache"
+ ],
+ "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
+ "_shasum": "54726b8b8fff4df053c42187e801fb4412df1494",
+ "_spec": "chownr@^1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/cacache",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/chownr/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "like `chown -R`",
+ "devDependencies": {
+ "mkdirp": "0.3",
+ "rimraf": "",
+ "tap": "^12.0.1"
+ },
+ "files": [
+ "chownr.js"
+ ],
+ "homepage": "https://github.com/isaacs/chownr#readme",
+ "license": "ISC",
+ "main": "chownr.js",
+ "name": "chownr",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/chownr.git"
+ },
+ "scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --cov"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/LICENSE b/deps/npm/node_modules/cacache/node_modules/lru-cache/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/README.md b/deps/npm/node_modules/cacache/node_modules/lru-cache/README.md
new file mode 100644
index 0000000000..435dfebb7e
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/README.md
@@ -0,0 +1,166 @@
+# lru cache
+
+A cache object that deletes the least-recently-used items.
+
+[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache)
+
+## Installation:
+
+```javascript
+npm install lru-cache --save
+```
+
+## Usage:
+
+```javascript
+var LRU = require("lru-cache")
+ , options = { max: 500
+ , length: function (n, key) { return n * 2 + key.length }
+ , dispose: function (key, n) { n.close() }
+ , maxAge: 1000 * 60 * 60 }
+ , cache = new LRU(options)
+ , otherCache = new LRU(50) // sets just the max size
+
+cache.set("key", "value")
+cache.get("key") // "value"
+
+// non-string keys ARE fully supported
+// but note that it must be THE SAME object, not
+// just a JSON-equivalent object.
+var someObject = { a: 1 }
+cache.set(someObject, 'a value')
+// Object keys are not toString()-ed
+cache.set('[object Object]', 'a different value')
+assert.equal(cache.get(someObject), 'a value')
+// A similar object with same keys/values won't work,
+// because it's a different object identity
+assert.equal(cache.get({ a: 1 }), undefined)
+
+cache.reset() // empty the cache
+```
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
+## Options
+
+* `max` The maximum size of the cache, checked by applying the length
+ function to all values in the cache. Not setting this is kind of
+ silly, since that's the whole purpose of this lib, but it defaults
+ to `Infinity`. Setting it to a non-number or negative number will
+ throw a `TypeError`. Setting it to 0 makes it be `Infinity`.
+* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
+ as they age, but if you try to get an item that is too old, it'll
+ drop it and return undefined instead of giving it to you.
+ Setting this to a negative value will make everything seem old!
+ Setting it to a non-number will throw a `TypeError`.
+* `length` Function that is used to calculate the length of stored
+ items. If you're storing strings or buffers, then you probably want
+ to do something like `function(n, key){return n.length}`. The default is
+ `function(){return 1}`, which is fine if you want to store `max`
+ like-sized things. The item is passed as the first argument, and
+ the key is passed as the second argumnet.
+* `dispose` Function that is called on items when they are dropped
+ from the cache. This can be handy if you want to close file
+ descriptors or do other cleanup tasks when items are no longer
+ accessible. Called with `key, value`. It's called *before*
+ actually removing the item from the internal cache, so if you want
+ to immediately put it back in, you'll have to do that in a
+ `nextTick` or `setTimeout` callback or it won't do anything.
+* `stale` By default, if you set a `maxAge`, it'll only actually pull
+ stale items out of the cache when you `get(key)`. (That is, it's
+ not pre-emptively doing a `setTimeout` or anything.) If you set
+ `stale:true`, it'll return the stale value before deleting it. If
+ you don't set this, then it'll return `undefined` when you try to
+ get a stale entry, as if it had already been deleted.
+* `noDisposeOnSet` By default, if you set a `dispose()` method, then
+ it'll be called whenever a `set()` operation overwrites an existing
+ key. If you set this option, `dispose()` will only be called when a
+ key falls out of the cache, not when it is overwritten.
+* `updateAgeOnGet` When using time-expiring entries with `maxAge`,
+ setting this to `true` will make each item's effective time update
+ to the current time whenever it is retrieved from cache, causing it
+ to not expire. (It can still fall out of cache based on recency of
+ use, of course.)
+
+## API
+
+* `set(key, value, maxAge)`
+* `get(key) => value`
+
+ Both of these will update the "recently used"-ness of the key.
+ They do what you think. `maxAge` is optional and overrides the
+ cache `maxAge` option if provided.
+
+ If the key is not found, `get()` will return `undefined`.
+
+ The key and val can be any value.
+
+* `peek(key)`
+
+ Returns the key value (or `undefined` if not found) without
+ updating the "recently used"-ness of the key.
+
+ (If you find yourself using this a lot, you *might* be using the
+ wrong sort of data structure, but there are some use cases where
+ it's handy.)
+
+* `del(key)`
+
+ Deletes a key out of the cache.
+
+* `reset()`
+
+ Clear the cache entirely, throwing away all values.
+
+* `has(key)`
+
+ Check if a key is in the cache, without updating the recent-ness
+ or deleting it for being stale.
+
+* `forEach(function(value,key,cache), [thisp])`
+
+ Just like `Array.prototype.forEach`. Iterates over all the keys
+ in the cache, in order of recent-ness. (Ie, more recently used
+ items are iterated over first.)
+
+* `rforEach(function(value,key,cache), [thisp])`
+
+ The same as `cache.forEach(...)` but items are iterated over in
+ reverse order. (ie, less recently used items are iterated over
+ first.)
+
+* `keys()`
+
+ Return an array of the keys in the cache.
+
+* `values()`
+
+ Return an array of the values in the cache.
+
+* `length`
+
+ Return total length of objects in cache taking into account
+ `length` options function.
+
+* `itemCount`
+
+ Return total quantity of objects currently in cache. Note, that
+ `stale` (see options) items are returned as part of this item
+ count.
+
+* `dump()`
+
+ Return an array of the cache entries ready for serialization and usage
+ with 'destinationCache.load(arr)`.
+
+* `load(cacheEntriesArray)`
+
+ Loads another cache entries array, obtained with `sourceCache.dump()`,
+ into the cache. The destination cache is reset before loading new entries
+
+* `prune()`
+
+ Manually iterates over the entire cache proactively pruning old entries
diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/index.js b/deps/npm/node_modules/cacache/node_modules/lru-cache/index.js
new file mode 100644
index 0000000000..573b6b85b9
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/index.js
@@ -0,0 +1,334 @@
+'use strict'
+
+// A linked list to keep track of recently-used-ness
+const Yallist = require('yallist')
+
+const MAX = Symbol('max')
+const LENGTH = Symbol('length')
+const LENGTH_CALCULATOR = Symbol('lengthCalculator')
+const ALLOW_STALE = Symbol('allowStale')
+const MAX_AGE = Symbol('maxAge')
+const DISPOSE = Symbol('dispose')
+const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')
+const LRU_LIST = Symbol('lruList')
+const CACHE = Symbol('cache')
+const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')
+
+const naiveLength = () => 1
+
+// lruList is a yallist where the head is the youngest
+// item, and the tail is the oldest. the list contains the Hit
+// objects as the entries.
+// Each Hit object has a reference to its Yallist.Node. This
+// never changes.
+//
+// cache is a Map (or PseudoMap) that matches the keys to
+// the Yallist.Node object.
+class LRUCache {
+ constructor (options) {
+ if (typeof options === 'number')
+ options = { max: options }
+
+ if (!options)
+ options = {}
+
+ if (options.max && (typeof options.max !== 'number' || options.max < 0))
+ throw new TypeError('max must be a non-negative number')
+ // Kind of weird to have a default max of Infinity, but oh well.
+ const max = this[MAX] = options.max || Infinity
+
+ const lc = options.length || naiveLength
+ this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc
+ this[ALLOW_STALE] = options.stale || false
+ if (options.maxAge && typeof options.maxAge !== 'number')
+ throw new TypeError('maxAge must be a number')
+ this[MAX_AGE] = options.maxAge || 0
+ this[DISPOSE] = options.dispose
+ this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
+ this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false
+ this.reset()
+ }
+
+ // resize the cache when the max changes.
+ set max (mL) {
+ if (typeof mL !== 'number' || mL < 0)
+ throw new TypeError('max must be a non-negative number')
+
+ this[MAX] = mL || Infinity
+ trim(this)
+ }
+ get max () {
+ return this[MAX]
+ }
+
+ set allowStale (allowStale) {
+ this[ALLOW_STALE] = !!allowStale
+ }
+ get allowStale () {
+ return this[ALLOW_STALE]
+ }
+
+ set maxAge (mA) {
+ if (typeof mA !== 'number')
+ throw new TypeError('maxAge must be a non-negative number')
+
+ this[MAX_AGE] = mA
+ trim(this)
+ }
+ get maxAge () {
+ return this[MAX_AGE]
+ }
+
+ // resize the cache when the lengthCalculator changes.
+ set lengthCalculator (lC) {
+ if (typeof lC !== 'function')
+ lC = naiveLength
+
+ if (lC !== this[LENGTH_CALCULATOR]) {
+ this[LENGTH_CALCULATOR] = lC
+ this[LENGTH] = 0
+ this[LRU_LIST].forEach(hit => {
+ hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
+ this[LENGTH] += hit.length
+ })
+ }
+ trim(this)
+ }
+ get lengthCalculator () { return this[LENGTH_CALCULATOR] }
+
+ get length () { return this[LENGTH] }
+ get itemCount () { return this[LRU_LIST].length }
+
+ rforEach (fn, thisp) {
+ thisp = thisp || this
+ for (let walker = this[LRU_LIST].tail; walker !== null;) {
+ const prev = walker.prev
+ forEachStep(this, fn, walker, thisp)
+ walker = prev
+ }
+ }
+
+ forEach (fn, thisp) {
+ thisp = thisp || this
+ for (let walker = this[LRU_LIST].head; walker !== null;) {
+ const next = walker.next
+ forEachStep(this, fn, walker, thisp)
+ walker = next
+ }
+ }
+
+ keys () {
+ return this[LRU_LIST].toArray().map(k => k.key)
+ }
+
+ values () {
+ return this[LRU_LIST].toArray().map(k => k.value)
+ }
+
+ reset () {
+ if (this[DISPOSE] &&
+ this[LRU_LIST] &&
+ this[LRU_LIST].length) {
+ this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))
+ }
+
+ this[CACHE] = new Map() // hash of items by key
+ this[LRU_LIST] = new Yallist() // list of items in order of use recency
+ this[LENGTH] = 0 // length of items in the list
+ }
+
+ dump () {
+ return this[LRU_LIST].map(hit =>
+ isStale(this, hit) ? false : {
+ k: hit.key,
+ v: hit.value,
+ e: hit.now + (hit.maxAge || 0)
+ }).toArray().filter(h => h)
+ }
+
+ dumpLru () {
+ return this[LRU_LIST]
+ }
+
+ set (key, value, maxAge) {
+ maxAge = maxAge || this[MAX_AGE]
+
+ if (maxAge && typeof maxAge !== 'number')
+ throw new TypeError('maxAge must be a number')
+
+ const now = maxAge ? Date.now() : 0
+ const len = this[LENGTH_CALCULATOR](value, key)
+
+ if (this[CACHE].has(key)) {
+ if (len > this[MAX]) {
+ del(this, this[CACHE].get(key))
+ return false
+ }
+
+ const node = this[CACHE].get(key)
+ const item = node.value
+
+ // dispose of the old one before overwriting
+ // split out into 2 ifs for better coverage tracking
+ if (this[DISPOSE]) {
+ if (!this[NO_DISPOSE_ON_SET])
+ this[DISPOSE](key, item.value)
+ }
+
+ item.now = now
+ item.maxAge = maxAge
+ item.value = value
+ this[LENGTH] += len - item.length
+ item.length = len
+ this.get(key)
+ trim(this)
+ return true
+ }
+
+ const hit = new Entry(key, value, len, now, maxAge)
+
+ // oversized objects fall out of cache automatically.
+ if (hit.length > this[MAX]) {
+ if (this[DISPOSE])
+ this[DISPOSE](key, value)
+
+ return false
+ }
+
+ this[LENGTH] += hit.length
+ this[LRU_LIST].unshift(hit)
+ this[CACHE].set(key, this[LRU_LIST].head)
+ trim(this)
+ return true
+ }
+
+ has (key) {
+ if (!this[CACHE].has(key)) return false
+ const hit = this[CACHE].get(key).value
+ return !isStale(this, hit)
+ }
+
+ get (key) {
+ return get(this, key, true)
+ }
+
+ peek (key) {
+ return get(this, key, false)
+ }
+
+ pop () {
+ const node = this[LRU_LIST].tail
+ if (!node)
+ return null
+
+ del(this, node)
+ return node.value
+ }
+
+ del (key) {
+ del(this, this[CACHE].get(key))
+ }
+
+ load (arr) {
+ // reset the cache
+ this.reset()
+
+ const now = Date.now()
+ // A previous serialized cache has the most recent items first
+ for (let l = arr.length - 1; l >= 0; l--) {
+ const hit = arr[l]
+ const expiresAt = hit.e || 0
+ if (expiresAt === 0)
+ // the item was created without expiration in a non aged cache
+ this.set(hit.k, hit.v)
+ else {
+ const maxAge = expiresAt - now
+ // dont add already expired items
+ if (maxAge > 0) {
+ this.set(hit.k, hit.v, maxAge)
+ }
+ }
+ }
+ }
+
+ prune () {
+ this[CACHE].forEach((value, key) => get(this, key, false))
+ }
+}
+
+const get = (self, key, doUse) => {
+ const node = self[CACHE].get(key)
+ if (node) {
+ const hit = node.value
+ if (isStale(self, hit)) {
+ del(self, node)
+ if (!self[ALLOW_STALE])
+ return undefined
+ } else {
+ if (doUse) {
+ if (self[UPDATE_AGE_ON_GET])
+ node.value.now = Date.now()
+ self[LRU_LIST].unshiftNode(node)
+ }
+ }
+ return hit.value
+ }
+}
+
+const isStale = (self, hit) => {
+ if (!hit || (!hit.maxAge && !self[MAX_AGE]))
+ return false
+
+ const diff = Date.now() - hit.now
+ return hit.maxAge ? diff > hit.maxAge
+ : self[MAX_AGE] && (diff > self[MAX_AGE])
+}
+
+const trim = self => {
+ if (self[LENGTH] > self[MAX]) {
+ for (let walker = self[LRU_LIST].tail;
+ self[LENGTH] > self[MAX] && walker !== null;) {
+ // We know that we're about to delete this one, and also
+ // what the next least recently used key will be, so just
+ // go ahead and set it now.
+ const prev = walker.prev
+ del(self, walker)
+ walker = prev
+ }
+ }
+}
+
+const del = (self, node) => {
+ if (node) {
+ const hit = node.value
+ if (self[DISPOSE])
+ self[DISPOSE](hit.key, hit.value)
+
+ self[LENGTH] -= hit.length
+ self[CACHE].delete(hit.key)
+ self[LRU_LIST].removeNode(node)
+ }
+}
+
+class Entry {
+ constructor (key, value, length, now, maxAge) {
+ this.key = key
+ this.value = value
+ this.length = length
+ this.now = now
+ this.maxAge = maxAge || 0
+ }
+}
+
+const forEachStep = (self, fn, node, thisp) => {
+ let hit = node.value
+ if (isStale(self, hit)) {
+ del(self, node)
+ if (!self[ALLOW_STALE])
+ hit = undefined
+ }
+ if (hit)
+ fn.call(thisp, hit.value, hit.key, self)
+}
+
+module.exports = LRUCache
diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/package.json b/deps/npm/node_modules/cacache/node_modules/lru-cache/package.json
new file mode 100644
index 0000000000..1d41a07afb
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "lru-cache@^5.1.1",
+ "_id": "lru-cache@5.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "_location": "/cacache/lru-cache",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "lru-cache@^5.1.1",
+ "name": "lru-cache",
+ "escapedName": "lru-cache",
+ "rawSpec": "^5.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^5.1.1"
+ },
+ "_requiredBy": [
+ "/cacache"
+ ],
+ "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "_shasum": "1da27e6710271947695daf6848e847f01d84b920",
+ "_spec": "lru-cache@^5.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/cacache",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/node-lru-cache/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "yallist": "^3.0.2"
+ },
+ "deprecated": false,
+ "description": "A cache object that deletes the least-recently-used items.",
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "tap": "^12.1.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/isaacs/node-lru-cache#readme",
+ "keywords": [
+ "mru",
+ "lru",
+ "cache"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "lru-cache",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-lru-cache.git"
+ },
+ "scripts": {
+ "coveragerport": "tap --coverage-report=html",
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "snap": "TAP_SNAPSHOT=1 tap test/*.js -J",
+ "test": "tap test/*.js --100 -J"
+ },
+ "version": "5.1.1"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/LICENSE b/deps/npm/node_modules/cacache/node_modules/unique-filename/LICENSE
new file mode 100644
index 0000000000..69619c125e
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/LICENSE
@@ -0,0 +1,5 @@
+Copyright 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 AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/README.md b/deps/npm/node_modules/cacache/node_modules/unique-filename/README.md
new file mode 100644
index 0000000000..74b62b2ab4
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/README.md
@@ -0,0 +1,33 @@
+unique-filename
+===============
+
+Generate a unique filename for use in temporary directories or caches.
+
+```
+var uniqueFilename = require('unique-filename')
+
+// returns something like: /tmp/912ec803b2ce49e4a541068d495ab570
+var randomTmpfile = uniqueFilename(os.tmpdir())
+
+// returns something like: /tmp/my-test-912ec803b2ce49e4a541068d495ab570
+var randomPrefixedTmpfile = uniqueFilename(os.tmpdir(), 'my-test')
+
+var uniqueTmpfile = uniqueFilename('/tmp', 'testing', '/my/thing/to/uniq/on')
+```
+
+### uniqueFilename(*dir*, *fileprefix*, *uniqstr*) → String
+
+Returns the full path of a unique filename that looks like:
+`dir/prefix-7ddd44c0`
+or `dir/7ddd44c0`
+
+*dir* – The path you want the filename in. `os.tmpdir()` is a good choice for this.
+
+*fileprefix* – A string to append prior to the unique part of the filename.
+The parameter is required if *uniqstr* is also passed in but is otherwise
+optional and can be `undefined`/`null`/`''`. If present and not empty
+then this string plus a hyphen are prepended to the unique part.
+
+*uniqstr* – Optional, if not passed the unique part of the resulting
+filename will be random. If passed in it will be generated from this string
+in a reproducable way.
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.html b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.html
new file mode 100644
index 0000000000..cd55391a67
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.html
@@ -0,0 +1,73 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Code coverage report for __root__/</title>
+ <meta charset="utf-8">
+ <link rel="stylesheet" href="../prettify.css">
+ <link rel="stylesheet" href="../base.css">
+ <style type='text/css'>
+ div.coverage-summary .sorter {
+ background-image: url(../sort-arrow-sprite.png);
+ }
+ </style>
+</head>
+<body>
+<div class="header high">
+ <h1>Code coverage report for <span class="entity">__root__/</span></h1>
+ <h2>
+ Statements: <span class="metric">100% <small>(4 / 4)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Branches: <span class="metric">100% <small>(2 / 2)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Functions: <span class="metric">100% <small>(1 / 1)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Lines: <span class="metric">100% <small>(4 / 4)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Ignored: <span class="metric"><span class="ignore-none">none</span></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ </h2>
+ <div class="path"><a href="../index.html">All files</a> &#187; __root__/</div>
+</div>
+<div class="body">
+<div class="coverage-summary">
+<table>
+<thead>
+<tr>
+ <th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
+ <th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
+ <th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
+ <th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
+ <th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
+ <th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
+ <th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
+</tr>
+</thead>
+<tbody><tr>
+ <td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
+ <td data-value="100" class="pic high"><span class="cover-fill cover-full" style="width: 100px;"></span><span class="cover-empty" style="width:0px;"></span></td>
+ <td data-value="100" class="pct high">100%</td>
+ <td data-value="4" class="abs high">(4&nbsp;/&nbsp;4)</td>
+ <td data-value="100" class="pct high">100%</td>
+ <td data-value="2" class="abs high">(2&nbsp;/&nbsp;2)</td>
+ <td data-value="100" class="pct high">100%</td>
+ <td data-value="1" class="abs high">(1&nbsp;/&nbsp;1)</td>
+ <td data-value="100" class="pct high">100%</td>
+ <td data-value="4" class="abs high">(4&nbsp;/&nbsp;4)</td>
+ </tr>
+
+</tbody>
+</table>
+</div>
+</div>
+<div class="footer">
+ <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 03 2015 15:00:03 GMT-0800 (PST)</div>
+</div>
+<script src="../prettify.js"></script>
+<script>
+window.onload = function () {
+ if (typeof prettyPrint === 'function') {
+ prettyPrint();
+ }
+};
+</script>
+<script src="../sorter.js"></script>
+</body>
+</html>
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.js.html b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.js.html
new file mode 100644
index 0000000000..02e5768d3f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.js.html
@@ -0,0 +1,69 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Code coverage report for index.js</title>
+ <meta charset="utf-8">
+ <link rel="stylesheet" href="../prettify.css">
+ <link rel="stylesheet" href="../base.css">
+ <style type='text/css'>
+ div.coverage-summary .sorter {
+ background-image: url(../sort-arrow-sprite.png);
+ }
+ </style>
+</head>
+<body>
+<div class="header high">
+ <h1>Code coverage report for <span class="entity">index.js</span></h1>
+ <h2>
+ Statements: <span class="metric">100% <small>(4 / 4)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Branches: <span class="metric">100% <small>(2 / 2)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Functions: <span class="metric">100% <small>(1 / 1)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Lines: <span class="metric">100% <small>(4 / 4)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Ignored: <span class="metric"><span class="ignore-none">none</span></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ </h2>
+ <div class="path"><a href="../index.html">All files</a> &#187; <a href="index.html">__root__/</a> &#187; index.js</div>
+</div>
+<div class="body">
+<pre><table class="coverage">
+<tr><td class="line-count">1
+2
+3
+4
+5
+6
+7
+8
+9</td><td class="line-coverage"><span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1</span>
+<span class="cline-any cline-yes">6</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">'use strict'
+var path = require('path')
+&nbsp;
+var uniqueSlug = require('unique-slug')
+&nbsp;
+module.exports = function (filepath, prefix, uniq) {
+ return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq))
+}
+&nbsp;</pre></td></tr>
+</table></pre>
+
+</div>
+<div class="footer">
+ <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 03 2015 15:00:03 GMT-0800 (PST)</div>
+</div>
+<script src="../prettify.js"></script>
+<script>
+window.onload = function () {
+ if (typeof prettyPrint === 'function') {
+ prettyPrint();
+ }
+};
+</script>
+<script src="../sorter.js"></script>
+</body>
+</html>
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/base.css b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/base.css
new file mode 100644
index 0000000000..a6a2f3284d
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/base.css
@@ -0,0 +1,182 @@
+body, html {
+ margin:0; padding: 0;
+}
+body {
+ font-family: Helvetica Neue, Helvetica,Arial;
+ font-size: 10pt;
+}
+div.header, div.footer {
+ background: #eee;
+ padding: 1em;
+}
+div.header {
+ z-index: 100;
+ position: fixed;
+ top: 0;
+ border-bottom: 1px solid #666;
+ width: 100%;
+}
+div.footer {
+ border-top: 1px solid #666;
+}
+div.body {
+ margin-top: 10em;
+}
+div.meta {
+ font-size: 90%;
+ text-align: center;
+}
+h1, h2, h3 {
+ font-weight: normal;
+}
+h1 {
+ font-size: 12pt;
+}
+h2 {
+ font-size: 10pt;
+}
+pre {
+ font-family: Consolas, Menlo, Monaco, monospace;
+ margin: 0;
+ padding: 0;
+ line-height: 1.3;
+ font-size: 14px;
+ -moz-tab-size: 2;
+ -o-tab-size: 2;
+ tab-size: 2;
+}
+
+div.path { font-size: 110%; }
+div.path a:link, div.path a:visited { color: #000; }
+table.coverage { border-collapse: collapse; margin:0; padding: 0 }
+
+table.coverage td {
+ margin: 0;
+ padding: 0;
+ color: #111;
+ vertical-align: top;
+}
+table.coverage td.line-count {
+ width: 50px;
+ text-align: right;
+ padding-right: 5px;
+}
+table.coverage td.line-coverage {
+ color: #777 !important;
+ text-align: right;
+ border-left: 1px solid #666;
+ border-right: 1px solid #666;
+}
+
+table.coverage td.text {
+}
+
+table.coverage td span.cline-any {
+ display: inline-block;
+ padding: 0 5px;
+ width: 40px;
+}
+table.coverage td span.cline-neutral {
+ background: #eee;
+}
+table.coverage td span.cline-yes {
+ background: #b5d592;
+ color: #999;
+}
+table.coverage td span.cline-no {
+ background: #fc8c84;
+}
+
+.cstat-yes { color: #111; }
+.cstat-no { background: #fc8c84; color: #111; }
+.fstat-no { background: #ffc520; color: #111 !important; }
+.cbranch-no { background: yellow !important; color: #111; }
+
+.cstat-skip { background: #ddd; color: #111; }
+.fstat-skip { background: #ddd; color: #111 !important; }
+.cbranch-skip { background: #ddd !important; color: #111; }
+
+.missing-if-branch {
+ display: inline-block;
+ margin-right: 10px;
+ position: relative;
+ padding: 0 4px;
+ background: black;
+ color: yellow;
+}
+
+.skip-if-branch {
+ display: none;
+ margin-right: 10px;
+ position: relative;
+ padding: 0 4px;
+ background: #ccc;
+ color: white;
+}
+
+.missing-if-branch .typ, .skip-if-branch .typ {
+ color: inherit !important;
+}
+
+.entity, .metric { font-weight: bold; }
+.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; }
+.metric small { font-size: 80%; font-weight: normal; color: #666; }
+
+div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; }
+div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; }
+div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; }
+div.coverage-summary th.file { border-right: none !important; }
+div.coverage-summary th.pic { border-left: none !important; text-align: right; }
+div.coverage-summary th.pct { border-right: none !important; }
+div.coverage-summary th.abs { border-left: none !important; text-align: right; }
+div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; }
+div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; }
+div.coverage-summary td.file { border-left: 1px solid #666; white-space: nowrap; }
+div.coverage-summary td.pic { min-width: 120px !important; }
+div.coverage-summary a:link { text-decoration: none; color: #000; }
+div.coverage-summary a:visited { text-decoration: none; color: #777; }
+div.coverage-summary a:hover { text-decoration: underline; }
+div.coverage-summary tfoot td { border-top: 1px solid #666; }
+
+div.coverage-summary .sorter {
+ height: 10px;
+ width: 7px;
+ display: inline-block;
+ margin-left: 0.5em;
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
+}
+div.coverage-summary .sorted .sorter {
+ background-position: 0 -20px;
+}
+div.coverage-summary .sorted-desc .sorter {
+ background-position: 0 -10px;
+}
+
+.high { background: #b5d592 !important; }
+.medium { background: #ffe87c !important; }
+.low { background: #fc8c84 !important; }
+
+span.cover-fill, span.cover-empty {
+ display:inline-block;
+ border:1px solid #444;
+ background: white;
+ height: 12px;
+}
+span.cover-fill {
+ background: #ccc;
+ border-right: 1px solid #444;
+}
+span.cover-empty {
+ background: white;
+ border-left: none;
+}
+span.cover-full {
+ border-right: none !important;
+}
+pre.prettyprint {
+ border: none !important;
+ padding: 0 !important;
+ margin: 0 !important;
+}
+.com { color: #999 !important; }
+.ignore-none { color: #999; font-weight: normal; }
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/index.html b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/index.html
new file mode 100644
index 0000000000..b10d186cc3
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/index.html
@@ -0,0 +1,73 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Code coverage report for All files</title>
+ <meta charset="utf-8">
+ <link rel="stylesheet" href="prettify.css">
+ <link rel="stylesheet" href="base.css">
+ <style type='text/css'>
+ div.coverage-summary .sorter {
+ background-image: url(sort-arrow-sprite.png);
+ }
+ </style>
+</head>
+<body>
+<div class="header high">
+ <h1>Code coverage report for <span class="entity">All files</span></h1>
+ <h2>
+ Statements: <span class="metric">100% <small>(4 / 4)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Branches: <span class="metric">100% <small>(2 / 2)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Functions: <span class="metric">100% <small>(1 / 1)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Lines: <span class="metric">100% <small>(4 / 4)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ Ignored: <span class="metric"><span class="ignore-none">none</span></span> &nbsp;&nbsp;&nbsp;&nbsp;
+ </h2>
+ <div class="path"></div>
+</div>
+<div class="body">
+<div class="coverage-summary">
+<table>
+<thead>
+<tr>
+ <th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
+ <th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
+ <th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
+ <th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
+ <th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
+ <th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
+ <th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
+</tr>
+</thead>
+<tbody><tr>
+ <td class="file high" data-value="__root__/"><a href="__root__/index.html">__root__/</a></td>
+ <td data-value="100" class="pic high"><span class="cover-fill cover-full" style="width: 100px;"></span><span class="cover-empty" style="width:0px;"></span></td>
+ <td data-value="100" class="pct high">100%</td>
+ <td data-value="4" class="abs high">(4&nbsp;/&nbsp;4)</td>
+ <td data-value="100" class="pct high">100%</td>
+ <td data-value="2" class="abs high">(2&nbsp;/&nbsp;2)</td>
+ <td data-value="100" class="pct high">100%</td>
+ <td data-value="1" class="abs high">(1&nbsp;/&nbsp;1)</td>
+ <td data-value="100" class="pct high">100%</td>
+ <td data-value="4" class="abs high">(4&nbsp;/&nbsp;4)</td>
+ </tr>
+
+</tbody>
+</table>
+</div>
+</div>
+<div class="footer">
+ <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Dec 03 2015 15:00:03 GMT-0800 (PST)</div>
+</div>
+<script src="prettify.js"></script>
+<script>
+window.onload = function () {
+ if (typeof prettyPrint === 'function') {
+ prettyPrint();
+ }
+};
+</script>
+<script src="sorter.js"></script>
+</body>
+</html>
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.css b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.css
new file mode 100644
index 0000000000..b317a7cda3
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.css
@@ -0,0 +1 @@
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.js b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.js
new file mode 100644
index 0000000000..ef51e03866
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.js
@@ -0,0 +1 @@
+window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V<U;++V){var ae=Z[V];if(ae.ignoreCase){ac=true}else{if(/[a-z]/i.test(ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){S=true;ac=false;break}}}var Y={b:8,t:9,n:10,v:11,f:12,r:13};function ab(ah){var ag=ah.charCodeAt(0);if(ag!==92){return ag}var af=ah.charAt(1);ag=Y[af];if(ag){return ag}else{if("0"<=af&&af<="7"){return parseInt(ah.substring(1),8)}else{if(af==="u"||af==="x"){return parseInt(ah.substring(2),16)}else{return ah.charCodeAt(1)}}}}function T(af){if(af<32){return(af<16?"\\x0":"\\x")+af.toString(16)}var ag=String.fromCharCode(af);if(ag==="\\"||ag==="-"||ag==="["||ag==="]"){ag="\\"+ag}return ag}function X(am){var aq=am.substring(1,am.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));var ak=[];var af=[];var ao=aq[0]==="^";for(var ar=ao?1:0,aj=aq.length;ar<aj;++ar){var ah=aq[ar];if(/\\[bdsw]/i.test(ah)){ak.push(ah)}else{var ag=ab(ah);var al;if(ar+2<aj&&"-"===aq[ar+1]){al=ab(aq[ar+2]);ar+=2}else{al=ag}af.push([ag,al]);if(!(al<65||ag>122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;ar<af.length;++ar){var at=af[ar];if(at[0]<=ap[1]+1){ap[1]=Math.max(ap[1],at[1])}else{ai.push(ap=at)}}var an=["["];if(ao){an.push("^")}an.push.apply(an,ak);for(var ar=0;ar<ai.length;++ar){var at=ai[ar];an.push(T(at[0]));if(at[1]>at[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak<ah;++ak){var ag=aj[ak];if(ag==="("){++am}else{if("\\"===ag.charAt(0)){var af=+ag.substring(1);if(af&&af<=am){an[af]=-1}}}}for(var ak=1;ak<an.length;++ak){if(-1===an[ak]){an[ak]=++ad}}for(var ak=0,am=0;ak<ah;++ak){var ag=aj[ak];if(ag==="("){++am;if(an[am]===undefined){aj[ak]="(?:"}}else{if("\\"===ag.charAt(0)){var af=+ag.substring(1);if(af&&af<=am){aj[ak]="\\"+an[am]}}}}for(var ak=0,am=0;ak<ah;++ak){if("^"===aj[ak]&&"^"!==aj[ak+1]){aj[ak]=""}}if(al.ignoreCase&&S){for(var ak=0;ak<ah;++ak){var ag=aj[ak];var ai=ag.charAt(0);if(ag.length>=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V<U;++V){var ae=Z[V];if(ae.global||ae.multiline){throw new Error(""+ae)}aa.push("(?:"+W(ae)+")")}return new RegExp(aa.join("|"),ac?"gi":"g")}function a(V){var U=/(?:^|\s)nocode(?:\s|$)/;var X=[];var T=0;var Z=[];var W=0;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=document.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Y=S&&"pre"===S.substring(0,3);function aa(ab){switch(ab.nodeType){case 1:if(U.test(ab.className)){return}for(var ae=ab.firstChild;ae;ae=ae.nextSibling){aa(ae)}var ad=ab.nodeName;if("BR"===ad||"LI"===ad){X[W]="\n";Z[W<<1]=T++;Z[(W++<<1)|1]=ab}break;case 3:case 4:var ac=ab.nodeValue;if(ac.length){if(!Y){ac=ac.replace(/[ \t\r\n]+/g," ")}else{ac=ac.replace(/\r\n?/g,"\n")}X[W]=ac;Z[W<<1]=T;T+=ac.length;Z[(W++<<1)|1]=ab}break}}aa(V);return{sourceCode:X.join("").replace(/\n$/,""),spans:Z}}function B(S,U,W,T){if(!U){return}var V={sourceCode:U,basePos:S};W(V);T.push.apply(T,V.decorations)}var v=/\S/;function o(S){var V=undefined;for(var U=S.firstChild;U;U=U.nextSibling){var T=U.nodeType;V=(T===1)?(V?S:U):(T===3)?(v.test(U.nodeValue)?S:V):V}return V===S?undefined:V}function g(U,T){var S={};var V;(function(){var ad=U.concat(T);var ah=[];var ag={};for(var ab=0,Z=ad.length;ab<Z;++ab){var Y=ad[ab];var ac=Y[3];if(ac){for(var ae=ac.length;--ae>=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae<aq;++ae){var ag=an[ae];var ap=aj[ag];var ai=void 0;var am;if(typeof ap==="string"){am=false}else{var aa=S[ag.charAt(0)];if(aa){ai=ag.match(aa[1]);ap=aa[0]}else{for(var ao=0;ao<X;++ao){aa=T[ao];ai=ag.match(aa[1]);if(ai){ap=aa[0];break}}if(!ai){ap=F}}am=ap.length>=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y<W.length;++Y){ae(W[Y])}if(ag===(ag|0)){W[0].setAttribute("value",ag)}var aa=ac.createElement("OL");aa.className="linenums";var X=Math.max(0,((ag-1))|0)||0;for(var Y=0,T=W.length;Y<T;++Y){af=W[Y];af.className="L"+((Y+X)%10);if(!af.firstChild){af.appendChild(ac.createTextNode("\xA0"))}aa.appendChild(af)}V.appendChild(aa)}function D(ac){var aj=/\bMSIE\b/.test(navigator.userAgent);var am=/\n/g;var al=ac.sourceCode;var an=al.length;var V=0;var aa=ac.spans;var T=aa.length;var ah=0;var X=ac.decorations;var Y=X.length;var Z=0;X[Y]=an;var ar,aq;for(aq=ar=0;aq<Y;){if(X[aq]!==X[aq+2]){X[ar++]=X[aq++];X[ar++]=X[aq++]}else{aq+=2}}Y=ar;for(aq=ar=0;aq<Y;){var at=X[aq];var ab=X[aq+1];var W=aq+2;while(W+2<=Y&&X[W+1]===ab){W+=2}X[ar++]=at;X[ar++]=ab;aq=W}Y=X.length=ar;var ae=null;while(ah<T){var af=aa[ah];var S=aa[ah+2]||an;var ag=X[Z];var ap=X[Z+2]||an;var W=Math.min(S,ap);var ak=aa[ah+1];var U;if(ak.nodeType!==1&&(U=al.substring(V,W))){if(aj){U=U.replace(am,"\r")}ak.nodeValue=U;var ai=ak.ownerDocument;var ao=ai.createElement("SPAN");ao.className=X[Z+1];var ad=ak.parentNode;ad.replaceChild(ao,ak);ao.appendChild(ak);if(V<S){aa[ah+1]=ak=ai.createTextNode(al.substring(W,S));ad.insertBefore(ak,ao.nextSibling)}}V=W;if(V>=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*</.test(S)?"default-markup":"default-code"}return t[T]}c(K,["default-code"]);c(g([],[[F,/^[^<?]+/],[E,/^<!\w[^>]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa<ac.length;++aa){for(var Z=0,V=ac[aa].length;Z<V;++Z){T.push(ac[aa][Z])}}ac=null;var W=Date;if(!W.now){W={now:function(){return +(new Date)}}}var X=0;var S;var ab=/\blang(?:uage)?-([\w.]+)(?!\S)/;var ae=/\bprettyprint\b/;function U(){var ag=(window.PR_SHOULD_USE_CONTINUATION?W.now()+250:Infinity);for(;X<T.length&&W.now()<ag;X++){var aj=T[X];var ai=aj.className;if(ai.indexOf("prettyprint")>=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X<T.length){setTimeout(U,250)}else{if(ad){ad()}}}U()}window.prettyPrintOne=y;window.prettyPrint=b;window.PR={createSimpleLexer:g,registerLangHandler:c,sourceDecorator:i,PR_ATTRIB_NAME:P,PR_ATTRIB_VALUE:n,PR_COMMENT:j,PR_DECLARATION:E,PR_KEYWORD:z,PR_LITERAL:G,PR_NOCODE:N,PR_PLAIN:F,PR_PUNCTUATION:L,PR_SOURCE:J,PR_STRING:C,PR_TAG:m,PR_TYPE:O}})();PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_DECLARATION,/^<!\w[^>]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:<!--|-->)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]);
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sort-arrow-sprite.png b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sort-arrow-sprite.png
new file mode 100644
index 0000000000..03f704a609
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sort-arrow-sprite.png
Binary files differ
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sorter.js b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sorter.js
new file mode 100644
index 0000000000..6afb736c39
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sorter.js
@@ -0,0 +1,156 @@
+var addSorting = (function () {
+ "use strict";
+ var cols,
+ currentSort = {
+ index: 0,
+ desc: false
+ };
+
+ // returns the summary table element
+ function getTable() { return document.querySelector('.coverage-summary table'); }
+ // returns the thead element of the summary table
+ function getTableHeader() { return getTable().querySelector('thead tr'); }
+ // returns the tbody element of the summary table
+ function getTableBody() { return getTable().querySelector('tbody'); }
+ // returns the th element for nth column
+ function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; }
+
+ // loads all columns
+ function loadColumns() {
+ var colNodes = getTableHeader().querySelectorAll('th'),
+ colNode,
+ cols = [],
+ col,
+ i;
+
+ for (i = 0; i < colNodes.length; i += 1) {
+ colNode = colNodes[i];
+ col = {
+ key: colNode.getAttribute('data-col'),
+ sortable: !colNode.getAttribute('data-nosort'),
+ type: colNode.getAttribute('data-type') || 'string'
+ };
+ cols.push(col);
+ if (col.sortable) {
+ col.defaultDescSort = col.type === 'number';
+ colNode.innerHTML = colNode.innerHTML + '<span class="sorter"></span>';
+ }
+ }
+ return cols;
+ }
+ // attaches a data attribute to every tr element with an object
+ // of data values keyed by column name
+ function loadRowData(tableRow) {
+ var tableCols = tableRow.querySelectorAll('td'),
+ colNode,
+ col,
+ data = {},
+ i,
+ val;
+ for (i = 0; i < tableCols.length; i += 1) {
+ colNode = tableCols[i];
+ col = cols[i];
+ val = colNode.getAttribute('data-value');
+ if (col.type === 'number') {
+ val = Number(val);
+ }
+ data[col.key] = val;
+ }
+ return data;
+ }
+ // loads all row data
+ function loadData() {
+ var rows = getTableBody().querySelectorAll('tr'),
+ i;
+
+ for (i = 0; i < rows.length; i += 1) {
+ rows[i].data = loadRowData(rows[i]);
+ }
+ }
+ // sorts the table using the data for the ith column
+ function sortByIndex(index, desc) {
+ var key = cols[index].key,
+ sorter = function (a, b) {
+ a = a.data[key];
+ b = b.data[key];
+ return a < b ? -1 : a > b ? 1 : 0;
+ },
+ finalSorter = sorter,
+ tableBody = document.querySelector('.coverage-summary tbody'),
+ rowNodes = tableBody.querySelectorAll('tr'),
+ rows = [],
+ i;
+
+ if (desc) {
+ finalSorter = function (a, b) {
+ return -1 * sorter(a, b);
+ };
+ }
+
+ for (i = 0; i < rowNodes.length; i += 1) {
+ rows.push(rowNodes[i]);
+ tableBody.removeChild(rowNodes[i]);
+ }
+
+ rows.sort(finalSorter);
+
+ for (i = 0; i < rows.length; i += 1) {
+ tableBody.appendChild(rows[i]);
+ }
+ }
+ // removes sort indicators for current column being sorted
+ function removeSortIndicators() {
+ var col = getNthColumn(currentSort.index),
+ cls = col.className;
+
+ cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
+ col.className = cls;
+ }
+ // adds sort indicators for current column being sorted
+ function addSortIndicators() {
+ getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted';
+ }
+ // adds event listeners for all sorter widgets
+ function enableUI() {
+ var i,
+ el,
+ ithSorter = function ithSorter(i) {
+ var col = cols[i];
+
+ return function () {
+ var desc = col.defaultDescSort;
+
+ if (currentSort.index === i) {
+ desc = !currentSort.desc;
+ }
+ sortByIndex(i, desc);
+ removeSortIndicators();
+ currentSort.index = i;
+ currentSort.desc = desc;
+ addSortIndicators();
+ };
+ };
+ for (i =0 ; i < cols.length; i += 1) {
+ if (cols[i].sortable) {
+ el = getNthColumn(i).querySelector('.sorter');
+ if (el.addEventListener) {
+ el.addEventListener('click', ithSorter(i));
+ } else {
+ el.attachEvent('onclick', ithSorter(i));
+ }
+ }
+ }
+ }
+ // adds sorting functionality to the UI
+ return function () {
+ if (!getTable()) {
+ return;
+ }
+ cols = loadColumns();
+ loadData(cols);
+ addSortIndicators();
+ enableUI();
+ };
+})();
+
+window.addEventListener('load', addSorting);
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/index.js b/deps/npm/node_modules/cacache/node_modules/unique-filename/index.js
new file mode 100644
index 0000000000..02bf1e2731
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/index.js
@@ -0,0 +1,8 @@
+'use strict'
+var path = require('path')
+
+var uniqueSlug = require('unique-slug')
+
+module.exports = function (filepath, prefix, uniq) {
+ return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq))
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/package.json b/deps/npm/node_modules/cacache/node_modules/unique-filename/package.json
new file mode 100644
index 0000000000..7f245898c0
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/package.json
@@ -0,0 +1,56 @@
+{
+ "_from": "unique-filename@^1.1.1",
+ "_id": "unique-filename@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==",
+ "_location": "/cacache/unique-filename",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "unique-filename@^1.1.1",
+ "name": "unique-filename",
+ "escapedName": "unique-filename",
+ "rawSpec": "^1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.1"
+ },
+ "_requiredBy": [
+ "/cacache"
+ ],
+ "_resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz",
+ "_shasum": "1d69769369ada0583103a1e6ae87681b56573230",
+ "_spec": "unique-filename@^1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/cacache",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org",
+ "url": "http://re-becca.org/"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/unique-filename/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "unique-slug": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Generate a unique filename for use in temporary directories or caches.",
+ "devDependencies": {
+ "standard": "^5.4.1",
+ "tap": "^2.3.1"
+ },
+ "homepage": "https://github.com/iarna/unique-filename",
+ "keywords": [],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "unique-filename",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/unique-filename.git"
+ },
+ "scripts": {
+ "test": "standard && tap test"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js b/deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js
new file mode 100644
index 0000000000..105b4e52e8
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js
@@ -0,0 +1,23 @@
+'sue strict'
+var t = require('tap')
+var uniqueFilename = require('../index.js')
+
+t.plan(6)
+
+var randomTmpfile = uniqueFilename('tmp')
+t.like(randomTmpfile, /^tmp.[a-f0-9]{8}$/, 'random tmp file')
+
+var randomAgain = uniqueFilename('tmp')
+t.notEqual(randomAgain, randomTmpfile, 'random tmp files are not the same')
+
+var randomPrefixedTmpfile = uniqueFilename('tmp', 'my-test')
+t.like(randomPrefixedTmpfile, /^tmp.my-test-[a-f0-9]{8}$/, 'random prefixed tmp file')
+
+var randomPrefixedAgain = uniqueFilename('tmp', 'my-test')
+t.notEqual(randomPrefixedAgain, randomPrefixedTmpfile, 'random prefixed tmp files are not the same')
+
+var uniqueTmpfile = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on')
+t.like(uniqueTmpfile, /^tmp.testing-7ddd44c0$/, 'unique filename')
+
+var uniqueAgain = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on')
+t.is(uniqueTmpfile, uniqueAgain, 'same unique string component produces same filename')
diff --git a/deps/npm/node_modules/cacache/node_modules/yallist/LICENSE b/deps/npm/node_modules/cacache/node_modules/yallist/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/yallist/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/cacache/node_modules/yallist/README.md b/deps/npm/node_modules/cacache/node_modules/yallist/README.md
new file mode 100644
index 0000000000..f586101869
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/yallist/README.md
@@ -0,0 +1,204 @@
+# yallist
+
+Yet Another Linked List
+
+There are many doubly-linked list implementations like it, but this
+one is mine.
+
+For when an array would be too big, and a Map can't be iterated in
+reverse order.
+
+
+[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist)
+
+## basic usage
+
+```javascript
+var yallist = require('yallist')
+var myList = yallist.create([1, 2, 3])
+myList.push('foo')
+myList.unshift('bar')
+// of course pop() and shift() are there, too
+console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
+myList.forEach(function (k) {
+ // walk the list head to tail
+})
+myList.forEachReverse(function (k, index, list) {
+ // walk the list tail to head
+})
+var myDoubledList = myList.map(function (k) {
+ return k + k
+})
+// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
+// mapReverse is also a thing
+var myDoubledListReverse = myList.mapReverse(function (k) {
+ return k + k
+}) // ['foofoo', 6, 4, 2, 'barbar']
+
+var reduced = myList.reduce(function (set, entry) {
+ set += entry
+ return set
+}, 'start')
+console.log(reduced) // 'startfoo123bar'
+```
+
+## api
+
+The whole API is considered "public".
+
+Functions with the same name as an Array method work more or less the
+same way.
+
+There's reverse versions of most things because that's the point.
+
+### Yallist
+
+Default export, the class that holds and manages a list.
+
+Call it with either a forEach-able (like an array) or a set of
+arguments, to initialize the list.
+
+The Array-ish methods all act like you'd expect. No magic length,
+though, so if you change that it won't automatically prune or add
+empty spots.
+
+### Yallist.create(..)
+
+Alias for Yallist function. Some people like factories.
+
+#### yallist.head
+
+The first node in the list
+
+#### yallist.tail
+
+The last node in the list
+
+#### yallist.length
+
+The number of nodes in the list. (Change this at your peril. It is
+not magic like Array length.)
+
+#### yallist.toArray()
+
+Convert the list to an array.
+
+#### yallist.forEach(fn, [thisp])
+
+Call a function on each item in the list.
+
+#### yallist.forEachReverse(fn, [thisp])
+
+Call a function on each item in the list, in reverse order.
+
+#### yallist.get(n)
+
+Get the data at position `n` in the list. If you use this a lot,
+probably better off just using an Array.
+
+#### yallist.getReverse(n)
+
+Get the data at position `n`, counting from the tail.
+
+#### yallist.map(fn, thisp)
+
+Create a new Yallist with the result of calling the function on each
+item.
+
+#### yallist.mapReverse(fn, thisp)
+
+Same as `map`, but in reverse.
+
+#### yallist.pop()
+
+Get the data from the list tail, and remove the tail from the list.
+
+#### yallist.push(item, ...)
+
+Insert one or more items to the tail of the list.
+
+#### yallist.reduce(fn, initialValue)
+
+Like Array.reduce.
+
+#### yallist.reduceReverse
+
+Like Array.reduce, but in reverse.
+
+#### yallist.reverse
+
+Reverse the list in place.
+
+#### yallist.shift()
+
+Get the data from the list head, and remove the head from the list.
+
+#### yallist.slice([from], [to])
+
+Just like Array.slice, but returns a new Yallist.
+
+#### yallist.sliceReverse([from], [to])
+
+Just like yallist.slice, but the result is returned in reverse.
+
+#### yallist.toArray()
+
+Create an array representation of the list.
+
+#### yallist.toArrayReverse()
+
+Create a reversed array representation of the list.
+
+#### yallist.unshift(item, ...)
+
+Insert one or more items to the head of the list.
+
+#### yallist.unshiftNode(node)
+
+Move a Node object to the front of the list. (That is, pull it out of
+wherever it lives, and make it the new head.)
+
+If the node belongs to a different list, then that list will remove it
+first.
+
+#### yallist.pushNode(node)
+
+Move a Node object to the end of the list. (That is, pull it out of
+wherever it lives, and make it the new tail.)
+
+If the node belongs to a list already, then that list will remove it
+first.
+
+#### yallist.removeNode(node)
+
+Remove a node from the list, preserving referential integrity of head
+and tail and other nodes.
+
+Will throw an error if you try to have a list remove a node that
+doesn't belong to it.
+
+### Yallist.Node
+
+The class that holds the data and is actually the list.
+
+Call with `var n = new Node(value, previousNode, nextNode)`
+
+Note that if you do direct operations on Nodes themselves, it's very
+easy to get into weird states where the list is broken. Be careful :)
+
+#### node.next
+
+The next node in the list.
+
+#### node.prev
+
+The previous node in the list.
+
+#### node.value
+
+The data the node contains.
+
+#### node.list
+
+The list to which this node belongs. (Null if it does not belong to
+any list.)
diff --git a/deps/npm/node_modules/cacache/node_modules/yallist/iterator.js b/deps/npm/node_modules/cacache/node_modules/yallist/iterator.js
new file mode 100644
index 0000000000..d41c97a19f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/yallist/iterator.js
@@ -0,0 +1,8 @@
+'use strict'
+module.exports = function (Yallist) {
+ Yallist.prototype[Symbol.iterator] = function* () {
+ for (let walker = this.head; walker; walker = walker.next) {
+ yield walker.value
+ }
+ }
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/yallist/package.json b/deps/npm/node_modules/cacache/node_modules/yallist/package.json
new file mode 100644
index 0000000000..91ea442aa8
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/yallist/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "yallist@^3.0.2",
+ "_id": "yallist@3.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
+ "_location": "/cacache/yallist",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "yallist@^3.0.2",
+ "name": "yallist",
+ "escapedName": "yallist",
+ "rawSpec": "^3.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.2"
+ },
+ "_requiredBy": [
+ "/cacache/lru-cache"
+ ],
+ "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
+ "_shasum": "b4b049e314be545e3ce802236d6cd22cd91c3de9",
+ "_spec": "yallist@^3.0.2",
+ "_where": "/Users/aeschright/code/cli/node_modules/cacache/node_modules/lru-cache",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/yallist/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Yet Another Linked List",
+ "devDependencies": {
+ "tap": "^12.1.0"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "yallist.js",
+ "iterator.js"
+ ],
+ "homepage": "https://github.com/isaacs/yallist#readme",
+ "license": "ISC",
+ "main": "yallist.js",
+ "name": "yallist",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/yallist.git"
+ },
+ "scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --100"
+ },
+ "version": "3.0.3"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/yallist/yallist.js b/deps/npm/node_modules/cacache/node_modules/yallist/yallist.js
new file mode 100644
index 0000000000..b0ab36cf31
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/yallist/yallist.js
@@ -0,0 +1,376 @@
+'use strict'
+module.exports = Yallist
+
+Yallist.Node = Node
+Yallist.create = Yallist
+
+function Yallist (list) {
+ var self = this
+ if (!(self instanceof Yallist)) {
+ self = new Yallist()
+ }
+
+ self.tail = null
+ self.head = null
+ self.length = 0
+
+ if (list && typeof list.forEach === 'function') {
+ list.forEach(function (item) {
+ self.push(item)
+ })
+ } else if (arguments.length > 0) {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ self.push(arguments[i])
+ }
+ }
+
+ return self
+}
+
+Yallist.prototype.removeNode = function (node) {
+ if (node.list !== this) {
+ throw new Error('removing node which does not belong to this list')
+ }
+
+ var next = node.next
+ var prev = node.prev
+
+ if (next) {
+ next.prev = prev
+ }
+
+ if (prev) {
+ prev.next = next
+ }
+
+ if (node === this.head) {
+ this.head = next
+ }
+ if (node === this.tail) {
+ this.tail = prev
+ }
+
+ node.list.length--
+ node.next = null
+ node.prev = null
+ node.list = null
+}
+
+Yallist.prototype.unshiftNode = function (node) {
+ if (node === this.head) {
+ return
+ }
+
+ if (node.list) {
+ node.list.removeNode(node)
+ }
+
+ var head = this.head
+ node.list = this
+ node.next = head
+ if (head) {
+ head.prev = node
+ }
+
+ this.head = node
+ if (!this.tail) {
+ this.tail = node
+ }
+ this.length++
+}
+
+Yallist.prototype.pushNode = function (node) {
+ if (node === this.tail) {
+ return
+ }
+
+ if (node.list) {
+ node.list.removeNode(node)
+ }
+
+ var tail = this.tail
+ node.list = this
+ node.prev = tail
+ if (tail) {
+ tail.next = node
+ }
+
+ this.tail = node
+ if (!this.head) {
+ this.head = node
+ }
+ this.length++
+}
+
+Yallist.prototype.push = function () {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ push(this, arguments[i])
+ }
+ return this.length
+}
+
+Yallist.prototype.unshift = function () {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ unshift(this, arguments[i])
+ }
+ return this.length
+}
+
+Yallist.prototype.pop = function () {
+ if (!this.tail) {
+ return undefined
+ }
+
+ var res = this.tail.value
+ this.tail = this.tail.prev
+ if (this.tail) {
+ this.tail.next = null
+ } else {
+ this.head = null
+ }
+ this.length--
+ return res
+}
+
+Yallist.prototype.shift = function () {
+ if (!this.head) {
+ return undefined
+ }
+
+ var res = this.head.value
+ this.head = this.head.next
+ if (this.head) {
+ this.head.prev = null
+ } else {
+ this.tail = null
+ }
+ this.length--
+ return res
+}
+
+Yallist.prototype.forEach = function (fn, thisp) {
+ thisp = thisp || this
+ for (var walker = this.head, i = 0; walker !== null; i++) {
+ fn.call(thisp, walker.value, i, this)
+ walker = walker.next
+ }
+}
+
+Yallist.prototype.forEachReverse = function (fn, thisp) {
+ thisp = thisp || this
+ for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
+ fn.call(thisp, walker.value, i, this)
+ walker = walker.prev
+ }
+}
+
+Yallist.prototype.get = function (n) {
+ for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
+ // abort out of the list early if we hit a cycle
+ walker = walker.next
+ }
+ if (i === n && walker !== null) {
+ return walker.value
+ }
+}
+
+Yallist.prototype.getReverse = function (n) {
+ for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
+ // abort out of the list early if we hit a cycle
+ walker = walker.prev
+ }
+ if (i === n && walker !== null) {
+ return walker.value
+ }
+}
+
+Yallist.prototype.map = function (fn, thisp) {
+ thisp = thisp || this
+ var res = new Yallist()
+ for (var walker = this.head; walker !== null;) {
+ res.push(fn.call(thisp, walker.value, this))
+ walker = walker.next
+ }
+ return res
+}
+
+Yallist.prototype.mapReverse = function (fn, thisp) {
+ thisp = thisp || this
+ var res = new Yallist()
+ for (var walker = this.tail; walker !== null;) {
+ res.push(fn.call(thisp, walker.value, this))
+ walker = walker.prev
+ }
+ return res
+}
+
+Yallist.prototype.reduce = function (fn, initial) {
+ var acc
+ var walker = this.head
+ if (arguments.length > 1) {
+ acc = initial
+ } else if (this.head) {
+ walker = this.head.next
+ acc = this.head.value
+ } else {
+ throw new TypeError('Reduce of empty list with no initial value')
+ }
+
+ for (var i = 0; walker !== null; i++) {
+ acc = fn(acc, walker.value, i)
+ walker = walker.next
+ }
+
+ return acc
+}
+
+Yallist.prototype.reduceReverse = function (fn, initial) {
+ var acc
+ var walker = this.tail
+ if (arguments.length > 1) {
+ acc = initial
+ } else if (this.tail) {
+ walker = this.tail.prev
+ acc = this.tail.value
+ } else {
+ throw new TypeError('Reduce of empty list with no initial value')
+ }
+
+ for (var i = this.length - 1; walker !== null; i--) {
+ acc = fn(acc, walker.value, i)
+ walker = walker.prev
+ }
+
+ return acc
+}
+
+Yallist.prototype.toArray = function () {
+ var arr = new Array(this.length)
+ for (var i = 0, walker = this.head; walker !== null; i++) {
+ arr[i] = walker.value
+ walker = walker.next
+ }
+ return arr
+}
+
+Yallist.prototype.toArrayReverse = function () {
+ var arr = new Array(this.length)
+ for (var i = 0, walker = this.tail; walker !== null; i++) {
+ arr[i] = walker.value
+ walker = walker.prev
+ }
+ return arr
+}
+
+Yallist.prototype.slice = function (from, to) {
+ to = to || this.length
+ if (to < 0) {
+ to += this.length
+ }
+ from = from || 0
+ if (from < 0) {
+ from += this.length
+ }
+ var ret = new Yallist()
+ if (to < from || to < 0) {
+ return ret
+ }
+ if (from < 0) {
+ from = 0
+ }
+ if (to > this.length) {
+ to = this.length
+ }
+ for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
+ walker = walker.next
+ }
+ for (; walker !== null && i < to; i++, walker = walker.next) {
+ ret.push(walker.value)
+ }
+ return ret
+}
+
+Yallist.prototype.sliceReverse = function (from, to) {
+ to = to || this.length
+ if (to < 0) {
+ to += this.length
+ }
+ from = from || 0
+ if (from < 0) {
+ from += this.length
+ }
+ var ret = new Yallist()
+ if (to < from || to < 0) {
+ return ret
+ }
+ if (from < 0) {
+ from = 0
+ }
+ if (to > this.length) {
+ to = this.length
+ }
+ for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
+ walker = walker.prev
+ }
+ for (; walker !== null && i > from; i--, walker = walker.prev) {
+ ret.push(walker.value)
+ }
+ return ret
+}
+
+Yallist.prototype.reverse = function () {
+ var head = this.head
+ var tail = this.tail
+ for (var walker = head; walker !== null; walker = walker.prev) {
+ var p = walker.prev
+ walker.prev = walker.next
+ walker.next = p
+ }
+ this.head = tail
+ this.tail = head
+ return this
+}
+
+function push (self, item) {
+ self.tail = new Node(item, self.tail, null, self)
+ if (!self.head) {
+ self.head = self.tail
+ }
+ self.length++
+}
+
+function unshift (self, item) {
+ self.head = new Node(item, null, self.head, self)
+ if (!self.tail) {
+ self.tail = self.head
+ }
+ self.length++
+}
+
+function Node (value, prev, next, list) {
+ if (!(this instanceof Node)) {
+ return new Node(value, prev, next, list)
+ }
+
+ this.list = list
+ this.value = value
+
+ if (prev) {
+ prev.next = this
+ this.prev = prev
+ } else {
+ this.prev = null
+ }
+
+ if (next) {
+ next.prev = this
+ this.next = next
+ } else {
+ this.next = null
+ }
+}
+
+try {
+ // add if support for Symbol.iterator is present
+ require('./iterator.js')(Yallist)
+} catch (er) {}
diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json
index bf13242f80..7b45446dc7 100644
--- a/deps/npm/node_modules/cacache/package.json
+++ b/deps/npm/node_modules/cacache/package.json
@@ -1,19 +1,21 @@
{
- "_from": "cacache@11.2.0",
- "_id": "cacache@11.2.0",
+ "_from": "cacache@11.3.2",
+ "_id": "cacache@11.3.2",
"_inBundle": false,
- "_integrity": "sha512-IFWl6lfK6wSeYCHUXh+N1lY72UDrpyrYQJNIVQf48paDuWbv5RbAtJYf/4gUQFObTCHZwdZ5sI8Iw7nqwP6nlQ==",
+ "_integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==",
"_location": "/cacache",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "unique-slug": "2.0.0"
+ },
"_requested": {
"type": "version",
"registry": true,
- "raw": "cacache@11.2.0",
+ "raw": "cacache@11.3.2",
"name": "cacache",
"escapedName": "cacache",
- "rawSpec": "11.2.0",
+ "rawSpec": "11.3.2",
"saveSpec": null,
- "fetchSpec": "11.2.0"
+ "fetchSpec": "11.3.2"
},
"_requiredBy": [
"#USER",
@@ -21,10 +23,10 @@
"/make-fetch-happen",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/cacache/-/cacache-11.2.0.tgz",
- "_shasum": "617bdc0b02844af56310e411c0878941d5739965",
- "_spec": "cacache@11.2.0",
- "_where": "/Users/zkat/Documents/code/work/npm",
+ "_resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz",
+ "_shasum": "2d81e308e3d258ca38125b676b98b2ac9ce69bfa",
+ "_spec": "cacache@11.3.2",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -56,19 +58,19 @@
}
],
"dependencies": {
- "bluebird": "^3.5.1",
- "chownr": "^1.0.1",
- "figgy-pudding": "^3.1.0",
- "glob": "^7.1.2",
- "graceful-fs": "^4.1.11",
- "lru-cache": "^4.1.3",
+ "bluebird": "^3.5.3",
+ "chownr": "^1.1.1",
+ "figgy-pudding": "^3.5.1",
+ "glob": "^7.1.3",
+ "graceful-fs": "^4.1.15",
+ "lru-cache": "^5.1.1",
"mississippi": "^3.0.0",
"mkdirp": "^0.5.1",
"move-concurrently": "^1.0.1",
"promise-inflight": "^1.0.1",
"rimraf": "^2.6.2",
- "ssri": "^6.0.0",
- "unique-filename": "^1.1.0",
+ "ssri": "^6.0.1",
+ "unique-filename": "^1.1.1",
"y18n": "^4.0.0"
},
"deprecated": false,
@@ -81,7 +83,7 @@
"standard": "^11.0.1",
"standard-version": "^4.4.0",
"tacks": "^1.2.7",
- "tap": "^12.0.1",
+ "tap": "^12.1.1",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
@@ -124,5 +126,5 @@
"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": "11.2.0"
+ "version": "11.3.2"
}
diff --git a/deps/npm/node_modules/chownr/chownr.js b/deps/npm/node_modules/chownr/chownr.js
index ecd7b452df..7e63928827 100644
--- a/deps/npm/node_modules/chownr/chownr.js
+++ b/deps/npm/node_modules/chownr/chownr.js
@@ -1,52 +1,88 @@
-module.exports = chownr
-chownr.sync = chownrSync
+'use strict'
+const fs = require('fs')
+const path = require('path')
+
+/* istanbul ignore next */
+const LCHOWN = fs.lchown ? 'lchown' : 'chown'
+/* istanbul ignore next */
+const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
+
+// fs.readdir could only accept an options object as of node v6
+const nodeVersion = process.version
+let readdir = (path, options, cb) => fs.readdir(path, options, cb)
+let readdirSync = (path, options) => fs.readdirSync(path, options)
+/* istanbul ignore next */
+if (/^v4\./.test(nodeVersion))
+ readdir = (path, options, cb) => fs.readdir(path, cb)
+
+const chownrKid = (p, child, uid, gid, cb) => {
+ if (typeof child === 'string')
+ return fs.lstat(path.resolve(p, child), (er, stats) => {
+ if (er)
+ return cb(er)
+ stats.name = child
+ chownrKid(p, stats, uid, gid, cb)
+ })
-var fs = require("fs")
-, path = require("path")
-
-function chownr (p, uid, gid, cb) {
- fs.readdir(p, function (er, children) {
- // any error other than ENOTDIR means it's not readable, or
- // doesn't exist. give up.
- if (er && er.code !== "ENOTDIR") return cb(er)
- if (er || !children.length) return fs.chown(p, uid, gid, cb)
-
- var len = children.length
- , errState = null
- children.forEach(function (child) {
- var pathChild = path.resolve(p, child);
- fs.lstat(pathChild, function(er, stats) {
- if (er)
- return cb(er)
- if (!stats.isSymbolicLink())
- chownr(pathChild, uid, gid, then)
- else
- then()
- })
+ if (child.isDirectory()) {
+ chownr(path.resolve(p, child.name), uid, gid, er => {
+ if (er)
+ return cb(er)
+ fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb)
})
- function then (er) {
+ } else
+ fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb)
+}
+
+
+const chownr = (p, uid, gid, cb) => {
+ readdir(p, { withFileTypes: true }, (er, children) => {
+ // any error other than ENOTDIR or ENOTSUP means it's not readable,
+ // or doesn't exist. give up.
+ if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
+ return cb(er)
+ if (er || !children.length) return fs[LCHOWN](p, uid, gid, cb)
+
+ let len = children.length
+ let errState = null
+ const then = er => {
if (errState) return
if (er) return cb(errState = er)
- if (-- len === 0) return fs.chown(p, uid, gid, cb)
+ if (-- len === 0) return fs[LCHOWN](p, uid, gid, cb)
}
+
+ children.forEach(child => chownrKid(p, child, uid, gid, then))
})
}
-function chownrSync (p, uid, gid) {
- var children
+const chownrKidSync = (p, child, uid, gid) => {
+ if (typeof child === 'string') {
+ const stats = fs.lstatSync(path.resolve(p, child))
+ stats.name = child
+ child = stats
+ }
+
+ if (child.isDirectory())
+ chownrSync(path.resolve(p, child.name), uid, gid)
+
+ fs[LCHOWNSYNC](path.resolve(p, child.name), uid, gid)
+}
+
+const chownrSync = (p, uid, gid) => {
+ let children
try {
- children = fs.readdirSync(p)
+ children = readdirSync(p, { withFileTypes: true })
} catch (er) {
- if (er && er.code === "ENOTDIR") return fs.chownSync(p, uid, gid)
+ if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP')
+ return fs[LCHOWNSYNC](p, uid, gid)
throw er
}
- if (!children.length) return fs.chownSync(p, uid, gid)
- children.forEach(function (child) {
- var pathChild = path.resolve(p, child)
- var stats = fs.lstatSync(pathChild)
- if (!stats.isSymbolicLink())
- chownrSync(pathChild, uid, gid)
- })
- return fs.chownSync(p, uid, gid)
+ if (children.length)
+ children.forEach(child => chownrKidSync(p, child, uid, gid))
+
+ return fs[LCHOWNSYNC](p, uid, gid)
}
+
+module.exports = chownr
+chownr.sync = chownrSync
diff --git a/deps/npm/node_modules/chownr/package.json b/deps/npm/node_modules/chownr/package.json
index f9a67c8243..0004fa0e1e 100644
--- a/deps/npm/node_modules/chownr/package.json
+++ b/deps/npm/node_modules/chownr/package.json
@@ -1,36 +1,28 @@
{
- "_args": [
- [
- "chownr@1.0.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "chownr@1.0.1",
- "_id": "chownr@1.0.1",
+ "_from": "chownr@1.1.1",
+ "_id": "chownr@1.1.1",
"_inBundle": false,
- "_integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=",
+ "_integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
"_location": "/chownr",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "chownr@1.0.1",
+ "raw": "chownr@1.1.1",
"name": "chownr",
"escapedName": "chownr",
- "rawSpec": "1.0.1",
+ "rawSpec": "1.1.1",
"saveSpec": null,
- "fetchSpec": "1.0.1"
+ "fetchSpec": "1.1.1"
},
"_requiredBy": [
- "/",
- "/cacache",
- "/npm-profile/cacache",
- "/npm-registry-fetch/cacache",
- "/tar"
+ "#USER",
+ "/"
],
- "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz",
- "_spec": "1.0.1",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
+ "_shasum": "54726b8b8fff4df053c42187e801fb4412df1494",
+ "_spec": "chownr@1.1.1",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -39,11 +31,13 @@
"bugs": {
"url": "https://github.com/isaacs/chownr/issues"
},
+ "bundleDependencies": false,
+ "deprecated": false,
"description": "like `chown -R`",
"devDependencies": {
"mkdirp": "0.3",
"rimraf": "",
- "tap": "^1.2.0"
+ "tap": "^12.0.1"
},
"files": [
"chownr.js"
@@ -57,7 +51,10 @@
"url": "git://github.com/isaacs/chownr.git"
},
"scripts": {
- "test": "tap test/*.js"
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --cov"
},
- "version": "1.0.1"
+ "version": "1.1.1"
}
diff --git a/deps/npm/node_modules/ci-info/CHANGELOG.md b/deps/npm/node_modules/ci-info/CHANGELOG.md
index 859a0ad12a..66b9cf0b28 100644
--- a/deps/npm/node_modules/ci-info/CHANGELOG.md
+++ b/deps/npm/node_modules/ci-info/CHANGELOG.md
@@ -1,5 +1,21 @@
# Changelog
+## v2.0.0
+
+Breaking changes:
+
+* Drop support for Node.js end-of-life versions: 0.10, 0.12, 4, 5, 7,
+ and 9
+* Team Foundation Server will now be detected as Azure Pipelines. The
+ constant `ci.TFS` no longer exists - use `ci.AZURE_PIPELINES` instead
+* Remove deprecated `ci.TDDIUM` constant - use `ci.SOLANDO` instead
+
+New features:
+
+* feat: support Azure Pipelines ([#23](https://github.com/watson/ci-info/pull/23))
+* feat: support Netlify CI ([#26](https://github.com/watson/ci-info/pull/26))
+* feat: support Bitbucket pipelines PR detection ([#27](https://github.com/watson/ci-info/pull/27))
+
## v1.6.0
* feat: add Sail CI support
diff --git a/deps/npm/node_modules/ci-info/README.md b/deps/npm/node_modules/ci-info/README.md
index c88be8f82d..12c4f62175 100644
--- a/deps/npm/node_modules/ci-info/README.md
+++ b/deps/npm/node_modules/ci-info/README.md
@@ -32,41 +32,42 @@ if (ci.isCI) {
Officially supported CI servers:
-| Name | Constant |
-|------|----------|
-| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` |
-| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` |
-| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` |
-| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` |
-| [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` |
-| [Buddy](https://buddy.works/) | `ci.BUDDY` |
-| [Buildkite](https://buildkite.com) | `ci.BUILDKITE` |
-| [CircleCI](http://circleci.com) | `ci.CIRCLE` |
-| [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` |
-| [Codeship](https://codeship.com) | `ci.CODESHIP` |
-| [Drone](https://drone.io) | `ci.DRONE` |
-| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` |
-| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` |
-| [GoCD](https://www.go.cd/) | `ci.GOCD` |
-| [Hudson](http://hudson-ci.org) | `ci.HUDSON` |
-| [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` |
-| [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` |
-| [Sail CI](https://sail.ci/) | `ci.SAIL` |
-| [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` |
-| [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` |
-| [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` |
-| [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` |
-| [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` |
-| [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx) by Microsoft | `ci.TFS` |
-| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` |
-| [Travis CI](http://travis-ci.org) | `ci.TRAVIS` |
+| Name | Constant | isPR |
+|------|----------|------|
+| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` | 🚫 |
+| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` | ✅ |
+| [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) | `ci.AZURE_PIPELINES` | ✅ |
+| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` | 🚫 |
+| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` | ✅ |
+| [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` | ✅ |
+| [Buddy](https://buddy.works/) | `ci.BUDDY` | ✅ |
+| [Buildkite](https://buildkite.com) | `ci.BUILDKITE` | ✅ |
+| [CircleCI](http://circleci.com) | `ci.CIRCLE` | ✅ |
+| [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` | ✅ |
+| [Codeship](https://codeship.com) | `ci.CODESHIP` | 🚫 |
+| [Drone](https://drone.io) | `ci.DRONE` | ✅ |
+| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` | 🚫 |
+| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` | 🚫 |
+| [GoCD](https://www.go.cd/) | `ci.GOCD` | 🚫 |
+| [Hudson](http://hudson-ci.org) | `ci.HUDSON` | 🚫 |
+| [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` | ✅ |
+| [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` | 🚫 |
+| [Netlify CI](https://www.netlify.com/) | `ci.NETLIFY` | ✅ |
+| [Sail CI](https://sail.ci/) | `ci.SAIL` | ✅ |
+| [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` | ✅ |
+| [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` | ✅ |
+| [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` | ✅ |
+| [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` | 🚫 |
+| [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` | 🚫 |
+| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` | 🚫 |
+| [Travis CI](http://travis-ci.org) | `ci.TRAVIS` | ✅ |
## API
### `ci.name`
-A string. Will contain the name of the CI server the code is running on.
-If not CI server is detected, it will be `null`.
+Returns a string containing name of the CI server the code is running on.
+If CI server is not detected, it returns `null`.
Don't depend on the value of this string not to change for a specific
vendor. If you find your self writing `ci.name === 'Travis CI'`, you
@@ -74,8 +75,8 @@ most likely want to use `ci.TRAVIS` instead.
### `ci.isCI`
-A boolean. Will be `true` if the code is running on a CI server.
-Otherwise `false`.
+Returns a boolean. Will be `true` if the code is running on a CI server,
+otherwise `false`.
Some CI servers not listed here might still trigger the `ci.isCI`
boolean to be set to `true` if they use certain vendor neutral
@@ -84,15 +85,15 @@ vendor specific boolean will be set to `true`.
### `ci.isPR`
-A boolean if PR detection is supported for the current CI server. Will
-be `true` if a PR is being tested. Otherwise `false`. If PR detection is
+Returns a boolean if PR detection is supported for the current CI server. Will
+be `true` if a PR is being tested, otherwise `false`. If PR detection is
not supported for the current CI server, the value will be `null`.
### `ci.<VENDOR-CONSTANT>`
-A vendor specific boolean constants is exposed for each support CI
+A vendor specific boolean constant is exposed for each support CI
vendor. A constant will be `true` if the code is determined to run on
-the given CI server. Otherwise `false`.
+the given CI server, otherwise `false`.
Examples of vendor constants are `ci.TRAVIS` or `ci.APPVEYOR`. For a
complete list, see the support table above.
diff --git a/deps/npm/node_modules/ci-info/index.js b/deps/npm/node_modules/ci-info/index.js
index 27794d49b3..9928fee9d3 100644
--- a/deps/npm/node_modules/ci-info/index.js
+++ b/deps/npm/node_modules/ci-info/index.js
@@ -4,7 +4,7 @@ var vendors = require('./vendors.json')
var env = process.env
-// Used for testinging only
+// Used for testing only
Object.defineProperty(exports, '_vendors', {
value: vendors.map(function (v) { return v.constant })
})
diff --git a/deps/npm/node_modules/ci-info/package.json b/deps/npm/node_modules/ci-info/package.json
index ac37a5fcc8..16e90c59a8 100644
--- a/deps/npm/node_modules/ci-info/package.json
+++ b/deps/npm/node_modules/ci-info/package.json
@@ -1,29 +1,28 @@
{
- "_from": "ci-info@1.6.0",
- "_id": "ci-info@1.6.0",
+ "_from": "ci-info@2.0.0",
+ "_id": "ci-info@2.0.0",
"_inBundle": false,
- "_integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==",
+ "_integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
"_location": "/ci-info",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "ci-info@1.6.0",
+ "raw": "ci-info@2.0.0",
"name": "ci-info",
"escapedName": "ci-info",
- "rawSpec": "1.6.0",
+ "rawSpec": "2.0.0",
"saveSpec": null,
- "fetchSpec": "1.6.0"
+ "fetchSpec": "2.0.0"
},
"_requiredBy": [
"#USER",
- "/",
- "/is-ci"
+ "/"
],
- "_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
- "_shasum": "2ca20dbb9ceb32d4524a683303313f0304b1e497",
- "_spec": "ci-info@1.6.0",
- "_where": "/Users/zkat/Documents/code/work/npm",
+ "_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
+ "_shasum": "67a9e964be31a51e15e5010d58e6f12834002f46",
+ "_spec": "ci-info@2.0.0",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Thomas Watson Steen",
"email": "w@tson.dk",
@@ -34,8 +33,8 @@
},
"bundleDependencies": false,
"coordinates": [
- 55.778271,
- 12.593091
+ 55.778231,
+ 12.593179
],
"dependencies": {},
"deprecated": false,
@@ -63,5 +62,5 @@
"scripts": {
"test": "standard && node test.js"
},
- "version": "1.6.0"
+ "version": "2.0.0"
}
diff --git a/deps/npm/node_modules/ci-info/vendors.json b/deps/npm/node_modules/ci-info/vendors.json
index a157b78cea..266a724ab2 100644
--- a/deps/npm/node_modules/ci-info/vendors.json
+++ b/deps/npm/node_modules/ci-info/vendors.json
@@ -6,6 +6,12 @@
"pr": "APPVEYOR_PULL_REQUEST_NUMBER"
},
{
+ "name": "Azure Pipelines",
+ "constant": "AZURE_PIPELINES",
+ "env": "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",
+ "pr": "SYSTEM_PULLREQUEST_PULLREQUESTID"
+ },
+ {
"name": "Bamboo",
"constant": "BAMBOO",
"env": "bamboo_planKey"
@@ -13,7 +19,8 @@
{
"name": "Bitbucket Pipelines",
"constant": "BITBUCKET",
- "env": "BITBUCKET_COMMIT"
+ "env": "BITBUCKET_COMMIT",
+ "pr": "BITBUCKET_PR_ID"
},
{
"name": "Bitrise",
@@ -93,6 +100,12 @@
"env": "MAGNUM"
},
{
+ "name": "Netlify CI",
+ "constant": "NETLIFY",
+ "env": "NETLIFY_BUILD_BASE",
+ "pr": { "env": "PULL_REQUEST", "ne": "false" }
+ },
+ {
"name": "Sail CI",
"constant": "SAIL",
"env": "SAILCI",
@@ -127,23 +140,11 @@
"env": ["TASK_ID", "RUN_ID"]
},
{
- "name": "Solano CI",
- "constant": "TDDIUM",
- "env": "TDDIUM",
- "pr": "TDDIUM_PR_ID",
- "deprecated": true
- },
- {
"name": "TeamCity",
"constant": "TEAMCITY",
"env": "TEAMCITY_VERSION"
},
{
- "name": "Team Foundation Server",
- "constant": "TFS",
- "env": "TF_BUILD"
- },
- {
"name": "Travis CI",
"constant": "TRAVIS",
"env": "TRAVIS",
diff --git a/deps/npm/node_modules/cidr-regex/index.js b/deps/npm/node_modules/cidr-regex/index.js
index 190cefa7bf..f141ce14ad 100644
--- a/deps/npm/node_modules/cidr-regex/index.js
+++ b/deps/npm/node_modules/cidr-regex/index.js
@@ -5,9 +5,9 @@ const ipRegex = require("ip-regex");
const v4 = ipRegex.v4().source + "\\/(3[0-2]|[12]?[0-9])";
const v6 = ipRegex.v6().source + "\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])";
-const ip = module.exports = opts => opts && opts.exact ?
+const cidr = module.exports = opts => opts && opts.exact ?
new RegExp(`(?:^${v4}$)|(?:^${v6}$)`) :
new RegExp(`(?:${v4})|(?:${v6})`, "g");
-ip.v4 = opts => opts && opts.exact ? new RegExp(`^${v4}$`) : new RegExp(v4, "g");
-ip.v6 = opts => opts && opts.exact ? new RegExp(`^${v6}$`) : new RegExp(v6, "g");
+cidr.v4 = opts => opts && opts.exact ? new RegExp(`^${v4}$`) : new RegExp(v4, "g");
+cidr.v6 = opts => opts && opts.exact ? new RegExp(`^${v6}$`) : new RegExp(v6, "g");
diff --git a/deps/npm/node_modules/cidr-regex/package.json b/deps/npm/node_modules/cidr-regex/package.json
index 3aa8b4032c..4dd1196c17 100644
--- a/deps/npm/node_modules/cidr-regex/package.json
+++ b/deps/npm/node_modules/cidr-regex/package.json
@@ -1,32 +1,27 @@
{
- "_args": [
- [
- "cidr-regex@2.0.9",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "cidr-regex@2.0.9",
- "_id": "cidr-regex@2.0.9",
+ "_from": "cidr-regex@^2.0.10",
+ "_id": "cidr-regex@2.0.10",
"_inBundle": false,
- "_integrity": "sha512-F7/fBRUU45FnvSPjXdpIrc++WRSBdCiSTlyq4ZNhLKOlHFNWgtzZ0Fd+zrqI/J1j0wmlx/f5ZQDmD2GcbrNcmw==",
+ "_integrity": "sha512-sB3ogMQXWvreNPbJUZMRApxuRYd+KoIo4RGQ81VatjmMW6WJPo+IJZ2846FGItr9VzKo5w7DXzijPLGtSd0N3Q==",
"_location": "/cidr-regex",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "cidr-regex@2.0.9",
+ "raw": "cidr-regex@^2.0.10",
"name": "cidr-regex",
"escapedName": "cidr-regex",
- "rawSpec": "2.0.9",
+ "rawSpec": "^2.0.10",
"saveSpec": null,
- "fetchSpec": "2.0.9"
+ "fetchSpec": "^2.0.10"
},
"_requiredBy": [
"/is-cidr"
],
- "_resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-2.0.9.tgz",
- "_spec": "2.0.9",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-2.0.10.tgz",
+ "_shasum": "af13878bd4ad704de77d6dc800799358b3afa70d",
+ "_spec": "cidr-regex@^2.0.10",
+ "_where": "/Users/aeschright/code/cli/node_modules/is-cidr",
"author": {
"name": "silverwind",
"email": "me@silverwind.io"
@@ -34,6 +29,7 @@
"bugs": {
"url": "https://github.com/silverwind/cidr-regex/issues"
},
+ "bundleDependencies": false,
"contributors": [
{
"name": "Felipe Apostol",
@@ -44,12 +40,13 @@
"dependencies": {
"ip-regex": "^2.1.0"
},
+ "deprecated": false,
"description": "Regular expression for matching IP addresses in CIDR notation",
"devDependencies": {
- "ava": "^0.25.0",
- "eslint": "^4.19.1",
- "eslint-config-silverwind": "^1.0.42",
- "updates": "^3.0.0"
+ "eslint": "^5.6.0",
+ "eslint-config-silverwind": "^2.0.9",
+ "updates": "^4.3.0",
+ "ver": "^2.0.1"
},
"engines": {
"node": ">=4"
@@ -77,5 +74,5 @@
"scripts": {
"test": "make test"
},
- "version": "2.0.9"
+ "version": "2.0.10"
}
diff --git a/deps/npm/node_modules/cli-table3/CHANGELOG.md b/deps/npm/node_modules/cli-table3/CHANGELOG.md
index 62eb485bdf..3f6ba35f83 100644
--- a/deps/npm/node_modules/cli-table3/CHANGELOG.md
+++ b/deps/npm/node_modules/cli-table3/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## v0.5.1 (2018-07-19)
+
+#### :rocket: Enhancement
+* [#21](https://github.com/cli-table/cli-table3/pull/21) Import type definition from `@types/cli-table2` ([@Turbo87](https://github.com/Turbo87))
+
+#### Committers: 1
+- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))
+
+
## v0.5.0 (2018-06-11)
#### :boom: Breaking Change
@@ -18,10 +27,9 @@
* [#3](https://github.com/cli-table/cli-table3/pull/3) Add `yarn.lock` file. ([@Turbo87](https://github.com/Turbo87))
* [#1](https://github.com/cli-table/cli-table3/pull/1) Skip broken test. ([@Turbo87](https://github.com/Turbo87))
-#### Committers: 3
+#### Committers: 2
- Daniel Ruf ([DanielRuf](https://github.com/DanielRuf))
- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))
-- [dependabot[bot]](https://github.com/apps/dependabot)
## v0.4.0 (2018-06-10)
diff --git a/deps/npm/node_modules/cli-table3/index.d.ts b/deps/npm/node_modules/cli-table3/index.d.ts
new file mode 100644
index 0000000000..bdf17e270e
--- /dev/null
+++ b/deps/npm/node_modules/cli-table3/index.d.ts
@@ -0,0 +1,95 @@
+declare namespace CliTable3 {
+ type CharName =
+ "top" |
+ "top-mid" |
+ "top-left" |
+ "top-right" |
+ "bottom" |
+ "bottom-mid" |
+ "bottom-left" |
+ "bottom-right" |
+ "left" |
+ "left-mid" |
+ "mid" |
+ "mid-mid" |
+ "right" |
+ "right-mid" |
+ "middle";
+
+ type HorizontalAlignment = "left" | "center" | "right";
+ type VerticalAlignment = "top" | "center" | "bottom";
+
+ interface TableOptions {
+ truncate: string;
+ colWidths: Array<number | null>;
+ rowHeights: Array<number | null>;
+ colAligns: HorizontalAlignment[];
+ rowAligns: VerticalAlignment[];
+ head: string[];
+ wordWrap: boolean;
+ }
+
+ interface TableInstanceOptions extends TableOptions {
+ chars: Record<CharName, string>;
+ style: {
+ "padding-left": number;
+ "padding-right": number;
+ head: string[];
+ border: string[];
+ compact: boolean;
+ };
+ }
+
+ interface TableConstructorOptions extends Partial<TableOptions> {
+ chars?: Partial<Record<CharName, string>>;
+ style?: Partial<TableInstanceOptions["style"]>;
+ }
+
+ type CellValue = boolean | number | string | null | undefined;
+
+ interface CellOptions {
+ content: CellValue;
+ chars?: Partial<Record<CharName, string>>;
+ truncate?: string;
+ colSpan?: number;
+ rowSpan?: number;
+ hAlign?: HorizontalAlignment;
+ vAlign?: VerticalAlignment;
+ style?: {
+ "padding-left"?: number;
+ "padding-right"?: number;
+ head?: string[];
+ border?: string[];
+ };
+ }
+
+ interface GenericTable<T> extends Array<T> {
+ options: TableInstanceOptions;
+ readonly width: number;
+ }
+
+ type Table = HorizontalTable | VerticalTable | CrossTable;
+ type Cell = CellValue | CellOptions;
+
+ type HorizontalTable = GenericTable<HorizontalTableRow>;
+ type HorizontalTableRow = Cell[];
+
+ type VerticalTable = GenericTable<VerticalTableRow>;
+ interface VerticalTableRow {
+ [name: string]: Cell;
+ }
+
+ type CrossTable = GenericTable<CrossTableRow>;
+ interface CrossTableRow {
+ [name: string]: Cell[];
+ }
+}
+
+interface CliTable3 {
+ new (options?: CliTable3.TableConstructorOptions): CliTable3.Table;
+ readonly prototype: CliTable3.Table;
+}
+
+declare const CliTable3: CliTable3;
+
+export = CliTable3;
diff --git a/deps/npm/node_modules/cli-table3/package.json b/deps/npm/node_modules/cli-table3/package.json
index d0545c93f7..6ee81dc3f1 100644
--- a/deps/npm/node_modules/cli-table3/package.json
+++ b/deps/npm/node_modules/cli-table3/package.json
@@ -1,28 +1,29 @@
{
- "_from": "cli-table3",
- "_id": "cli-table3@0.5.0",
+ "_from": "cli-table3@0.5.1",
+ "_id": "cli-table3@0.5.1",
"_inBundle": false,
- "_integrity": "sha512-c7YHpUyO1SaKaO7kYtxd5NZ8FjAmSK3LpKkuzdwn+2CwpFxBpdoQLm+OAnnCfoEl7onKhN9PKQi1lsHuAIUqGQ==",
+ "_integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==",
"_location": "/cli-table3",
"_phantomChildren": {},
"_requested": {
- "type": "tag",
+ "type": "version",
"registry": true,
- "raw": "cli-table3",
+ "raw": "cli-table3@0.5.1",
"name": "cli-table3",
"escapedName": "cli-table3",
- "rawSpec": "",
+ "rawSpec": "0.5.1",
"saveSpec": null,
- "fetchSpec": "latest"
+ "fetchSpec": "0.5.1"
},
"_requiredBy": [
"#USER",
- "/"
+ "/",
+ "/npm-audit-report"
],
- "_resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.0.tgz",
- "_shasum": "adb2f025715f4466e67629783c8d73e9030eb4bd",
- "_spec": "cli-table3",
- "_where": "/Users/zkat/Documents/code/work/npm",
+ "_resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz",
+ "_shasum": "0252372d94dfc40dbd8df06005f48f31f656f202",
+ "_spec": "cli-table3@0.5.1",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "James Talmage"
},
@@ -54,8 +55,8 @@
"eslint-plugin-prettier": "^2.6.0",
"jest": "^23.1.0",
"jest-runner-eslint": "^0.6.0",
- "lerna-changelog": "^0.7.0",
- "prettier": "1.13.5"
+ "lerna-changelog": "^0.8.0",
+ "prettier": "1.13.7"
},
"directories": {
"test": "test"
@@ -65,6 +66,7 @@
},
"files": [
"src/",
+ "index.d.ts",
"index.js"
],
"homepage": "https://github.com/cli-table/cli-table3",
@@ -124,5 +126,6 @@
"test": "jest --color",
"test:watch": "jest --color --watchAll --notify"
},
- "version": "0.5.0"
+ "types": "index.d.ts",
+ "version": "0.5.1"
}
diff --git a/deps/npm/node_modules/colors/LICENSE b/deps/npm/node_modules/colors/LICENSE
index 3de4e33b48..17880ff029 100644
--- a/deps/npm/node_modules/colors/LICENSE
+++ b/deps/npm/node_modules/colors/LICENSE
@@ -1,3 +1,5 @@
+MIT License
+
Original Library
- Copyright (c) Marak Squires
@@ -20,4 +22,4 @@ 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
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/colors/README.md b/deps/npm/node_modules/colors/README.md
index 7f12859636..c0550bdd52 100644
--- a/deps/npm/node_modules/colors/README.md
+++ b/deps/npm/node_modules/colors/README.md
@@ -1,4 +1,10 @@
-# colors.js [![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js)
+# colors.js
+[![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js)
+[![version](https://img.shields.io/npm/v/colors.svg)](https://www.npmjs.org/package/colors)
+[![dependencies](https://david-dm.org/Marak/colors.js.svg)](https://david-dm.org/Marak/colors.js)
+[![devDependencies](https://david-dm.org/Marak/colors.js/dev-status.svg)](https://david-dm.org/Marak/colors.js#info=devDependencies)
+
+Please check out the [roadmap](ROADMAP.md) for upcoming features and releases. Please open Issues to provide feedback, and check the `develop` branch for the latest bleeding-edge updates.
## get color and style in your node.js console
@@ -163,7 +169,7 @@ console.log(colors.warn("this is a warning"));
```
-You can also combine them:
+### Combining Colors
```javascript
var colors = require('colors');
diff --git a/deps/npm/node_modules/colors/examples/normal-usage.js b/deps/npm/node_modules/colors/examples/normal-usage.js
index 2818741e1f..cc8d05ff4f 100644
--- a/deps/npm/node_modules/colors/examples/normal-usage.js
+++ b/deps/npm/node_modules/colors/examples/normal-usage.js
@@ -1,34 +1,36 @@
var colors = require('../lib/index');
-console.log("First some yellow text".yellow);
+console.log('First some yellow text'.yellow);
-console.log("Underline that text".yellow.underline);
+console.log('Underline that text'.yellow.underline);
-console.log("Make it bold and red".red.bold);
+console.log('Make it bold and red'.red.bold);
-console.log(("Double Raindows All Day Long").rainbow)
+console.log(('Double Raindows All Day Long').rainbow);
-console.log("Drop the bass".trap)
+console.log('Drop the bass'.trap);
-console.log("DROP THE RAINBOW BASS".trap.rainbow)
+console.log('DROP THE RAINBOW BASS'.trap.rainbow);
+// styles not widely supported
+console.log('Chains are also cool.'.bold.italic.underline.red);
-console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
-
-console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse + ' styles! '.yellow.bold); // styles not widely supported
-console.log("Zebras are so fun!".zebra);
+// styles not widely supported
+console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse
+ + ' styles! '.yellow.bold);
+console.log('Zebras are so fun!'.zebra);
//
// Remark: .strikethrough may not work with Mac OS Terminal App
//
-console.log("This is " + "not".strikethrough + " fun.");
+console.log('This is ' + 'not'.strikethrough + ' fun.');
-console.log('Background color attack!'.black.bgWhite)
-console.log('Use random styles on everything!'.random)
-console.log('America, Heck Yeah!'.america)
+console.log('Background color attack!'.black.bgWhite);
+console.log('Use random styles on everything!'.random);
+console.log('America, Heck Yeah!'.america);
-console.log('Setting themes is useful')
+console.log('Setting themes is useful');
//
// Custom themes
@@ -45,30 +47,35 @@ colors.setTheme({
help: 'cyan',
warn: 'yellow',
debug: 'blue',
- error: 'red'
+ error: 'red',
});
// outputs red text
-console.log("this is an error".error);
+console.log('this is an error'.error);
// outputs yellow text
-console.log("this is a warning".warn);
+console.log('this is a warning'.warn);
// outputs grey text
-console.log("this is an input".input);
+console.log('this is an input'.input);
console.log('Generic logging theme as file'.green.bold.underline);
// Load a theme from file
-colors.setTheme(__dirname + '/../themes/generic-logging.js');
+try {
+ colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));
+} catch (err) {
+ console.log(err);
+}
// outputs red text
-console.log("this is an error".error);
+console.log('this is an error'.error);
// outputs yellow text
-console.log("this is a warning".warn);
+console.log('this is a warning'.warn);
// outputs grey text
-console.log("this is an input".input);
+console.log('this is an input'.input);
+
+// console.log("Don't summon".zalgo)
-//console.log("Don't summon".zalgo) \ No newline at end of file
diff --git a/deps/npm/node_modules/colors/examples/safe-string.js b/deps/npm/node_modules/colors/examples/safe-string.js
index 47e5633afe..bd22f2ff4f 100644
--- a/deps/npm/node_modules/colors/examples/safe-string.js
+++ b/deps/npm/node_modules/colors/examples/safe-string.js
@@ -1,41 +1,43 @@
var colors = require('../safe');
-console.log(colors.yellow("First some yellow text"));
+console.log(colors.yellow('First some yellow text'));
-console.log(colors.yellow.underline("Underline that text"));
+console.log(colors.yellow.underline('Underline that text'));
-console.log(colors.red.bold("Make it bold and red"));
+console.log(colors.red.bold('Make it bold and red'));
-console.log(colors.rainbow("Double Raindows All Day Long"))
+console.log(colors.rainbow('Double Raindows All Day Long'));
-console.log(colors.trap("Drop the bass"))
+console.log(colors.trap('Drop the bass'));
-console.log(colors.rainbow(colors.trap("DROP THE RAINBOW BASS")));
+console.log(colors.rainbow(colors.trap('DROP THE RAINBOW BASS')));
-console.log(colors.bold.italic.underline.red('Chains are also cool.')); // styles not widely supported
+// styles not widely supported
+console.log(colors.bold.italic.underline.red('Chains are also cool.'));
+// styles not widely supported
+console.log(colors.green('So ') + colors.underline('are') + ' '
+ + colors.inverse('inverse') + colors.yellow.bold(' styles! '));
-console.log(colors.green('So ') + colors.underline('are') + ' ' + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); // styles not widely supported
+console.log(colors.zebra('Zebras are so fun!'));
-console.log(colors.zebra("Zebras are so fun!"));
-
-console.log("This is " + colors.strikethrough("not") + " fun.");
+console.log('This is ' + colors.strikethrough('not') + ' fun.');
console.log(colors.black.bgWhite('Background color attack!'));
-console.log(colors.random('Use random styles on everything!'))
+console.log(colors.random('Use random styles on everything!'));
console.log(colors.america('America, Heck Yeah!'));
-console.log('Setting themes is useful')
+console.log('Setting themes is useful');
//
// Custom themes
//
-//console.log('Generic logging theme as JSON'.green.bold.underline);
+// console.log('Generic logging theme as JSON'.green.bold.underline);
// Load theme with JSON literal
colors.setTheme({
silly: 'rainbow',
- input: 'grey',
+ input: 'blue',
verbose: 'cyan',
prompt: 'grey',
info: 'green',
@@ -43,31 +45,31 @@ colors.setTheme({
help: 'cyan',
warn: 'yellow',
debug: 'blue',
- error: 'red'
+ error: 'red',
});
// outputs red text
-console.log(colors.error("this is an error"));
+console.log(colors.error('this is an error'));
// outputs yellow text
-console.log(colors.warn("this is a warning"));
+console.log(colors.warn('this is a warning'));
-// outputs grey text
-console.log(colors.input("this is an input"));
+// outputs blue text
+console.log(colors.input('this is an input'));
// console.log('Generic logging theme as file'.green.bold.underline);
// Load a theme from file
-colors.setTheme(__dirname + '/../themes/generic-logging.js');
+colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));
// outputs red text
-console.log(colors.error("this is an error"));
+console.log(colors.error('this is an error'));
// outputs yellow text
-console.log(colors.warn("this is a warning"));
+console.log(colors.warn('this is a warning'));
// outputs grey text
-console.log(colors.input("this is an input"));
+console.log(colors.input('this is an input'));
// console.log(colors.zalgo("Don't summon him"))
diff --git a/deps/npm/node_modules/colors/index.d.ts b/deps/npm/node_modules/colors/index.d.ts
new file mode 100644
index 0000000000..baa7068653
--- /dev/null
+++ b/deps/npm/node_modules/colors/index.d.ts
@@ -0,0 +1,136 @@
+// Type definitions for Colors.js 1.2
+// Project: https://github.com/Marak/colors.js
+// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke>
+// Definitions: https://github.com/Marak/colors.js
+
+export interface Color {
+ (text: string): string;
+
+ strip: Color;
+ stripColors: Color;
+
+ black: Color;
+ red: Color;
+ green: Color;
+ yellow: Color;
+ blue: Color;
+ magenta: Color;
+ cyan: Color;
+ white: Color;
+ gray: Color;
+ grey: Color;
+
+ bgBlack: Color;
+ bgRed: Color;
+ bgGreen: Color;
+ bgYellow: Color;
+ bgBlue: Color;
+ bgMagenta: Color;
+ bgCyan: Color;
+ bgWhite: Color;
+
+ reset: Color;
+ bold: Color;
+ dim: Color;
+ italic: Color;
+ underline: Color;
+ inverse: Color;
+ hidden: Color;
+ strikethrough: Color;
+
+ rainbow: Color;
+ zebra: Color;
+ america: Color;
+ trap: Color;
+ random: Color;
+ zalgo: Color;
+}
+
+export function enable(): void;
+export function disable(): void;
+export function setTheme(theme: any): void;
+
+export let enabled: boolean;
+
+export const strip: Color;
+export const stripColors: Color;
+
+export const black: Color;
+export const red: Color;
+export const green: Color;
+export const yellow: Color;
+export const blue: Color;
+export const magenta: Color;
+export const cyan: Color;
+export const white: Color;
+export const gray: Color;
+export const grey: Color;
+
+export const bgBlack: Color;
+export const bgRed: Color;
+export const bgGreen: Color;
+export const bgYellow: Color;
+export const bgBlue: Color;
+export const bgMagenta: Color;
+export const bgCyan: Color;
+export const bgWhite: Color;
+
+export const reset: Color;
+export const bold: Color;
+export const dim: Color;
+export const italic: Color;
+export const underline: Color;
+export const inverse: Color;
+export const hidden: Color;
+export const strikethrough: Color;
+
+export const rainbow: Color;
+export const zebra: Color;
+export const america: Color;
+export const trap: Color;
+export const random: Color;
+export const zalgo: Color;
+
+declare global {
+ interface String {
+ strip: string;
+ stripColors: string;
+
+ black: string;
+ red: string;
+ green: string;
+ yellow: string;
+ blue: string;
+ magenta: string;
+ cyan: string;
+ white: string;
+ gray: string;
+ grey: string;
+
+ bgBlack: string;
+ bgRed: string;
+ bgGreen: string;
+ bgYellow: string;
+ bgBlue: string;
+ bgMagenta: string;
+ bgCyan: string;
+ bgWhite: string;
+
+ reset: string;
+ // @ts-ignore
+ bold: string;
+ dim: string;
+ italic: string;
+ underline: string;
+ inverse: string;
+ hidden: string;
+ strikethrough: string;
+
+ rainbow: string;
+ zebra: string;
+ america: string;
+ trap: string;
+ random: string;
+ zalgo: string;
+ }
+}
diff --git a/deps/npm/node_modules/colors/lib/colors.js b/deps/npm/node_modules/colors/lib/colors.js
index 823e3ddd0d..7ca90fa903 100644
--- a/deps/npm/node_modules/colors/lib/colors.js
+++ b/deps/npm/node_modules/colors/lib/colors.js
@@ -33,35 +33,45 @@ module['exports'] = colors;
colors.themes = {};
+var util = require('util');
var ansiStyles = colors.styles = require('./styles');
var defineProps = Object.defineProperties;
+var newLineRegex = new RegExp(/[\r\n]+/g);
-colors.supportsColor = require('./system/supports-colors');
+colors.supportsColor = require('./system/supports-colors').supportsColor;
-if (typeof colors.enabled === "undefined") {
- colors.enabled = colors.supportsColor;
+if (typeof colors.enabled === 'undefined') {
+ colors.enabled = colors.supportsColor() !== false;
}
-colors.stripColors = colors.strip = function(str){
- return ("" + str).replace(/\x1B\[\d+m/g, '');
+colors.enable = function() {
+ colors.enabled = true;
};
+colors.disable = function() {
+ colors.enabled = false;
+};
+
+colors.stripColors = colors.strip = function(str) {
+ return ('' + str).replace(/\x1B\[\d+m/g, '');
+};
-var stylize = colors.stylize = function stylize (str, style) {
+// eslint-disable-next-line no-unused-vars
+var stylize = colors.stylize = function stylize(str, style) {
if (!colors.enabled) {
return str+'';
}
return ansiStyles[style].open + str + ansiStyles[style].close;
-}
+};
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
-var escapeStringRegexp = function (str) {
+var escapeStringRegexp = function(str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
- return str.replace(matchOperatorsRe, '\\$&');
-}
+ return str.replace(matchOperatorsRe, '\\$&');
+};
function build(_styles) {
var builder = function builder() {
@@ -74,15 +84,16 @@ function build(_styles) {
return builder;
}
-var styles = (function () {
+var styles = (function() {
var ret = {};
ansiStyles.grey = ansiStyles.gray;
- Object.keys(ansiStyles).forEach(function (key) {
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+ Object.keys(ansiStyles).forEach(function(key) {
+ ansiStyles[key].closeRe =
+ new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
ret[key] = {
- get: function () {
+ get: function() {
return build(this._styles.concat(key));
- }
+ },
};
});
return ret;
@@ -91,78 +102,81 @@ var styles = (function () {
var proto = defineProps(function colors() {}, styles);
function applyStyle() {
- var args = arguments;
- var argsLen = args.length;
- var str = argsLen !== 0 && String(arguments[0]);
- if (argsLen > 1) {
- for (var a = 1; a < argsLen; a++) {
- str += ' ' + args[a];
+ var args = Array.prototype.slice.call(arguments);
+
+ var str = args.map(function(arg) {
+ if (arg !== undefined && arg.constructor === String) {
+ return arg;
+ } else {
+ return util.inspect(arg);
}
- }
+ }).join(' ');
if (!colors.enabled || !str) {
return str;
}
+ var newLinesPresent = str.indexOf('\n') != -1;
+
var nestedStyles = this._styles;
var i = nestedStyles.length;
while (i--) {
var code = ansiStyles[nestedStyles[i]];
str = code.open + str.replace(code.closeRe, code.open) + code.close;
+ if (newLinesPresent) {
+ str = str.replace(newLineRegex, function(match) {
+ return code.close + match + code.open;
+ });
+ }
}
return str;
}
-function applyTheme (theme) {
+colors.setTheme = function(theme) {
+ if (typeof theme === 'string') {
+ console.log('colors.setTheme now only accepts an object, not a string. ' +
+ 'If you are trying to set a theme from a file, it is now your (the ' +
+ 'caller\'s) responsibility to require the file. The old syntax ' +
+ 'looked like colors.setTheme(__dirname + ' +
+ '\'/../themes/generic-logging.js\'); The new syntax looks like '+
+ 'colors.setTheme(require(__dirname + ' +
+ '\'/../themes/generic-logging.js\'));');
+ return;
+ }
for (var style in theme) {
- (function(style){
- colors[style] = function(str){
- if (typeof theme[style] === 'object'){
+ (function(style) {
+ colors[style] = function(str) {
+ if (typeof theme[style] === 'object') {
var out = str;
- for (var i in theme[style]){
+ for (var i in theme[style]) {
out = colors[theme[style][i]](out);
}
return out;
}
return colors[theme[style]](str);
};
- })(style)
- }
-}
-
-colors.setTheme = function (theme) {
- if (typeof theme === 'string') {
- try {
- colors.themes[theme] = require(theme);
- applyTheme(colors.themes[theme]);
- return colors.themes[theme];
- } catch (err) {
- console.log(err);
- return err;
- }
- } else {
- applyTheme(theme);
+ })(style);
}
};
function init() {
var ret = {};
- Object.keys(styles).forEach(function (name) {
+ Object.keys(styles).forEach(function(name) {
ret[name] = {
- get: function () {
+ get: function() {
return build([name]);
- }
+ },
};
});
return ret;
}
-var sequencer = function sequencer (map, str) {
- var exploded = str.split(""), i = 0;
+var sequencer = function sequencer(map, str) {
+ var exploded = str.split('');
exploded = exploded.map(map);
- return exploded.join("");
+ return exploded.join('');
};
// custom formatter methods
@@ -171,17 +185,17 @@ colors.zalgo = require('./custom/zalgo');
// maps
colors.maps = {};
-colors.maps.america = require('./maps/america');
-colors.maps.zebra = require('./maps/zebra');
-colors.maps.rainbow = require('./maps/rainbow');
-colors.maps.random = require('./maps/random')
+colors.maps.america = require('./maps/america')(colors);
+colors.maps.zebra = require('./maps/zebra')(colors);
+colors.maps.rainbow = require('./maps/rainbow')(colors);
+colors.maps.random = require('./maps/random')(colors);
for (var map in colors.maps) {
- (function(map){
- colors[map] = function (str) {
+ (function(map) {
+ colors[map] = function(str) {
return sequencer(colors.maps[map], str);
- }
- })(map)
+ };
+ })(map);
}
-defineProps(colors, init()); \ No newline at end of file
+defineProps(colors, init());
diff --git a/deps/npm/node_modules/colors/lib/custom/trap.js b/deps/npm/node_modules/colors/lib/custom/trap.js
index 3f09143738..fbccf88ded 100644
--- a/deps/npm/node_modules/colors/lib/custom/trap.js
+++ b/deps/npm/node_modules/colors/lib/custom/trap.js
@@ -1,45 +1,46 @@
-module['exports'] = function runTheTrap (text, options) {
- var result = "";
- text = text || "Run the trap, drop the bass";
+module['exports'] = function runTheTrap(text, options) {
+ var result = '';
+ text = text || 'Run the trap, drop the bass';
text = text.split('');
var trap = {
- a: ["\u0040", "\u0104", "\u023a", "\u0245", "\u0394", "\u039b", "\u0414"],
- b: ["\u00df", "\u0181", "\u0243", "\u026e", "\u03b2", "\u0e3f"],
- c: ["\u00a9", "\u023b", "\u03fe"],
- d: ["\u00d0", "\u018a", "\u0500" , "\u0501" ,"\u0502", "\u0503"],
- e: ["\u00cb", "\u0115", "\u018e", "\u0258", "\u03a3", "\u03be", "\u04bc", "\u0a6c"],
- f: ["\u04fa"],
- g: ["\u0262"],
- h: ["\u0126", "\u0195", "\u04a2", "\u04ba", "\u04c7", "\u050a"],
- i: ["\u0f0f"],
- j: ["\u0134"],
- k: ["\u0138", "\u04a0", "\u04c3", "\u051e"],
- l: ["\u0139"],
- m: ["\u028d", "\u04cd", "\u04ce", "\u0520", "\u0521", "\u0d69"],
- n: ["\u00d1", "\u014b", "\u019d", "\u0376", "\u03a0", "\u048a"],
- o: ["\u00d8", "\u00f5", "\u00f8", "\u01fe", "\u0298", "\u047a", "\u05dd", "\u06dd", "\u0e4f"],
- p: ["\u01f7", "\u048e"],
- q: ["\u09cd"],
- r: ["\u00ae", "\u01a6", "\u0210", "\u024c", "\u0280", "\u042f"],
- s: ["\u00a7", "\u03de", "\u03df", "\u03e8"],
- t: ["\u0141", "\u0166", "\u0373"],
- u: ["\u01b1", "\u054d"],
- v: ["\u05d8"],
- w: ["\u0428", "\u0460", "\u047c", "\u0d70"],
- x: ["\u04b2", "\u04fe", "\u04fc", "\u04fd"],
- y: ["\u00a5", "\u04b0", "\u04cb"],
- z: ["\u01b5", "\u0240"]
- }
- text.forEach(function(c){
+ a: ['\u0040', '\u0104', '\u023a', '\u0245', '\u0394', '\u039b', '\u0414'],
+ b: ['\u00df', '\u0181', '\u0243', '\u026e', '\u03b2', '\u0e3f'],
+ c: ['\u00a9', '\u023b', '\u03fe'],
+ d: ['\u00d0', '\u018a', '\u0500', '\u0501', '\u0502', '\u0503'],
+ e: ['\u00cb', '\u0115', '\u018e', '\u0258', '\u03a3', '\u03be', '\u04bc',
+ '\u0a6c'],
+ f: ['\u04fa'],
+ g: ['\u0262'],
+ h: ['\u0126', '\u0195', '\u04a2', '\u04ba', '\u04c7', '\u050a'],
+ i: ['\u0f0f'],
+ j: ['\u0134'],
+ k: ['\u0138', '\u04a0', '\u04c3', '\u051e'],
+ l: ['\u0139'],
+ m: ['\u028d', '\u04cd', '\u04ce', '\u0520', '\u0521', '\u0d69'],
+ n: ['\u00d1', '\u014b', '\u019d', '\u0376', '\u03a0', '\u048a'],
+ o: ['\u00d8', '\u00f5', '\u00f8', '\u01fe', '\u0298', '\u047a', '\u05dd',
+ '\u06dd', '\u0e4f'],
+ p: ['\u01f7', '\u048e'],
+ q: ['\u09cd'],
+ r: ['\u00ae', '\u01a6', '\u0210', '\u024c', '\u0280', '\u042f'],
+ s: ['\u00a7', '\u03de', '\u03df', '\u03e8'],
+ t: ['\u0141', '\u0166', '\u0373'],
+ u: ['\u01b1', '\u054d'],
+ v: ['\u05d8'],
+ w: ['\u0428', '\u0460', '\u047c', '\u0d70'],
+ x: ['\u04b2', '\u04fe', '\u04fc', '\u04fd'],
+ y: ['\u00a5', '\u04b0', '\u04cb'],
+ z: ['\u01b5', '\u0240'],
+ };
+ text.forEach(function(c) {
c = c.toLowerCase();
- var chars = trap[c] || [" "];
+ var chars = trap[c] || [' '];
var rand = Math.floor(Math.random() * chars.length);
- if (typeof trap[c] !== "undefined") {
+ if (typeof trap[c] !== 'undefined') {
result += trap[c][rand];
} else {
result += c;
}
});
return result;
-
-}
+};
diff --git a/deps/npm/node_modules/colors/lib/custom/zalgo.js b/deps/npm/node_modules/colors/lib/custom/zalgo.js
index 45c89a8d30..01bdd2b802 100644
--- a/deps/npm/node_modules/colors/lib/custom/zalgo.js
+++ b/deps/npm/node_modules/colors/lib/custom/zalgo.js
@@ -1,8 +1,8 @@
// please no
module['exports'] = function zalgo(text, options) {
- text = text || " he is here ";
+ text = text || ' he is here ';
var soul = {
- "up" : [
+ 'up': [
'̍', '̎', '̄', '̅',
'̿', '̑', '̆', '̐',
'͒', '͗', '͑', '̇',
@@ -15,9 +15,9 @@ module['exports'] = function zalgo(text, options) {
'ͦ', 'ͧ', 'ͨ', 'ͩ',
'ͪ', 'ͫ', 'ͬ', 'ͭ',
'ͮ', 'ͯ', '̾', '͛',
- '͆', '̚'
+ '͆', '̚',
],
- "down" : [
+ 'down': [
'̖', '̗', '̘', '̙',
'̜', '̝', '̞', '̟',
'̠', '̤', '̥', '̦',
@@ -27,28 +27,27 @@ module['exports'] = function zalgo(text, options) {
'̺', '̻', '̼', 'ͅ',
'͇', '͈', '͉', '͍',
'͎', '͓', '͔', '͕',
- '͖', '͙', '͚', '̣'
+ '͖', '͙', '͚', '̣',
],
- "mid" : [
+ 'mid': [
'̕', '̛', '̀', '́',
'͘', '̡', '̢', '̧',
'̨', '̴', '̵', '̶',
'͜', '͝', '͞',
'͟', '͠', '͢', '̸',
- '̷', '͡', ' ҉'
- ]
- },
- all = [].concat(soul.up, soul.down, soul.mid),
- zalgo = {};
+ '̷', '͡', ' ҉',
+ ],
+ };
+ var all = [].concat(soul.up, soul.down, soul.mid);
function randomNumber(range) {
var r = Math.floor(Math.random() * range);
return r;
}
- function is_char(character) {
+ function isChar(character) {
var bool = false;
- all.filter(function (i) {
+ all.filter(function(i) {
bool = (i === character);
});
return bool;
@@ -56,41 +55,47 @@ module['exports'] = function zalgo(text, options) {
function heComes(text, options) {
- var result = '', counts, l;
+ var result = '';
+ var counts;
+ var l;
options = options || {};
- options["up"] = typeof options["up"] !== 'undefined' ? options["up"] : true;
- options["mid"] = typeof options["mid"] !== 'undefined' ? options["mid"] : true;
- options["down"] = typeof options["down"] !== 'undefined' ? options["down"] : true;
- options["size"] = typeof options["size"] !== 'undefined' ? options["size"] : "maxi";
+ options['up'] =
+ typeof options['up'] !== 'undefined' ? options['up'] : true;
+ options['mid'] =
+ typeof options['mid'] !== 'undefined' ? options['mid'] : true;
+ options['down'] =
+ typeof options['down'] !== 'undefined' ? options['down'] : true;
+ options['size'] =
+ typeof options['size'] !== 'undefined' ? options['size'] : 'maxi';
text = text.split('');
for (l in text) {
- if (is_char(l)) {
+ if (isChar(l)) {
continue;
}
result = result + text[l];
- counts = {"up" : 0, "down" : 0, "mid" : 0};
+ counts = {'up': 0, 'down': 0, 'mid': 0};
switch (options.size) {
- case 'mini':
- counts.up = randomNumber(8);
- counts.mid = randomNumber(2);
- counts.down = randomNumber(8);
- break;
- case 'maxi':
- counts.up = randomNumber(16) + 3;
- counts.mid = randomNumber(4) + 1;
- counts.down = randomNumber(64) + 3;
- break;
- default:
- counts.up = randomNumber(8) + 1;
- counts.mid = randomNumber(6) / 2;
- counts.down = randomNumber(8) + 1;
- break;
+ case 'mini':
+ counts.up = randomNumber(8);
+ counts.mid = randomNumber(2);
+ counts.down = randomNumber(8);
+ break;
+ case 'maxi':
+ counts.up = randomNumber(16) + 3;
+ counts.mid = randomNumber(4) + 1;
+ counts.down = randomNumber(64) + 3;
+ break;
+ default:
+ counts.up = randomNumber(8) + 1;
+ counts.mid = randomNumber(6) / 2;
+ counts.down = randomNumber(8) + 1;
+ break;
}
- var arr = ["up", "mid", "down"];
+ var arr = ['up', 'mid', 'down'];
for (var d in arr) {
var index = arr[d];
- for (var i = 0 ; i <= counts[index]; i++) {
+ for (var i = 0; i <= counts[index]; i++) {
if (options[index]) {
result = result + soul[index][randomNumber(soul[index].length)];
}
@@ -101,4 +106,4 @@ module['exports'] = function zalgo(text, options) {
}
// don't summon him
return heComes(text, options);
-}
+};
diff --git a/deps/npm/node_modules/colors/lib/extendStringPrototype.js b/deps/npm/node_modules/colors/lib/extendStringPrototype.js
index 67374a1c22..46fd386a91 100644
--- a/deps/npm/node_modules/colors/lib/extendStringPrototype.js
+++ b/deps/npm/node_modules/colors/lib/extendStringPrototype.js
@@ -1,51 +1,42 @@
var colors = require('./colors');
-module['exports'] = function () {
-
+module['exports'] = function() {
//
// Extends prototype of native string object to allow for "foo".red syntax
//
- var addProperty = function (color, func) {
+ var addProperty = function(color, func) {
String.prototype.__defineGetter__(color, func);
};
- var sequencer = function sequencer (map, str) {
- return function () {
- var exploded = this.split(""), i = 0;
- exploded = exploded.map(map);
- return exploded.join("");
- }
- };
-
- addProperty('strip', function () {
+ addProperty('strip', function() {
return colors.strip(this);
});
- addProperty('stripColors', function () {
+ addProperty('stripColors', function() {
return colors.strip(this);
});
- addProperty("trap", function(){
+ addProperty('trap', function() {
return colors.trap(this);
});
- addProperty("zalgo", function(){
+ addProperty('zalgo', function() {
return colors.zalgo(this);
});
- addProperty("zebra", function(){
+ addProperty('zebra', function() {
return colors.zebra(this);
});
- addProperty("rainbow", function(){
+ addProperty('rainbow', function() {
return colors.rainbow(this);
});
- addProperty("random", function(){
+ addProperty('random', function() {
return colors.random(this);
});
- addProperty("america", function(){
+ addProperty('america', function() {
return colors.america(this);
});
@@ -53,8 +44,8 @@ module['exports'] = function () {
// Iterate through all default styles and colors
//
var x = Object.keys(colors.styles);
- x.forEach(function (style) {
- addProperty(style, function () {
+ x.forEach(function(style) {
+ addProperty(style, function() {
return colors.stylize(this, style);
});
});
@@ -65,49 +56,55 @@ module['exports'] = function () {
// on String that you should not overwrite.
//
var stringPrototypeBlacklist = [
- '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
- 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
- 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
- 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
+ '__defineGetter__', '__defineSetter__', '__lookupGetter__',
+ '__lookupSetter__', 'charAt', 'constructor', 'hasOwnProperty',
+ 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString',
+ 'valueOf', 'charCodeAt', 'indexOf', 'lastIndexOf', 'length',
+ 'localeCompare', 'match', 'repeat', 'replace', 'search', 'slice',
+ 'split', 'substring', 'toLocaleLowerCase', 'toLocaleUpperCase',
+ 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight',
];
- Object.keys(theme).forEach(function (prop) {
+ Object.keys(theme).forEach(function(prop) {
if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
- console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
- }
- else {
+ console.log('warn: '.red + ('String.prototype' + prop).magenta +
+ ' is probably something you don\'t want to override. ' +
+ 'Ignoring style name');
+ } else {
if (typeof(theme[prop]) === 'string') {
colors[prop] = colors[theme[prop]];
- addProperty(prop, function () {
- return colors[theme[prop]](this);
+ addProperty(prop, function() {
+ return colors[prop](this);
});
- }
- else {
- addProperty(prop, function () {
- var ret = this;
+ } else {
+ var themePropApplicator = function(str) {
+ var ret = str || this;
for (var t = 0; t < theme[prop].length; t++) {
ret = colors[theme[prop][t]](ret);
}
return ret;
- });
+ };
+ addProperty(prop, themePropApplicator);
+ colors[prop] = function(str) {
+ return themePropApplicator(str);
+ };
}
}
});
}
- colors.setTheme = function (theme) {
+ colors.setTheme = function(theme) {
if (typeof theme === 'string') {
- try {
- colors.themes[theme] = require(theme);
- applyTheme(colors.themes[theme]);
- return colors.themes[theme];
- } catch (err) {
- console.log(err);
- return err;
- }
+ console.log('colors.setTheme now only accepts an object, not a string. ' +
+ 'If you are trying to set a theme from a file, it is now your (the ' +
+ 'caller\'s) responsibility to require the file. The old syntax ' +
+ 'looked like colors.setTheme(__dirname + ' +
+ '\'/../themes/generic-logging.js\'); The new syntax looks like '+
+ 'colors.setTheme(require(__dirname + ' +
+ '\'/../themes/generic-logging.js\'));');
+ return;
} else {
applyTheme(theme);
}
};
-
-}; \ No newline at end of file
+};
diff --git a/deps/npm/node_modules/colors/lib/index.js b/deps/npm/node_modules/colors/lib/index.js
index fd0956d03a..9df5ab7df3 100644
--- a/deps/npm/node_modules/colors/lib/index.js
+++ b/deps/npm/node_modules/colors/lib/index.js
@@ -1,12 +1,13 @@
var colors = require('./colors');
module['exports'] = colors;
-// Remark: By default, colors will add style properties to String.prototype
+// Remark: By default, colors will add style properties to String.prototype.
//
-// If you don't wish to extend String.prototype you can do this instead and native String will not be touched
+// If you don't wish to extend String.prototype, you can do this instead and
+// native String will not be touched:
//
// var colors = require('colors/safe);
// colors.red("foo")
//
//
-require('./extendStringPrototype')(); \ No newline at end of file
+require('./extendStringPrototype')();
diff --git a/deps/npm/node_modules/colors/lib/maps/america.js b/deps/npm/node_modules/colors/lib/maps/america.js
index a07d8327ff..dc96903328 100644
--- a/deps/npm/node_modules/colors/lib/maps/america.js
+++ b/deps/npm/node_modules/colors/lib/maps/america.js
@@ -1,12 +1,10 @@
-var colors = require('../colors');
-
-module['exports'] = (function() {
- return function (letter, i, exploded) {
- if(letter === " ") return letter;
- switch(i%3) {
+module['exports'] = function(colors) {
+ return function(letter, i, exploded) {
+ if (letter === ' ') return letter;
+ switch (i%3) {
case 0: return colors.red(letter);
- case 1: return colors.white(letter)
- case 2: return colors.blue(letter)
+ case 1: return colors.white(letter);
+ case 2: return colors.blue(letter);
}
- }
-})(); \ No newline at end of file
+ };
+};
diff --git a/deps/npm/node_modules/colors/lib/maps/rainbow.js b/deps/npm/node_modules/colors/lib/maps/rainbow.js
index 5442744369..874508da8e 100644
--- a/deps/npm/node_modules/colors/lib/maps/rainbow.js
+++ b/deps/npm/node_modules/colors/lib/maps/rainbow.js
@@ -1,12 +1,11 @@
-var colors = require('../colors');
-
-module['exports'] = (function () {
- var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
- return function (letter, i, exploded) {
- if (letter === " ") {
+module['exports'] = function(colors) {
+ // RoY G BiV
+ var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta'];
+ return function(letter, i, exploded) {
+ if (letter === ' ') {
return letter;
} else {
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
}
};
-})();
+};
diff --git a/deps/npm/node_modules/colors/lib/maps/random.js b/deps/npm/node_modules/colors/lib/maps/random.js
index 5cd101fae2..6f8f2f8e1e 100644
--- a/deps/npm/node_modules/colors/lib/maps/random.js
+++ b/deps/npm/node_modules/colors/lib/maps/random.js
@@ -1,8 +1,10 @@
-var colors = require('../colors');
-
-module['exports'] = (function () {
- var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
+module['exports'] = function(colors) {
+ var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green',
+ 'blue', 'white', 'cyan', 'magenta'];
return function(letter, i, exploded) {
- return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter);
+ return letter === ' ' ? letter :
+ colors[
+ available[Math.round(Math.random() * (available.length - 2))]
+ ](letter);
};
-})(); \ No newline at end of file
+};
diff --git a/deps/npm/node_modules/colors/lib/maps/zebra.js b/deps/npm/node_modules/colors/lib/maps/zebra.js
index bf7dcdead0..fa73623544 100644
--- a/deps/npm/node_modules/colors/lib/maps/zebra.js
+++ b/deps/npm/node_modules/colors/lib/maps/zebra.js
@@ -1,5 +1,5 @@
-var colors = require('../colors');
-
-module['exports'] = function (letter, i, exploded) {
- return i % 2 === 0 ? letter : colors.inverse(letter);
-}; \ No newline at end of file
+module['exports'] = function(colors) {
+ return function(letter, i, exploded) {
+ return i % 2 === 0 ? letter : colors.inverse(letter);
+ };
+};
diff --git a/deps/npm/node_modules/colors/lib/styles.js b/deps/npm/node_modules/colors/lib/styles.js
index 067d59070c..02db9acf7c 100644
--- a/deps/npm/node_modules/colors/lib/styles.js
+++ b/deps/npm/node_modules/colors/lib/styles.js
@@ -65,13 +65,13 @@ var codes = {
blueBG: [44, 49],
magentaBG: [45, 49],
cyanBG: [46, 49],
- whiteBG: [47, 49]
+ whiteBG: [47, 49],
};
-Object.keys(codes).forEach(function (key) {
+Object.keys(codes).forEach(function(key) {
var val = codes[key];
var style = styles[key] = [];
style.open = '\u001b[' + val[0] + 'm';
style.close = '\u001b[' + val[1] + 'm';
-}); \ No newline at end of file
+});
diff --git a/deps/npm/node_modules/colors/lib/system/has-flag.js b/deps/npm/node_modules/colors/lib/system/has-flag.js
new file mode 100644
index 0000000000..a347dd4d7a
--- /dev/null
+++ b/deps/npm/node_modules/colors/lib/system/has-flag.js
@@ -0,0 +1,35 @@
+/*
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+'use strict';
+
+module.exports = function(flag, argv) {
+ argv = argv || process.argv;
+
+ var terminatorPos = argv.indexOf('--');
+ var prefix = /^-{1,2}/.test(flag) ? '' : '--';
+ var pos = argv.indexOf(prefix + flag);
+
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
+};
diff --git a/deps/npm/node_modules/colors/lib/system/supports-colors.js b/deps/npm/node_modules/colors/lib/system/supports-colors.js
index 3e008aa93a..f1f9c8ff3d 100644
--- a/deps/npm/node_modules/colors/lib/system/supports-colors.js
+++ b/deps/npm/node_modules/colors/lib/system/supports-colors.js
@@ -23,39 +23,129 @@ THE SOFTWARE.
*/
-var argv = process.argv;
+'use strict';
-module.exports = (function () {
- if (argv.indexOf('--no-color') !== -1 ||
- argv.indexOf('--color=false') !== -1) {
+var os = require('os');
+var hasFlag = require('./has-flag.js');
+
+var env = process.env;
+
+var forceColor = void 0;
+if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
+ forceColor = false;
+} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true')
+ || hasFlag('color=always')) {
+ forceColor = true;
+}
+if ('FORCE_COLOR' in env) {
+ forceColor = env.FORCE_COLOR.length === 0
+ || parseInt(env.FORCE_COLOR, 10) !== 0;
+}
+
+function translateLevel(level) {
+ if (level === 0) {
return false;
}
- if (argv.indexOf('--color') !== -1 ||
- argv.indexOf('--color=true') !== -1 ||
- argv.indexOf('--color=always') !== -1) {
- return true;
+ return {
+ level: level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3,
+ };
+}
+
+function supportsColor(stream) {
+ if (forceColor === false) {
+ return 0;
}
- if (process.stdout && !process.stdout.isTTY) {
- return false;
+ if (hasFlag('color=16m') || hasFlag('color=full')
+ || hasFlag('color=truecolor')) {
+ return 3;
+ }
+
+ if (hasFlag('color=256')) {
+ return 2;
+ }
+
+ if (stream && !stream.isTTY && forceColor !== true) {
+ return 0;
}
+ var min = forceColor ? 1 : 0;
+
if (process.platform === 'win32') {
- return true;
+ // Node.js 7.5.0 is the first version of Node.js to include a patch to
+ // libuv that enables 256 color output on Windows. Anything earlier and it
+ // won't work. However, here we target Node.js 8 at minimum as it is an LTS
+ // release, and Node.js 7 is not. Windows 10 build 10586 is the first
+ // Windows release that supports 256 colors. Windows 10 build 14931 is the
+ // first release that supports 16m/TrueColor.
+ var osRelease = os.release().split('.');
+ if (Number(process.versions.node.split('.')[0]) >= 8
+ && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
+ }
+
+ return 1;
+ }
+
+ if ('CI' in env) {
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) {
+ return sign in env;
+ }) || env.CI_NAME === 'codeship') {
+ return 1;
+ }
+
+ return min;
}
- if ('COLORTERM' in process.env) {
- return true;
+ if ('TEAMCITY_VERSION' in env) {
+ return (/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0
+ );
}
- if (process.env.TERM === 'dumb') {
- return false;
+ if ('TERM_PROGRAM' in env) {
+ var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+
+ switch (env.TERM_PROGRAM) {
+ case 'iTerm.app':
+ return version >= 3 ? 3 : 2;
+ case 'Hyper':
+ return 3;
+ case 'Apple_Terminal':
+ return 2;
+ // No default
+ }
+ }
+
+ if (/-256(color)?$/i.test(env.TERM)) {
+ return 2;
}
- if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
- return true;
+ if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ return 1;
}
- return false;
-})(); \ No newline at end of file
+ if ('COLORTERM' in env) {
+ return 1;
+ }
+
+ if (env.TERM === 'dumb') {
+ return min;
+ }
+
+ return min;
+}
+
+function getSupportLevel(stream) {
+ var level = supportsColor(stream);
+ return translateLevel(level);
+}
+
+module.exports = {
+ supportsColor: getSupportLevel,
+ stdout: getSupportLevel(process.stdout),
+ stderr: getSupportLevel(process.stderr),
+};
diff --git a/deps/npm/node_modules/colors/package.json b/deps/npm/node_modules/colors/package.json
index 554cbd22e1..712ab466de 100644
--- a/deps/npm/node_modules/colors/package.json
+++ b/deps/npm/node_modules/colors/package.json
@@ -1,40 +1,46 @@
{
- "_args": [
- [
- "colors@1.1.2",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "colors@1.1.2",
- "_id": "colors@1.1.2",
+ "_from": "colors@^1.1.2",
+ "_id": "colors@1.3.3",
"_inBundle": false,
- "_integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
+ "_integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==",
"_location": "/colors",
- "_optional": true,
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "colors@1.1.2",
+ "raw": "colors@^1.1.2",
"name": "colors",
"escapedName": "colors",
- "rawSpec": "1.1.2",
+ "rawSpec": "^1.1.2",
"saveSpec": null,
- "fetchSpec": "1.1.2"
+ "fetchSpec": "^1.1.2"
},
"_requiredBy": [
"/cli-table3"
],
- "_resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
- "_spec": "1.1.2",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz",
+ "_shasum": "39e005d546afe01e01f9c4ca8fa50f686a01205d",
+ "_spec": "colors@^1.1.2",
+ "_where": "/Users/aeschright/code/cli/node_modules/cli-table3",
"author": {
"name": "Marak Squires"
},
"bugs": {
"url": "https://github.com/Marak/colors.js/issues"
},
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "DABH",
+ "url": "https://github.com/DABH"
+ }
+ ],
+ "deprecated": false,
"description": "get colors in your node.js console",
+ "devDependencies": {
+ "eslint": "^5.2.0",
+ "eslint-config-google": "^0.11.0"
+ },
"engines": {
"node": ">=0.1.90"
},
@@ -43,7 +49,9 @@
"lib",
"LICENSE",
"safe.js",
- "themes"
+ "themes",
+ "index.d.ts",
+ "safe.d.ts"
],
"homepage": "https://github.com/Marak/colors.js",
"keywords": [
@@ -52,14 +60,15 @@
"colors"
],
"license": "MIT",
- "main": "lib",
+ "main": "lib/index.js",
"name": "colors",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/Marak/colors.js.git"
},
"scripts": {
+ "lint": "eslint . --fix",
"test": "node tests/basic-test.js && node tests/safe-test.js"
},
- "version": "1.1.2"
+ "version": "1.3.3"
}
diff --git a/deps/npm/node_modules/colors/safe.d.ts b/deps/npm/node_modules/colors/safe.d.ts
new file mode 100644
index 0000000000..2bafc27984
--- /dev/null
+++ b/deps/npm/node_modules/colors/safe.d.ts
@@ -0,0 +1,48 @@
+// Type definitions for Colors.js 1.2
+// Project: https://github.com/Marak/colors.js
+// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke>
+// Definitions: https://github.com/Marak/colors.js
+
+export const enabled: boolean;
+export function enable(): void;
+export function disable(): void;
+export function setTheme(theme: any): void;
+
+export function strip(str: string): string;
+export function stripColors(str: string): string;
+
+export function black(str: string): string;
+export function red(str: string): string;
+export function green(str: string): string;
+export function yellow(str: string): string;
+export function blue(str: string): string;
+export function magenta(str: string): string;
+export function cyan(str: string): string;
+export function white(str: string): string;
+export function gray(str: string): string;
+export function grey(str: string): string;
+
+export function bgBlack(str: string): string;
+export function bgRed(str: string): string;
+export function bgGreen(str: string): string;
+export function bgYellow(str: string): string;
+export function bgBlue(str: string): string;
+export function bgMagenta(str: string): string;
+export function bgCyan(str: string): string;
+export function bgWhite(str: string): string;
+
+export function reset(str: string): string;
+export function bold(str: string): string;
+export function dim(str: string): string;
+export function italic(str: string): string;
+export function underline(str: string): string;
+export function inverse(str: string): string;
+export function hidden(str: string): string;
+export function strikethrough(str: string): string;
+
+export function rainbow(str: string): string;
+export function zebra(str: string): string;
+export function america(str: string): string;
+export function trap(str: string): string;
+export function random(str: string): string;
+export function zalgo(str: string): string;
diff --git a/deps/npm/node_modules/colors/safe.js b/deps/npm/node_modules/colors/safe.js
index a6a1f3ab47..a013d54246 100644
--- a/deps/npm/node_modules/colors/safe.js
+++ b/deps/npm/node_modules/colors/safe.js
@@ -1,9 +1,10 @@
//
-// Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype
+// Remark: Requiring this file will use the "safe" colors API,
+// which will not touch String.prototype.
//
-// var colors = require('colors/safe);
+// var colors = require('colors/safe');
// colors.red("foo")
//
//
var colors = require('./lib/colors');
-module['exports'] = colors; \ No newline at end of file
+module['exports'] = colors;
diff --git a/deps/npm/node_modules/colors/themes/generic-logging.js b/deps/npm/node_modules/colors/themes/generic-logging.js
index 571972c1ba..63adfe4ac3 100644
--- a/deps/npm/node_modules/colors/themes/generic-logging.js
+++ b/deps/npm/node_modules/colors/themes/generic-logging.js
@@ -8,5 +8,5 @@ module['exports'] = {
help: 'cyan',
warn: 'yellow',
debug: 'blue',
- error: 'red'
-}; \ No newline at end of file
+ error: 'red',
+};
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000000..40992555bf
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,55 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000000..f478d58dca
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/concat-stream/node_modules/readable-stream/README.md b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..23fe3f3e30
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000000..c141a99c26
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,58 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000000..f8b2db83db
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..46924cbfdf
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..a1ca813e5a
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..bf34ac65e1
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..5d1f8b876d
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..b3f4e85a2f
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000000..aefc68bd90
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,79 @@
+'use strict';
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+var util = require('util');
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..5a0a0d88ce
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/package.json b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..9f2a5ca7ca
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "readable-stream@^2.2.2",
+ "_id": "readable-stream@2.3.6",
+ "_inBundle": false,
+ "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_location": "/concat-stream/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@^2.2.2",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "^2.2.2",
+ "saveSpec": null,
+ "fetchSpec": "^2.2.2"
+ },
+ "_requiredBy": [
+ "/concat-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
+ "_spec": "readable-stream@^2.2.2",
+ "_where": "/Users/aeschright/code/cli/node_modules/concat-stream",
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ },
+ "version": "2.3.6"
+}
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..ffd791d7ff
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/readable.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/transform.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..b1baba26da
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000000..ebdde6a85d
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/deps/npm/node_modules/concat-stream/node_modules/readable-stream/writable.js b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..3211a6f80d
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/readable-stream/writable.js
@@ -0,0 +1,8 @@
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+} else {
+ module.exports = Writable
+}
diff --git a/deps/npm/node_modules/concat-stream/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/concat-stream/node_modules/string_decoder/.travis.yml
new file mode 100644
index 0000000000..3347a72546
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/string_decoder/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
diff --git a/deps/npm/node_modules/concat-stream/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/concat-stream/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/string_decoder/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/concat-stream/node_modules/string_decoder/README.md b/deps/npm/node_modules/concat-stream/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..5fd58315ed
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/deps/npm/node_modules/concat-stream/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/concat-stream/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..2e89e63f79
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/concat-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/concat-stream/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..fcc3a4bdf3
--- /dev/null
+++ b/deps/npm/node_modules/concat-stream/node_modules/string_decoder/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "string_decoder@~1.1.1",
+ "_id": "string_decoder@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_location": "/concat-stream/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.1.1",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.1"
+ },
+ "_requiredBy": [
+ "/concat-stream/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
+ "_spec": "string_decoder@~1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/concat-stream/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/copy-concurrently/node_modules/aproba/LICENSE b/deps/npm/node_modules/copy-concurrently/node_modules/aproba/LICENSE
new file mode 100644
index 0000000000..2a4982dc40
--- /dev/null
+++ b/deps/npm/node_modules/copy-concurrently/node_modules/aproba/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/copy-concurrently/node_modules/aproba/README.md b/deps/npm/node_modules/copy-concurrently/node_modules/aproba/README.md
new file mode 100644
index 0000000000..e94799201c
--- /dev/null
+++ b/deps/npm/node_modules/copy-concurrently/node_modules/aproba/README.md
@@ -0,0 +1,93 @@
+aproba
+======
+
+A ridiculously light-weight function argument validator
+
+```
+var validate = require("aproba")
+
+function myfunc(a, b, c) {
+ // `a` must be a string, `b` a number, `c` a function
+ validate('SNF', arguments) // [a,b,c] is also valid
+}
+
+myfunc('test', 23, function () {}) // ok
+myfunc(123, 23, function () {}) // type error
+myfunc('test', 23) // missing arg error
+myfunc('test', 23, function () {}, true) // too many args error
+
+```
+
+Valid types are:
+
+| type | description
+| :--: | :----------
+| * | matches any type
+| A | `Array.isArray` OR an `arguments` object
+| S | typeof == string
+| N | typeof == number
+| F | typeof == function
+| O | typeof == object and not type A and not type E
+| B | typeof == boolean
+| E | `instanceof Error` OR `null` **(special: see below)**
+| Z | == `null`
+
+Validation failures throw one of three exception types, distinguished by a
+`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
+
+If you pass in an invalid type then it will throw with a code of
+`EUNKNOWNTYPE`.
+
+If an **error** argument is found and is not null then the remaining
+arguments are optional. That is, if you say `ESO` then that's like using a
+non-magical `E` in: `E|ESO|ZSO`.
+
+### But I have optional arguments?!
+
+You can provide more than one signature by separating them with pipes `|`.
+If any signature matches the arguments then they'll be considered valid.
+
+So for example, say you wanted to write a signature for
+`fs.createWriteStream`. The docs for it describe it thusly:
+
+```
+fs.createWriteStream(path[, options])
+```
+
+This would be a signature of `SO|S`. That is, a string and and object, or
+just a string.
+
+Now, if you read the full `fs` docs, you'll see that actually path can ALSO
+be a buffer. And options can be a string, that is:
+```
+path <String> | <Buffer>
+options <String> | <Object>
+```
+
+To reproduce this you have to fully enumerate all of the possible
+combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
+awkwardness is a feature: It reminds you of the complexity you're adding to
+your API when you do this sort of thing.
+
+
+### Browser support
+
+This has no dependencies and should work in browsers, though you'll have
+noisier stack traces.
+
+### Why this exists
+
+I wanted a very simple argument validator. It needed to do two things:
+
+1. Be more concise and easier to use than assertions
+
+2. Not encourage an infinite bikeshed of DSLs
+
+This is why types are specified by a single character and there's no such
+thing as an optional argument.
+
+This is not intended to validate user data. This is specifically about
+asserting the interface of your functions.
+
+If you need greater validation, I encourage you to write them by hand or
+look elsewhere.
diff --git a/deps/npm/node_modules/copy-concurrently/node_modules/aproba/index.js b/deps/npm/node_modules/copy-concurrently/node_modules/aproba/index.js
new file mode 100644
index 0000000000..6f3f797c09
--- /dev/null
+++ b/deps/npm/node_modules/copy-concurrently/node_modules/aproba/index.js
@@ -0,0 +1,105 @@
+'use strict'
+
+function isArguments (thingy) {
+ return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
+}
+
+var types = {
+ '*': {label: 'any', check: function () { return true }},
+ A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
+ S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
+ N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
+ F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
+ O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
+ B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
+ E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
+ Z: {label: 'null', check: function (thingy) { return thingy == null }}
+}
+
+function addSchema (schema, arity) {
+ var group = arity[schema.length] = arity[schema.length] || []
+ if (group.indexOf(schema) === -1) group.push(schema)
+}
+
+var validate = module.exports = function (rawSchemas, args) {
+ if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
+ if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
+ if (!args) throw missingRequiredArg(1, 'args')
+ if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
+ if (!types.A.check(args)) throw invalidType(1, ['array'], args)
+ var schemas = rawSchemas.split('|')
+ var arity = {}
+
+ schemas.forEach(function (schema) {
+ for (var ii = 0; ii < schema.length; ++ii) {
+ var type = schema[ii]
+ if (!types[type]) throw unknownType(ii, type)
+ }
+ if (/E.*E/.test(schema)) throw moreThanOneError(schema)
+ addSchema(schema, arity)
+ if (/E/.test(schema)) {
+ addSchema(schema.replace(/E.*$/, 'E'), arity)
+ addSchema(schema.replace(/E/, 'Z'), arity)
+ if (schema.length === 1) addSchema('', arity)
+ }
+ })
+ var matching = arity[args.length]
+ if (!matching) {
+ throw wrongNumberOfArgs(Object.keys(arity), args.length)
+ }
+ for (var ii = 0; ii < args.length; ++ii) {
+ var newMatching = matching.filter(function (schema) {
+ var type = schema[ii]
+ var typeCheck = types[type].check
+ return typeCheck(args[ii])
+ })
+ if (!newMatching.length) {
+ var labels = matching.map(function (schema) {
+ return types[schema[ii]].label
+ }).filter(function (schema) { return schema != null })
+ throw invalidType(ii, labels, args[ii])
+ }
+ matching = newMatching
+ }
+}
+
+function missingRequiredArg (num) {
+ return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
+}
+
+function unknownType (num, type) {
+ return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
+}
+
+function invalidType (num, expectedTypes, value) {
+ var valueType
+ Object.keys(types).forEach(function (typeCode) {
+ if (types[typeCode].check(value)) valueType = types[typeCode].label
+ })
+ return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
+ englishList(expectedTypes) + ' but got ' + valueType)
+}
+
+function englishList (list) {
+ return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
+}
+
+function wrongNumberOfArgs (expected, got) {
+ var english = englishList(expected)
+ var args = expected.every(function (ex) { return ex.length === 1 })
+ ? 'argument'
+ : 'arguments'
+ return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
+}
+
+function moreThanOneError (schema) {
+ return newException('ETOOMANYERRORTYPES',
+ 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
+}
+
+function newException (code, msg) {
+ var e = new Error(msg)
+ e.code = code
+ if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
+ return e
+}
diff --git a/deps/npm/node_modules/copy-concurrently/node_modules/aproba/package.json b/deps/npm/node_modules/copy-concurrently/node_modules/aproba/package.json
new file mode 100644
index 0000000000..e16eea157f
--- /dev/null
+++ b/deps/npm/node_modules/copy-concurrently/node_modules/aproba/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "aproba@^1.1.1",
+ "_id": "aproba@1.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "_location": "/copy-concurrently/aproba",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "aproba@^1.1.1",
+ "name": "aproba",
+ "escapedName": "aproba",
+ "rawSpec": "^1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.1"
+ },
+ "_requiredBy": [
+ "/copy-concurrently"
+ ],
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
+ "_spec": "aproba@^1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/copy-concurrently",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/aproba/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "A ridiculously light-weight argument validator (now browser friendly)",
+ "devDependencies": {
+ "standard": "^10.0.3",
+ "tap": "^10.0.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/iarna/aproba",
+ "keywords": [
+ "argument",
+ "validate"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "aproba",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/aproba.git"
+ },
+ "scripts": {
+ "test": "standard && tap -j3 test/*.js"
+ },
+ "version": "1.2.0"
+}
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/duplexify/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000000..40992555bf
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,55 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/duplexify/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000000..f478d58dca
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/duplexify/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/duplexify/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/duplexify/node_modules/readable-stream/README.md b/deps/npm/node_modules/duplexify/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..23fe3f3e30
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/duplexify/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000000..c141a99c26
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,58 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000000..f8b2db83db
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..46924cbfdf
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..a1ca813e5a
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..bf34ac65e1
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..5d1f8b876d
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..b3f4e85a2f
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000000..aefc68bd90
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,79 @@
+'use strict';
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+var util = require('util');
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..5a0a0d88ce
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/package.json b/deps/npm/node_modules/duplexify/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..e0a8053722
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "readable-stream@^2.0.0",
+ "_id": "readable-stream@2.3.6",
+ "_inBundle": false,
+ "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_location": "/duplexify/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@^2.0.0",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/duplexify"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
+ "_spec": "readable-stream@^2.0.0",
+ "_where": "/Users/aeschright/code/cli/node_modules/duplexify",
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ },
+ "version": "2.3.6"
+}
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..ffd791d7ff
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/readable.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/transform.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..b1baba26da
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000000..ebdde6a85d
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/deps/npm/node_modules/duplexify/node_modules/readable-stream/writable.js b/deps/npm/node_modules/duplexify/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..3211a6f80d
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/readable-stream/writable.js
@@ -0,0 +1,8 @@
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+} else {
+ module.exports = Writable
+}
diff --git a/deps/npm/node_modules/duplexify/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/duplexify/node_modules/string_decoder/.travis.yml
new file mode 100644
index 0000000000..3347a72546
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/string_decoder/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
diff --git a/deps/npm/node_modules/duplexify/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/duplexify/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/string_decoder/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/duplexify/node_modules/string_decoder/README.md b/deps/npm/node_modules/duplexify/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..5fd58315ed
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/deps/npm/node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..2e89e63f79
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/duplexify/node_modules/string_decoder/package.json b/deps/npm/node_modules/duplexify/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..cccb055a2f
--- /dev/null
+++ b/deps/npm/node_modules/duplexify/node_modules/string_decoder/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "string_decoder@~1.1.1",
+ "_id": "string_decoder@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_location": "/duplexify/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.1.1",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.1"
+ },
+ "_requiredBy": [
+ "/duplexify/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
+ "_spec": "string_decoder@~1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/duplexify/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/execa/node_modules/get-stream/buffer-stream.js b/deps/npm/node_modules/execa/node_modules/get-stream/buffer-stream.js
new file mode 100644
index 0000000000..ae45d3d9e7
--- /dev/null
+++ b/deps/npm/node_modules/execa/node_modules/get-stream/buffer-stream.js
@@ -0,0 +1,51 @@
+'use strict';
+const PassThrough = require('stream').PassThrough;
+
+module.exports = opts => {
+ opts = Object.assign({}, opts);
+
+ const array = opts.array;
+ let encoding = opts.encoding;
+ const buffer = encoding === 'buffer';
+ let objectMode = false;
+
+ if (array) {
+ objectMode = !(encoding || buffer);
+ } else {
+ encoding = encoding || 'utf8';
+ }
+
+ if (buffer) {
+ encoding = null;
+ }
+
+ let len = 0;
+ const ret = [];
+ const stream = new PassThrough({objectMode});
+
+ if (encoding) {
+ stream.setEncoding(encoding);
+ }
+
+ stream.on('data', chunk => {
+ ret.push(chunk);
+
+ if (objectMode) {
+ len = ret.length;
+ } else {
+ len += chunk.length;
+ }
+ });
+
+ stream.getBufferedValue = () => {
+ if (array) {
+ return ret;
+ }
+
+ return buffer ? Buffer.concat(ret, len) : ret.join('');
+ };
+
+ stream.getBufferedLength = () => len;
+
+ return stream;
+};
diff --git a/deps/npm/node_modules/execa/node_modules/get-stream/index.js b/deps/npm/node_modules/execa/node_modules/get-stream/index.js
new file mode 100644
index 0000000000..2dc5ee96af
--- /dev/null
+++ b/deps/npm/node_modules/execa/node_modules/get-stream/index.js
@@ -0,0 +1,51 @@
+'use strict';
+const bufferStream = require('./buffer-stream');
+
+function getStream(inputStream, opts) {
+ if (!inputStream) {
+ return Promise.reject(new Error('Expected a stream'));
+ }
+
+ opts = Object.assign({maxBuffer: Infinity}, opts);
+
+ const maxBuffer = opts.maxBuffer;
+ let stream;
+ let clean;
+
+ const p = new Promise((resolve, reject) => {
+ const error = err => {
+ if (err) { // null check
+ err.bufferedData = stream.getBufferedValue();
+ }
+
+ reject(err);
+ };
+
+ stream = bufferStream(opts);
+ inputStream.once('error', error);
+ inputStream.pipe(stream);
+
+ stream.on('data', () => {
+ if (stream.getBufferedLength() > maxBuffer) {
+ reject(new Error('maxBuffer exceeded'));
+ }
+ });
+ stream.once('error', error);
+ stream.on('end', resolve);
+
+ clean = () => {
+ // some streams doesn't implement the `stream.Readable` interface correctly
+ if (inputStream.unpipe) {
+ inputStream.unpipe(stream);
+ }
+ };
+ });
+
+ p.then(clean, clean);
+
+ return p.then(() => stream.getBufferedValue());
+}
+
+module.exports = getStream;
+module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'}));
+module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true}));
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/LICENSE b/deps/npm/node_modules/execa/node_modules/get-stream/license
index 757562ec59..654d0bfe94 100644
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/LICENSE
+++ b/deps/npm/node_modules/execa/node_modules/get-stream/license
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014 Mathias Buus
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ 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
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/execa/node_modules/get-stream/package.json b/deps/npm/node_modules/execa/node_modules/get-stream/package.json
new file mode 100644
index 0000000000..9875888365
--- /dev/null
+++ b/deps/npm/node_modules/execa/node_modules/get-stream/package.json
@@ -0,0 +1,80 @@
+{
+ "_from": "get-stream@^3.0.0",
+ "_id": "get-stream@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
+ "_location": "/execa/get-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "get-stream@^3.0.0",
+ "name": "get-stream",
+ "escapedName": "get-stream",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/execa"
+ ],
+ "_resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
+ "_shasum": "8e943d1358dc37555054ecbe2edb05aa174ede14",
+ "_spec": "get-stream@^3.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/execa",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/get-stream/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Get a stream as a string, buffer, or array",
+ "devDependencies": {
+ "ava": "*",
+ "into-stream": "^3.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js",
+ "buffer-stream.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/get-stream#readme",
+ "keywords": [
+ "get",
+ "stream",
+ "promise",
+ "concat",
+ "string",
+ "str",
+ "text",
+ "buffer",
+ "read",
+ "data",
+ "consume",
+ "readable",
+ "readablestream",
+ "array",
+ "object",
+ "obj"
+ ],
+ "license": "MIT",
+ "name": "get-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/get-stream.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/deps/npm/node_modules/execa/node_modules/get-stream/readme.md b/deps/npm/node_modules/execa/node_modules/get-stream/readme.md
new file mode 100644
index 0000000000..73b188fb42
--- /dev/null
+++ b/deps/npm/node_modules/execa/node_modules/get-stream/readme.md
@@ -0,0 +1,117 @@
+# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream)
+
+> Get a stream as a string, buffer, or array
+
+
+## Install
+
+```
+$ npm install --save get-stream
+```
+
+
+## Usage
+
+```js
+const fs = require('fs');
+const getStream = require('get-stream');
+const stream = fs.createReadStream('unicorn.txt');
+
+getStream(stream).then(str => {
+ console.log(str);
+ /*
+ ,,))))))));,
+ __)))))))))))))),
+ \|/ -\(((((''''((((((((.
+ -*-==//////(('' . `)))))),
+ /|\ ))| o ;-. '((((( ,(,
+ ( `| / ) ;))))' ,_))^;(~
+ | | | ,))((((_ _____------~~~-. %,;(;(>';'~
+ o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~
+ ; ''''```` `: `:::|\,__,%% );`'; ~
+ | _ ) / `:|`----' `-'
+ ______/\/~ | / /
+ /~;;.____/;;' / ___--,-( `;;;/
+ / // _;______;'------~~~~~ /;;/\ /
+ // | | / ; \;;,\
+ (<_ | ; /',/-----' _>
+ \_| ||_ //~;~~~~~~~~~
+ `\_| (,~~
+ \~\
+ ~~
+ */
+});
+```
+
+
+## API
+
+The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode.
+
+### getStream(stream, [options])
+
+Get the `stream` as a string.
+
+#### options
+
+##### encoding
+
+Type: `string`<br>
+Default: `utf8`
+
+[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream.
+
+##### maxBuffer
+
+Type: `number`<br>
+Default: `Infinity`
+
+Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected.
+
+### getStream.buffer(stream, [options])
+
+Get the `stream` as a buffer.
+
+It honors the `maxBuffer` option as above, but it refers to byte length rather than string length.
+
+### getStream.array(stream, [options])
+
+Get the `stream` as an array of values.
+
+It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen:
+
+- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes).
+
+- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array.
+
+- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array.
+
+
+## Errors
+
+If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error.
+
+```js
+getStream(streamThatErrorsAtTheEnd('unicorn'))
+ .catch(err => {
+ console.log(err.bufferedData);
+ //=> 'unicorn'
+ });
+```
+
+
+## FAQ
+
+### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)?
+
+This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package.
+
+
+## Related
+
+- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/figgy-pudding/package.json b/deps/npm/node_modules/figgy-pudding/package.json
index 00fc272482..4f268f6ff0 100644
--- a/deps/npm/node_modules/figgy-pudding/package.json
+++ b/deps/npm/node_modules/figgy-pudding/package.json
@@ -20,7 +20,10 @@
"/",
"/cacache",
"/libnpmhook",
- "/libnpmhook/npm-registry-fetch"
+ "/libnpmorg",
+ "/libnpmteam",
+ "/npm-registry-fetch",
+ "/pacote"
],
"_resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz",
"_shasum": "862470112901c727a0e495a80744bd5baa1d6790",
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000000..40992555bf
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,55 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000000..f478d58dca
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/flush-write-stream/node_modules/readable-stream/README.md b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..23fe3f3e30
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000000..c141a99c26
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,58 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000000..f8b2db83db
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..46924cbfdf
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..a1ca813e5a
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..bf34ac65e1
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..5d1f8b876d
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..b3f4e85a2f
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000000..aefc68bd90
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,79 @@
+'use strict';
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+var util = require('util');
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..5a0a0d88ce
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/package.json b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..d6f84bde6b
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "readable-stream@^2.0.4",
+ "_id": "readable-stream@2.3.6",
+ "_inBundle": false,
+ "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_location": "/flush-write-stream/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@^2.0.4",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "^2.0.4",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.4"
+ },
+ "_requiredBy": [
+ "/flush-write-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
+ "_spec": "readable-stream@^2.0.4",
+ "_where": "/Users/aeschright/code/cli/node_modules/flush-write-stream",
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ },
+ "version": "2.3.6"
+}
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..ffd791d7ff
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/readable.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/transform.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..b1baba26da
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000000..ebdde6a85d
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/writable.js b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..3211a6f80d
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/readable-stream/writable.js
@@ -0,0 +1,8 @@
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+} else {
+ module.exports = Writable
+}
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/.travis.yml
new file mode 100644
index 0000000000..3347a72546
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/flush-write-stream/node_modules/string_decoder/README.md b/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..5fd58315ed
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..2e89e63f79
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..56012b0108
--- /dev/null
+++ b/deps/npm/node_modules/flush-write-stream/node_modules/string_decoder/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "string_decoder@~1.1.1",
+ "_id": "string_decoder@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_location": "/flush-write-stream/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.1.1",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.1"
+ },
+ "_requiredBy": [
+ "/flush-write-stream/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
+ "_spec": "string_decoder@~1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/flush-write-stream/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/from2/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000000..40992555bf
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,55 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/from2/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000000..f478d58dca
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/from2/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/from2/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/from2/node_modules/readable-stream/README.md b/deps/npm/node_modules/from2/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..23fe3f3e30
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/from2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000000..c141a99c26
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,58 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/from2/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000000..f8b2db83db
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/from2/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..46924cbfdf
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..a1ca813e5a
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..bf34ac65e1
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..5d1f8b876d
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..b3f4e85a2f
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000000..aefc68bd90
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,79 @@
+'use strict';
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+var util = require('util');
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..5a0a0d88ce
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/package.json b/deps/npm/node_modules/from2/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..699ff7e674
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "readable-stream@^2.0.0",
+ "_id": "readable-stream@2.3.6",
+ "_inBundle": false,
+ "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_location": "/from2/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@^2.0.0",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/from2"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
+ "_spec": "readable-stream@^2.0.0",
+ "_where": "/Users/aeschright/code/cli/node_modules/from2",
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ },
+ "version": "2.3.6"
+}
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/from2/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..ffd791d7ff
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/from2/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/readable.js b/deps/npm/node_modules/from2/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/transform.js b/deps/npm/node_modules/from2/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..b1baba26da
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/from2/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000000..ebdde6a85d
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/deps/npm/node_modules/from2/node_modules/readable-stream/writable.js b/deps/npm/node_modules/from2/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..3211a6f80d
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/readable-stream/writable.js
@@ -0,0 +1,8 @@
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+} else {
+ module.exports = Writable
+}
diff --git a/deps/npm/node_modules/from2/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/from2/node_modules/string_decoder/.travis.yml
new file mode 100644
index 0000000000..3347a72546
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/string_decoder/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
diff --git a/deps/npm/node_modules/from2/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/from2/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/string_decoder/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/from2/node_modules/string_decoder/README.md b/deps/npm/node_modules/from2/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..5fd58315ed
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/deps/npm/node_modules/from2/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/from2/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..2e89e63f79
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/from2/node_modules/string_decoder/package.json b/deps/npm/node_modules/from2/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..feec8efa23
--- /dev/null
+++ b/deps/npm/node_modules/from2/node_modules/string_decoder/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "string_decoder@~1.1.1",
+ "_id": "string_decoder@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_location": "/from2/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.1.1",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.1"
+ },
+ "_requiredBy": [
+ "/from2/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
+ "_spec": "string_decoder@~1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/from2/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000000..40992555bf
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,55 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000000..f478d58dca
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/fs-write-stream-atomic/node_modules/readable-stream/README.md b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..23fe3f3e30
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000000..c141a99c26
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,58 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000000..f8b2db83db
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..46924cbfdf
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..a1ca813e5a
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..bf34ac65e1
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..5d1f8b876d
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..b3f4e85a2f
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000000..aefc68bd90
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,79 @@
+'use strict';
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+var util = require('util');
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..5a0a0d88ce
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/package.json b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..6ef1cd32a9
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "readable-stream@1 || 2",
+ "_id": "readable-stream@2.3.6",
+ "_inBundle": false,
+ "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_location": "/fs-write-stream-atomic/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@1 || 2",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "1 || 2",
+ "saveSpec": null,
+ "fetchSpec": "1 || 2"
+ },
+ "_requiredBy": [
+ "/fs-write-stream-atomic"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
+ "_spec": "readable-stream@1 || 2",
+ "_where": "/Users/aeschright/code/cli/node_modules/fs-write-stream-atomic",
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ },
+ "version": "2.3.6"
+}
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..ffd791d7ff
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/readable.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/transform.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..b1baba26da
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000000..ebdde6a85d
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/writable.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..3211a6f80d
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/writable.js
@@ -0,0 +1,8 @@
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+} else {
+ module.exports = Writable
+}
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/.travis.yml
new file mode 100644
index 0000000000..3347a72546
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/fs-write-stream-atomic/node_modules/string_decoder/README.md b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..5fd58315ed
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..2e89e63f79
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/package.json b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..65d08e2cac
--- /dev/null
+++ b/deps/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "string_decoder@~1.1.1",
+ "_id": "string_decoder@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_location": "/fs-write-stream-atomic/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.1.1",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.1"
+ },
+ "_requiredBy": [
+ "/fs-write-stream-atomic/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
+ "_spec": "string_decoder@~1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/fs-write-stream-atomic/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/gauge/node_modules/aproba/LICENSE b/deps/npm/node_modules/gauge/node_modules/aproba/LICENSE
new file mode 100644
index 0000000000..2a4982dc40
--- /dev/null
+++ b/deps/npm/node_modules/gauge/node_modules/aproba/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/gauge/node_modules/aproba/README.md b/deps/npm/node_modules/gauge/node_modules/aproba/README.md
new file mode 100644
index 0000000000..e94799201c
--- /dev/null
+++ b/deps/npm/node_modules/gauge/node_modules/aproba/README.md
@@ -0,0 +1,93 @@
+aproba
+======
+
+A ridiculously light-weight function argument validator
+
+```
+var validate = require("aproba")
+
+function myfunc(a, b, c) {
+ // `a` must be a string, `b` a number, `c` a function
+ validate('SNF', arguments) // [a,b,c] is also valid
+}
+
+myfunc('test', 23, function () {}) // ok
+myfunc(123, 23, function () {}) // type error
+myfunc('test', 23) // missing arg error
+myfunc('test', 23, function () {}, true) // too many args error
+
+```
+
+Valid types are:
+
+| type | description
+| :--: | :----------
+| * | matches any type
+| A | `Array.isArray` OR an `arguments` object
+| S | typeof == string
+| N | typeof == number
+| F | typeof == function
+| O | typeof == object and not type A and not type E
+| B | typeof == boolean
+| E | `instanceof Error` OR `null` **(special: see below)**
+| Z | == `null`
+
+Validation failures throw one of three exception types, distinguished by a
+`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
+
+If you pass in an invalid type then it will throw with a code of
+`EUNKNOWNTYPE`.
+
+If an **error** argument is found and is not null then the remaining
+arguments are optional. That is, if you say `ESO` then that's like using a
+non-magical `E` in: `E|ESO|ZSO`.
+
+### But I have optional arguments?!
+
+You can provide more than one signature by separating them with pipes `|`.
+If any signature matches the arguments then they'll be considered valid.
+
+So for example, say you wanted to write a signature for
+`fs.createWriteStream`. The docs for it describe it thusly:
+
+```
+fs.createWriteStream(path[, options])
+```
+
+This would be a signature of `SO|S`. That is, a string and and object, or
+just a string.
+
+Now, if you read the full `fs` docs, you'll see that actually path can ALSO
+be a buffer. And options can be a string, that is:
+```
+path <String> | <Buffer>
+options <String> | <Object>
+```
+
+To reproduce this you have to fully enumerate all of the possible
+combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
+awkwardness is a feature: It reminds you of the complexity you're adding to
+your API when you do this sort of thing.
+
+
+### Browser support
+
+This has no dependencies and should work in browsers, though you'll have
+noisier stack traces.
+
+### Why this exists
+
+I wanted a very simple argument validator. It needed to do two things:
+
+1. Be more concise and easier to use than assertions
+
+2. Not encourage an infinite bikeshed of DSLs
+
+This is why types are specified by a single character and there's no such
+thing as an optional argument.
+
+This is not intended to validate user data. This is specifically about
+asserting the interface of your functions.
+
+If you need greater validation, I encourage you to write them by hand or
+look elsewhere.
diff --git a/deps/npm/node_modules/gauge/node_modules/aproba/index.js b/deps/npm/node_modules/gauge/node_modules/aproba/index.js
new file mode 100644
index 0000000000..6f3f797c09
--- /dev/null
+++ b/deps/npm/node_modules/gauge/node_modules/aproba/index.js
@@ -0,0 +1,105 @@
+'use strict'
+
+function isArguments (thingy) {
+ return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
+}
+
+var types = {
+ '*': {label: 'any', check: function () { return true }},
+ A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
+ S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
+ N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
+ F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
+ O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
+ B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
+ E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
+ Z: {label: 'null', check: function (thingy) { return thingy == null }}
+}
+
+function addSchema (schema, arity) {
+ var group = arity[schema.length] = arity[schema.length] || []
+ if (group.indexOf(schema) === -1) group.push(schema)
+}
+
+var validate = module.exports = function (rawSchemas, args) {
+ if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
+ if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
+ if (!args) throw missingRequiredArg(1, 'args')
+ if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
+ if (!types.A.check(args)) throw invalidType(1, ['array'], args)
+ var schemas = rawSchemas.split('|')
+ var arity = {}
+
+ schemas.forEach(function (schema) {
+ for (var ii = 0; ii < schema.length; ++ii) {
+ var type = schema[ii]
+ if (!types[type]) throw unknownType(ii, type)
+ }
+ if (/E.*E/.test(schema)) throw moreThanOneError(schema)
+ addSchema(schema, arity)
+ if (/E/.test(schema)) {
+ addSchema(schema.replace(/E.*$/, 'E'), arity)
+ addSchema(schema.replace(/E/, 'Z'), arity)
+ if (schema.length === 1) addSchema('', arity)
+ }
+ })
+ var matching = arity[args.length]
+ if (!matching) {
+ throw wrongNumberOfArgs(Object.keys(arity), args.length)
+ }
+ for (var ii = 0; ii < args.length; ++ii) {
+ var newMatching = matching.filter(function (schema) {
+ var type = schema[ii]
+ var typeCheck = types[type].check
+ return typeCheck(args[ii])
+ })
+ if (!newMatching.length) {
+ var labels = matching.map(function (schema) {
+ return types[schema[ii]].label
+ }).filter(function (schema) { return schema != null })
+ throw invalidType(ii, labels, args[ii])
+ }
+ matching = newMatching
+ }
+}
+
+function missingRequiredArg (num) {
+ return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
+}
+
+function unknownType (num, type) {
+ return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
+}
+
+function invalidType (num, expectedTypes, value) {
+ var valueType
+ Object.keys(types).forEach(function (typeCode) {
+ if (types[typeCode].check(value)) valueType = types[typeCode].label
+ })
+ return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
+ englishList(expectedTypes) + ' but got ' + valueType)
+}
+
+function englishList (list) {
+ return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
+}
+
+function wrongNumberOfArgs (expected, got) {
+ var english = englishList(expected)
+ var args = expected.every(function (ex) { return ex.length === 1 })
+ ? 'argument'
+ : 'arguments'
+ return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
+}
+
+function moreThanOneError (schema) {
+ return newException('ETOOMANYERRORTYPES',
+ 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
+}
+
+function newException (code, msg) {
+ var e = new Error(msg)
+ e.code = code
+ if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
+ return e
+}
diff --git a/deps/npm/node_modules/gauge/node_modules/aproba/package.json b/deps/npm/node_modules/gauge/node_modules/aproba/package.json
new file mode 100644
index 0000000000..f654576f8e
--- /dev/null
+++ b/deps/npm/node_modules/gauge/node_modules/aproba/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "aproba@^1.0.3",
+ "_id": "aproba@1.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "_location": "/gauge/aproba",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "aproba@^1.0.3",
+ "name": "aproba",
+ "escapedName": "aproba",
+ "rawSpec": "^1.0.3",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.3"
+ },
+ "_requiredBy": [
+ "/gauge"
+ ],
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
+ "_spec": "aproba@^1.0.3",
+ "_where": "/Users/aeschright/code/cli/node_modules/gauge",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/aproba/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "A ridiculously light-weight argument validator (now browser friendly)",
+ "devDependencies": {
+ "standard": "^10.0.3",
+ "tap": "^10.0.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/iarna/aproba",
+ "keywords": [
+ "argument",
+ "validate"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "aproba",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/aproba.git"
+ },
+ "scripts": {
+ "test": "standard && tap -j3 test/*.js"
+ },
+ "version": "1.2.0"
+}
diff --git a/deps/npm/node_modules/genfun/CHANGELOG.md b/deps/npm/node_modules/genfun/CHANGELOG.md
index c72d719ea3..461e22fc59 100644
--- a/deps/npm/node_modules/genfun/CHANGELOG.md
+++ b/deps/npm/node_modules/genfun/CHANGELOG.md
@@ -2,6 +2,23 @@
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/genfun/compare/v4.0.1...v5.0.0) (2017-12-12)
+
+
+### Bug Fixes
+
+* **license:** relicense to MIT ([857e720](https://github.com/zkat/genfun/commit/857e720))
+* **platforms:** drop support for node 4 and 7 ([2cdbe32](https://github.com/zkat/genfun/commit/2cdbe32))
+
+
+### BREAKING CHANGES
+
+* **platforms:** node 4 and node 7 are no longer officially supported
+* **license:** license changed from CC0-1.0 to MIT
+
+
+
<a name="4.0.1"></a>
## [4.0.1](https://github.com/zkat/genfun/compare/v4.0.0...v4.0.1) (2017-04-16)
diff --git a/deps/npm/node_modules/genfun/LICENSE b/deps/npm/node_modules/genfun/LICENSE
new file mode 100644
index 0000000000..1e0a1d6f8d
--- /dev/null
+++ b/deps/npm/node_modules/genfun/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+Copyright (c) 2017 Kat Marchán
+
+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/genfun/lib/method.js b/deps/npm/node_modules/genfun/lib/method.js
index 5a9d9f788e..eddb7d3253 100644
--- a/deps/npm/node_modules/genfun/lib/method.js
+++ b/deps/npm/node_modules/genfun/lib/method.js
@@ -46,13 +46,9 @@ function Method (genfun, selector, func) {
} else {
method.minimalSelector++
if (!Object.hasOwnProperty.call(object, Role.roleKeyName)) {
- if (Object.defineProperty) {
- // Object.defineProperty is JS 1.8.0+
- Object.defineProperty(
- object, Role.roleKeyName, {value: [], enumerable: false})
- } else {
- object[Role.roleKeyName] = []
- }
+ // Object.defineProperty is JS 1.8.0+
+ Object.defineProperty(
+ object, Role.roleKeyName, {value: [], enumerable: false})
}
// XXX HACK - no method replacement now, so we just shove
// it in a place where it'll always show up first. This
diff --git a/deps/npm/node_modules/genfun/package.json b/deps/npm/node_modules/genfun/package.json
index 60295ade5d..4a557eb45a 100644
--- a/deps/npm/node_modules/genfun/package.json
+++ b/deps/npm/node_modules/genfun/package.json
@@ -1,27 +1,27 @@
{
- "_from": "genfun@^4.0.1",
- "_id": "genfun@4.0.1",
+ "_from": "genfun@^5.0.0",
+ "_id": "genfun@5.0.0",
"_inBundle": false,
- "_integrity": "sha1-7RAEHy5KfxsKOEZtF6XD4n3x38E=",
+ "_integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==",
"_location": "/genfun",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "genfun@^4.0.1",
+ "raw": "genfun@^5.0.0",
"name": "genfun",
"escapedName": "genfun",
- "rawSpec": "^4.0.1",
+ "rawSpec": "^5.0.0",
"saveSpec": null,
- "fetchSpec": "^4.0.1"
+ "fetchSpec": "^5.0.0"
},
"_requiredBy": [
"/protoduck"
],
- "_resolved": "https://registry.npmjs.org/genfun/-/genfun-4.0.1.tgz",
- "_shasum": "ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1",
- "_spec": "genfun@^4.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/protoduck",
+ "_resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz",
+ "_shasum": "9dd9710a06900a5c4a5bf57aca5da4e52fe76537",
+ "_spec": "genfun@^5.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/protoduck",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -59,7 +59,7 @@
"polymorphic",
"protocols"
],
- "license": "CC0-1.0",
+ "license": "MIT",
"main": "lib/genfun.js",
"name": "genfun",
"repository": {
@@ -75,5 +75,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "4.0.1"
+ "version": "5.0.0"
}
diff --git a/deps/npm/node_modules/gentle-fs/node_modules/aproba/LICENSE b/deps/npm/node_modules/gentle-fs/node_modules/aproba/LICENSE
new file mode 100644
index 0000000000..2a4982dc40
--- /dev/null
+++ b/deps/npm/node_modules/gentle-fs/node_modules/aproba/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/gentle-fs/node_modules/aproba/README.md b/deps/npm/node_modules/gentle-fs/node_modules/aproba/README.md
new file mode 100644
index 0000000000..e94799201c
--- /dev/null
+++ b/deps/npm/node_modules/gentle-fs/node_modules/aproba/README.md
@@ -0,0 +1,93 @@
+aproba
+======
+
+A ridiculously light-weight function argument validator
+
+```
+var validate = require("aproba")
+
+function myfunc(a, b, c) {
+ // `a` must be a string, `b` a number, `c` a function
+ validate('SNF', arguments) // [a,b,c] is also valid
+}
+
+myfunc('test', 23, function () {}) // ok
+myfunc(123, 23, function () {}) // type error
+myfunc('test', 23) // missing arg error
+myfunc('test', 23, function () {}, true) // too many args error
+
+```
+
+Valid types are:
+
+| type | description
+| :--: | :----------
+| * | matches any type
+| A | `Array.isArray` OR an `arguments` object
+| S | typeof == string
+| N | typeof == number
+| F | typeof == function
+| O | typeof == object and not type A and not type E
+| B | typeof == boolean
+| E | `instanceof Error` OR `null` **(special: see below)**
+| Z | == `null`
+
+Validation failures throw one of three exception types, distinguished by a
+`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
+
+If you pass in an invalid type then it will throw with a code of
+`EUNKNOWNTYPE`.
+
+If an **error** argument is found and is not null then the remaining
+arguments are optional. That is, if you say `ESO` then that's like using a
+non-magical `E` in: `E|ESO|ZSO`.
+
+### But I have optional arguments?!
+
+You can provide more than one signature by separating them with pipes `|`.
+If any signature matches the arguments then they'll be considered valid.
+
+So for example, say you wanted to write a signature for
+`fs.createWriteStream`. The docs for it describe it thusly:
+
+```
+fs.createWriteStream(path[, options])
+```
+
+This would be a signature of `SO|S`. That is, a string and and object, or
+just a string.
+
+Now, if you read the full `fs` docs, you'll see that actually path can ALSO
+be a buffer. And options can be a string, that is:
+```
+path <String> | <Buffer>
+options <String> | <Object>
+```
+
+To reproduce this you have to fully enumerate all of the possible
+combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
+awkwardness is a feature: It reminds you of the complexity you're adding to
+your API when you do this sort of thing.
+
+
+### Browser support
+
+This has no dependencies and should work in browsers, though you'll have
+noisier stack traces.
+
+### Why this exists
+
+I wanted a very simple argument validator. It needed to do two things:
+
+1. Be more concise and easier to use than assertions
+
+2. Not encourage an infinite bikeshed of DSLs
+
+This is why types are specified by a single character and there's no such
+thing as an optional argument.
+
+This is not intended to validate user data. This is specifically about
+asserting the interface of your functions.
+
+If you need greater validation, I encourage you to write them by hand or
+look elsewhere.
diff --git a/deps/npm/node_modules/gentle-fs/node_modules/aproba/index.js b/deps/npm/node_modules/gentle-fs/node_modules/aproba/index.js
new file mode 100644
index 0000000000..6f3f797c09
--- /dev/null
+++ b/deps/npm/node_modules/gentle-fs/node_modules/aproba/index.js
@@ -0,0 +1,105 @@
+'use strict'
+
+function isArguments (thingy) {
+ return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
+}
+
+var types = {
+ '*': {label: 'any', check: function () { return true }},
+ A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
+ S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
+ N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
+ F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
+ O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
+ B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
+ E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
+ Z: {label: 'null', check: function (thingy) { return thingy == null }}
+}
+
+function addSchema (schema, arity) {
+ var group = arity[schema.length] = arity[schema.length] || []
+ if (group.indexOf(schema) === -1) group.push(schema)
+}
+
+var validate = module.exports = function (rawSchemas, args) {
+ if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
+ if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
+ if (!args) throw missingRequiredArg(1, 'args')
+ if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
+ if (!types.A.check(args)) throw invalidType(1, ['array'], args)
+ var schemas = rawSchemas.split('|')
+ var arity = {}
+
+ schemas.forEach(function (schema) {
+ for (var ii = 0; ii < schema.length; ++ii) {
+ var type = schema[ii]
+ if (!types[type]) throw unknownType(ii, type)
+ }
+ if (/E.*E/.test(schema)) throw moreThanOneError(schema)
+ addSchema(schema, arity)
+ if (/E/.test(schema)) {
+ addSchema(schema.replace(/E.*$/, 'E'), arity)
+ addSchema(schema.replace(/E/, 'Z'), arity)
+ if (schema.length === 1) addSchema('', arity)
+ }
+ })
+ var matching = arity[args.length]
+ if (!matching) {
+ throw wrongNumberOfArgs(Object.keys(arity), args.length)
+ }
+ for (var ii = 0; ii < args.length; ++ii) {
+ var newMatching = matching.filter(function (schema) {
+ var type = schema[ii]
+ var typeCheck = types[type].check
+ return typeCheck(args[ii])
+ })
+ if (!newMatching.length) {
+ var labels = matching.map(function (schema) {
+ return types[schema[ii]].label
+ }).filter(function (schema) { return schema != null })
+ throw invalidType(ii, labels, args[ii])
+ }
+ matching = newMatching
+ }
+}
+
+function missingRequiredArg (num) {
+ return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
+}
+
+function unknownType (num, type) {
+ return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
+}
+
+function invalidType (num, expectedTypes, value) {
+ var valueType
+ Object.keys(types).forEach(function (typeCode) {
+ if (types[typeCode].check(value)) valueType = types[typeCode].label
+ })
+ return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
+ englishList(expectedTypes) + ' but got ' + valueType)
+}
+
+function englishList (list) {
+ return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
+}
+
+function wrongNumberOfArgs (expected, got) {
+ var english = englishList(expected)
+ var args = expected.every(function (ex) { return ex.length === 1 })
+ ? 'argument'
+ : 'arguments'
+ return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
+}
+
+function moreThanOneError (schema) {
+ return newException('ETOOMANYERRORTYPES',
+ 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
+}
+
+function newException (code, msg) {
+ var e = new Error(msg)
+ e.code = code
+ if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
+ return e
+}
diff --git a/deps/npm/node_modules/gentle-fs/node_modules/aproba/package.json b/deps/npm/node_modules/gentle-fs/node_modules/aproba/package.json
new file mode 100644
index 0000000000..34b51a0df2
--- /dev/null
+++ b/deps/npm/node_modules/gentle-fs/node_modules/aproba/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "aproba@^1.1.2",
+ "_id": "aproba@1.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "_location": "/gentle-fs/aproba",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "aproba@^1.1.2",
+ "name": "aproba",
+ "escapedName": "aproba",
+ "rawSpec": "^1.1.2",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.2"
+ },
+ "_requiredBy": [
+ "/gentle-fs"
+ ],
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
+ "_spec": "aproba@^1.1.2",
+ "_where": "/Users/aeschright/code/cli/node_modules/gentle-fs",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/aproba/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "A ridiculously light-weight argument validator (now browser friendly)",
+ "devDependencies": {
+ "standard": "^10.0.3",
+ "tap": "^10.0.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/iarna/aproba",
+ "keywords": [
+ "argument",
+ "validate"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "aproba",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/aproba.git"
+ },
+ "scripts": {
+ "test": "standard && tap -j3 test/*.js"
+ },
+ "version": "1.2.0"
+}
diff --git a/deps/npm/node_modules/get-stream/buffer-stream.js b/deps/npm/node_modules/get-stream/buffer-stream.js
index ae45d3d9e7..4121c8e56f 100644
--- a/deps/npm/node_modules/get-stream/buffer-stream.js
+++ b/deps/npm/node_modules/get-stream/buffer-stream.js
@@ -1,11 +1,11 @@
'use strict';
-const PassThrough = require('stream').PassThrough;
+const {PassThrough} = require('stream');
-module.exports = opts => {
- opts = Object.assign({}, opts);
+module.exports = options => {
+ options = Object.assign({}, options);
- const array = opts.array;
- let encoding = opts.encoding;
+ const {array} = options;
+ let {encoding} = options;
const buffer = encoding === 'buffer';
let objectMode = false;
diff --git a/deps/npm/node_modules/get-stream/index.js b/deps/npm/node_modules/get-stream/index.js
index 2dc5ee96af..7e5584a63d 100644
--- a/deps/npm/node_modules/get-stream/index.js
+++ b/deps/npm/node_modules/get-stream/index.js
@@ -1,51 +1,50 @@
'use strict';
+const pump = require('pump');
const bufferStream = require('./buffer-stream');
-function getStream(inputStream, opts) {
+class MaxBufferError extends Error {
+ constructor() {
+ super('maxBuffer exceeded');
+ this.name = 'MaxBufferError';
+ }
+}
+
+function getStream(inputStream, options) {
if (!inputStream) {
return Promise.reject(new Error('Expected a stream'));
}
- opts = Object.assign({maxBuffer: Infinity}, opts);
+ options = Object.assign({maxBuffer: Infinity}, options);
- const maxBuffer = opts.maxBuffer;
- let stream;
- let clean;
+ const {maxBuffer} = options;
- const p = new Promise((resolve, reject) => {
- const error = err => {
- if (err) { // null check
- err.bufferedData = stream.getBufferedValue();
+ let stream;
+ return new Promise((resolve, reject) => {
+ const rejectPromise = error => {
+ if (error) { // A null check
+ error.bufferedData = stream.getBufferedValue();
}
-
- reject(err);
+ reject(error);
};
- stream = bufferStream(opts);
- inputStream.once('error', error);
- inputStream.pipe(stream);
+ stream = pump(inputStream, bufferStream(options), error => {
+ if (error) {
+ rejectPromise(error);
+ return;
+ }
+
+ resolve();
+ });
stream.on('data', () => {
if (stream.getBufferedLength() > maxBuffer) {
- reject(new Error('maxBuffer exceeded'));
+ rejectPromise(new MaxBufferError());
}
});
- stream.once('error', error);
- stream.on('end', resolve);
-
- clean = () => {
- // some streams doesn't implement the `stream.Readable` interface correctly
- if (inputStream.unpipe) {
- inputStream.unpipe(stream);
- }
- };
- });
-
- p.then(clean, clean);
-
- return p.then(() => stream.getBufferedValue());
+ }).then(() => stream.getBufferedValue());
}
module.exports = getStream;
-module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'}));
-module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true}));
+module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'}));
+module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true}));
+module.exports.MaxBufferError = MaxBufferError;
diff --git a/deps/npm/node_modules/get-stream/license b/deps/npm/node_modules/get-stream/license
index 654d0bfe94..e7af2f7710 100644
--- a/deps/npm/node_modules/get-stream/license
+++ b/deps/npm/node_modules/get-stream/license
@@ -1,21 +1,9 @@
-The MIT License (MIT)
+MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+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 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.
+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/get-stream/package.json b/deps/npm/node_modules/get-stream/package.json
index 3042176e14..a34aa1daf0 100644
--- a/deps/npm/node_modules/get-stream/package.json
+++ b/deps/npm/node_modules/get-stream/package.json
@@ -1,29 +1,35 @@
{
- "_from": "get-stream@^3.0.0",
- "_id": "get-stream@3.0.0",
+ "_from": "get-stream@",
+ "_id": "get-stream@4.1.0",
"_inBundle": false,
- "_integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
+ "_integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
"_location": "/get-stream",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "tag",
"registry": true,
- "raw": "get-stream@^3.0.0",
+ "raw": "get-stream@",
"name": "get-stream",
"escapedName": "get-stream",
- "rawSpec": "^3.0.0",
+ "rawSpec": "",
"saveSpec": null,
- "fetchSpec": "^3.0.0"
+ "fetchSpec": "latest"
},
"_requiredBy": [
- "/execa",
- "/got",
+ "#DEV:/",
+ "#USER",
+ "/libnpm/libnpmhook",
+ "/libnpmaccess",
+ "/libnpmorg",
+ "/libnpmpublish",
+ "/libnpmsearch",
+ "/libnpmteam",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
- "_shasum": "8e943d1358dc37555054ecbe2edb05aa174ede14",
- "_spec": "get-stream@^3.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/pacote",
+ "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
+ "_shasum": "c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5",
+ "_spec": "get-stream@",
+ "_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -33,6 +39,9 @@
"url": "https://github.com/sindresorhus/get-stream/issues"
},
"bundleDependencies": false,
+ "dependencies": {
+ "pump": "^3.0.0"
+ },
"deprecated": false,
"description": "Get a stream as a string, buffer, or array",
"devDependencies": {
@@ -41,7 +50,7 @@
"xo": "*"
},
"engines": {
- "node": ">=4"
+ "node": ">=6"
},
"files": [
"index.js",
@@ -54,7 +63,6 @@
"promise",
"concat",
"string",
- "str",
"text",
"buffer",
"read",
@@ -63,8 +71,7 @@
"readable",
"readablestream",
"array",
- "object",
- "obj"
+ "object"
],
"license": "MIT",
"name": "get-stream",
@@ -75,8 +82,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "3.0.0",
- "xo": {
- "esnext": true
- }
+ "version": "4.1.0"
}
diff --git a/deps/npm/node_modules/get-stream/readme.md b/deps/npm/node_modules/get-stream/readme.md
index 73b188fb42..b87a4d37ce 100644
--- a/deps/npm/node_modules/get-stream/readme.md
+++ b/deps/npm/node_modules/get-stream/readme.md
@@ -6,7 +6,7 @@
## Install
```
-$ npm install --save get-stream
+$ npm install get-stream
```
@@ -15,10 +15,11 @@ $ npm install --save get-stream
```js
const fs = require('fs');
const getStream = require('get-stream');
-const stream = fs.createReadStream('unicorn.txt');
-getStream(stream).then(str => {
- console.log(str);
+(async () => {
+ const stream = fs.createReadStream('unicorn.txt');
+
+ console.log(await getStream(stream));
/*
,,))))))));,
__)))))))))))))),
@@ -40,7 +41,7 @@ getStream(stream).then(str => {
\~\
~~
*/
-});
+})();
```
@@ -54,6 +55,8 @@ Get the `stream` as a string.
#### options
+Type: `Object`
+
##### encoding
Type: `string`<br>
@@ -66,7 +69,7 @@ Default: `utf8`
Type: `number`<br>
Default: `Infinity`
-Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected.
+Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `getStream.MaxBufferError` error.
### getStream.buffer(stream, [options])
@@ -92,11 +95,14 @@ It honors both the `maxBuffer` and `encoding` options. The behavior changes slig
If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error.
```js
-getStream(streamThatErrorsAtTheEnd('unicorn'))
- .catch(err => {
- console.log(err.bufferedData);
+(async () => {
+ try {
+ await getStream(streamThatErrorsAtTheEnd('unicorn'));
+ } catch (error) {
+ console.log(error.bufferedData);
//=> 'unicorn'
- });
+ }
+})()
```
diff --git a/deps/npm/node_modules/got/node_modules/get-stream/buffer-stream.js b/deps/npm/node_modules/got/node_modules/get-stream/buffer-stream.js
new file mode 100644
index 0000000000..ae45d3d9e7
--- /dev/null
+++ b/deps/npm/node_modules/got/node_modules/get-stream/buffer-stream.js
@@ -0,0 +1,51 @@
+'use strict';
+const PassThrough = require('stream').PassThrough;
+
+module.exports = opts => {
+ opts = Object.assign({}, opts);
+
+ const array = opts.array;
+ let encoding = opts.encoding;
+ const buffer = encoding === 'buffer';
+ let objectMode = false;
+
+ if (array) {
+ objectMode = !(encoding || buffer);
+ } else {
+ encoding = encoding || 'utf8';
+ }
+
+ if (buffer) {
+ encoding = null;
+ }
+
+ let len = 0;
+ const ret = [];
+ const stream = new PassThrough({objectMode});
+
+ if (encoding) {
+ stream.setEncoding(encoding);
+ }
+
+ stream.on('data', chunk => {
+ ret.push(chunk);
+
+ if (objectMode) {
+ len = ret.length;
+ } else {
+ len += chunk.length;
+ }
+ });
+
+ stream.getBufferedValue = () => {
+ if (array) {
+ return ret;
+ }
+
+ return buffer ? Buffer.concat(ret, len) : ret.join('');
+ };
+
+ stream.getBufferedLength = () => len;
+
+ return stream;
+};
diff --git a/deps/npm/node_modules/got/node_modules/get-stream/index.js b/deps/npm/node_modules/got/node_modules/get-stream/index.js
new file mode 100644
index 0000000000..2dc5ee96af
--- /dev/null
+++ b/deps/npm/node_modules/got/node_modules/get-stream/index.js
@@ -0,0 +1,51 @@
+'use strict';
+const bufferStream = require('./buffer-stream');
+
+function getStream(inputStream, opts) {
+ if (!inputStream) {
+ return Promise.reject(new Error('Expected a stream'));
+ }
+
+ opts = Object.assign({maxBuffer: Infinity}, opts);
+
+ const maxBuffer = opts.maxBuffer;
+ let stream;
+ let clean;
+
+ const p = new Promise((resolve, reject) => {
+ const error = err => {
+ if (err) { // null check
+ err.bufferedData = stream.getBufferedValue();
+ }
+
+ reject(err);
+ };
+
+ stream = bufferStream(opts);
+ inputStream.once('error', error);
+ inputStream.pipe(stream);
+
+ stream.on('data', () => {
+ if (stream.getBufferedLength() > maxBuffer) {
+ reject(new Error('maxBuffer exceeded'));
+ }
+ });
+ stream.once('error', error);
+ stream.on('end', resolve);
+
+ clean = () => {
+ // some streams doesn't implement the `stream.Readable` interface correctly
+ if (inputStream.unpipe) {
+ inputStream.unpipe(stream);
+ }
+ };
+ });
+
+ p.then(clean, clean);
+
+ return p.then(() => stream.getBufferedValue());
+}
+
+module.exports = getStream;
+module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'}));
+module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true}));
diff --git a/deps/npm/node_modules/got/node_modules/get-stream/license b/deps/npm/node_modules/got/node_modules/get-stream/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/got/node_modules/get-stream/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/got/node_modules/get-stream/package.json b/deps/npm/node_modules/got/node_modules/get-stream/package.json
new file mode 100644
index 0000000000..e8eb498409
--- /dev/null
+++ b/deps/npm/node_modules/got/node_modules/get-stream/package.json
@@ -0,0 +1,80 @@
+{
+ "_from": "get-stream@^3.0.0",
+ "_id": "get-stream@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
+ "_location": "/got/get-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "get-stream@^3.0.0",
+ "name": "get-stream",
+ "escapedName": "get-stream",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/got"
+ ],
+ "_resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
+ "_shasum": "8e943d1358dc37555054ecbe2edb05aa174ede14",
+ "_spec": "get-stream@^3.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/got",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/get-stream/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Get a stream as a string, buffer, or array",
+ "devDependencies": {
+ "ava": "*",
+ "into-stream": "^3.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js",
+ "buffer-stream.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/get-stream#readme",
+ "keywords": [
+ "get",
+ "stream",
+ "promise",
+ "concat",
+ "string",
+ "str",
+ "text",
+ "buffer",
+ "read",
+ "data",
+ "consume",
+ "readable",
+ "readablestream",
+ "array",
+ "object",
+ "obj"
+ ],
+ "license": "MIT",
+ "name": "get-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/get-stream.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/deps/npm/node_modules/got/node_modules/get-stream/readme.md b/deps/npm/node_modules/got/node_modules/get-stream/readme.md
new file mode 100644
index 0000000000..73b188fb42
--- /dev/null
+++ b/deps/npm/node_modules/got/node_modules/get-stream/readme.md
@@ -0,0 +1,117 @@
+# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream)
+
+> Get a stream as a string, buffer, or array
+
+
+## Install
+
+```
+$ npm install --save get-stream
+```
+
+
+## Usage
+
+```js
+const fs = require('fs');
+const getStream = require('get-stream');
+const stream = fs.createReadStream('unicorn.txt');
+
+getStream(stream).then(str => {
+ console.log(str);
+ /*
+ ,,))))))));,
+ __)))))))))))))),
+ \|/ -\(((((''''((((((((.
+ -*-==//////(('' . `)))))),
+ /|\ ))| o ;-. '((((( ,(,
+ ( `| / ) ;))))' ,_))^;(~
+ | | | ,))((((_ _____------~~~-. %,;(;(>';'~
+ o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~
+ ; ''''```` `: `:::|\,__,%% );`'; ~
+ | _ ) / `:|`----' `-'
+ ______/\/~ | / /
+ /~;;.____/;;' / ___--,-( `;;;/
+ / // _;______;'------~~~~~ /;;/\ /
+ // | | / ; \;;,\
+ (<_ | ; /',/-----' _>
+ \_| ||_ //~;~~~~~~~~~
+ `\_| (,~~
+ \~\
+ ~~
+ */
+});
+```
+
+
+## API
+
+The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode.
+
+### getStream(stream, [options])
+
+Get the `stream` as a string.
+
+#### options
+
+##### encoding
+
+Type: `string`<br>
+Default: `utf8`
+
+[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream.
+
+##### maxBuffer
+
+Type: `number`<br>
+Default: `Infinity`
+
+Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected.
+
+### getStream.buffer(stream, [options])
+
+Get the `stream` as a buffer.
+
+It honors the `maxBuffer` option as above, but it refers to byte length rather than string length.
+
+### getStream.array(stream, [options])
+
+Get the `stream` as an array of values.
+
+It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen:
+
+- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes).
+
+- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array.
+
+- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array.
+
+
+## Errors
+
+If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error.
+
+```js
+getStream(streamThatErrorsAtTheEnd('unicorn'))
+ .catch(err => {
+ console.log(err.bufferedData);
+ //=> 'unicorn'
+ });
+```
+
+
+## FAQ
+
+### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)?
+
+This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package.
+
+
+## Related
+
+- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/is-ci/node_modules/ci-info/CHANGELOG.md b/deps/npm/node_modules/is-ci/node_modules/ci-info/CHANGELOG.md
new file mode 100644
index 0000000000..859a0ad12a
--- /dev/null
+++ b/deps/npm/node_modules/is-ci/node_modules/ci-info/CHANGELOG.md
@@ -0,0 +1,62 @@
+# Changelog
+
+## v1.6.0
+
+* feat: add Sail CI support
+* feat: add Buddy support
+* feat: add Bitrise support
+* feat: detect Jenkins PRs
+* feat: detect Drone PRs
+
+## v1.5.1
+
+* fix: use full path to vendors.json
+
+## v1.5.0
+
+* feat: add dsari detection ([#15](https://github.com/watson/ci-info/pull/15))
+* feat: add ci.isPR ([#16](https://github.com/watson/ci-info/pull/16))
+
+## v1.4.0
+
+* feat: add Cirrus CI detection ([#13](https://github.com/watson/ci-info/pull/13))
+* feat: add Shippable CI detection ([#14](https://github.com/watson/ci-info/pull/14))
+
+## v1.3.1
+
+* chore: reduce npm package size by not including `.github` folder content ([#11](https://github.com/watson/ci-info/pull/11))
+
+## v1.3.0
+
+* feat: add support for Strider CD
+* chore: deprecate vendor constant `TDDIUM` in favor of `SOLANO`
+* docs: add missing vendor constant to docs
+
+## v1.2.0
+
+* feat: detect solano-ci ([#9](https://github.com/watson/ci-info/pull/9))
+
+## v1.1.3
+
+* fix: fix spelling of Hunson in `ci.name`
+
+## v1.1.2
+
+* fix: no more false positive matches for Jenkins
+
+## v1.1.1
+
+* docs: sort lists of CI servers in README.md
+* docs: add missing AWS CodeBuild to the docs
+
+## v1.1.0
+
+* feat: add AWS CodeBuild to CI detection ([#2](https://github.com/watson/ci-info/pull/2))
+
+## v1.0.1
+
+* chore: reduce npm package size by using an `.npmignore` file ([#3](https://github.com/watson/ci-info/pull/3))
+
+## v1.0.0
+
+* Initial release
diff --git a/deps/npm/node_modules/is-ci/node_modules/ci-info/LICENSE b/deps/npm/node_modules/is-ci/node_modules/ci-info/LICENSE
new file mode 100644
index 0000000000..67846832ec
--- /dev/null
+++ b/deps/npm/node_modules/is-ci/node_modules/ci-info/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016-2018 Thomas Watson Steen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/deps/npm/node_modules/is-ci/node_modules/ci-info/README.md b/deps/npm/node_modules/is-ci/node_modules/ci-info/README.md
new file mode 100644
index 0000000000..c88be8f82d
--- /dev/null
+++ b/deps/npm/node_modules/is-ci/node_modules/ci-info/README.md
@@ -0,0 +1,107 @@
+# ci-info
+
+Get details about the current Continuous Integration environment.
+
+Please [open an
+issue](https://github.com/watson/ci-info/issues/new?template=ci-server-not-detected.md)
+if your CI server isn't properly detected :)
+
+[![npm](https://img.shields.io/npm/v/ci-info.svg)](https://www.npmjs.com/package/ci-info)
+[![Build status](https://travis-ci.org/watson/ci-info.svg?branch=master)](https://travis-ci.org/watson/ci-info)
+[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
+
+## Installation
+
+```bash
+npm install ci-info --save
+```
+
+## Usage
+
+```js
+var ci = require('ci-info')
+
+if (ci.isCI) {
+ console.log('The name of the CI server is:', ci.name)
+} else {
+ console.log('This program is not running on a CI server')
+}
+```
+
+## Supported CI tools
+
+Officially supported CI servers:
+
+| Name | Constant |
+|------|----------|
+| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` |
+| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` |
+| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` |
+| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` |
+| [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` |
+| [Buddy](https://buddy.works/) | `ci.BUDDY` |
+| [Buildkite](https://buildkite.com) | `ci.BUILDKITE` |
+| [CircleCI](http://circleci.com) | `ci.CIRCLE` |
+| [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` |
+| [Codeship](https://codeship.com) | `ci.CODESHIP` |
+| [Drone](https://drone.io) | `ci.DRONE` |
+| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` |
+| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` |
+| [GoCD](https://www.go.cd/) | `ci.GOCD` |
+| [Hudson](http://hudson-ci.org) | `ci.HUDSON` |
+| [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` |
+| [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` |
+| [Sail CI](https://sail.ci/) | `ci.SAIL` |
+| [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` |
+| [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` |
+| [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` |
+| [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` |
+| [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` |
+| [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx) by Microsoft | `ci.TFS` |
+| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` |
+| [Travis CI](http://travis-ci.org) | `ci.TRAVIS` |
+
+## API
+
+### `ci.name`
+
+A string. Will contain the name of the CI server the code is running on.
+If not CI server is detected, it will be `null`.
+
+Don't depend on the value of this string not to change for a specific
+vendor. If you find your self writing `ci.name === 'Travis CI'`, you
+most likely want to use `ci.TRAVIS` instead.
+
+### `ci.isCI`
+
+A boolean. Will be `true` if the code is running on a CI server.
+Otherwise `false`.
+
+Some CI servers not listed here might still trigger the `ci.isCI`
+boolean to be set to `true` if they use certain vendor neutral
+environment variables. In those cases `ci.name` will be `null` and no
+vendor specific boolean will be set to `true`.
+
+### `ci.isPR`
+
+A boolean if PR detection is supported for the current CI server. Will
+be `true` if a PR is being tested. Otherwise `false`. If PR detection is
+not supported for the current CI server, the value will be `null`.
+
+### `ci.<VENDOR-CONSTANT>`
+
+A vendor specific boolean constants is exposed for each support CI
+vendor. A constant will be `true` if the code is determined to run on
+the given CI server. Otherwise `false`.
+
+Examples of vendor constants are `ci.TRAVIS` or `ci.APPVEYOR`. For a
+complete list, see the support table above.
+
+Deprecated vendor constants that will be removed in the next major
+release:
+
+- `ci.TDDIUM` (Solano CI) This have been renamed `ci.SOLANO`
+
+## License
+
+[MIT](LICENSE)
diff --git a/deps/npm/node_modules/is-ci/node_modules/ci-info/index.js b/deps/npm/node_modules/is-ci/node_modules/ci-info/index.js
new file mode 100644
index 0000000000..27794d49b3
--- /dev/null
+++ b/deps/npm/node_modules/is-ci/node_modules/ci-info/index.js
@@ -0,0 +1,66 @@
+'use strict'
+
+var vendors = require('./vendors.json')
+
+var env = process.env
+
+// Used for testinging only
+Object.defineProperty(exports, '_vendors', {
+ value: vendors.map(function (v) { return v.constant })
+})
+
+exports.name = null
+exports.isPR = null
+
+vendors.forEach(function (vendor) {
+ var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]
+ var isCI = envs.every(function (obj) {
+ return checkEnv(obj)
+ })
+
+ exports[vendor.constant] = isCI
+
+ if (isCI) {
+ exports.name = vendor.name
+
+ switch (typeof vendor.pr) {
+ case 'string':
+ // "pr": "CIRRUS_PR"
+ exports.isPR = !!env[vendor.pr]
+ break
+ case 'object':
+ if ('env' in vendor.pr) {
+ // "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
+ exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne
+ } else if ('any' in vendor.pr) {
+ // "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
+ exports.isPR = vendor.pr.any.some(function (key) {
+ return !!env[key]
+ })
+ } else {
+ // "pr": { "DRONE_BUILD_EVENT": "pull_request" }
+ exports.isPR = checkEnv(vendor.pr)
+ }
+ break
+ default:
+ // PR detection not supported for this vendor
+ exports.isPR = null
+ }
+ }
+})
+
+exports.isCI = !!(
+ env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
+ env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
+ env.BUILD_NUMBER || // Jenkins, TeamCity
+ env.RUN_ID || // TaskCluster, dsari
+ exports.name ||
+ false
+)
+
+function checkEnv (obj) {
+ if (typeof obj === 'string') return !!env[obj]
+ return Object.keys(obj).every(function (k) {
+ return env[k] === obj[k]
+ })
+}
diff --git a/deps/npm/node_modules/is-ci/node_modules/ci-info/package.json b/deps/npm/node_modules/is-ci/node_modules/ci-info/package.json
new file mode 100644
index 0000000000..3542df9d41
--- /dev/null
+++ b/deps/npm/node_modules/is-ci/node_modules/ci-info/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "ci-info@^1.0.0",
+ "_id": "ci-info@1.6.0",
+ "_inBundle": false,
+ "_integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==",
+ "_location": "/is-ci/ci-info",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ci-info@^1.0.0",
+ "name": "ci-info",
+ "escapedName": "ci-info",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/is-ci"
+ ],
+ "_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
+ "_shasum": "2ca20dbb9ceb32d4524a683303313f0304b1e497",
+ "_spec": "ci-info@^1.0.0",
+ "_where": "/Users/aeschright/code/cli/node_modules/is-ci",
+ "author": {
+ "name": "Thomas Watson Steen",
+ "email": "w@tson.dk",
+ "url": "https://twitter.com/wa7son"
+ },
+ "bugs": {
+ "url": "https://github.com/watson/ci-info/issues"
+ },
+ "bundleDependencies": false,
+ "coordinates": [
+ 55.778271,
+ 12.593091
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Get details about the current Continuous Integration environment",
+ "devDependencies": {
+ "clear-require": "^1.0.1",
+ "standard": "^12.0.1",
+ "tape": "^4.9.1"
+ },
+ "homepage": "https://github.com/watson/ci-info",
+ "keywords": [
+ "ci",
+ "continuous",
+ "integration",
+ "test",
+ "detect"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "ci-info",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/watson/ci-info.git"
+ },
+ "scripts": {
+ "test": "standard && node test.js"
+ },
+ "version": "1.6.0"
+}
diff --git a/deps/npm/node_modules/is-ci/node_modules/ci-info/vendors.json b/deps/npm/node_modules/is-ci/node_modules/ci-info/vendors.json
new file mode 100644
index 0000000000..a157b78cea
--- /dev/null
+++ b/deps/npm/node_modules/is-ci/node_modules/ci-info/vendors.json
@@ -0,0 +1,152 @@
+[
+ {
+ "name": "AppVeyor",
+ "constant": "APPVEYOR",
+ "env": "APPVEYOR",
+ "pr": "APPVEYOR_PULL_REQUEST_NUMBER"
+ },
+ {
+ "name": "Bamboo",
+ "constant": "BAMBOO",
+ "env": "bamboo_planKey"
+ },
+ {
+ "name": "Bitbucket Pipelines",
+ "constant": "BITBUCKET",
+ "env": "BITBUCKET_COMMIT"
+ },
+ {
+ "name": "Bitrise",
+ "constant": "BITRISE",
+ "env": "BITRISE_IO",
+ "pr": "BITRISE_PULL_REQUEST"
+ },
+ {
+ "name": "Buddy",
+ "constant": "BUDDY",
+ "env": "BUDDY_WORKSPACE_ID",
+ "pr": "BUDDY_EXECUTION_PULL_REQUEST_ID"
+ },
+ {
+ "name": "Buildkite",
+ "constant": "BUILDKITE",
+ "env": "BUILDKITE",
+ "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
+ },
+ {
+ "name": "CircleCI",
+ "constant": "CIRCLE",
+ "env": "CIRCLECI",
+ "pr": "CIRCLE_PULL_REQUEST"
+ },
+ {
+ "name": "Cirrus CI",
+ "constant": "CIRRUS",
+ "env": "CIRRUS_CI",
+ "pr": "CIRRUS_PR"
+ },
+ {
+ "name": "AWS CodeBuild",
+ "constant": "CODEBUILD",
+ "env": "CODEBUILD_BUILD_ARN"
+ },
+ {
+ "name": "Codeship",
+ "constant": "CODESHIP",
+ "env": { "CI_NAME": "codeship" }
+ },
+ {
+ "name": "Drone",
+ "constant": "DRONE",
+ "env": "DRONE",
+ "pr": { "DRONE_BUILD_EVENT": "pull_request" }
+ },
+ {
+ "name": "dsari",
+ "constant": "DSARI",
+ "env": "DSARI"
+ },
+ {
+ "name": "GitLab CI",
+ "constant": "GITLAB",
+ "env": "GITLAB_CI"
+ },
+ {
+ "name": "GoCD",
+ "constant": "GOCD",
+ "env": "GO_PIPELINE_LABEL"
+ },
+ {
+ "name": "Hudson",
+ "constant": "HUDSON",
+ "env": "HUDSON_URL"
+ },
+ {
+ "name": "Jenkins",
+ "constant": "JENKINS",
+ "env": ["JENKINS_URL", "BUILD_ID"],
+ "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
+ },
+ {
+ "name": "Magnum CI",
+ "constant": "MAGNUM",
+ "env": "MAGNUM"
+ },
+ {
+ "name": "Sail CI",
+ "constant": "SAIL",
+ "env": "SAILCI",
+ "pr": "SAIL_PULL_REQUEST_NUMBER"
+ },
+ {
+ "name": "Semaphore",
+ "constant": "SEMAPHORE",
+ "env": "SEMAPHORE",
+ "pr": "PULL_REQUEST_NUMBER"
+ },
+ {
+ "name": "Shippable",
+ "constant": "SHIPPABLE",
+ "env": "SHIPPABLE",
+ "pr": { "IS_PULL_REQUEST": "true" }
+ },
+ {
+ "name": "Solano CI",
+ "constant": "SOLANO",
+ "env": "TDDIUM",
+ "pr": "TDDIUM_PR_ID"
+ },
+ {
+ "name": "Strider CD",
+ "constant": "STRIDER",
+ "env": "STRIDER"
+ },
+ {
+ "name": "TaskCluster",
+ "constant": "TASKCLUSTER",
+ "env": ["TASK_ID", "RUN_ID"]
+ },
+ {
+ "name": "Solano CI",
+ "constant": "TDDIUM",
+ "env": "TDDIUM",
+ "pr": "TDDIUM_PR_ID",
+ "deprecated": true
+ },
+ {
+ "name": "TeamCity",
+ "constant": "TEAMCITY",
+ "env": "TEAMCITY_VERSION"
+ },
+ {
+ "name": "Team Foundation Server",
+ "constant": "TFS",
+ "env": "TF_BUILD"
+ },
+ {
+ "name": "Travis CI",
+ "constant": "TRAVIS",
+ "env": "TRAVIS",
+ "pr": { "env": "TRAVIS_PULL_REQUEST", "ne": "false" }
+ }
+]
diff --git a/deps/npm/node_modules/is-cidr/README.md b/deps/npm/node_modules/is-cidr/README.md
index cd7c8c9686..1fa3ee9ede 100644
--- a/deps/npm/node_modules/is-cidr/README.md
+++ b/deps/npm/node_modules/is-cidr/README.md
@@ -7,7 +7,7 @@
## Install
```
-$ npm install --save is-cidr
+npm i is-cidr
```
@@ -16,14 +16,10 @@ $ npm install --save is-cidr
```js
const isCidr = require('is-cidr');
-isCidr('192.168.0.1/24');
-//=> true
-
-isCidr('1:2:3:4:5:6:7:8/64');
-//=> true
-
-isCidr.v4('1:2:3:4:5:6:7:8/64');
-//=> false
+isCidr('192.168.0.1/24'); //=> 4
+isCidr('1:2:3:4:5:6:7:8/64'); //=> 6
+isCidr('10.0.0.0'); //=> 0
+isCidr.v6('10.0.0.0/24'); //=> false
```
@@ -31,15 +27,15 @@ isCidr.v4('1:2:3:4:5:6:7:8/64');
### isCidr(input)
-Check if `input` is a IPv4 or IPv6 CIDR address.
+Check if `input` is a IPv4 or IPv6 CIDR address. Returns either `4`, `6` (indicating the IP version) or `0` if the string is not a CIDR.
### isCidr.v4(input)
-Check if `input` is a IPv4 CIDR address.
+Check if `input` is a IPv4 CIDR address. Returns a boolean.
### isCidr.v6(input)
-Check if `input` is a IPv6 CIDR address.
+Check if `input` is a IPv6 CIDR address. Returns a boolean.
## Related
diff --git a/deps/npm/node_modules/is-cidr/index.js b/deps/npm/node_modules/is-cidr/index.js
index b5a5026439..3eaf906c35 100644
--- a/deps/npm/node_modules/is-cidr/index.js
+++ b/deps/npm/node_modules/is-cidr/index.js
@@ -1,6 +1,13 @@
"use strict";
const cidrRegex = require("cidr-regex");
+const re4 = cidrRegex.v4({exact: true});
+const re6 = cidrRegex.v6({exact: true});
-const isCidr = module.exports = string => cidrRegex({exact: true}).test(string);
-isCidr.v4 = string => cidrRegex.v4({exact: true}).test(string);
-isCidr.v6 = string => cidrRegex.v6({exact: true}).test(string);
+const isCidr = module.exports = str => {
+ if (re4.test(str)) return 4;
+ if (re6.test(str)) return 6;
+ return 0;
+};
+
+isCidr.v4 = str => re4.test(str);
+isCidr.v6 = str => re6.test(str);
diff --git a/deps/npm/node_modules/is-cidr/package.json b/deps/npm/node_modules/is-cidr/package.json
index 6f735158ab..5737794e8c 100644
--- a/deps/npm/node_modules/is-cidr/package.json
+++ b/deps/npm/node_modules/is-cidr/package.json
@@ -1,28 +1,28 @@
{
- "_from": "is-cidr@2.0.6",
- "_id": "is-cidr@2.0.6",
+ "_from": "is-cidr@3.0.0",
+ "_id": "is-cidr@3.0.0",
"_inBundle": false,
- "_integrity": "sha512-A578p1dV22TgPXn6NCaDAPj6vJvYsBgAzUrAd28a4oldeXJjWqEUuSZOLIW3im51mazOKsoyVp8NU/OItlWacw==",
+ "_integrity": "sha512-8Xnnbjsb0x462VoYiGlhEi+drY8SFwrHiSYuzc/CEwco55vkehTaxAyIjEdpi3EMvLPPJAJi9FlzP+h+03gp0Q==",
"_location": "/is-cidr",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "is-cidr@2.0.6",
+ "raw": "is-cidr@3.0.0",
"name": "is-cidr",
"escapedName": "is-cidr",
- "rawSpec": "2.0.6",
+ "rawSpec": "3.0.0",
"saveSpec": null,
- "fetchSpec": "2.0.6"
+ "fetchSpec": "3.0.0"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-2.0.6.tgz",
- "_shasum": "4b01c9693d8e18399dacd18a4f3d60ea5871ac60",
- "_spec": "is-cidr@2.0.6",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-3.0.0.tgz",
+ "_shasum": "1acf35c9e881063cd5f696d48959b30fed3eed56",
+ "_spec": "is-cidr@3.0.0",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "silverwind",
"email": "me@silverwind.io"
@@ -39,18 +39,18 @@
}
],
"dependencies": {
- "cidr-regex": "^2.0.8"
+ "cidr-regex": "^2.0.10"
},
"deprecated": false,
"description": "Check if a string is an IP address in CIDR notation",
"devDependencies": {
- "ava": "^0.25.0",
- "eslint": "^4.19.1",
- "eslint-config-silverwind": "^1.0.42",
- "updates": "^3.0.0"
+ "eslint": "^5.7.0",
+ "eslint-config-silverwind": "^2.0.9",
+ "updates": "^4.5.2",
+ "ver": "^3.0.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=6"
},
"files": [
"index.js"
@@ -64,7 +64,8 @@
"prefix",
"prefixes",
"ip",
- "ip address"
+ "ip address",
+ "network"
],
"license": "BSD-2-Clause",
"name": "is-cidr",
@@ -75,5 +76,5 @@
"scripts": {
"test": "make test"
},
- "version": "2.0.6"
+ "version": "3.0.0"
}
diff --git a/deps/npm/node_modules/libcipm/CHANGELOG.md b/deps/npm/node_modules/libcipm/CHANGELOG.md
index a1949b8565..5f9d4906e4 100644
--- a/deps/npm/node_modules/libcipm/CHANGELOG.md
+++ b/deps/npm/node_modules/libcipm/CHANGELOG.md
@@ -2,6 +2,51 @@
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="3.0.3"></a>
+## [3.0.3](https://github.com/zkat/cipm/compare/v3.0.2...v3.0.3) (2019-01-22)
+
+
+### Bug Fixes
+
+* **scripts:** pass in opts.dir directly ([018df27](https://github.com/zkat/cipm/commit/018df27))
+
+
+
+<a name="3.0.2"></a>
+## [3.0.2](https://github.com/zkat/cipm/compare/v3.0.1...v3.0.2) (2018-08-31)
+
+
+### Bug Fixes
+
+* **worker:** missed a spot ([4371558](https://github.com/zkat/cipm/commit/4371558))
+
+
+
+<a name="3.0.1"></a>
+## [3.0.1](https://github.com/zkat/cipm/compare/v3.0.0...v3.0.1) (2018-08-31)
+
+
+### Bug Fixes
+
+* **workers:** disable workers for now ([64db490](https://github.com/zkat/cipm/commit/64db490))
+
+
+
+<a name="3.0.0"></a>
+# [3.0.0](https://github.com/zkat/cipm/compare/v2.0.2...v3.0.0) (2018-08-31)
+
+
+### Features
+
+* **config:** switch to modern, figgy-pudding configuration ([#57](https://github.com/zkat/cipm/issues/57)) ([161f6b2](https://github.com/zkat/cipm/commit/161f6b2))
+
+
+### BREAKING CHANGES
+
+* **config:** this updates cipm to use pacote@9, which consumes npm-style config objects, not pacoteOpts()-style objects.
+
+
+
<a name="2.0.2"></a>
## [2.0.2](https://github.com/zkat/cipm/compare/v2.0.1...v2.0.2) (2018-08-10)
diff --git a/deps/npm/node_modules/libcipm/index.js b/deps/npm/node_modules/libcipm/index.js
index 9061ec4b18..7f4d13f74a 100644
--- a/deps/npm/node_modules/libcipm/index.js
+++ b/deps/npm/node_modules/libcipm/index.js
@@ -5,6 +5,7 @@ const BB = require('bluebird')
const binLink = require('bin-links')
const buildLogicalTree = require('npm-logical-tree')
const extract = require('./lib/extract.js')
+const figgyPudding = require('figgy-pudding')
const fs = require('graceful-fs')
const getPrefix = require('find-npm-prefix')
const lifecycle = require('npm-lifecycle')
@@ -20,10 +21,45 @@ const statAsync = BB.promisify(fs.stat)
const symlinkAsync = BB.promisify(fs.symlink)
const writeFileAsync = BB.promisify(fs.writeFile)
+const CipmOpts = figgyPudding({
+ also: {},
+ dev: 'development',
+ development: {},
+ dirPacker: {},
+ force: {},
+ global: {},
+ ignoreScripts: 'ignore-scripts',
+ 'ignore-scripts': {},
+ log: {},
+ loglevel: {},
+ only: {},
+ prefix: {},
+ prod: 'production',
+ production: {},
+ Promise: { default: () => BB },
+ umask: {}
+})
+
+const LifecycleOpts = figgyPudding({
+ config: {},
+ 'script-shell': {},
+ scriptShell: 'script-shell',
+ 'ignore-scripts': {},
+ ignoreScripts: 'ignore-scripts',
+ 'ignore-prepublish': {},
+ ignorePrepublish: 'ignore-prepublish',
+ 'scripts-prepend-node-path': {},
+ scriptsPrependNodePath: 'scripts-prepend-node-path',
+ 'unsafe-perm': {},
+ unsafePerm: 'unsafe-perm',
+ prefix: {},
+ dir: 'prefix',
+ failOk: { default: false }
+}, { other () { return true } })
+
class Installer {
constructor (opts) {
- this.opts = opts
- this.config = opts.config
+ this.opts = CipmOpts(opts)
// Stats
this.startTime = Date.now()
@@ -80,17 +116,17 @@ class Installer {
prepare () {
this.log.info('prepare', 'initializing installer')
- this.log.level = this.config.get('loglevel')
+ this.log.level = this.opts.loglevel
this.log.verbose('prepare', 'starting workers')
extract.startWorkers()
return (
- this.config.get('prefix') && this.config.get('global')
- ? BB.resolve(this.config.get('prefix'))
+ this.opts.prefix && this.opts.global
+ ? BB.resolve(this.opts.prefix)
// There's some Special™ logic around the `--prefix` config when it
// comes from a config file or env vs when it comes from the CLI
: process.argv.some(arg => arg.match(/^\s*--prefix\s*/i))
- ? BB.resolve(this.config.get('prefix'))
+ ? BB.resolve(this.opts.prefix)
: getPrefix(process.cwd())
)
.then(prefix => {
@@ -203,7 +239,7 @@ class Installer {
return next()
} else {
return BB.resolve(extract.child(
- dep.name, dep, depPath, this.config, this.opts
+ dep.name, dep, depPath, this.opts
))
.then(() => cg.completeWork(1))
.then(() => { this.pkgCount++ })
@@ -218,15 +254,15 @@ class Installer {
checkDepEnv (dep) {
const includeDev = (
// Covers --dev and --development (from npm config itself)
- this.config.get('dev') ||
+ this.opts.dev ||
(
- !/^prod(uction)?$/.test(this.config.get('only')) &&
- !this.config.get('production')
+ !/^prod(uction)?$/.test(this.opts.only) &&
+ !this.opts.production
) ||
- /^dev(elopment)?$/.test(this.config.get('only')) ||
- /^dev(elopment)?$/.test(this.config.get('also'))
+ /^dev(elopment)?$/.test(this.opts.only) ||
+ /^dev(elopment)?$/.test(this.opts.also)
)
- const includeProd = !/^dev(elopment)?$/.test(this.config.get('only'))
+ const includeProd = !/^dev(elopment)?$/.test(this.opts.only)
return (dep.dev && includeDev) || (!dep.dev && includeProd)
}
@@ -274,14 +310,14 @@ class Installer {
}
return readPkgJson(path.join(depPath, 'package.json'))
.then(pkg => binLink(pkg, depPath, false, {
- force: this.config.get('force'),
- ignoreScripts: this.config.get('ignore-scripts'),
+ force: this.opts.force,
+ ignoreScripts: this.opts['ignore-scripts'],
log: Object.assign({}, this.log, { info: () => {} }),
name: pkg.name,
pkgId: pkg.name + '@' + pkg.version,
prefix: this.prefix,
prefixes: [this.prefix],
- umask: this.config.get('umask')
+ umask: this.opts.umask
}), e => {
this.log.verbose('buildTree', `error linking ${spec}: ${e.message} ${e.stack}`)
})
@@ -346,18 +382,22 @@ class Installer {
runScript (stage, pkg, pkgPath) {
const start = Date.now()
- if (!this.config.get('ignore-scripts')) {
+ if (!this.opts['ignore-scripts']) {
// TODO(mikesherov): remove pkg._id when npm-lifecycle no longer relies on it
pkg._id = pkg.name + '@' + pkg.version
- const opts = this.config.toLifecycle()
- return BB.resolve(lifecycle(pkg, stage, pkgPath, opts))
- .tap(() => { this.timings.scripts += Date.now() - start })
+ return BB.resolve(lifecycle(
+ pkg, stage, pkgPath, LifecycleOpts(this.opts).concat({
+ // TODO: can be removed once npm-lifecycle is updated to modern
+ // config practices.
+ config: this.opts,
+ dir: this.prefix
+ }))
+ ).tap(() => { this.timings.scripts += Date.now() - start })
}
return BB.resolve()
}
}
module.exports = Installer
-module.exports.CipmConfig = require('./lib/config/npm-config.js').CipmConfig
function mark (tree, failed) {
const liveDeps = new Set()
diff --git a/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js b/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js
deleted file mode 100644
index 7d57459779..0000000000
--- a/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict'
-
-const log = require('npmlog')
-
-module.exports = lifecycleOpts
-function lifecycleOpts (opts) {
- const objConfig = {}
- for (const key of opts.keys()) {
- const val = opts.get(key)
- if (val != null) {
- objConfig[key] = val
- }
- }
- return {
- config: objConfig,
- scriptShell: opts.get('script-shell'),
- force: opts.get('force'),
- user: opts.get('user'),
- group: opts.get('group'),
- ignoreScripts: opts.get('ignore-scripts'),
- ignorePrepublish: opts.get('ignore-prepublish'),
- scriptsPrependNodePath: opts.get('scripts-prepend-node-path'),
- unsafePerm: opts.get('unsafe-perm'),
- log,
- dir: opts.get('prefix'),
- failOk: false,
- production: opts.get('production')
- }
-}
diff --git a/deps/npm/node_modules/libcipm/lib/config/npm-config.js b/deps/npm/node_modules/libcipm/lib/config/npm-config.js
index 76b4054eef..a051190619 100644
--- a/deps/npm/node_modules/libcipm/lib/config/npm-config.js
+++ b/deps/npm/node_modules/libcipm/lib/config/npm-config.js
@@ -1,40 +1,22 @@
'use strict'
const BB = require('bluebird')
-const lifecycleOpts = require('./lifecycle-opts.js')
-const pacoteOpts = require('./pacote-opts.js')
-const protoduck = require('protoduck')
-const spawn = require('child_process').spawn
-class NpmConfig extends Map {}
+const fs = require('fs')
+const figgyPudding = require('figgy-pudding')
+const ini = require('ini')
+const path = require('path')
+const spawn = require('child_process').spawn
-const CipmConfig = protoduck.define({
- get: [],
- set: [],
- toPacote: [],
- toLifecycle: []
-}, {
- name: 'CipmConfig'
-})
-module.exports.CipmConfig = CipmConfig
+const readFileAsync = BB.promisify(fs.readFile)
-CipmConfig.impl(NpmConfig, {
- get: Map.prototype.get,
- set: Map.prototype.set,
- toPacote (opts) {
- return pacoteOpts(this, opts)
- },
- toLifecycle () {
- return lifecycleOpts(this)
- }
+const NpmConfig = figgyPudding({
+ cache: { default: '' },
+ then: {},
+ userconfig: {}
})
-module.exports.fromObject = fromObj
-function fromObj (obj) {
- const map = new NpmConfig()
- Object.keys(obj).forEach(k => map.set(k, obj[k]))
- return map
-}
+module.exports = NpmConfig
module.exports.fromNpm = getNpmConfig
function getNpmConfig (argv) {
@@ -62,11 +44,41 @@ function getNpmConfig (argv) {
reject(new Error('`npm` command not found. Please ensure you have npm@5.4.0 or later installed.'))
} else {
try {
- resolve(fromObj(JSON.parse(stdout)))
+ resolve(JSON.parse(stdout))
} catch (e) {
reject(new Error('`npm config ls --json` failed to output json. Please ensure you have npm@5.4.0 or later installed.'))
}
}
})
+ }).then(opts => {
+ return BB.all(
+ process.cwd().split(path.sep).reduce((acc, next) => {
+ acc.path = path.join(acc.path, next)
+ acc.promises.push(maybeReadIni(path.join(acc.path, '.npmrc')))
+ acc.promises.push(maybeReadIni(path.join(acc.path, 'npmrc')))
+ return acc
+ }, {
+ path: '',
+ promises: []
+ }).promises.concat(
+ opts.userconfig ? maybeReadIni(opts.userconfig) : {}
+ )
+ ).then(configs => NpmConfig(...configs, opts))
+ }).then(opts => {
+ if (opts.cache) {
+ return opts.concat({ cache: path.join(opts.cache, '_cacache') })
+ } else {
+ return opts
+ }
})
}
+
+function maybeReadIni (f) {
+ return readFileAsync(f, 'utf8').catch(err => {
+ if (err.code === 'ENOENT') {
+ return ''
+ } else {
+ throw err
+ }
+ }).then(ini.parse)
+}
diff --git a/deps/npm/node_modules/libcipm/lib/config/pacote-opts.js b/deps/npm/node_modules/libcipm/lib/config/pacote-opts.js
deleted file mode 100644
index 234ed1352a..0000000000
--- a/deps/npm/node_modules/libcipm/lib/config/pacote-opts.js
+++ /dev/null
@@ -1,135 +0,0 @@
-'use strict'
-
-const Buffer = require('safe-buffer').Buffer
-
-const crypto = require('crypto')
-const path = require('path')
-
-let effectiveOwner
-
-const npmSession = crypto.randomBytes(8).toString('hex')
-
-module.exports = pacoteOpts
-function pacoteOpts (npmOpts, moreOpts) {
- const ownerStats = calculateOwner()
- const opts = {
- cache: path.join(npmOpts.get('cache'), '_cacache'),
- ca: npmOpts.get('ca'),
- cert: npmOpts.get('cert'),
- git: npmOpts.get('git'),
- key: npmOpts.get('key'),
- localAddress: npmOpts.get('local-address'),
- loglevel: npmOpts.get('loglevel'),
- maxSockets: +(npmOpts.get('maxsockets') || 15),
- npmSession: npmSession,
- offline: npmOpts.get('offline'),
- projectScope: moreOpts.rootPkg && getProjectScope(moreOpts.rootPkg.name),
- proxy: npmOpts.get('https-proxy') || npmOpts.get('proxy'),
- refer: 'cipm',
- registry: npmOpts.get('registry'),
- retry: {
- retries: npmOpts.get('fetch-retries'),
- factor: npmOpts.get('fetch-retry-factor'),
- minTimeout: npmOpts.get('fetch-retry-mintimeout'),
- maxTimeout: npmOpts.get('fetch-retry-maxtimeout')
- },
- strictSSL: npmOpts.get('strict-ssl'),
- userAgent: npmOpts.get('user-agent'),
-
- dmode: parseInt('0777', 8) & (~npmOpts.get('umask')),
- fmode: parseInt('0666', 8) & (~npmOpts.get('umask')),
- umask: npmOpts.get('umask')
- }
-
- if (ownerStats.uid != null || ownerStats.gid != null) {
- Object.assign(opts, ownerStats)
- }
-
- (npmOpts.forEach ? Array.from(npmOpts.keys()) : npmOpts.keys).forEach(k => {
- const authMatchGlobal = k.match(
- /^(_authToken|username|_password|password|email|always-auth|_auth)$/
- )
- const authMatchScoped = k[0] === '/' && k.match(
- /(.*):(_authToken|username|_password|password|email|always-auth|_auth)$/
- )
-
- // if it matches scoped it will also match global
- if (authMatchGlobal || authMatchScoped) {
- let nerfDart = null
- let key = null
- let val = null
-
- if (!opts.auth) { opts.auth = {} }
-
- if (authMatchScoped) {
- nerfDart = authMatchScoped[1]
- key = authMatchScoped[2]
- val = npmOpts.get(k)
- if (!opts.auth[nerfDart]) {
- opts.auth[nerfDart] = {
- alwaysAuth: !!npmOpts.get('always-auth')
- }
- }
- } else {
- key = authMatchGlobal[1]
- val = npmOpts.get(k)
- opts.auth.alwaysAuth = !!npmOpts.get('always-auth')
- }
-
- const auth = authMatchScoped ? opts.auth[nerfDart] : opts.auth
- if (key === '_authToken') {
- auth.token = val
- } else if (key.match(/password$/i)) {
- auth.password =
- // the config file stores password auth already-encoded. pacote expects
- // the actual username/password pair.
- Buffer.from(val, 'base64').toString('utf8')
- } else if (key === 'always-auth') {
- auth.alwaysAuth = val === 'false' ? false : !!val
- } else {
- auth[key] = val
- }
- }
-
- if (k[0] === '@') {
- if (!opts.scopeTargets) { opts.scopeTargets = {} }
- opts.scopeTargets[k.replace(/:registry$/, '')] = npmOpts.get(k)
- }
- })
-
- Object.keys(moreOpts || {}).forEach((k) => {
- opts[k] = moreOpts[k]
- })
-
- return opts
-}
-
-function calculateOwner () {
- if (!effectiveOwner) {
- effectiveOwner = { uid: 0, gid: 0 }
-
- // Pretty much only on windows
- if (!process.getuid) {
- return effectiveOwner
- }
-
- effectiveOwner.uid = +process.getuid()
- effectiveOwner.gid = +process.getgid()
-
- if (effectiveOwner.uid === 0) {
- if (process.env.SUDO_UID) effectiveOwner.uid = +process.env.SUDO_UID
- if (process.env.SUDO_GID) effectiveOwner.gid = +process.env.SUDO_GID
- }
- }
-
- return effectiveOwner
-}
-
-function getProjectScope (pkgName) {
- const sep = pkgName.indexOf('/')
- if (sep === -1) {
- return ''
- } else {
- return pkgName.slice(0, sep)
- }
-}
diff --git a/deps/npm/node_modules/libcipm/lib/extract.js b/deps/npm/node_modules/libcipm/lib/extract.js
index 9166ebc058..5681d1ce8c 100644
--- a/deps/npm/node_modules/libcipm/lib/extract.js
+++ b/deps/npm/node_modules/libcipm/lib/extract.js
@@ -2,45 +2,56 @@
const BB = require('bluebird')
-const npa = require('npm-package-arg')
-const workerFarm = require('worker-farm')
-
const extractionWorker = require('./worker.js')
+const figgyPudding = require('figgy-pudding')
+const npa = require('npm-package-arg')
const WORKER_PATH = require.resolve('./worker.js')
+let workerFarm
+
+// Broken for now, cause too many issues on some systems.
+const ENABLE_WORKERS = false
+
+const ExtractOpts = figgyPudding({
+ log: {}
+})
module.exports = {
startWorkers () {
- this._workers = workerFarm({
- maxConcurrentCallsPerWorker: 20,
- maxRetries: 1
- }, WORKER_PATH)
+ if (ENABLE_WORKERS) {
+ if (!workerFarm) { workerFarm = require('worker-farm') }
+ this._workers = workerFarm({
+ maxConcurrentCallsPerWorker: 20,
+ maxRetries: 1
+ }, WORKER_PATH)
+ }
},
stopWorkers () {
- workerFarm.end(this._workers)
+ if (ENABLE_WORKERS) {
+ if (!workerFarm) { workerFarm = require('worker-farm') }
+ workerFarm.end(this._workers)
+ }
},
- child (name, child, childPath, config, opts) {
+ child (name, child, childPath, opts) {
+ opts = ExtractOpts(opts)
const spec = npa.resolve(name, child.version)
- const additionalToPacoteOpts = {}
- if (typeof opts.dirPacker !== 'undefined') {
- additionalToPacoteOpts.dirPacker = opts.dirPacker
- }
- const childOpts = config.toPacote(Object.assign({
+ let childOpts = opts.concat({
integrity: child.integrity,
resolved: child.resolved
- }, additionalToPacoteOpts))
+ })
const args = [spec, childPath, childOpts]
return BB.fromNode((cb) => {
let launcher = extractionWorker
let msg = args
const spec = typeof args[0] === 'string' ? npa(args[0]) : args[0]
- childOpts.loglevel = opts.log.level
- if (spec.registry || spec.type === 'remote') {
+ if (ENABLE_WORKERS && (spec.registry || spec.type === 'remote')) {
+ if (!workerFarm) { workerFarm = require('worker-farm') }
// We can't serialize these options
- childOpts.config = null
- childOpts.log = null
- childOpts.dirPacker = null
+ childOpts = childOpts.concat({
+ log: null,
+ dirPacker: null
+ })
// workers will run things in parallel!
launcher = this._workers
try {
diff --git a/deps/npm/node_modules/libcipm/lib/worker.js b/deps/npm/node_modules/libcipm/lib/worker.js
index ac61b06236..bab607e527 100644
--- a/deps/npm/node_modules/libcipm/lib/worker.js
+++ b/deps/npm/node_modules/libcipm/lib/worker.js
@@ -2,7 +2,7 @@
const BB = require('bluebird')
-const log = require('npmlog')
+// const log = require('npmlog')
const pacote = require('pacote')
module.exports = (args, cb) => {
@@ -10,7 +10,7 @@ module.exports = (args, cb) => {
const spec = parsed[0]
const extractTo = parsed[1]
const opts = parsed[2]
- opts.log = log
- log.level = opts.loglevel
+ // opts.log = log
+ // log.level = opts.loglevel
return BB.resolve(pacote.extract(spec, extractTo, opts)).nodeify(cb)
}
diff --git a/deps/npm/node_modules/libcipm/package.json b/deps/npm/node_modules/libcipm/package.json
index a934f18df5..153dc1acba 100644
--- a/deps/npm/node_modules/libcipm/package.json
+++ b/deps/npm/node_modules/libcipm/package.json
@@ -1,27 +1,27 @@
{
- "_from": "libcipm@2.0.2",
- "_id": "libcipm@2.0.2",
+ "_from": "libcipm@latest",
+ "_id": "libcipm@3.0.3",
"_inBundle": false,
- "_integrity": "sha512-9uZ6/LAflVEijksTRq/RX0e+pGA4mr8tND9Cmk2JMg7j2fFUBrs8PpFX2DOAJR/XoxPzz+5h8bkWmtIYLunKAg==",
+ "_integrity": "sha512-71V5CpTI+zFydTc5IjJ/tx8JHbXEJvmYF2zaSVW1V3X1rRnRjXqh44iuiyry1xgi3ProUQ1vX1uwFiWs00+2og==",
"_location": "/libcipm",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "libcipm@2.0.2",
+ "raw": "libcipm@latest",
"name": "libcipm",
"escapedName": "libcipm",
- "rawSpec": "2.0.2",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "2.0.2"
+ "fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-2.0.2.tgz",
- "_shasum": "4f38c2b37acf2ec156936cef1cbf74636568fc7b",
- "_spec": "libcipm@2.0.2",
+ "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-3.0.3.tgz",
+ "_shasum": "2e764effe0b90d458790dab3165794c804075ed3",
+ "_spec": "libcipm@latest",
"_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Kat Marchán",
@@ -42,15 +42,16 @@
"dependencies": {
"bin-links": "^1.1.2",
"bluebird": "^3.5.1",
+ "figgy-pudding": "^3.5.1",
"find-npm-prefix": "^1.0.2",
"graceful-fs": "^4.1.11",
+ "ini": "^1.3.5",
"lock-verify": "^2.0.2",
"mkdirp": "^0.5.1",
"npm-lifecycle": "^2.0.3",
"npm-logical-tree": "^1.2.1",
"npm-package-arg": "^6.1.0",
- "pacote": "^8.1.6",
- "protoduck": "^5.0.0",
+ "pacote": "^9.1.0",
"read-package-json": "^2.0.13",
"rimraf": "^2.6.2",
"worker-farm": "^1.6.0"
@@ -95,5 +96,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "2.0.2"
+ "version": "3.0.3"
}
diff --git a/deps/npm/node_modules/libnpm/CHANGELOG.md b/deps/npm/node_modules/libnpm/CHANGELOG.md
new file mode 100644
index 0000000000..e9712f7d44
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/CHANGELOG.md
@@ -0,0 +1,95 @@
+# 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="2.0.1"></a>
+## [2.0.1](https://github.com/npm/libnpm/compare/v2.0.0...v2.0.1) (2018-12-05)
+
+
+### Bug Fixes
+
+* **read-json:** use bluebird for promisification ([8dddde6](https://github.com/npm/libnpm/commit/8dddde6))
+
+
+
+<a name="2.0.0"></a>
+# [2.0.0](https://github.com/npm/libnpm/compare/v1.5.0...v2.0.0) (2018-11-27)
+
+
+### deps
+
+* bump all libs ([83ae929](https://github.com/npm/libnpm/commit/83ae929))
+
+
+### BREAKING CHANGES
+
+* This includes a breaking libnpmaccess patch
+
+
+
+<a name="1.5.0"></a>
+# [1.5.0](https://github.com/npm/libnpm/compare/v1.4.0...v1.5.0) (2018-11-26)
+
+
+### Features
+
+* **pacote:** minimal requires for pacote-related APIs ([e19ce11](https://github.com/npm/libnpm/commit/e19ce11))
+
+
+
+<a name="1.4.0"></a>
+# [1.4.0](https://github.com/npm/libnpm/compare/v1.3.0...v1.4.0) (2018-11-13)
+
+
+### Features
+
+* **libnpm:** add support for partial requires ([7ba10a7](https://github.com/npm/libnpm/commit/7ba10a7))
+
+
+
+<a name="1.3.0"></a>
+# [1.3.0](https://github.com/npm/libnpm/compare/v1.2.0...v1.3.0) (2018-11-07)
+
+
+### Features
+
+* **bin:** add binLinks lib ([2f4d551](https://github.com/npm/libnpm/commit/2f4d551))
+
+
+
+<a name="1.2.0"></a>
+# [1.2.0](https://github.com/npm/libnpm/compare/v1.1.0...v1.2.0) (2018-11-07)
+
+
+### Features
+
+* **log:** add npmlog to the bundle ([c20abd1](https://github.com/npm/libnpm/commit/c20abd1))
+
+
+
+<a name="1.1.0"></a>
+# [1.1.0](https://github.com/npm/libnpm/compare/v1.0.0...v1.1.0) (2018-11-07)
+
+
+### Features
+
+* **config:** add libnpmconfig ([6a44725](https://github.com/npm/libnpm/commit/6a44725))
+* **json+tree:** add read-package-json and npm-logical-tree ([0198a91](https://github.com/npm/libnpm/commit/0198a91))
+* **lock+prefix:** add lock-verify and find-npm-prefix ([00750c9](https://github.com/npm/libnpm/commit/00750c9))
+* **parseArg:** add npm-package-arg ([5712614](https://github.com/npm/libnpm/commit/5712614))
+* **stringify:** add stringify-package ([0ec5bba](https://github.com/npm/libnpm/commit/0ec5bba))
+
+
+
+<a name="1.0.0"></a>
+# [1.0.0](https://github.com/npm/libnpm/compare/v0.0.1...v1.0.0) (2018-08-31)
+
+
+### Features
+
+* **api:** document and export libnpm api ([f85f8f8](https://github.com/npm/libnpm/commit/f85f8f8))
+
+
+
+<a name="0.0.1"></a>
+## 0.0.1 (2018-04-04)
diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/LICENSE.md b/deps/npm/node_modules/libnpm/LICENSE.md
index 8d28acf866..8d28acf866 100644
--- a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/LICENSE.md
+++ b/deps/npm/node_modules/libnpm/LICENSE.md
diff --git a/deps/npm/node_modules/libnpm/README.md b/deps/npm/node_modules/libnpm/README.md
new file mode 100644
index 0000000000..ce35f5da19
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/README.md
@@ -0,0 +1,57 @@
+# libnpm
+
+[`libnpm`](https://github.com/npm/libnpm) is the programmatic API for npm.
+
+For bug reports and support, please head over to [npm.community](https://npm.community).
+
+
+## Install
+
+`$ npm install libnpm`
+
+## Table of Contents
+
+* [Example](#example)
+* [Features](#features)
+* [API](#api)
+ * Fetching Packages and Their Info
+ * [`manifest`](https://www.npmjs.com/package/pacote#manifest)
+ * [`packument`](https://www.npmjs.com/package/pacote#packument)
+ * [`tarball`](https://www.npmjs.com/package/pacote#tarball)
+ * [`extract`](https://www.npmjs.com/package/pacote#extract)
+ * [`search`](https://npm.im/libnpmsearch)
+ * Package-related Registry APIs
+ * [`publish`]()
+ * [`unpublish`](#unpublish)
+ * [`access`](https://npm.im/libnpmaccess)
+ * Account-related Registry APIs
+ * [`login`](https://www.npmjs.com/package/npm-profile#login)
+ * [`adduser`](https://www.npmjs.com/package/npm-profile#adduser)
+ * [`profile`](https://npm.im/npm-profile)
+ * [`hook`](https://npm.im/libnpmhook)
+ * [`team`](https://npm.im/libnpmteam)
+ * [`org`](https://npm.im/libnpmorg)
+ * Miscellaneous
+ * [`parseArg`](https://npm.im/npm-package-arg)
+ * [`config`](https://npm.im/libnpmconfig)
+ * [`readJSON`](https://npm.im/read-package-json)
+ * [`verifyLock`](https://npm.im/lock-verify)
+ * [`getPrefix`](https://npm.im/find-npm-prefix)
+ * [`logicalTree`](https://npm.im/npm-logical-tree)
+ * [`stringifyPackage`](https://npm.im/stringify-package)
+ * [`runScript`](https://www.npmjs.com/package/npm-lifecycle)
+ * [`log`](https://npm.im/npmlog)
+ * [`fetch`](https://npm.im/npm-registry-fetch) (plain ol' client for registry interaction)
+ * [`linkBin`](https://npm.im/bin-links)
+
+### Example
+
+```javascript
+await libnpm.manifest('libnpm') // => Manifest { name: 'libnpm', ... }
+```
+
+### API
+
+This package re-exports the APIs from other packages for convenience. Refer to
+the [table of contents](#table-of-contents) for detailed documentation on each
+individual exported API.
diff --git a/deps/npm/node_modules/libnpm/access.js b/deps/npm/node_modules/libnpm/access.js
new file mode 100644
index 0000000000..4b164226a3
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/access.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('libnpmaccess')
diff --git a/deps/npm/node_modules/libnpm/adduser.js b/deps/npm/node_modules/libnpm/adduser.js
new file mode 100644
index 0000000000..e57dbeaf9b
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/adduser.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('npm-profile').adduser
diff --git a/deps/npm/node_modules/libnpm/config.js b/deps/npm/node_modules/libnpm/config.js
new file mode 100644
index 0000000000..51ff1edee8
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/config.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('libnpmconfig')
diff --git a/deps/npm/node_modules/libnpm/extract.js b/deps/npm/node_modules/libnpm/extract.js
new file mode 100644
index 0000000000..4f3aa3d706
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/extract.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('pacote/extract')
diff --git a/deps/npm/node_modules/libnpm/fetch.js b/deps/npm/node_modules/libnpm/fetch.js
new file mode 100644
index 0000000000..0e5ccd8804
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/fetch.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('npm-registry-fetch')
diff --git a/deps/npm/node_modules/libnpm/get-prefix.js b/deps/npm/node_modules/libnpm/get-prefix.js
new file mode 100644
index 0000000000..86bf85862c
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/get-prefix.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('find-npm-prefix')
diff --git a/deps/npm/node_modules/libnpm/hook.js b/deps/npm/node_modules/libnpm/hook.js
new file mode 100644
index 0000000000..a45644beea
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/hook.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('libnpmhook')
diff --git a/deps/npm/node_modules/libnpm/index.js b/deps/npm/node_modules/libnpm/index.js
new file mode 100644
index 0000000000..19c0419e89
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/index.js
@@ -0,0 +1,29 @@
+'use strict'
+
+module.exports = {
+ config: require('./config.js'),
+ parseArg: require('./parse-arg.js'),
+ readJSON: require('./read-json.js'),
+ logicalTree: require('./logical-tree.js'),
+ getPrefix: require('./get-prefix.js'),
+ verifyLock: require('./verify-lock.js'),
+ stringifyPackage: require('./stringify-package.js'),
+ manifest: require('./manifest.js'),
+ tarball: require('./tarball.js'),
+ extract: require('./extract.js'),
+ packument: require('./packument.js'),
+ hook: require('./hook.js'),
+ access: require('./access.js'),
+ search: require('./search.js'),
+ team: require('./team.js'),
+ org: require('./org.js'),
+ fetch: require('./fetch.js'),
+ login: require('./login.js'),
+ adduser: require('./adduser.js'),
+ profile: require('./profile.js'),
+ publish: require('./publish.js'),
+ unpublish: require('./unpublish.js'),
+ runScript: require('./run-script.js'),
+ log: require('./log.js'),
+ linkBin: require('./link-bin.js')
+}
diff --git a/deps/npm/node_modules/libnpm/link-bin.js b/deps/npm/node_modules/libnpm/link-bin.js
new file mode 100644
index 0000000000..4d7d35c731
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/link-bin.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('bin-links')
diff --git a/deps/npm/node_modules/libnpm/log.js b/deps/npm/node_modules/libnpm/log.js
new file mode 100644
index 0000000000..f935c6242d
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/log.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('npmlog')
diff --git a/deps/npm/node_modules/libnpm/logical-tree.js b/deps/npm/node_modules/libnpm/logical-tree.js
new file mode 100644
index 0000000000..a08e7737a6
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/logical-tree.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('npm-logical-tree')
diff --git a/deps/npm/node_modules/libnpm/login.js b/deps/npm/node_modules/libnpm/login.js
new file mode 100644
index 0000000000..fbd61e9a2f
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/login.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('npm-profile').login
diff --git a/deps/npm/node_modules/libnpm/manifest.js b/deps/npm/node_modules/libnpm/manifest.js
new file mode 100644
index 0000000000..863b004e7f
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/manifest.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('pacote/manifest')
diff --git a/deps/npm/node_modules/libnpm/org.js b/deps/npm/node_modules/libnpm/org.js
new file mode 100644
index 0000000000..96b15aac0d
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/org.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('libnpmorg')
diff --git a/deps/npm/node_modules/libnpm/package.json b/deps/npm/node_modules/libnpm/package.json
new file mode 100644
index 0000000000..4c77e68097
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/package.json
@@ -0,0 +1,94 @@
+{
+ "_from": "libnpm@^2.0.1",
+ "_id": "libnpm@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-qTKoxyJvpBxHZQB6k0AhSLajyXq9ZE/lUsZzuHAplr2Bpv9G+k4YuYlExYdUCeVRRGqcJt8hvkPh4tBwKoV98w==",
+ "_location": "/libnpm",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "libnpm@^2.0.1",
+ "name": "libnpm",
+ "escapedName": "libnpm",
+ "rawSpec": "^2.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.1"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/libnpm/-/libnpm-2.0.1.tgz",
+ "_shasum": "a48fcdee3c25e13c77eb7c60a0efe561d7fb0d8f",
+ "_spec": "libnpm@^2.0.1",
+ "_where": "/Users/zkat/Documents/code/work/npm",
+ "author": {
+ "name": "Kat Marchán",
+ "email": "kzm@zkat.tech"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/libnpm/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "bin-links": "^1.1.2",
+ "bluebird": "^3.5.3",
+ "find-npm-prefix": "^1.0.2",
+ "libnpmaccess": "^3.0.1",
+ "libnpmconfig": "^1.2.1",
+ "libnpmhook": "^5.0.2",
+ "libnpmorg": "^1.0.0",
+ "libnpmpublish": "^1.1.0",
+ "libnpmsearch": "^2.0.0",
+ "libnpmteam": "^1.0.1",
+ "lock-verify": "^2.0.2",
+ "npm-lifecycle": "^2.1.0",
+ "npm-logical-tree": "^1.2.1",
+ "npm-package-arg": "^6.1.0",
+ "npm-profile": "^4.0.1",
+ "npm-registry-fetch": "^3.8.0",
+ "npmlog": "^4.1.2",
+ "pacote": "^9.2.3",
+ "read-package-json": "^2.0.13",
+ "stringify-package": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Collection of programmatic APIs for the npm CLI",
+ "devDependencies": {
+ "nock": "^9.2.3",
+ "standard": "^11.0.1",
+ "standard-version": "^4.3.0",
+ "tap": "^12.0.1",
+ "weallbehave": "^1.2.0",
+ "weallcontribute": "^1.0.8"
+ },
+ "files": [
+ "*.js",
+ "lib"
+ ],
+ "homepage": "https://github.com/npm/libnpm#readme",
+ "keywords": [
+ "npm",
+ "api",
+ "package manager",
+ "lib"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "libnpm",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/libnpm.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": "2.0.1"
+}
diff --git a/deps/npm/node_modules/libnpm/packument.js b/deps/npm/node_modules/libnpm/packument.js
new file mode 100644
index 0000000000..f852a3fe26
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/packument.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('pacote/packument')
diff --git a/deps/npm/node_modules/libnpm/parse-arg.js b/deps/npm/node_modules/libnpm/parse-arg.js
new file mode 100644
index 0000000000..6db5201504
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/parse-arg.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('npm-package-arg')
diff --git a/deps/npm/node_modules/libnpm/profile.js b/deps/npm/node_modules/libnpm/profile.js
new file mode 100644
index 0000000000..6df6b5e23a
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/profile.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('npm-profile')
diff --git a/deps/npm/node_modules/libnpm/publish.js b/deps/npm/node_modules/libnpm/publish.js
new file mode 100644
index 0000000000..bcdbdeb2a8
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/publish.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('libnpmpublish').publish
diff --git a/deps/npm/node_modules/libnpm/read-json.js b/deps/npm/node_modules/libnpm/read-json.js
new file mode 100644
index 0000000000..b59eb9d45a
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/read-json.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('bluebird').promisify(require('read-package-json'))
diff --git a/deps/npm/node_modules/libnpm/run-script.js b/deps/npm/node_modules/libnpm/run-script.js
new file mode 100644
index 0000000000..11765d40ae
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/run-script.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('npm-lifecycle')
diff --git a/deps/npm/node_modules/libnpm/search.js b/deps/npm/node_modules/libnpm/search.js
new file mode 100644
index 0000000000..172b10b7ca
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/search.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('libnpmsearch')
diff --git a/deps/npm/node_modules/libnpm/stringify-package.js b/deps/npm/node_modules/libnpm/stringify-package.js
new file mode 100644
index 0000000000..e7f3bfcbb7
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/stringify-package.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('stringify-package')
diff --git a/deps/npm/node_modules/libnpm/tarball.js b/deps/npm/node_modules/libnpm/tarball.js
new file mode 100644
index 0000000000..cc1b2e54a4
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/tarball.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('pacote/tarball')
diff --git a/deps/npm/node_modules/libnpm/team.js b/deps/npm/node_modules/libnpm/team.js
new file mode 100644
index 0000000000..d407f796f4
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/team.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('libnpmteam')
diff --git a/deps/npm/node_modules/libnpm/unpublish.js b/deps/npm/node_modules/libnpm/unpublish.js
new file mode 100644
index 0000000000..bc0d34c9a0
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/unpublish.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('libnpmpublish').unpublish
diff --git a/deps/npm/node_modules/libnpm/verify-lock.js b/deps/npm/node_modules/libnpm/verify-lock.js
new file mode 100644
index 0000000000..e396756419
--- /dev/null
+++ b/deps/npm/node_modules/libnpm/verify-lock.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = require('lock-verify')
diff --git a/deps/npm/node_modules/libnpmaccess/.travis.yml b/deps/npm/node_modules/libnpmaccess/.travis.yml
new file mode 100644
index 0000000000..db5ea8b018
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/.travis.yml
@@ -0,0 +1,7 @@
+language: node_js
+sudo: false
+node_js:
+ - "10"
+ - "9"
+ - "8"
+ - "6"
diff --git a/deps/npm/node_modules/libnpmaccess/CHANGELOG.md b/deps/npm/node_modules/libnpmaccess/CHANGELOG.md
new file mode 100644
index 0000000000..14959aaefb
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/CHANGELOG.md
@@ -0,0 +1,124 @@
+# 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="3.0.1"></a>
+## [3.0.1](https://github.com/npm/libnpmaccess/compare/v3.0.0...v3.0.1) (2018-11-12)
+
+
+### Bug Fixes
+
+* **ls-packages:** fix confusing splitEntity arg check ([1769090](https://github.com/npm/libnpmaccess/commit/1769090))
+
+
+
+<a name="3.0.0"></a>
+# [3.0.0](https://github.com/npm/libnpmaccess/compare/v2.0.1...v3.0.0) (2018-08-24)
+
+
+### Features
+
+* **api:** overhaul API ergonomics ([1faf00a](https://github.com/npm/libnpmaccess/commit/1faf00a))
+
+
+### BREAKING CHANGES
+
+* **api:** all API calls where scope and team were separate, or
+where team was an extra, optional argument should now use a
+fully-qualified team name instead, in the `scope:team` format.
+
+
+
+<a name="2.0.1"></a>
+## [2.0.1](https://github.com/npm/libnpmaccess/compare/v2.0.0...v2.0.1) (2018-08-24)
+
+
+
+<a name="2.0.0"></a>
+# [2.0.0](https://github.com/npm/libnpmaccess/compare/v1.2.2...v2.0.0) (2018-08-21)
+
+
+### Bug Fixes
+
+* **json:** stop trying to parse response JSON ([20fdd84](https://github.com/npm/libnpmaccess/commit/20fdd84))
+* **lsPackages:** team URL was wrong D: ([b52201c](https://github.com/npm/libnpmaccess/commit/b52201c))
+
+
+### BREAKING CHANGES
+
+* **json:** use cases where registries were returning JSON
+strings in the response body will no longer have an effect. All
+API functions except for lsPackages and lsCollaborators will return
+`true` on completion.
+
+
+
+<a name="1.2.2"></a>
+## [1.2.2](https://github.com/npm/libnpmaccess/compare/v1.2.1...v1.2.2) (2018-08-20)
+
+
+### Bug Fixes
+
+* **docs:** tiny doc hiccup fix ([106396f](https://github.com/npm/libnpmaccess/commit/106396f))
+
+
+
+<a name="1.2.1"></a>
+## [1.2.1](https://github.com/npm/libnpmaccess/compare/v1.2.0...v1.2.1) (2018-08-20)
+
+
+### Bug Fixes
+
+* **docs:** document the stream interfaces ([c435aa2](https://github.com/npm/libnpmaccess/commit/c435aa2))
+
+
+
+<a name="1.2.0"></a>
+# [1.2.0](https://github.com/npm/libnpmaccess/compare/v1.1.0...v1.2.0) (2018-08-20)
+
+
+### Bug Fixes
+
+* **readme:** fix up appveyor badge url ([42b45a1](https://github.com/npm/libnpmaccess/commit/42b45a1))
+
+
+### Features
+
+* **streams:** add streaming result support for lsPkg and lsCollab ([0f06f46](https://github.com/npm/libnpmaccess/commit/0f06f46))
+
+
+
+<a name="1.1.0"></a>
+# [1.1.0](https://github.com/npm/libnpmaccess/compare/v1.0.0...v1.1.0) (2018-08-17)
+
+
+### Bug Fixes
+
+* **2fa:** escape package names correctly ([f2d83fe](https://github.com/npm/libnpmaccess/commit/f2d83fe))
+* **grant:** fix permissions validation ([07f7435](https://github.com/npm/libnpmaccess/commit/07f7435))
+* **ls-collaborators:** fix package name escaping + query ([3c02858](https://github.com/npm/libnpmaccess/commit/3c02858))
+* **ls-packages:** add query + fix fallback request order ([bdc4791](https://github.com/npm/libnpmaccess/commit/bdc4791))
+* **node6:** stop using Object.entries() ([4fec03c](https://github.com/npm/libnpmaccess/commit/4fec03c))
+* **public/restricted:** body should be string, not bool ([cffc727](https://github.com/npm/libnpmaccess/commit/cffc727))
+* **readme:** fix up title and badges ([2bd6113](https://github.com/npm/libnpmaccess/commit/2bd6113))
+* **specs:** require specs to be registry specs ([7892891](https://github.com/npm/libnpmaccess/commit/7892891))
+
+
+### Features
+
+* **test:** add 100% coverage test suite ([22b5dec](https://github.com/npm/libnpmaccess/commit/22b5dec))
+
+
+
+<a name="1.0.0"></a>
+# 1.0.0 (2018-08-17)
+
+
+### Bug Fixes
+
+* **test:** -100 is apparently bad now ([a5ab879](https://github.com/npm/libnpmaccess/commit/a5ab879))
+
+
+### Features
+
+* **impl:** initial implementation of api ([7039390](https://github.com/npm/libnpmaccess/commit/7039390))
diff --git a/deps/npm/node_modules/libnpmaccess/CODE_OF_CONDUCT.md b/deps/npm/node_modules/libnpmaccess/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000000..aeb72f598d
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/CODE_OF_CONDUCT.md
@@ -0,0 +1,151 @@
+# Code of Conduct
+
+## When Something Happens
+
+If you see a Code of Conduct violation, follow these steps:
+
+1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
+2. That person should immediately stop the behavior and correct the issue.
+3. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
+4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
+
+When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
+
+**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+ * Using welcoming and inclusive language.
+ * Being respectful of differing viewpoints and experiences.
+ * Gracefully accepting constructive feedback.
+ * Focusing on what is best for the community.
+ * Showing empathy and kindness towards other community members.
+ * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
+
+Examples of unacceptable behavior by participants include:
+
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
+ * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
+ * Making light of/making mocking comments about trigger warnings and content warnings.
+ * Trolling, insulting/derogatory comments, and personal or political attacks.
+ * Public or private harassment, deliberate intimidation, or threats.
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
+ * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
+ * Publishing of private communication that doesn't have to do with reporting harrassment.
+ * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
+ * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
+ * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
+ * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
+ * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
+ * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
+
+## Scope
+
+This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
+
+Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
+
+### Other Community Standards
+
+As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
+
+Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
+
+Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
+
+## Maintainer Enforcement Process
+
+Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
+
+### Contacting Maintainers
+
+You may get in touch with the maintainer team through any of the following methods:
+
+ * Through email:
+ * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchán)
+
+ * Through Twitter:
+ * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchán)
+
+### Further Enforcement
+
+If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
+
+ 1. Repeat the request to stop.
+ 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
+ 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
+ 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
+
+On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
+
+Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
+
+Members expelled from events or venues with any sort of paid attendance will not be refunded.
+
+### Who Watches the Watchers?
+
+Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
+
+Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
+
+### Enforcement Examples
+
+#### The Best Case
+
+The vast majority of situations work out like this. This interaction is common, and generally positive.
+
+> Alex: "Yeah I used X and it was really crazy!"
+
+> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
+
+> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
+
+#### The Maintainer Case
+
+Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
+
+> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
+
+> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
+
+> Patt: "I'm not attacking anyone, what's your problem?"
+
+> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
+
+> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
+
+> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
+
+> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
+
+> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
+
+> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
+
+#### The Nope Case
+
+> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
+
+> Patt: "NOOOOPE. OH NOPE NOPE."
+
+> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
+
+> KeeperOfCommitBits: "👀 Nope. NOPE NOPE NOPE. 🔥"
+
+> PepeTheFrog🐸 has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
+
+## Attribution
+
+This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
+Conduct](https://wealljs.org/code-of-conduct), which is itself based on
+[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
+at
+[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
+and the LGBTQ in Technology Slack [Code of
+Conduct](http://lgbtq.technology/coc.html).
diff --git a/deps/npm/node_modules/libnpmaccess/CONTRIBUTING.md b/deps/npm/node_modules/libnpmaccess/CONTRIBUTING.md
new file mode 100644
index 0000000000..e13356ea44
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/CONTRIBUTING.md
@@ -0,0 +1,256 @@
+# Contributing
+
+## How do I... <a name="toc"></a>
+
+* [Use This Guide](#introduction)?
+* Ask or Say Something? 🤔🐛😱
+ * [Request Support](#request-support)
+ * [Report an Error or Bug](#report-an-error-or-bug)
+ * [Request a Feature](#request-a-feature)
+* Make Something? 🤓👩🏽‍💻📜🍳
+ * [Project Setup](#project-setup)
+ * [Contribute Documentation](#contribute-documentation)
+ * [Contribute Code](#contribute-code)
+* Manage Something ✅🙆🏼💃👔
+ * [Provide Support on Issues](#provide-support-on-issues)
+ * [Label Issues](#label-issues)
+ * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
+ * [Review Pull Requests](#review-pull-requests)
+ * [Merge Pull Requests](#merge-pull-requests)
+ * [Tag a Release](#tag-a-release)
+ * [Join the Project Team](#join-the-project-team)
+* Add a Guide Like This One [To My Project](#attribution)? 🤖😻👻
+
+## Introduction
+
+Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝
+
+Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 💚
+
+The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨
+
+## Request Support
+
+If you have a question about this project, how to use it, or just need clarification about something:
+
+* Open an Issue at https://github.com/npm/libnpmaccess/issues
+* Provide as much context as you can about what you're running into.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* Someone will try to have a response soon.
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+
+## Report an Error or Bug
+
+If you run into an error or bug with the project:
+
+* Open an Issue at https://github.com/npm/libnpmaccess/issues
+* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
+* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
+
+## Request a Feature
+
+If the project doesn't do something you need or want it to do:
+
+* Open an Issue at https://github.com/npm/libnpmaccess/issues
+* Provide as much context as you can about what you're running into.
+* Please try and be clear about why existing features and alternatives would not work for you.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
+* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
+
+Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
+
+## Project Setup
+
+So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
+
+If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
+
+If you want to go the usual route and run the project locally, though:
+
+* [Install Node.js](https://nodejs.org/en/download/)
+* [Fork the project](https://guides.github.com/activities/forking/#fork)
+
+Then in your terminal:
+* `cd path/to/your/clone`
+* `npm install`
+* `npm test`
+
+And you should be ready to go!
+
+## Contribute Documentation
+
+Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
+
+Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
+
+To contribute documentation:
+
+* [Set up the project](#project-setup).
+* Edit or add any relevant documentation.
+* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
+* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
+* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(<component>): <message>`.
+* Go to https://github.com/npm/libnpmaccess/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Contribute Code
+
+We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
+
+Code contributions of just about any size are acceptable!
+
+The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
+
+To contribute code:
+
+* [Set up the project](#project-setup).
+* Make any necessary changes to the source code.
+* Include any [additional documentation](#contribute-documentation) the changes might need.
+* Write tests that verify that your contribution works as expected.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
+* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `<prefix>(deps): PKG@VERSION`, where `<prefix>` is any of the usual `conventional-changelog` prefixes, at your discretion.
+* Go to https://github.com/npm/libnpmaccess/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Provide Support on Issues
+
+[Needs Collaborator](#join-the-project-team): none
+
+Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
+
+Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
+
+In order to help other folks out with their questions:
+
+* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmaccess/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
+* Read through the list until you find something that you're familiar enough with to give an answer to.
+* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
+* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
+
+Some notes on picking up support issues:
+
+* Avoid responding to issues you don't know you can answer accurately.
+* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
+* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
+
+## Label Issues
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
+
+In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmaccess/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
+
+Label | Apply When | Notes
+--- | --- | ---
+`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
+`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
+`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
+`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
+`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
+`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
+`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
+`performance` | This issue or PR is directly related to improving performance. |
+`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
+`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
+`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
+`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
+`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
+
+## Clean Up Issues and PRs
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
+
+In these cases, they should be closed until they're brought up again or the interaction starts over.
+
+To clean up issues and PRs:
+
+* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
+* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
+ * not opened by a maintainer
+ * not marked as `critical`
+ * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
+ * no explicit messages in the comments asking for it to be left open
+ * does not belong to a milestone
+* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmaccess/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
+
+## Review Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
+
+PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
+
+Some notes:
+
+* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
+* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
+* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
+* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
+
+## Merge Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process.
+
+## Tag A Release
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
+
+## Join the Project Team
+
+### Ways to Join
+
+There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
+
+All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
+
+You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
+
+Permission | Description
+--- | ---
+Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
+Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
+Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
+
+## Attribution
+
+This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/deps/npm/node_modules/libnpmaccess/LICENSE b/deps/npm/node_modules/libnpmaccess/LICENSE
new file mode 100644
index 0000000000..209e4477f3
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/LICENSE
@@ -0,0 +1,13 @@
+Copyright 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 AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmaccess/PULL_REQUEST_TEMPLATE b/deps/npm/node_modules/libnpmaccess/PULL_REQUEST_TEMPLATE
new file mode 100644
index 0000000000..9471c6d325
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/PULL_REQUEST_TEMPLATE
@@ -0,0 +1,7 @@
+<!--
+⚠️🚨 BEFORE FILING A PR: 🚨⚠️
+
+👉🏼 CONTRIBUTING.md 👈🏼 (the "contribution guidelines" up there ☝🏼)
+
+I PROMISE IT'S A VERY VERY SHORT READ.🙇🏼
+-->
diff --git a/deps/npm/node_modules/libnpmaccess/README.md b/deps/npm/node_modules/libnpmaccess/README.md
new file mode 100644
index 0000000000..2b639823a0
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/README.md
@@ -0,0 +1,258 @@
+# libnpmaccess [![npm version](https://img.shields.io/npm/v/libnpmaccess.svg)](https://npm.im/libnpmaccess) [![license](https://img.shields.io/npm/l/libnpmaccess.svg)](https://npm.im/libnpmaccess) [![Travis](https://img.shields.io/travis/npm/libnpmaccess/latest.svg)](https://travis-ci.org/npm/libnpmaccess) [![AppVeyor](https://img.shields.io/appveyor/ci/zkat/libnpmaccess/latest.svg)](https://ci.appveyor.com/project/zkat/libnpmaccess) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmaccess/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmaccess?branch=latest)
+
+[`libnpmaccess`](https://github.com/npm/libnpmaccess) is a Node.js
+library that provides programmatic access to the guts of the npm CLI's `npm
+access` command and its various subcommands. This includes managing account 2FA,
+listing packages and permissions, looking at package collaborators, and defining
+package permissions for users, orgs, and teams.
+
+## Example
+
+```javascript
+const access = require('libnpmaccess')
+
+// List all packages @zkat has access to on the npm registry.
+console.log(Object.keys(await access.lsPackages('zkat')))
+```
+
+## Table of Contents
+
+* [Installing](#install)
+* [Example](#example)
+* [Contributing](#contributing)
+* [API](#api)
+ * [access opts](#opts)
+ * [`public()`](#public)
+ * [`restricted()`](#restricted)
+ * [`grant()`](#grant)
+ * [`revoke()`](#revoke)
+ * [`tfaRequired()`](#tfa-required)
+ * [`tfaNotRequired()`](#tfa-not-required)
+ * [`lsPackages()`](#ls-packages)
+ * [`lsPackages.stream()`](#ls-packages-stream)
+ * [`lsCollaborators()`](#ls-collaborators)
+ * [`lsCollaborators.stream()`](#ls-collaborators-stream)
+
+### Install
+
+`$ npm install libnpmaccess`
+
+### Contributing
+
+The npm team enthusiastically welcomes contributions and project participation!
+There's a bunch of things you can do if you want to contribute! The [Contributor
+Guide](CONTRIBUTING.md) has all the information you need for everything from
+reporting bugs to contributing entire new features. Please don't hesitate to
+jump in if you'd like to, or even ask us questions if something isn't clear.
+
+All participants and maintainers in this project are expected to follow [Code of
+Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
+
+Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
+
+Happy hacking!
+
+### API
+
+#### <a name="opts"></a> `opts` for `libnpmaccess` commands
+
+`libnpmaccess` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch).
+All options are passed through directly to that library, so please refer to [its
+own `opts`
+documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options)
+for options that can be passed in.
+
+A couple of options of note for those in a hurry:
+
+* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs.
+* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmaccess` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}`
+* `opts.Promise` - If you pass this in, the Promises returned by `libnpmaccess` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}`
+
+#### <a name="public"></a> `> access.public(spec, [opts]) -> Promise`
+
+`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible
+registry spec.
+
+Makes package described by `spec` public.
+
+##### Example
+
+```javascript
+await access.public('@foo/bar', {token: 'myregistrytoken'})
+// `@foo/bar` is now public
+```
+
+#### <a name="restricted"></a> `> access.restricted(spec, [opts]) -> Promise`
+
+`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible
+registry spec.
+
+Makes package described by `spec` private/restricted.
+
+##### Example
+
+```javascript
+await access.restricted('@foo/bar', {token: 'myregistrytoken'})
+// `@foo/bar` is now private
+```
+
+#### <a name="grant"></a> `> access.grant(spec, team, permissions, [opts]) -> Promise`
+
+`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible
+registry spec. `team` must be a fully-qualified team name, in the `scope:team`
+format, with or without the `@` prefix, and the team must be a valid team within
+that scope. `permissions` must be one of `'read-only'` or `'read-write'`.
+
+Grants `read-only` or `read-write` permissions for a certain package to a team.
+
+##### Example
+
+```javascript
+await access.grant('@foo/bar', '@foo:myteam', 'read-write', {
+ token: 'myregistrytoken'
+})
+// `@foo/bar` is now read/write enabled for the @foo:myteam team.
+```
+
+#### <a name="revoke"></a> `> access.revoke(spec, team, [opts]) -> Promise`
+
+`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible
+registry spec. `team` must be a fully-qualified team name, in the `scope:team`
+format, with or without the `@` prefix, and the team must be a valid team within
+that scope. `permissions` must be one of `'read-only'` or `'read-write'`.
+
+Removes access to a package from a certain team.
+
+##### Example
+
+```javascript
+await access.revoke('@foo/bar', '@foo:myteam', {
+ token: 'myregistrytoken'
+})
+// @foo:myteam can no longer access `@foo/bar`
+```
+
+#### <a name="tfa-required"></a> `> access.tfaRequired(spec, [opts]) -> Promise`
+
+`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible
+registry spec.
+
+Makes it so publishing or managing a package requires using 2FA tokens to
+complete operations.
+
+##### Example
+
+```javascript
+await access.tfaRequires('lodash', {token: 'myregistrytoken'})
+// Publishing or changing dist-tags on `lodash` now require OTP to be enabled.
+```
+
+#### <a name="tfa-not-required"></a> `> access.tfaNotRequired(spec, [opts]) -> Promise`
+
+`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible
+registry spec.
+
+Disabled the package-level 2FA requirement for `spec`. Note that you will need
+to pass in an `otp` token in `opts` in order to complete this operation.
+
+##### Example
+
+```javascript
+await access.tfaNotRequired('lodash', {otp: '123654', token: 'myregistrytoken'})
+// Publishing or editing dist-tags on `lodash` no longer requires OTP to be
+// enabled.
+```
+
+#### <a name="ls-packages"></a> `> access.lsPackages(entity, [opts]) -> Promise`
+
+`entity` must be either a valid org or user name, or a fully-qualified team name
+in the `scope:team` format, with or without the `@` prefix.
+
+Lists out packages a user, org, or team has access to, with corresponding
+permissions. Packages that the access token does not have access to won't be
+listed.
+
+In order to disambiguate between users and orgs, two requests may end up being
+made when listing orgs or users.
+
+For a streamed version of these results, see
+[`access.lsPackages.stream()`](#ls-package-stream).
+
+##### Example
+
+```javascript
+await access.lsPackages('zkat', {
+ token: 'myregistrytoken'
+})
+// Lists all packages `@zkat` has access to on the registry, and the
+// corresponding permissions.
+```
+
+#### <a name="ls-packages-stream"></a> `> access.lsPackages.stream(scope, [team], [opts]) -> Stream`
+
+`entity` must be either a valid org or user name, or a fully-qualified team name
+in the `scope:team` format, with or without the `@` prefix.
+
+Streams out packages a user, org, or team has access to, with corresponding
+permissions, with each stream entry being formatted like `[packageName,
+permissions]`. Packages that the access token does not have access to won't be
+listed.
+
+In order to disambiguate between users and orgs, two requests may end up being
+made when listing orgs or users.
+
+The returned stream is a valid `asyncIterator`.
+
+##### Example
+
+```javascript
+for await (let [pkg, perm] of access.lsPackages.stream('zkat')) {
+ console.log('zkat has', perm, 'access to', pkg)
+}
+// zkat has read-write access to eggplant
+// zkat has read-only access to @npmcorp/secret
+```
+
+#### <a name="ls-collaborators"></a> `> access.lsCollaborators(spec, [user], [opts]) -> Promise`
+
+`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible
+registry spec. `user` must be a valid user name, with or without the `@`
+prefix.
+
+Lists out access privileges for a certain package. Will only show permissions
+for packages to which you have at least read access. If `user` is passed in, the
+list is filtered only to teams _that_ user happens to belong to.
+
+For a streamed version of these results, see [`access.lsCollaborators.stream()`](#ls-collaborators-stream).
+
+##### Example
+
+```javascript
+await access.lsCollaborators('@npm/foo', 'zkat', {
+ token: 'myregistrytoken'
+})
+// Lists all teams with access to @npm/foo that @zkat belongs to.
+```
+
+#### <a name="ls-collaborators-stream"></a> `> access.lsCollaborators.stream(spec, [user], [opts]) -> Stream`
+
+`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible
+registry spec. `user` must be a valid user name, with or without the `@`
+prefix.
+
+Stream out access privileges for a certain package, with each entry in `[user,
+permissions]` format. Will only show permissions for packages to which you have
+at least read access. If `user` is passed in, the list is filtered only to teams
+_that_ user happens to belong to.
+
+The returned stream is a valid `asyncIterator`.
+
+##### Example
+
+```javascript
+for await (let [usr, perm] of access.lsCollaborators.stream('npm')) {
+ console.log(usr, 'has', perm, 'access to npm')
+}
+// zkat has read-write access to npm
+// iarna has read-write access to npm
+```
diff --git a/deps/npm/node_modules/libnpmaccess/appveyor.yml b/deps/npm/node_modules/libnpmaccess/appveyor.yml
new file mode 100644
index 0000000000..9cc64c58e0
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/appveyor.yml
@@ -0,0 +1,22 @@
+environment:
+ matrix:
+ - nodejs_version: "10"
+ - nodejs_version: "9"
+ - nodejs_version: "8"
+ - nodejs_version: "6"
+
+platform:
+ - x64
+
+install:
+ - ps: Install-Product node $env:nodejs_version $env:platform
+ - npm config set spin false
+ - npm install
+
+test_script:
+ - npm test
+
+matrix:
+ fast_finish: true
+
+build: off
diff --git a/deps/npm/node_modules/libnpmaccess/index.js b/deps/npm/node_modules/libnpmaccess/index.js
new file mode 100644
index 0000000000..e241fcbfc6
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/index.js
@@ -0,0 +1,201 @@
+'use strict'
+
+const figgyPudding = require('figgy-pudding')
+const getStream = require('get-stream')
+const npa = require('npm-package-arg')
+const npmFetch = require('npm-registry-fetch')
+const {PassThrough} = require('stream')
+const validate = require('aproba')
+
+const AccessConfig = figgyPudding({
+ Promise: {default: () => Promise}
+})
+
+const eu = encodeURIComponent
+const npar = spec => {
+ spec = npa(spec)
+ if (!spec.registry) {
+ throw new Error('`spec` must be a registry spec')
+ }
+ return spec
+}
+
+const cmd = module.exports = {}
+
+cmd.public = (spec, opts) => setAccess(spec, 'public', opts)
+cmd.restricted = (spec, opts) => setAccess(spec, 'restricted', opts)
+function setAccess (spec, access, opts) {
+ opts = AccessConfig(opts)
+ return pwrap(opts, () => {
+ spec = npar(spec)
+ validate('OSO', [spec, access, opts])
+ const uri = `/-/package/${eu(spec.name)}/access`
+ return npmFetch(uri, opts.concat({
+ method: 'POST',
+ body: {access},
+ spec
+ }))
+ }).then(res => res.body.resume() && true)
+}
+
+cmd.grant = (spec, entity, permissions, opts) => {
+ opts = AccessConfig(opts)
+ return pwrap(opts, () => {
+ spec = npar(spec)
+ const {scope, team} = splitEntity(entity)
+ validate('OSSSO', [spec, scope, team, permissions, opts])
+ if (permissions !== 'read-write' && permissions !== 'read-only') {
+ throw new Error('`permissions` must be `read-write` or `read-only`. Got `' + permissions + '` instead')
+ }
+ const uri = `/-/team/${eu(scope)}/${eu(team)}/package`
+ return npmFetch(uri, opts.concat({
+ method: 'PUT',
+ body: {package: spec.name, permissions},
+ scope,
+ spec,
+ ignoreBody: true
+ }))
+ }).then(() => true)
+}
+
+cmd.revoke = (spec, entity, opts) => {
+ opts = AccessConfig(opts)
+ return pwrap(opts, () => {
+ spec = npar(spec)
+ const {scope, team} = splitEntity(entity)
+ validate('OSSO', [spec, scope, team, opts])
+ const uri = `/-/team/${eu(scope)}/${eu(team)}/package`
+ return npmFetch(uri, opts.concat({
+ method: 'DELETE',
+ body: {package: spec.name},
+ scope,
+ spec,
+ ignoreBody: true
+ }))
+ }).then(() => true)
+}
+
+cmd.lsPackages = (entity, opts) => {
+ opts = AccessConfig(opts)
+ return pwrap(opts, () => {
+ return getStream.array(
+ cmd.lsPackages.stream(entity, opts)
+ ).then(data => data.reduce((acc, [key, val]) => {
+ if (!acc) {
+ acc = {}
+ }
+ acc[key] = val
+ return acc
+ }, null))
+ })
+}
+
+cmd.lsPackages.stream = (entity, opts) => {
+ validate('SO|SZ', [entity, opts])
+ opts = AccessConfig(opts)
+ const {scope, team} = splitEntity(entity)
+ let uri
+ if (team) {
+ uri = `/-/team/${eu(scope)}/${eu(team)}/package`
+ } else {
+ uri = `/-/org/${eu(scope)}/package`
+ }
+ opts = opts.concat({
+ query: {format: 'cli'},
+ mapJson (value, [key]) {
+ if (value === 'read') {
+ return [key, 'read-only']
+ } else if (value === 'write') {
+ return [key, 'read-write']
+ } else {
+ return [key, value]
+ }
+ }
+ })
+ const ret = new PassThrough({objectMode: true})
+ npmFetch.json.stream(uri, '*', opts).on('error', err => {
+ if (err.code === 'E404' && !team) {
+ uri = `/-/user/${eu(scope)}/package`
+ npmFetch.json.stream(uri, '*', opts).on(
+ 'error', err => ret.emit('error', err)
+ ).pipe(ret)
+ } else {
+ ret.emit('error', err)
+ }
+ }).pipe(ret)
+ return ret
+}
+
+cmd.lsCollaborators = (spec, user, opts) => {
+ if (typeof user === 'object' && !opts) {
+ opts = user
+ user = undefined
+ }
+ opts = AccessConfig(opts)
+ return pwrap(opts, () => {
+ return getStream.array(
+ cmd.lsCollaborators.stream(spec, user, opts)
+ ).then(data => data.reduce((acc, [key, val]) => {
+ if (!acc) {
+ acc = {}
+ }
+ acc[key] = val
+ return acc
+ }, null))
+ })
+}
+
+cmd.lsCollaborators.stream = (spec, user, opts) => {
+ if (typeof user === 'object' && !opts) {
+ opts = user
+ user = undefined
+ }
+ opts = AccessConfig(opts)
+ spec = npar(spec)
+ validate('OSO|OZO', [spec, user, opts])
+ const uri = `/-/package/${eu(spec.name)}/collaborators`
+ return npmFetch.json.stream(uri, '*', opts.concat({
+ query: {format: 'cli', user: user || undefined},
+ mapJson (value, [key]) {
+ if (value === 'read') {
+ return [key, 'read-only']
+ } else if (value === 'write') {
+ return [key, 'read-write']
+ } else {
+ return [key, value]
+ }
+ }
+ }))
+}
+
+cmd.tfaRequired = (spec, opts) => setRequires2fa(spec, true, opts)
+cmd.tfaNotRequired = (spec, opts) => setRequires2fa(spec, false, opts)
+function setRequires2fa (spec, required, opts) {
+ opts = AccessConfig(opts)
+ return new opts.Promise((resolve, reject) => {
+ spec = npar(spec)
+ validate('OBO', [spec, required, opts])
+ const uri = `/-/package/${eu(spec.name)}/access`
+ return npmFetch(uri, opts.concat({
+ method: 'POST',
+ body: {publish_requires_tfa: required},
+ spec,
+ ignoreBody: true
+ })).then(resolve, reject)
+ }).then(() => true)
+}
+
+cmd.edit = () => {
+ throw new Error('Not implemented yet')
+}
+
+function splitEntity (entity = '') {
+ let [, scope, team] = entity.match(/^@?([^:]+)(?::(.*))?$/) || []
+ return {scope, team}
+}
+
+function pwrap (opts, fn) {
+ return new opts.Promise((resolve, reject) => {
+ fn().then(resolve, reject)
+ })
+}
diff --git a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/CHANGELOG.md b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/CHANGELOG.md
new file mode 100644
index 0000000000..bab30ecb7e
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/CHANGELOG.md
@@ -0,0 +1,4 @@
+2.0.0
+ * Drop support for 0.10 and 0.12. They haven't been in travis but still,
+ since we _know_ we'll break with them now it's only polite to do a
+ major bump.
diff --git a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/LICENSE b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/LICENSE
new file mode 100644
index 0000000000..2a4982dc40
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/README.md b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/README.md
new file mode 100644
index 0000000000..e94799201c
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/README.md
@@ -0,0 +1,93 @@
+aproba
+======
+
+A ridiculously light-weight function argument validator
+
+```
+var validate = require("aproba")
+
+function myfunc(a, b, c) {
+ // `a` must be a string, `b` a number, `c` a function
+ validate('SNF', arguments) // [a,b,c] is also valid
+}
+
+myfunc('test', 23, function () {}) // ok
+myfunc(123, 23, function () {}) // type error
+myfunc('test', 23) // missing arg error
+myfunc('test', 23, function () {}, true) // too many args error
+
+```
+
+Valid types are:
+
+| type | description
+| :--: | :----------
+| * | matches any type
+| A | `Array.isArray` OR an `arguments` object
+| S | typeof == string
+| N | typeof == number
+| F | typeof == function
+| O | typeof == object and not type A and not type E
+| B | typeof == boolean
+| E | `instanceof Error` OR `null` **(special: see below)**
+| Z | == `null`
+
+Validation failures throw one of three exception types, distinguished by a
+`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
+
+If you pass in an invalid type then it will throw with a code of
+`EUNKNOWNTYPE`.
+
+If an **error** argument is found and is not null then the remaining
+arguments are optional. That is, if you say `ESO` then that's like using a
+non-magical `E` in: `E|ESO|ZSO`.
+
+### But I have optional arguments?!
+
+You can provide more than one signature by separating them with pipes `|`.
+If any signature matches the arguments then they'll be considered valid.
+
+So for example, say you wanted to write a signature for
+`fs.createWriteStream`. The docs for it describe it thusly:
+
+```
+fs.createWriteStream(path[, options])
+```
+
+This would be a signature of `SO|S`. That is, a string and and object, or
+just a string.
+
+Now, if you read the full `fs` docs, you'll see that actually path can ALSO
+be a buffer. And options can be a string, that is:
+```
+path <String> | <Buffer>
+options <String> | <Object>
+```
+
+To reproduce this you have to fully enumerate all of the possible
+combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
+awkwardness is a feature: It reminds you of the complexity you're adding to
+your API when you do this sort of thing.
+
+
+### Browser support
+
+This has no dependencies and should work in browsers, though you'll have
+noisier stack traces.
+
+### Why this exists
+
+I wanted a very simple argument validator. It needed to do two things:
+
+1. Be more concise and easier to use than assertions
+
+2. Not encourage an infinite bikeshed of DSLs
+
+This is why types are specified by a single character and there's no such
+thing as an optional argument.
+
+This is not intended to validate user data. This is specifically about
+asserting the interface of your functions.
+
+If you need greater validation, I encourage you to write them by hand or
+look elsewhere.
diff --git a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/index.js b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/index.js
new file mode 100644
index 0000000000..fd947481ba
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/index.js
@@ -0,0 +1,105 @@
+'use strict'
+module.exports = validate
+
+function isArguments (thingy) {
+ return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
+}
+
+const types = {
+ '*': {label: 'any', check: () => true},
+ A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)},
+ S: {label: 'string', check: _ => typeof _ === 'string'},
+ N: {label: 'number', check: _ => typeof _ === 'number'},
+ F: {label: 'function', check: _ => typeof _ === 'function'},
+ O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)},
+ B: {label: 'boolean', check: _ => typeof _ === 'boolean'},
+ E: {label: 'error', check: _ => _ instanceof Error},
+ Z: {label: 'null', check: _ => _ == null}
+}
+
+function addSchema (schema, arity) {
+ const group = arity[schema.length] = arity[schema.length] || []
+ if (group.indexOf(schema) === -1) group.push(schema)
+}
+
+function validate (rawSchemas, args) {
+ if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
+ if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
+ if (!args) throw missingRequiredArg(1, 'args')
+ if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
+ if (!types.A.check(args)) throw invalidType(1, ['array'], args)
+ const schemas = rawSchemas.split('|')
+ const arity = {}
+
+ schemas.forEach(schema => {
+ for (let ii = 0; ii < schema.length; ++ii) {
+ const type = schema[ii]
+ if (!types[type]) throw unknownType(ii, type)
+ }
+ if (/E.*E/.test(schema)) throw moreThanOneError(schema)
+ addSchema(schema, arity)
+ if (/E/.test(schema)) {
+ addSchema(schema.replace(/E.*$/, 'E'), arity)
+ addSchema(schema.replace(/E/, 'Z'), arity)
+ if (schema.length === 1) addSchema('', arity)
+ }
+ })
+ let matching = arity[args.length]
+ if (!matching) {
+ throw wrongNumberOfArgs(Object.keys(arity), args.length)
+ }
+ for (let ii = 0; ii < args.length; ++ii) {
+ let newMatching = matching.filter(schema => {
+ const type = schema[ii]
+ const typeCheck = types[type].check
+ return typeCheck(args[ii])
+ })
+ if (!newMatching.length) {
+ const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null)
+ throw invalidType(ii, labels, args[ii])
+ }
+ matching = newMatching
+ }
+}
+
+function missingRequiredArg (num) {
+ return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
+}
+
+function unknownType (num, type) {
+ return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
+}
+
+function invalidType (num, expectedTypes, value) {
+ let valueType
+ Object.keys(types).forEach(typeCode => {
+ if (types[typeCode].check(value)) valueType = types[typeCode].label
+ })
+ return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
+ englishList(expectedTypes) + ' but got ' + valueType)
+}
+
+function englishList (list) {
+ return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
+}
+
+function wrongNumberOfArgs (expected, got) {
+ const english = englishList(expected)
+ const args = expected.every(ex => ex.length === 1)
+ ? 'argument'
+ : 'arguments'
+ return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
+}
+
+function moreThanOneError (schema) {
+ return newException('ETOOMANYERRORTYPES',
+ 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
+}
+
+function newException (code, msg) {
+ const err = new Error(msg)
+ err.code = code
+ /* istanbul ignore else */
+ if (Error.captureStackTrace) Error.captureStackTrace(err, validate)
+ return err
+}
diff --git a/deps/npm/node_modules/libnpmaccess/node_modules/aproba/package.json b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/package.json
new file mode 100644
index 0000000000..c184114b06
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/node_modules/aproba/package.json
@@ -0,0 +1,66 @@
+{
+ "_args": [
+ [
+ "aproba@2.0.0",
+ "/Users/zkat/Documents/code/work/npm"
+ ]
+ ],
+ "_from": "aproba@2.0.0",
+ "_id": "aproba@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
+ "_location": "/libnpmaccess/aproba",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "aproba@2.0.0",
+ "name": "aproba",
+ "escapedName": "aproba",
+ "rawSpec": "2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "2.0.0"
+ },
+ "_requiredBy": [
+ "/libnpmaccess"
+ ],
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
+ "_spec": "2.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/aproba/issues"
+ },
+ "dependencies": {},
+ "description": "A ridiculously light-weight argument validator (now browser friendly)",
+ "devDependencies": {
+ "standard": "^11.0.1",
+ "tap": "^12.0.1"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/iarna/aproba",
+ "keywords": [
+ "argument",
+ "validate"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "aproba",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/aproba.git"
+ },
+ "scripts": {
+ "pretest": "standard",
+ "test": "tap --100 -J test/*.js"
+ },
+ "version": "2.0.0"
+}
diff --git a/deps/npm/node_modules/libnpmaccess/package.json b/deps/npm/node_modules/libnpmaccess/package.json
new file mode 100644
index 0000000000..c60e95b8d9
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "libnpmaccess@^3.0.1",
+ "_id": "libnpmaccess@3.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-RlZ7PNarCBt+XbnP7R6PoVgOq9t+kou5rvhaInoNibhPO7eMlRfS0B8yjatgn2yaHIwWNyoJDolC/6Lc5L/IQA==",
+ "_location": "/libnpmaccess",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "libnpmaccess@^3.0.1",
+ "name": "libnpmaccess",
+ "escapedName": "libnpmaccess",
+ "rawSpec": "^3.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.1"
+ },
+ "_requiredBy": [
+ "/libnpm"
+ ],
+ "_resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-3.0.1.tgz",
+ "_shasum": "5b3a9de621f293d425191aa2e779102f84167fa8",
+ "_spec": "libnpmaccess@^3.0.1",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpm",
+ "author": {
+ "name": "Kat Marchán",
+ "email": "kzm@zkat.tech"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/libnpmaccess/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "aproba": "^2.0.0",
+ "get-stream": "^4.0.0",
+ "npm-package-arg": "^6.1.0",
+ "npm-registry-fetch": "^3.8.0"
+ },
+ "deprecated": false,
+ "description": "programmatic library for `npm access` commands",
+ "devDependencies": {
+ "nock": "^9.6.1",
+ "standard": "*",
+ "standard-version": "*",
+ "tap": "*",
+ "weallbehave": "*",
+ "weallcontribute": "*"
+ },
+ "homepage": "https://npmjs.com/package/libnpmaccess",
+ "license": "ISC",
+ "name": "libnpmaccess",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/libnpmaccess.git"
+ },
+ "scripts": {
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap -J --100 test/*.js",
+ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
+ "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ },
+ "version": "3.0.1"
+}
diff --git a/deps/npm/node_modules/libnpmaccess/test/index.js b/deps/npm/node_modules/libnpmaccess/test/index.js
new file mode 100644
index 0000000000..b48815e79a
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/test/index.js
@@ -0,0 +1,347 @@
+'use strict'
+
+const figgyPudding = require('figgy-pudding')
+const getStream = require('get-stream')
+const {test} = require('tap')
+const tnock = require('./util/tnock.js')
+
+const access = require('../index.js')
+
+const REG = 'http://localhost:1337'
+const OPTS = figgyPudding({})({
+ registry: REG
+})
+
+test('access public', t => {
+ tnock(t, REG).post(
+ '/-/package/%40foo%2Fbar/access', {access: 'public'}
+ ).reply(200)
+ return access.public('@foo/bar', OPTS).then(ret => {
+ t.deepEqual(ret, true, 'request succeeded')
+ })
+})
+
+test('access restricted', t => {
+ tnock(t, REG).post(
+ '/-/package/%40foo%2Fbar/access', {access: 'restricted'}
+ ).reply(200)
+ return access.restricted('@foo/bar', OPTS).then(ret => {
+ t.deepEqual(ret, true, 'request succeeded')
+ })
+})
+
+test('access 2fa-required', t => {
+ tnock(t, REG).post('/-/package/%40foo%2Fbar/access', {
+ publish_requires_tfa: true
+ }).reply(200, {ok: true})
+ return access.tfaRequired('@foo/bar', OPTS).then(ret => {
+ t.deepEqual(ret, true, 'request succeeded')
+ })
+})
+
+test('access 2fa-not-required', t => {
+ tnock(t, REG).post('/-/package/%40foo%2Fbar/access', {
+ publish_requires_tfa: false
+ }).reply(200, {ok: true})
+ return access.tfaNotRequired('@foo/bar', OPTS).then(ret => {
+ t.deepEqual(ret, true, 'request succeeded')
+ })
+})
+
+test('access grant basic read-write', t => {
+ tnock(t, REG).put('/-/team/myorg/myteam/package', {
+ package: '@foo/bar',
+ permissions: 'read-write'
+ }).reply(201)
+ return access.grant(
+ '@foo/bar', 'myorg:myteam', 'read-write', OPTS
+ ).then(ret => {
+ t.deepEqual(ret, true, 'request succeeded')
+ })
+})
+
+test('access grant basic read-only', t => {
+ tnock(t, REG).put('/-/team/myorg/myteam/package', {
+ package: '@foo/bar',
+ permissions: 'read-only'
+ }).reply(201)
+ return access.grant(
+ '@foo/bar', 'myorg:myteam', 'read-only', OPTS
+ ).then(ret => {
+ t.deepEqual(ret, true, 'request succeeded')
+ })
+})
+
+test('access grant bad perm', t => {
+ return access.grant(
+ '@foo/bar', 'myorg:myteam', 'unknown', OPTS
+ ).then(ret => {
+ throw new Error('should not have succeeded')
+ }, err => {
+ t.match(
+ err.message,
+ /must be.*read-write.*read-only/,
+ 'only read-write and read-only are accepted'
+ )
+ })
+})
+
+test('access grant no entity', t => {
+ return access.grant(
+ '@foo/bar', undefined, 'read-write', OPTS
+ ).then(ret => {
+ throw new Error('should not have succeeded')
+ }, err => {
+ t.match(
+ err.message,
+ /Expected string/,
+ 'passing undefined entity gives useful error'
+ )
+ })
+})
+
+test('access grant basic unscoped', t => {
+ tnock(t, REG).put('/-/team/myorg/myteam/package', {
+ package: 'bar',
+ permissions: 'read-write'
+ }).reply(201)
+ return access.grant(
+ 'bar', 'myorg:myteam', 'read-write', OPTS
+ ).then(ret => {
+ t.deepEqual(ret, true, 'request succeeded')
+ })
+})
+
+test('access revoke basic', t => {
+ tnock(t, REG).delete('/-/team/myorg/myteam/package', {
+ package: '@foo/bar'
+ }).reply(200)
+ return access.revoke('@foo/bar', 'myorg:myteam', OPTS).then(ret => {
+ t.deepEqual(ret, true, 'request succeeded')
+ })
+})
+
+test('access revoke basic unscoped', t => {
+ tnock(t, REG).delete('/-/team/myorg/myteam/package', {
+ package: 'bar'
+ }).reply(200, {accessChanged: true})
+ return access.revoke('bar', 'myorg:myteam', OPTS).then(ret => {
+ t.deepEqual(ret, true, 'request succeeded')
+ })
+})
+
+test('ls-packages on team', t => {
+ const serverPackages = {
+ '@foo/bar': 'write',
+ '@foo/util': 'read',
+ '@foo/other': 'shrödinger'
+ }
+ const clientPackages = {
+ '@foo/bar': 'read-write',
+ '@foo/util': 'read-only',
+ '@foo/other': 'shrödinger'
+ }
+ tnock(t, REG).get(
+ '/-/team/myorg/myteam/package?format=cli'
+ ).reply(200, serverPackages)
+ return access.lsPackages('myorg:myteam', OPTS).then(data => {
+ t.deepEqual(data, clientPackages, 'got client package info')
+ })
+})
+
+test('ls-packages on org', t => {
+ const serverPackages = {
+ '@foo/bar': 'write',
+ '@foo/util': 'read',
+ '@foo/other': 'shrödinger'
+ }
+ const clientPackages = {
+ '@foo/bar': 'read-write',
+ '@foo/util': 'read-only',
+ '@foo/other': 'shrödinger'
+ }
+ tnock(t, REG).get(
+ '/-/org/myorg/package?format=cli'
+ ).reply(200, serverPackages)
+ return access.lsPackages('myorg', OPTS).then(data => {
+ t.deepEqual(data, clientPackages, 'got client package info')
+ })
+})
+
+test('ls-packages on user', t => {
+ const serverPackages = {
+ '@foo/bar': 'write',
+ '@foo/util': 'read',
+ '@foo/other': 'shrödinger'
+ }
+ const clientPackages = {
+ '@foo/bar': 'read-write',
+ '@foo/util': 'read-only',
+ '@foo/other': 'shrödinger'
+ }
+ const srv = tnock(t, REG)
+ srv.get('/-/org/myuser/package?format=cli').reply(404, {error: 'not found'})
+ srv.get('/-/user/myuser/package?format=cli').reply(200, serverPackages)
+ return access.lsPackages('myuser', OPTS).then(data => {
+ t.deepEqual(data, clientPackages, 'got client package info')
+ })
+})
+
+test('ls-packages error on team', t => {
+ tnock(t, REG).get('/-/team/myorg/myteam/package?format=cli').reply(404)
+ return access.lsPackages('myorg:myteam', OPTS).then(
+ () => { throw new Error('should not have succeeded') },
+ err => t.equal(err.code, 'E404', 'spit out 404 directly if team provided')
+ )
+})
+
+test('ls-packages error on user', t => {
+ const srv = tnock(t, REG)
+ srv.get('/-/org/myuser/package?format=cli').reply(404, {error: 'not found'})
+ srv.get('/-/user/myuser/package?format=cli').reply(404, {error: 'not found'})
+ return access.lsPackages('myuser', OPTS).then(
+ () => { throw new Error('should not have succeeded') },
+ err => t.equal(err.code, 'E404', 'spit out 404 if both reqs fail')
+ )
+})
+
+test('ls-packages bad response', t => {
+ tnock(t, REG).get(
+ '/-/team/myorg/myteam/package?format=cli'
+ ).reply(200, JSON.stringify(null))
+ return access.lsPackages('myorg:myteam', OPTS).then(data => {
+ t.deepEqual(data, null, 'succeeds with null')
+ })
+})
+
+test('ls-packages stream', t => {
+ const serverPackages = {
+ '@foo/bar': 'write',
+ '@foo/util': 'read',
+ '@foo/other': 'shrödinger'
+ }
+ const clientPackages = [
+ ['@foo/bar', 'read-write'],
+ ['@foo/util', 'read-only'],
+ ['@foo/other', 'shrödinger']
+ ]
+ tnock(t, REG).get(
+ '/-/team/myorg/myteam/package?format=cli'
+ ).reply(200, serverPackages)
+ return getStream.array(
+ access.lsPackages.stream('myorg:myteam', OPTS)
+ ).then(data => {
+ t.deepEqual(data, clientPackages, 'got streamed client package info')
+ })
+})
+
+test('ls-collaborators', t => {
+ const serverCollaborators = {
+ 'myorg:myteam': 'write',
+ 'myorg:anotherteam': 'read',
+ 'myorg:thirdteam': 'special-case'
+ }
+ const clientCollaborators = {
+ 'myorg:myteam': 'read-write',
+ 'myorg:anotherteam': 'read-only',
+ 'myorg:thirdteam': 'special-case'
+ }
+ tnock(t, REG).get(
+ '/-/package/%40foo%2Fbar/collaborators?format=cli'
+ ).reply(200, serverCollaborators)
+ return access.lsCollaborators('@foo/bar', OPTS).then(data => {
+ t.deepEqual(data, clientCollaborators, 'got collaborators')
+ })
+})
+
+test('ls-collaborators stream', t => {
+ const serverCollaborators = {
+ 'myorg:myteam': 'write',
+ 'myorg:anotherteam': 'read',
+ 'myorg:thirdteam': 'special-case'
+ }
+ const clientCollaborators = [
+ ['myorg:myteam', 'read-write'],
+ ['myorg:anotherteam', 'read-only'],
+ ['myorg:thirdteam', 'special-case']
+ ]
+ tnock(t, REG).get(
+ '/-/package/%40foo%2Fbar/collaborators?format=cli'
+ ).reply(200, serverCollaborators)
+ return getStream.array(
+ access.lsCollaborators.stream('@foo/bar', OPTS)
+ ).then(data => {
+ t.deepEqual(data, clientCollaborators, 'got collaborators')
+ })
+})
+
+test('ls-collaborators w/scope', t => {
+ const serverCollaborators = {
+ 'myorg:myteam': 'write',
+ 'myorg:anotherteam': 'read',
+ 'myorg:thirdteam': 'special-case'
+ }
+ const clientCollaborators = {
+ 'myorg:myteam': 'read-write',
+ 'myorg:anotherteam': 'read-only',
+ 'myorg:thirdteam': 'special-case'
+ }
+ tnock(t, REG).get(
+ '/-/package/%40foo%2Fbar/collaborators?format=cli&user=zkat'
+ ).reply(200, serverCollaborators)
+ return access.lsCollaborators('@foo/bar', 'zkat', OPTS).then(data => {
+ t.deepEqual(data, clientCollaborators, 'got collaborators')
+ })
+})
+
+test('ls-collaborators w/o scope', t => {
+ const serverCollaborators = {
+ 'myorg:myteam': 'write',
+ 'myorg:anotherteam': 'read',
+ 'myorg:thirdteam': 'special-case'
+ }
+ const clientCollaborators = {
+ 'myorg:myteam': 'read-write',
+ 'myorg:anotherteam': 'read-only',
+ 'myorg:thirdteam': 'special-case'
+ }
+ tnock(t, REG).get(
+ '/-/package/bar/collaborators?format=cli&user=zkat'
+ ).reply(200, serverCollaborators)
+ return access.lsCollaborators('bar', 'zkat', OPTS).then(data => {
+ t.deepEqual(data, clientCollaborators, 'got collaborators')
+ })
+})
+
+test('ls-collaborators bad response', t => {
+ tnock(t, REG).get(
+ '/-/package/%40foo%2Fbar/collaborators?format=cli'
+ ).reply(200, JSON.stringify(null))
+ return access.lsCollaborators('@foo/bar', null, OPTS).then(data => {
+ t.deepEqual(data, null, 'succeeds with null')
+ })
+})
+
+test('error on non-registry specs', t => {
+ const resolve = () => { throw new Error('should not succeed') }
+ const reject = err => t.match(
+ err.message, /spec.*must be a registry spec/, 'registry spec required'
+ )
+ return Promise.all([
+ access.public('foo/bar').then(resolve, reject),
+ access.restricted('foo/bar').then(resolve, reject),
+ access.grant('foo/bar', 'myorg', 'myteam', 'read-only').then(resolve, reject),
+ access.revoke('foo/bar', 'myorg', 'myteam').then(resolve, reject),
+ access.lsCollaborators('foo/bar').then(resolve, reject),
+ access.tfaRequired('foo/bar').then(resolve, reject),
+ access.tfaNotRequired('foo/bar').then(resolve, reject)
+ ])
+})
+
+test('edit', t => {
+ t.equal(typeof access.edit, 'function', 'access.edit exists')
+ t.throws(() => {
+ access.edit()
+ }, /Not implemented/, 'directly throws NIY message')
+ t.done()
+})
diff --git a/deps/npm/node_modules/libnpmaccess/test/util/tnock.js b/deps/npm/node_modules/libnpmaccess/test/util/tnock.js
new file mode 100644
index 0000000000..00b6e160e1
--- /dev/null
+++ b/deps/npm/node_modules/libnpmaccess/test/util/tnock.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const nock = require('nock')
+
+module.exports = tnock
+function tnock (t, host) {
+ const server = nock(host)
+ t.tearDown(function () {
+ server.done()
+ })
+ return server
+}
diff --git a/deps/npm/node_modules/libnpmconfig/CHANGELOG.md b/deps/npm/node_modules/libnpmconfig/CHANGELOG.md
new file mode 100644
index 0000000000..a5708cc7ca
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/CHANGELOG.md
@@ -0,0 +1,51 @@
+# 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="1.2.1"></a>
+## [1.2.1](https://github.com/npm/libnpmconfig/compare/v1.2.0...v1.2.1) (2018-11-13)
+
+
+### Bug Fixes
+
+* **proj:** make sure proj object exists ([8fe2663](https://github.com/npm/libnpmconfig/commit/8fe2663))
+
+
+
+<a name="1.2.0"></a>
+# [1.2.0](https://github.com/npm/libnpmconfig/compare/v1.1.1...v1.2.0) (2018-11-13)
+
+
+### Features
+
+* **cache:** improved cache parsing/handling ([63ba3bb](https://github.com/npm/libnpmconfig/commit/63ba3bb))
+
+
+
+<a name="1.1.1"></a>
+## [1.1.1](https://github.com/npm/libnpmconfig/compare/v1.1.0...v1.1.1) (2018-11-04)
+
+
+### Bug Fixes
+
+* **config:** rework load order and support builtin configs ([5ef1ac5](https://github.com/npm/libnpmconfig/commit/5ef1ac5))
+
+
+
+<a name="1.1.0"></a>
+# [1.1.0](https://github.com/npm/libnpmconfig/compare/v1.0.0...v1.1.0) (2018-11-04)
+
+
+### Features
+
+* **userconfig:** allow passing in userconfig from env ([f613877](https://github.com/npm/libnpmconfig/commit/f613877))
+
+
+
+<a name="1.0.0"></a>
+# 1.0.0 (2018-11-04)
+
+
+### Features
+
+* **api:** add read() function ([710426b](https://github.com/npm/libnpmconfig/commit/710426b))
diff --git a/deps/npm/node_modules/libnpmconfig/CODE_OF_CONDUCT.md b/deps/npm/node_modules/libnpmconfig/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000000..aeb72f598d
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/CODE_OF_CONDUCT.md
@@ -0,0 +1,151 @@
+# Code of Conduct
+
+## When Something Happens
+
+If you see a Code of Conduct violation, follow these steps:
+
+1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
+2. That person should immediately stop the behavior and correct the issue.
+3. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
+4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
+
+When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
+
+**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+ * Using welcoming and inclusive language.
+ * Being respectful of differing viewpoints and experiences.
+ * Gracefully accepting constructive feedback.
+ * Focusing on what is best for the community.
+ * Showing empathy and kindness towards other community members.
+ * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
+
+Examples of unacceptable behavior by participants include:
+
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
+ * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
+ * Making light of/making mocking comments about trigger warnings and content warnings.
+ * Trolling, insulting/derogatory comments, and personal or political attacks.
+ * Public or private harassment, deliberate intimidation, or threats.
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
+ * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
+ * Publishing of private communication that doesn't have to do with reporting harrassment.
+ * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
+ * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
+ * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
+ * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
+ * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
+ * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
+
+## Scope
+
+This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
+
+Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
+
+### Other Community Standards
+
+As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
+
+Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
+
+Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
+
+## Maintainer Enforcement Process
+
+Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
+
+### Contacting Maintainers
+
+You may get in touch with the maintainer team through any of the following methods:
+
+ * Through email:
+ * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchán)
+
+ * Through Twitter:
+ * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchán)
+
+### Further Enforcement
+
+If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
+
+ 1. Repeat the request to stop.
+ 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
+ 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
+ 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
+
+On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
+
+Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
+
+Members expelled from events or venues with any sort of paid attendance will not be refunded.
+
+### Who Watches the Watchers?
+
+Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
+
+Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
+
+### Enforcement Examples
+
+#### The Best Case
+
+The vast majority of situations work out like this. This interaction is common, and generally positive.
+
+> Alex: "Yeah I used X and it was really crazy!"
+
+> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
+
+> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
+
+#### The Maintainer Case
+
+Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
+
+> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
+
+> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
+
+> Patt: "I'm not attacking anyone, what's your problem?"
+
+> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
+
+> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
+
+> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
+
+> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
+
+> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
+
+> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
+
+#### The Nope Case
+
+> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
+
+> Patt: "NOOOOPE. OH NOPE NOPE."
+
+> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
+
+> KeeperOfCommitBits: "👀 Nope. NOPE NOPE NOPE. 🔥"
+
+> PepeTheFrog🐸 has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
+
+## Attribution
+
+This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
+Conduct](https://wealljs.org/code-of-conduct), which is itself based on
+[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
+at
+[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
+and the LGBTQ in Technology Slack [Code of
+Conduct](http://lgbtq.technology/coc.html).
diff --git a/deps/npm/node_modules/libnpmconfig/CONTRIBUTING.md b/deps/npm/node_modules/libnpmconfig/CONTRIBUTING.md
new file mode 100644
index 0000000000..970c1cf43a
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/CONTRIBUTING.md
@@ -0,0 +1,256 @@
+# Contributing
+
+## How do I... <a name="toc"></a>
+
+* [Use This Guide](#introduction)?
+* Ask or Say Something? 🤔🐛😱
+ * [Request Support](#request-support)
+ * [Report an Error or Bug](#report-an-error-or-bug)
+ * [Request a Feature](#request-a-feature)
+* Make Something? 🤓👩🏽‍💻📜🍳
+ * [Project Setup](#project-setup)
+ * [Contribute Documentation](#contribute-documentation)
+ * [Contribute Code](#contribute-code)
+* Manage Something ✅🙆🏼💃👔
+ * [Provide Support on Issues](#provide-support-on-issues)
+ * [Label Issues](#label-issues)
+ * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
+ * [Review Pull Requests](#review-pull-requests)
+ * [Merge Pull Requests](#merge-pull-requests)
+ * [Tag a Release](#tag-a-release)
+ * [Join the Project Team](#join-the-project-team)
+* Add a Guide Like This One [To My Project](#attribution)? 🤖😻👻
+
+## Introduction
+
+Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝
+
+Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 💚
+
+The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨
+
+## Request Support
+
+If you have a question about this project, how to use it, or just need clarification about something:
+
+* Open an Issue at https://github.com/npm/libnpmconfig/issues
+* Provide as much context as you can about what you're running into.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* Someone will try to have a response soon.
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+
+## Report an Error or Bug
+
+If you run into an error or bug with the project:
+
+* Open an Issue at https://github.com/npm/libnpmconfig/issues
+* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
+* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
+
+## Request a Feature
+
+If the project doesn't do something you need or want it to do:
+
+* Open an Issue at https://github.com/npm/libnpmconfig/issues
+* Provide as much context as you can about what you're running into.
+* Please try and be clear about why existing features and alternatives would not work for you.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
+* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
+
+Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
+
+## Project Setup
+
+So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
+
+If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
+
+If you want to go the usual route and run the project locally, though:
+
+* [Install Node.js](https://nodejs.org/en/download/)
+* [Fork the project](https://guides.github.com/activities/forking/#fork)
+
+Then in your terminal:
+* `cd path/to/your/clone`
+* `npm install`
+* `npm test`
+
+And you should be ready to go!
+
+## Contribute Documentation
+
+Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
+
+Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
+
+To contribute documentation:
+
+* [Set up the project](#project-setup).
+* Edit or add any relevant documentation.
+* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
+* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
+* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(<component>): <message>`.
+* Go to https://github.com/npm/libnpmconfig/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Contribute Code
+
+We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
+
+Code contributions of just about any size are acceptable!
+
+The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
+
+To contribute code:
+
+* [Set up the project](#project-setup).
+* Make any necessary changes to the source code.
+* Include any [additional documentation](#contribute-documentation) the changes might need.
+* Write tests that verify that your contribution works as expected.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
+* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `<prefix>(deps): PKG@VERSION`, where `<prefix>` is any of the usual `conventional-changelog` prefixes, at your discretion.
+* Go to https://github.com/npm/libnpmconfig/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Provide Support on Issues
+
+[Needs Collaborator](#join-the-project-team): none
+
+Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
+
+Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
+
+In order to help other folks out with their questions:
+
+* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmconfig/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
+* Read through the list until you find something that you're familiar enough with to give an answer to.
+* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
+* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
+
+Some notes on picking up support issues:
+
+* Avoid responding to issues you don't know you can answer accurately.
+* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
+* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
+
+## Label Issues
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
+
+In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmconfig/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
+
+Label | Apply When | Notes
+--- | --- | ---
+`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
+`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
+`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
+`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
+`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
+`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
+`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
+`performance` | This issue or PR is directly related to improving performance. |
+`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
+`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
+`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
+`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
+`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
+
+## Clean Up Issues and PRs
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
+
+In these cases, they should be closed until they're brought up again or the interaction starts over.
+
+To clean up issues and PRs:
+
+* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
+* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
+ * not opened by a maintainer
+ * not marked as `critical`
+ * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
+ * no explicit messages in the comments asking for it to be left open
+ * does not belong to a milestone
+* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmconfig/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
+
+## Review Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
+
+PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
+
+Some notes:
+
+* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
+* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
+* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
+* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
+
+## Merge Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process.
+
+## Tag A Release
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
+
+## Join the Project Team
+
+### Ways to Join
+
+There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
+
+All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
+
+You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
+
+Permission | Description
+--- | ---
+Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
+Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
+Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
+
+## Attribution
+
+This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/deps/npm/node_modules/libnpmconfig/LICENSE b/deps/npm/node_modules/libnpmconfig/LICENSE
new file mode 100644
index 0000000000..209e4477f3
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/LICENSE
@@ -0,0 +1,13 @@
+Copyright 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 AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmconfig/PULL_REQUEST_TEMPLATE b/deps/npm/node_modules/libnpmconfig/PULL_REQUEST_TEMPLATE
new file mode 100644
index 0000000000..9471c6d325
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/PULL_REQUEST_TEMPLATE
@@ -0,0 +1,7 @@
+<!--
+⚠️🚨 BEFORE FILING A PR: 🚨⚠️
+
+👉🏼 CONTRIBUTING.md 👈🏼 (the "contribution guidelines" up there ☝🏼)
+
+I PROMISE IT'S A VERY VERY SHORT READ.🙇🏼
+-->
diff --git a/deps/npm/node_modules/libnpmconfig/README.md b/deps/npm/node_modules/libnpmconfig/README.md
new file mode 100644
index 0000000000..91bac0d171
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/README.md
@@ -0,0 +1,40 @@
+# libnpmconfig [![npm version](https://img.shields.io/npm/v/libnpmconfig.svg)](https://npm.im/libnpmconfig) [![license](https://img.shields.io/npm/l/libnpmconfig.svg)](https://npm.im/libnpmconfig) [![Travis](https://img.shields.io/travis/npm/libnpmconfig.svg)](https://travis-ci.org/npm/libnpmconfig) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmconfig?svg=true)](https://ci.appveyor.com/project/zkat/libnpmconfig) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmconfig/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmconfig?branch=latest)
+
+[`libnpmconfig`](https://github.com/npm/libnpmconfig) is a Node.js library for
+programmatically managing npm's configuration files and data.
+
+## Example
+
+```js
+const config = require('libnpmconfig')
+
+console.log('configured registry:', config.read({
+ registry: 'https://default.registry/'
+}))
+// => configured registry: https://registry.npmjs.org
+```
+
+## Install
+
+`$ npm install libnpmconfig`
+
+## Table of Contents
+
+* [Example](#example)
+* [Install](#install)
+* [API](#api)
+
+### API
+
+##### <a name="read"></a> `> read(cliOpts, builtinOpts)`
+
+Reads configurations from the filesystem and the env and returns a
+[`figgy-pudding`](https://npm.im/figgy-pudding) object with the configuration
+values.
+
+If `cliOpts` is provided, it will be merged with the returned config pudding,
+shadowing any read values. These are intended as CLI-provided options. Do your
+own `process.argv` parsing, though.
+
+If `builtinOpts.cwd` is provided, it will be used instead of `process.cwd()` as
+the starting point for config searching.
diff --git a/deps/npm/node_modules/libnpmconfig/index.js b/deps/npm/node_modules/libnpmconfig/index.js
new file mode 100644
index 0000000000..5501e26b75
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/index.js
@@ -0,0 +1,107 @@
+'use strict'
+
+const fs = require('fs')
+const figgyPudding = require('figgy-pudding')
+const findUp = require('find-up')
+const ini = require('ini')
+const os = require('os')
+const path = require('path')
+
+const NpmConfig = figgyPudding({}, {
+ // Open up the pudding object.
+ other () { return true }
+})
+
+const ConfigOpts = figgyPudding({
+ cache: { default: path.join(os.homedir(), '.npm') },
+ configNames: { default: ['npmrc', '.npmrc'] },
+ envPrefix: { default: /^npm_config_/i },
+ cwd: { default: () => process.cwd() },
+ globalconfig: {
+ default: () => path.join(getGlobalPrefix(), 'etc', 'npmrc')
+ },
+ userconfig: { default: path.join(os.homedir(), '.npmrc') }
+})
+
+module.exports.read = getNpmConfig
+function getNpmConfig (_opts, _builtin) {
+ const builtin = ConfigOpts(_builtin)
+ const env = {}
+ for (let key of Object.keys(process.env)) {
+ if (!key.match(builtin.envPrefix)) continue
+ const newKey = key.toLowerCase()
+ .replace(builtin.envPrefix, '')
+ .replace(/(?!^)_/g, '-')
+ env[newKey] = process.env[key]
+ }
+ const cli = NpmConfig(_opts)
+ const userConfPath = (
+ builtin.userconfig ||
+ cli.userconfig ||
+ env.userconfig
+ )
+ const user = userConfPath && maybeReadIni(userConfPath)
+ const globalConfPath = (
+ builtin.globalconfig ||
+ cli.globalconfig ||
+ env.globalconfig
+ )
+ const global = globalConfPath && maybeReadIni(globalConfPath)
+ const projConfPath = findUp.sync(builtin.configNames, { cwd: builtin.cwd })
+ let proj = {}
+ if (projConfPath && projConfPath !== userConfPath) {
+ proj = maybeReadIni(projConfPath)
+ }
+ const newOpts = NpmConfig(builtin, global, user, proj, env, cli)
+ if (newOpts.cache) {
+ return newOpts.concat({
+ cache: path.resolve(
+ (
+ (cli.cache || env.cache)
+ ? builtin.cwd
+ : proj.cache
+ ? path.dirname(projConfPath)
+ : user.cache
+ ? path.dirname(userConfPath)
+ : global.cache
+ ? path.dirname(globalConfPath)
+ : path.dirname(userConfPath)
+ ),
+ newOpts.cache
+ )
+ })
+ } else {
+ return newOpts
+ }
+}
+
+function maybeReadIni (f) {
+ let txt
+ try {
+ txt = fs.readFileSync(f, 'utf8')
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ return ''
+ } else {
+ throw err
+ }
+ }
+ return ini.parse(txt)
+}
+
+function getGlobalPrefix () {
+ if (process.env.PREFIX) {
+ return process.env.PREFIX
+ } else if (process.platform === 'win32') {
+ // c:\node\node.exe --> prefix=c:\node\
+ return path.dirname(process.execPath)
+ } else {
+ // /usr/local/bin/node --> prefix=/usr/local
+ let pref = path.dirname(path.dirname(process.execPath))
+ // destdir only is respected on Unix
+ if (process.env.DESTDIR) {
+ pref = path.join(process.env.DESTDIR, pref)
+ }
+ return pref
+ }
+}
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/find-up/index.js b/deps/npm/node_modules/libnpmconfig/node_modules/find-up/index.js
new file mode 100644
index 0000000000..8e83819cea
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/find-up/index.js
@@ -0,0 +1,46 @@
+'use strict';
+const path = require('path');
+const locatePath = require('locate-path');
+
+module.exports = (filename, opts = {}) => {
+ const startDir = path.resolve(opts.cwd || '');
+ const {root} = path.parse(startDir);
+
+ const filenames = [].concat(filename);
+
+ return new Promise(resolve => {
+ (function find(dir) {
+ locatePath(filenames, {cwd: dir}).then(file => {
+ if (file) {
+ resolve(path.join(dir, file));
+ } else if (dir === root) {
+ resolve(null);
+ } else {
+ find(path.dirname(dir));
+ }
+ });
+ })(startDir);
+ });
+};
+
+module.exports.sync = (filename, opts = {}) => {
+ let dir = path.resolve(opts.cwd || '');
+ const {root} = path.parse(dir);
+
+ const filenames = [].concat(filename);
+
+ // eslint-disable-next-line no-constant-condition
+ while (true) {
+ const file = locatePath.sync(filenames, {cwd: dir});
+
+ if (file) {
+ return path.join(dir, file);
+ }
+
+ if (dir === root) {
+ return null;
+ }
+
+ dir = path.dirname(dir);
+ }
+};
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/find-up/license b/deps/npm/node_modules/libnpmconfig/node_modules/find-up/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/find-up/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/find-up/package.json b/deps/npm/node_modules/libnpmconfig/node_modules/find-up/package.json
new file mode 100644
index 0000000000..d18dba3f17
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/find-up/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "find-up@^3.0.0",
+ "_id": "find-up@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "_location": "/libnpmconfig/find-up",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "find-up@^3.0.0",
+ "name": "find-up",
+ "escapedName": "find-up",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/libnpmconfig"
+ ],
+ "_resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "_shasum": "49169f1d7993430646da61ecc5ae355c21c97b73",
+ "_spec": "find-up@^3.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpmconfig",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/find-up/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "locate-path": "^3.0.0"
+ },
+ "deprecated": false,
+ "description": "Find a file or directory by walking up parent directories",
+ "devDependencies": {
+ "ava": "*",
+ "tempy": "^0.2.1",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/find-up#readme",
+ "keywords": [
+ "find",
+ "up",
+ "find-up",
+ "findup",
+ "look-up",
+ "look",
+ "file",
+ "search",
+ "match",
+ "package",
+ "resolve",
+ "parent",
+ "parents",
+ "folder",
+ "directory",
+ "dir",
+ "walk",
+ "walking",
+ "path"
+ ],
+ "license": "MIT",
+ "name": "find-up",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/find-up.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0"
+}
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/find-up/readme.md b/deps/npm/node_modules/libnpmconfig/node_modules/find-up/readme.md
new file mode 100644
index 0000000000..810ad7ceb5
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/find-up/readme.md
@@ -0,0 +1,87 @@
+# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master)
+
+> Find a file or directory by walking up parent directories
+
+
+## Install
+
+```
+$ npm install find-up
+```
+
+
+## Usage
+
+```
+/
+└── Users
+ └── sindresorhus
+ ├── unicorn.png
+ └── foo
+ └── bar
+ ├── baz
+ └── example.js
+```
+
+`example.js`
+
+```js
+const findUp = require('find-up');
+
+(async () => {
+ console.log(await findUp('unicorn.png'));
+ //=> '/Users/sindresorhus/unicorn.png'
+
+ console.log(await findUp(['rainbow.png', 'unicorn.png']));
+ //=> '/Users/sindresorhus/unicorn.png'
+})();
+```
+
+
+## API
+
+### findUp(filename, [options])
+
+Returns a `Promise` for either the filepath or `null` if it couldn't be found.
+
+### findUp([filenameA, filenameB], [options])
+
+Returns a `Promise` for either the first filepath found (by respecting the order) or `null` if none could be found.
+
+### findUp.sync(filename, [options])
+
+Returns a filepath or `null`.
+
+### findUp.sync([filenameA, filenameB], [options])
+
+Returns the first filepath found (by respecting the order) or `null`.
+
+#### filename
+
+Type: `string`
+
+Filename of the file to find.
+
+#### options
+
+Type: `Object`
+
+##### cwd
+
+Type: `string`<br>
+Default: `process.cwd()`
+
+Directory to start from.
+
+
+## Related
+
+- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module
+- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
+- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package
+- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/index.js b/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/index.js
new file mode 100644
index 0000000000..5aae6ee4ad
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/index.js
@@ -0,0 +1,24 @@
+'use strict';
+const path = require('path');
+const pathExists = require('path-exists');
+const pLocate = require('p-locate');
+
+module.exports = (iterable, options) => {
+ options = Object.assign({
+ cwd: process.cwd()
+ }, options);
+
+ return pLocate(iterable, el => pathExists(path.resolve(options.cwd, el)), options);
+};
+
+module.exports.sync = (iterable, options) => {
+ options = Object.assign({
+ cwd: process.cwd()
+ }, options);
+
+ for (const el of iterable) {
+ if (pathExists.sync(path.resolve(options.cwd, el))) {
+ return el;
+ }
+ }
+};
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/license b/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/package.json b/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/package.json
new file mode 100644
index 0000000000..54600c0c48
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/package.json
@@ -0,0 +1,76 @@
+{
+ "_from": "locate-path@^3.0.0",
+ "_id": "locate-path@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "_location": "/libnpmconfig/locate-path",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "locate-path@^3.0.0",
+ "name": "locate-path",
+ "escapedName": "locate-path",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/libnpmconfig/find-up"
+ ],
+ "_resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "_shasum": "dbec3b3ab759758071b58fe59fc41871af21400e",
+ "_spec": "locate-path@^3.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpmconfig/node_modules/find-up",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/locate-path/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "p-locate": "^3.0.0",
+ "path-exists": "^3.0.0"
+ },
+ "deprecated": false,
+ "description": "Get the first path that exists on disk of multiple paths",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/locate-path#readme",
+ "keywords": [
+ "locate",
+ "path",
+ "paths",
+ "file",
+ "files",
+ "exists",
+ "find",
+ "finder",
+ "search",
+ "searcher",
+ "array",
+ "iterable",
+ "iterator"
+ ],
+ "license": "MIT",
+ "name": "locate-path",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/locate-path.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0"
+}
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/readme.md b/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/readme.md
new file mode 100644
index 0000000000..a1d2e62832
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/locate-path/readme.md
@@ -0,0 +1,99 @@
+# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path)
+
+> Get the first path that exists on disk of multiple paths
+
+
+## Install
+
+```
+$ npm install locate-path
+```
+
+
+## Usage
+
+Here we find the first file that exists on disk, in array order.
+
+```js
+const locatePath = require('locate-path');
+
+const files = [
+ 'unicorn.png',
+ 'rainbow.png', // Only this one actually exists on disk
+ 'pony.png'
+];
+
+(async () => {
+ console(await locatePath(files));
+ //=> 'rainbow'
+})();
+```
+
+
+## API
+
+### locatePath(input, [options])
+
+Returns a `Promise` for the first path that exists or `undefined` if none exists.
+
+#### input
+
+Type: `Iterable<string>`
+
+Paths to check.
+
+#### options
+
+Type: `Object`
+
+##### concurrency
+
+Type: `number`<br>
+Default: `Infinity`<br>
+Minimum: `1`
+
+Number of concurrently pending promises.
+
+##### preserveOrder
+
+Type: `boolean`<br>
+Default: `true`
+
+Preserve `input` order when searching.
+
+Disable this to improve performance if you don't care about the order.
+
+##### cwd
+
+Type: `string`<br>
+Default: `process.cwd()`
+
+Current working directory.
+
+### locatePath.sync(input, [options])
+
+Returns the first path that exists or `undefined` if none exists.
+
+#### input
+
+Type: `Iterable<string>`
+
+Paths to check.
+
+#### options
+
+Type: `Object`
+
+##### cwd
+
+Same as above.
+
+
+## Related
+
+- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js
new file mode 100644
index 0000000000..86decabbc0
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js
@@ -0,0 +1,49 @@
+'use strict';
+const pTry = require('p-try');
+
+module.exports = concurrency => {
+ if (concurrency < 1) {
+ throw new TypeError('Expected `concurrency` to be a number from 1 and up');
+ }
+
+ const queue = [];
+ let activeCount = 0;
+
+ const next = () => {
+ activeCount--;
+
+ if (queue.length > 0) {
+ queue.shift()();
+ }
+ };
+
+ const run = (fn, resolve, ...args) => {
+ activeCount++;
+
+ const result = pTry(fn, ...args);
+
+ resolve(result);
+
+ result.then(next, next);
+ };
+
+ const enqueue = (fn, resolve, ...args) => {
+ if (activeCount < concurrency) {
+ run(fn, resolve, ...args);
+ } else {
+ queue.push(run.bind(null, fn, resolve, ...args));
+ }
+ };
+
+ const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args));
+ Object.defineProperties(generator, {
+ activeCount: {
+ get: () => activeCount
+ },
+ pendingCount: {
+ get: () => queue.length
+ }
+ });
+
+ return generator;
+};
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/license b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json
new file mode 100644
index 0000000000..233b3f13d7
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "p-limit@^2.0.0",
+ "_id": "p-limit@2.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==",
+ "_location": "/libnpmconfig/p-limit",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "p-limit@^2.0.0",
+ "name": "p-limit",
+ "escapedName": "p-limit",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/libnpmconfig/p-locate"
+ ],
+ "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz",
+ "_shasum": "1d5a0d20fb12707c758a655f6bbc4386b5930d68",
+ "_spec": "p-limit@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpmconfig/node_modules/p-locate",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/p-limit/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Run multiple promise-returning & async functions with limited concurrency",
+ "devDependencies": {
+ "ava": "^1.0.1",
+ "delay": "^4.1.0",
+ "in-range": "^1.0.0",
+ "random-int": "^1.0.0",
+ "time-span": "^2.0.0",
+ "xo": "^0.23.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/p-limit#readme",
+ "keywords": [
+ "promise",
+ "limit",
+ "limited",
+ "concurrency",
+ "throttle",
+ "throat",
+ "rate",
+ "batch",
+ "ratelimit",
+ "task",
+ "queue",
+ "async",
+ "await",
+ "promises",
+ "bluebird"
+ ],
+ "license": "MIT",
+ "name": "p-limit",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/p-limit.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.1.0"
+}
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md
new file mode 100644
index 0000000000..92a6dbf774
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md
@@ -0,0 +1,90 @@
+# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit)
+
+> Run multiple promise-returning & async functions with limited concurrency
+
+
+## Install
+
+```
+$ npm install p-limit
+```
+
+
+## Usage
+
+```js
+const pLimit = require('p-limit');
+
+const limit = pLimit(1);
+
+const input = [
+ limit(() => fetchSomething('foo')),
+ limit(() => fetchSomething('bar')),
+ limit(() => doSomething())
+];
+
+(async () => {
+ // Only one promise is run at once
+ const result = await Promise.all(input);
+ console.log(result);
+})();
+```
+
+
+## API
+
+### pLimit(concurrency)
+
+Returns a `limit` function.
+
+#### concurrency
+
+Type: `number`<br>
+Minimum: `1`
+
+Concurrency limit.
+
+### limit(fn, ...args)
+
+Returns the promise returned by calling `fn(...args)`.
+
+#### fn
+
+Type: `Function`
+
+Promise-returning/async function.
+
+#### ...args
+
+Any arguments to pass through to `fn`.
+
+Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions.
+
+### limit.activeCount
+
+The number of promises that are currently running.
+
+### limit.pendingCount
+
+The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
+
+
+## FAQ
+
+### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package?
+
+This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause and clear the queue.
+
+
+## Related
+
+- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control
+- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions
+- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions
+- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency
+- [More…](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/index.js b/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/index.js
new file mode 100644
index 0000000000..4bd08aad19
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/index.js
@@ -0,0 +1,34 @@
+'use strict';
+const pLimit = require('p-limit');
+
+class EndError extends Error {
+ constructor(value) {
+ super();
+ this.value = value;
+ }
+}
+
+// The input can also be a promise, so we `Promise.resolve()` it
+const testElement = (el, tester) => Promise.resolve(el).then(tester);
+
+// The input can also be a promise, so we `Promise.all()` them both
+const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0])));
+
+module.exports = (iterable, tester, opts) => {
+ opts = Object.assign({
+ concurrency: Infinity,
+ preserveOrder: true
+ }, opts);
+
+ const limit = pLimit(opts.concurrency);
+
+ // Start all the promises concurrently with optional limit
+ const items = [...iterable].map(el => [el, limit(testElement, el, tester)]);
+
+ // Check the promises either serially or concurrently
+ const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity);
+
+ return Promise.all(items.map(el => checkLimit(finder, el)))
+ .then(() => {})
+ .catch(err => err instanceof EndError ? err.value : Promise.reject(err));
+};
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/license b/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/package.json b/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/package.json
new file mode 100644
index 0000000000..d49e3027e1
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "p-locate@^3.0.0",
+ "_id": "p-locate@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "_location": "/libnpmconfig/p-locate",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "p-locate@^3.0.0",
+ "name": "p-locate",
+ "escapedName": "p-locate",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/libnpmconfig/locate-path"
+ ],
+ "_resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "_shasum": "322d69a05c0264b25997d9f40cd8a891ab0064a4",
+ "_spec": "p-locate@^3.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpmconfig/node_modules/locate-path",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/p-locate/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "p-limit": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Get the first fulfilled promise that satisfies the provided testing function",
+ "devDependencies": {
+ "ava": "*",
+ "delay": "^3.0.0",
+ "in-range": "^1.0.0",
+ "time-span": "^2.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/p-locate#readme",
+ "keywords": [
+ "promise",
+ "locate",
+ "find",
+ "finder",
+ "search",
+ "searcher",
+ "test",
+ "array",
+ "collection",
+ "iterable",
+ "iterator",
+ "race",
+ "fulfilled",
+ "fastest",
+ "async",
+ "await",
+ "promises",
+ "bluebird"
+ ],
+ "license": "MIT",
+ "name": "p-locate",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/p-locate.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "3.0.0"
+}
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/readme.md b/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/readme.md
new file mode 100644
index 0000000000..3b0173bc4e
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-locate/readme.md
@@ -0,0 +1,88 @@
+# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate)
+
+> Get the first fulfilled promise that satisfies the provided testing function
+
+Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+
+
+## Install
+
+```
+$ npm install p-locate
+```
+
+
+## Usage
+
+Here we find the first file that exists on disk, in array order.
+
+```js
+const pathExists = require('path-exists');
+const pLocate = require('p-locate');
+
+const files = [
+ 'unicorn.png',
+ 'rainbow.png', // Only this one actually exists on disk
+ 'pony.png'
+];
+
+(async () => {
+ const foundPath = await pLocate(files, file => pathExists(file));
+
+ console.log(foundPath);
+ //=> 'rainbow'
+})();
+```
+
+*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.*
+
+
+## API
+
+### pLocate(input, tester, [options])
+
+Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`.
+
+#### input
+
+Type: `Iterable<Promise|any>`
+
+#### tester(element)
+
+Type: `Function`
+
+Expected to return a `Promise<boolean>` or boolean.
+
+#### options
+
+Type: `Object`
+
+##### concurrency
+
+Type: `number`<br>
+Default: `Infinity`<br>
+Minimum: `1`
+
+Number of concurrently pending promises returned by `tester`.
+
+##### preserveOrder
+
+Type: `boolean`<br>
+Default: `true`
+
+Preserve `input` order when searching.
+
+Disable this to improve performance if you don't care about the order.
+
+
+## Related
+
+- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
+- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently
+- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled
+- [More…](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.js b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.js
new file mode 100644
index 0000000000..2d26268d47
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (callback, ...args) => new Promise(resolve => {
+ resolve(callback(...args));
+});
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/license b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/package.json b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/package.json
new file mode 100644
index 0000000000..d8aef830b5
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "p-try@^2.0.0",
+ "_id": "p-try@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==",
+ "_location": "/libnpmconfig/p-try",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "p-try@^2.0.0",
+ "name": "p-try",
+ "escapedName": "p-try",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/libnpmconfig/p-limit"
+ ],
+ "_resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
+ "_shasum": "85080bb87c64688fa47996fe8f7dfbe8211760b1",
+ "_spec": "p-try@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpmconfig/node_modules/p-limit",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/p-try/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "`Start a promise chain",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/p-try#readme",
+ "keywords": [
+ "promise",
+ "try",
+ "resolve",
+ "function",
+ "catch",
+ "async",
+ "await",
+ "promises",
+ "settled",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "bluebird"
+ ],
+ "license": "MIT",
+ "name": "p-try",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/p-try.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.0.0"
+}
diff --git a/deps/npm/node_modules/libnpmconfig/node_modules/p-try/readme.md b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/readme.md
new file mode 100644
index 0000000000..58acb759aa
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/node_modules/p-try/readme.md
@@ -0,0 +1,47 @@
+# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try)
+
+> Start a promise chain
+
+[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/)
+
+
+## Install
+
+```
+$ npm install p-try
+```
+
+
+## Usage
+
+```js
+const pTry = require('p-try');
+
+pTry(() => {
+ return synchronousFunctionThatMightThrow();
+}).then(value => {
+ console.log(value);
+}).catch(error => {
+ console.error(error);
+});
+```
+
+
+## API
+
+### pTry(fn, ...args)
+
+Returns a `Promise` resolved with the value of calling `fn(...args)`. If the function throws an error, the returned `Promise` will be rejected with that error.
+
+Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions.
+
+
+## Related
+
+- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome
+- [More…](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpmconfig/package.json b/deps/npm/node_modules/libnpmconfig/package.json
new file mode 100644
index 0000000000..d272290b32
--- /dev/null
+++ b/deps/npm/node_modules/libnpmconfig/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "libnpmconfig@^1.1.1",
+ "_id": "libnpmconfig@1.2.1",
+ "_inBundle": false,
+ "_integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==",
+ "_location": "/libnpmconfig",
+ "_phantomChildren": {
+ "path-exists": "3.0.0"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "libnpmconfig@^1.1.1",
+ "name": "libnpmconfig",
+ "escapedName": "libnpmconfig",
+ "rawSpec": "^1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.1"
+ },
+ "_requiredBy": [
+ "/libnpm"
+ ],
+ "_resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz",
+ "_shasum": "c0c2f793a74e67d4825e5039e7a02a0044dfcbc0",
+ "_spec": "libnpmconfig@^1.1.1",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpm",
+ "author": {
+ "name": "Kat Marchán",
+ "email": "kzm@zkat.tech"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/libnpmconfig/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "figgy-pudding": "^3.5.1",
+ "find-up": "^3.0.0",
+ "ini": "^1.3.5"
+ },
+ "deprecated": false,
+ "description": "Standalone library for reading/writing/managing npm configurations",
+ "devDependencies": {
+ "standard": "*",
+ "standard-version": "*",
+ "tap": "*",
+ "weallbehave": "*",
+ "weallcontribute": "*"
+ },
+ "homepage": "https://npmjs.com/package/libnpmconfig",
+ "license": "ISC",
+ "name": "libnpmconfig",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/libnpmconfig.git"
+ },
+ "scripts": {
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap -J --100 test/*.js",
+ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
+ "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ },
+ "version": "1.2.1"
+}
diff --git a/deps/npm/node_modules/libnpmhook/CHANGELOG.md b/deps/npm/node_modules/libnpmhook/CHANGELOG.md
index 6fe3e05b5e..251d1f996d 100644
--- a/deps/npm/node_modules/libnpmhook/CHANGELOG.md
+++ b/deps/npm/node_modules/libnpmhook/CHANGELOG.md
@@ -2,6 +2,36 @@
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.2"></a>
+## [5.0.2](https://github.com/npm/libnpmhook/compare/v5.0.1...v5.0.2) (2018-08-24)
+
+
+
+<a name="5.0.1"></a>
+## [5.0.1](https://github.com/npm/libnpmhook/compare/v5.0.0...v5.0.1) (2018-08-23)
+
+
+### Bug Fixes
+
+* **deps:** move JSONStream to prod deps ([bb63594](https://github.com/npm/libnpmhook/commit/bb63594))
+
+
+
+<a name="5.0.0"></a>
+# [5.0.0](https://github.com/npm/libnpmhook/compare/v4.0.1...v5.0.0) (2018-08-21)
+
+
+### Features
+
+* **api:** overhauled API ([46b271b](https://github.com/npm/libnpmhook/commit/46b271b))
+
+
+### BREAKING CHANGES
+
+* **api:** the API for ls() has changed, and rm() no longer errors on 404
+
+
+
<a name="4.0.1"></a>
## [4.0.1](https://github.com/npm/libnpmhook/compare/v4.0.0...v4.0.1) (2018-04-09)
diff --git a/deps/npm/node_modules/libnpmhook/README.md b/deps/npm/node_modules/libnpmhook/README.md
index 0e2f018f2a..9a13d05531 100644
--- a/deps/npm/node_modules/libnpmhook/README.md
+++ b/deps/npm/node_modules/libnpmhook/README.md
@@ -1,8 +1,20 @@
-# libnpmhook [![npm version](https://img.shields.io/npm/v/libnpmhook.svg)](https://npm.im/libnpmhook) [![license](https://img.shields.io/npm/l/libnpmhook.svg)](https://npm.im/libnpmhook) [![Travis](https://img.shields.io/travis/npm/libnpmhook.svg)](https://travis-ci.org/npm/libnpmhook) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/libnpmhook?svg=true)](https://ci.appveyor.com/project/npm/libnpmhook) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmhook/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmhook?branch=latest)
+# libnpmhook [![npm version](https://img.shields.io/npm/v/libnpmhook.svg)](https://npm.im/libnpmhook) [![license](https://img.shields.io/npm/l/libnpmhook.svg)](https://npm.im/libnpmhook) [![Travis](https://img.shields.io/travis/npm/libnpmhook.svg)](https://travis-ci.org/npm/libnpmhook) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmhook?svg=true)](https://ci.appveyor.com/project/zkat/libnpmhook) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmhook/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmhook?branch=latest)
[`libnpmhook`](https://github.com/npm/libnpmhook) is a Node.js library for
programmatically managing the npm registry's server-side hooks.
+For a more general introduction to managing hooks, see [the introductory blog
+post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm).
+
+## Example
+
+```js
+const hooks = require('libnpmhook')
+
+console.log(await hooks.ls('mypkg', {token: 'deadbeef'}))
+// array of hook objects on `mypkg`.
+```
+
## Install
`$ npm install libnpmhook`
@@ -10,14 +22,246 @@ programmatically managing the npm registry's server-side hooks.
## Table of Contents
* [Example](#example)
-* [Features](#features)
+* [Install](#install)
* [API](#api)
+ * [hook opts](#opts)
+ * [`add()`](#add)
+ * [`rm()`](#rm)
+ * [`ls()`](#ls)
+ * [`ls.stream()`](#ls-stream)
+ * [`update()`](#update)
+
+### API
+
+#### <a name="opts"></a> `opts` for `libnpmhook` commands
+
+`libnpmhook` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch).
+All options are passed through directly to that library, so please refer to [its
+own `opts`
+documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options)
+for options that can be passed in.
-### Example
+A couple of options of note for those in a hurry:
+
+* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs.
+* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmhook` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}`
+* `opts.Promise` - If you pass this in, the Promises returned by `libnpmhook` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}`
+
+#### <a name="add"></a> `> hooks.add(name, endpoint, secret, [opts]) -> Promise`
+
+`name` is the name of the package, org, or user/org scope to watch. The type is
+determined by the name syntax: `'@foo/bar'` and `'foo'` are treated as packages,
+`@foo` is treated as a scope, and `~user` is treated as an org name or scope.
+Each type will attach to different events.
+
+The `endpoint` should be a fully-qualified http URL for the endpoint the hook
+will send its payload to when it fires. `secret` is a shared secret that the
+hook will send to that endpoint to verify that it's actually coming from the
+registry hook.
+
+The returned Promise resolves to the full hook object that was created,
+including its generated `id`.
+
+See also: [`POST
+/v1/hooks/hook`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#post-v1hookshook)
+
+##### Example
```javascript
+await hooks.add('~zkat', 'https://zkat.tech/api/added', 'supersekrit', {
+ token: 'myregistrytoken',
+ otp: '694207'
+})
+
+=>
+
+{ id: '16f7xoal',
+ username: 'zkat',
+ name: 'zkat',
+ endpoint: 'https://zkat.tech/api/added',
+ secret: 'supersekrit',
+ type: 'owner',
+ created: '2018-08-21T20:05:25.125Z',
+ updated: '2018-08-21T20:05:25.125Z',
+ deleted: false,
+ delivered: false,
+ last_delivery: null,
+ response_code: 0,
+ status: 'active' }
```
-### Features
+#### <a name="find"></a> `> hooks.find(id, [opts]) -> Promise`
-### API
+Returns the hook identified by `id`.
+
+The returned Promise resolves to the full hook object that was found, or error
+with `err.code` of `'E404'` if it didn't exist.
+
+See also: [`GET
+/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hookshookid)
+
+##### Example
+
+```javascript
+await hooks.find('16f7xoal', {token: 'myregistrytoken'})
+
+=>
+
+{ id: '16f7xoal',
+ username: 'zkat',
+ name: 'zkat',
+ endpoint: 'https://zkat.tech/api/added',
+ secret: 'supersekrit',
+ type: 'owner',
+ created: '2018-08-21T20:05:25.125Z',
+ updated: '2018-08-21T20:05:25.125Z',
+ deleted: false,
+ delivered: false,
+ last_delivery: null,
+ response_code: 0,
+ status: 'active' }
+```
+
+#### <a name="rm"></a> `> hooks.rm(id, [opts]) -> Promise`
+
+Removes the hook identified by `id`.
+
+The returned Promise resolves to the full hook object that was removed, if it
+existed, or `null` if no such hook was there (instead of erroring).
+
+See also: [`DELETE
+/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#delete-v1hookshookid)
+
+##### Example
+
+```javascript
+await hooks.rm('16f7xoal', {
+ token: 'myregistrytoken',
+ otp: '694207'
+})
+
+=>
+
+{ id: '16f7xoal',
+ username: 'zkat',
+ name: 'zkat',
+ endpoint: 'https://zkat.tech/api/added',
+ secret: 'supersekrit',
+ type: 'owner',
+ created: '2018-08-21T20:05:25.125Z',
+ updated: '2018-08-21T20:05:25.125Z',
+ deleted: true,
+ delivered: false,
+ last_delivery: null,
+ response_code: 0,
+ status: 'active' }
+
+// Repeat it...
+await hooks.rm('16f7xoal', {
+ token: 'myregistrytoken',
+ otp: '694207'
+})
+
+=> null
+```
+
+#### <a name="update"></a> `> hooks.update(id, endpoint, secret, [opts]) -> Promise`
+
+The `id` should be a hook ID from a previously-created hook.
+
+The `endpoint` should be a fully-qualified http URL for the endpoint the hook
+will send its payload to when it fires. `secret` is a shared secret that the
+hook will send to that endpoint to verify that it's actually coming from the
+registry hook.
+
+The returned Promise resolves to the full hook object that was updated, if it
+existed. Otherwise, it will error with an `'E404'` error code.
+
+See also: [`PUT
+/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#put-v1hookshookid)
+
+##### Example
+
+```javascript
+await hooks.update('16fxoal', 'https://zkat.tech/api/other', 'newsekrit', {
+ token: 'myregistrytoken',
+ otp: '694207'
+})
+
+=>
+
+{ id: '16f7xoal',
+ username: 'zkat',
+ name: 'zkat',
+ endpoint: 'https://zkat.tech/api/other',
+ secret: 'newsekrit',
+ type: 'owner',
+ created: '2018-08-21T20:05:25.125Z',
+ updated: '2018-08-21T20:14:41.964Z',
+ deleted: false,
+ delivered: false,
+ last_delivery: null,
+ response_code: 0,
+ status: 'active' }
+```
+
+#### <a name="ls"></a> `> hooks.ls([opts]) -> Promise`
+
+Resolves to an array of hook objects associated with the account you're
+authenticated as.
+
+Results can be further filtered with three values that can be passed in through
+`opts`:
+
+* `opts.package` - filter results by package name
+* `opts.limit` - maximum number of hooks to return
+* `opts.offset` - pagination offset for results (use with `opts.limit`)
+
+See also:
+ * [`hooks.ls.stream()`](#ls-stream)
+ * [`GET
+/v1/hooks`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hooks)
+
+##### Example
+
+```javascript
+await hooks.ls({token: 'myregistrytoken'})
+
+=>
+[
+ { id: '16f7xoal', ... },
+ { id: 'wnyf98a1', ... },
+ ...
+]
+```
+
+#### <a name="ls-stream"></a> `> hooks.ls.stream([opts]) -> Stream`
+
+Returns a stream of hook objects associated with the account you're
+authenticated as. The returned stream is a valid `Symbol.asyncIterator` on
+`node@>=10`.
+
+Results can be further filtered with three values that can be passed in through
+`opts`:
+
+* `opts.package` - filter results by package name
+* `opts.limit` - maximum number of hooks to return
+* `opts.offset` - pagination offset for results (use with `opts.limit`)
+
+See also:
+ * [`hooks.ls()`](#ls)
+ * [`GET
+/v1/hooks`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hooks)
+
+##### Example
+
+```javascript
+for await (let hook of hooks.ls.stream({token: 'myregistrytoken'})) {
+ console.log('found hook:', hook.id)
+}
+
+=>
+// outputs:
+// found hook: 16f7xoal
+// found hook: wnyf98a1
+```
diff --git a/deps/npm/node_modules/libnpmhook/config.js b/deps/npm/node_modules/libnpmhook/config.js
deleted file mode 100644
index 864e1ede6a..0000000000
--- a/deps/npm/node_modules/libnpmhook/config.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict'
-
-const pudding = require('figgy-pudding')
-
-const NpmHooksConfig = pudding()
-
-module.exports = config
-function config (opts) {
- return NpmHooksConfig.apply(
- null,
- [opts, opts.config].concat([].slice.call(arguments, 1))
- )
-}
diff --git a/deps/npm/node_modules/libnpmhook/index.js b/deps/npm/node_modules/libnpmhook/index.js
index b59ff842e2..b489294951 100644
--- a/deps/npm/node_modules/libnpmhook/index.js
+++ b/deps/npm/node_modules/libnpmhook/index.js
@@ -1,41 +1,80 @@
'use strict'
-const config = require('./config')
const fetch = require('npm-registry-fetch')
+const figgyPudding = require('figgy-pudding')
+const getStream = require('get-stream')
+const validate = require('aproba')
-module.exports = {
- add (name, endpoint, secret, opts) {
- let type = 'package'
- if (name && name.match(/^@[^/]+$/)) {
- type = 'scope'
- }
- if (name && name[0] === '~') {
- type = 'owner'
- name = name.substr(1)
- }
+const HooksConfig = figgyPudding({
+ package: {},
+ limit: {},
+ offset: {},
+ Promise: {default: () => Promise}
+})
- opts = config({
- method: 'POST',
- body: { type, name, endpoint, secret }
- }, opts)
- return fetch.json('/-/npm/v1/hooks/hook', opts)
- },
-
- rm (id, opts) {
- return fetch.json(`/-/npm/v1/hooks/hook/${encodeURIComponent(id)}`, config({
- method: 'DELETE'
- }, opts))
- },
-
- ls (pkg, opts) {
- return fetch.json('/-/npm/v1/hooks', config({query: pkg && {package: pkg}}, opts))
- .then(json => json.objects)
- },
-
- update (id, endpoint, secret, opts) {
- return fetch.json(`/-/npm/v1/hooks/hook/${encodeURIComponent(id)}`, config({
- method: 'PUT',
- body: {endpoint, secret}
- }, opts))
+const eu = encodeURIComponent
+const cmd = module.exports = {}
+cmd.add = (name, endpoint, secret, opts) => {
+ opts = HooksConfig(opts)
+ validate('SSSO', [name, endpoint, secret, opts])
+ let type = 'package'
+ if (name.match(/^@[^/]+$/)) {
+ type = 'scope'
}
+ if (name[0] === '~') {
+ type = 'owner'
+ name = name.substr(1)
+ }
+ return fetch.json('/-/npm/v1/hooks/hook', opts.concat({
+ method: 'POST',
+ body: { type, name, endpoint, secret }
+ }))
+}
+
+cmd.rm = (id, opts) => {
+ opts = HooksConfig(opts)
+ validate('SO', [id, opts])
+ return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, opts.concat({
+ method: 'DELETE'
+ }, opts)).catch(err => {
+ if (err.code === 'E404') {
+ return null
+ } else {
+ throw err
+ }
+ })
+}
+
+cmd.update = (id, endpoint, secret, opts) => {
+ opts = HooksConfig(opts)
+ validate('SSSO', [id, endpoint, secret, opts])
+ return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, opts.concat({
+ method: 'PUT',
+ body: {endpoint, secret}
+ }, opts))
+}
+
+cmd.find = (id, opts) => {
+ opts = HooksConfig(opts)
+ validate('SO', [id, opts])
+ return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, opts)
+}
+
+cmd.ls = (opts) => {
+ return getStream.array(cmd.ls.stream(opts))
+}
+
+cmd.ls.stream = (opts) => {
+ opts = HooksConfig(opts)
+ const {package: pkg, limit, offset} = opts
+ validate('S|Z', [pkg])
+ validate('N|Z', [limit])
+ validate('N|Z', [offset])
+ return fetch.json.stream('/-/npm/v1/hooks', 'objects.*', opts.concat({
+ query: {
+ package: pkg,
+ limit,
+ offset
+ }
+ }))
}
diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/CHANGELOG.md b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/CHANGELOG.md
deleted file mode 100644
index 8f9366551f..0000000000
--- a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/CHANGELOG.md
+++ /dev/null
@@ -1,104 +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="3.1.1"></a>
-## [3.1.1](https://github.com/npm/registry-fetch/compare/v3.1.0...v3.1.1) (2018-04-09)
-
-
-
-<a name="3.1.0"></a>
-# [3.1.0](https://github.com/npm/registry-fetch/compare/v3.0.0...v3.1.0) (2018-04-09)
-
-
-### Features
-
-* **config:** support no-proxy and https-proxy options ([9aa906b](https://github.com/npm/registry-fetch/commit/9aa906b))
-
-
-
-<a name="3.0.0"></a>
-# [3.0.0](https://github.com/npm/registry-fetch/compare/v2.1.0...v3.0.0) (2018-04-09)
-
-
-### Bug Fixes
-
-* **api:** pacote integration-related fixes ([a29de4f](https://github.com/npm/registry-fetch/commit/a29de4f))
-* **config:** stop caring about opts.config ([5856a6f](https://github.com/npm/registry-fetch/commit/5856a6f))
-
-
-### BREAKING CHANGES
-
-* **config:** opts.config is no longer supported. Pass the options down in opts itself.
-
-
-
-<a name="2.1.0"></a>
-# [2.1.0](https://github.com/npm/registry-fetch/compare/v2.0.0...v2.1.0) (2018-04-08)
-
-
-### Features
-
-* **token:** accept opts.token for opts._authToken ([108c9f0](https://github.com/npm/registry-fetch/commit/108c9f0))
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/npm/registry-fetch/compare/v1.1.1...v2.0.0) (2018-04-08)
-
-
-### meta
-
-* drop support for node@4 ([758536e](https://github.com/npm/registry-fetch/commit/758536e))
-
-
-### BREAKING CHANGES
-
-* node@4 is no longer supported
-
-
-
-<a name="1.1.1"></a>
-## [1.1.1](https://github.com/npm/registry-fetch/compare/v1.1.0...v1.1.1) (2018-04-06)
-
-
-
-<a name="1.1.0"></a>
-# [1.1.0](https://github.com/npm/registry-fetch/compare/v1.0.1...v1.1.0) (2018-03-16)
-
-
-### Features
-
-* **specs:** can use opts.spec to trigger pickManifest ([85c4ac9](https://github.com/npm/registry-fetch/commit/85c4ac9))
-
-
-
-<a name="1.0.1"></a>
-## [1.0.1](https://github.com/npm/registry-fetch/compare/v1.0.0...v1.0.1) (2018-03-16)
-
-
-### Bug Fixes
-
-* **query:** oops console.log ([870e4f5](https://github.com/npm/registry-fetch/commit/870e4f5))
-
-
-
-<a name="1.0.0"></a>
-# 1.0.0 (2018-03-16)
-
-
-### Bug Fixes
-
-* **auth:** get auth working with all the little details ([84b94ba](https://github.com/npm/registry-fetch/commit/84b94ba))
-* **deps:** add bluebird as an actual dep ([1286e31](https://github.com/npm/registry-fetch/commit/1286e31))
-* **errors:** Unknown auth errors use default code ([#1](https://github.com/npm/registry-fetch/issues/1)) ([3d91b93](https://github.com/npm/registry-fetch/commit/3d91b93))
-* **standard:** remove args from invocation ([9620a0a](https://github.com/npm/registry-fetch/commit/9620a0a))
-
-
-### Features
-
-* **api:** baseline kinda-working API impl ([bf91f9f](https://github.com/npm/registry-fetch/commit/bf91f9f))
-* **body:** automatic handling of different opts.body values ([f3b97db](https://github.com/npm/registry-fetch/commit/f3b97db))
-* **config:** nicer input config input handling ([b9ce21d](https://github.com/npm/registry-fetch/commit/b9ce21d))
-* **opts:** use figgy-pudding for opts handling ([0abd527](https://github.com/npm/registry-fetch/commit/0abd527))
-* **query:** add query utility support ([65ea8b1](https://github.com/npm/registry-fetch/commit/65ea8b1))
diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/README.md b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/README.md
deleted file mode 100644
index 3d55eef6de..0000000000
--- a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/README.md
+++ /dev/null
@@ -1,549 +0,0 @@
-# npm-registry-fetch [![npm version](https://img.shields.io/npm/v/npm-registry-fetch.svg)](https://npm.im/npm-registry-fetch) [![license](https://img.shields.io/npm/l/npm-registry-fetch.svg)](https://npm.im/npm-registry-fetch) [![Travis](https://img.shields.io/travis/npm/npm-registry-fetch/latest.svg)](https://travis-ci.org/npm/npm-registry-fetch) [![AppVeyor](https://img.shields.io/appveyor/ci/zkat/npm-registry-fetch/latest.svg)](https://ci.appveyor.com/project/npm/npm-registry-fetch) [![Coverage Status](https://coveralls.io/repos/github/npm/npm-registry-fetch/badge.svg?branch=latest)](https://coveralls.io/github/npm/npm-registry-fetch?branch=latest)
-
-[`npm-registry-fetch`](https://github.com/npm/npm-registry-fetch) is a Node.js
-library that implements a `fetch`-like API for accessing npm registry APIs
-consistently. It's able to consume npm-style configuration values and has all
-the necessary logic for picking registries, handling scopes, and dealing with
-authentication details built-in.
-
-This package is meant to replace the older
-[`npm-registry-client`](https://npm.im/npm-registry-client).
-
-## Example
-
-```javascript
-const npmFetch = require('npm-registry-fetch')
-
-console.log(
- await npmFetch.json('/-/ping')
-)
-```
-
-## Table of Contents
-
-* [Installing](#install)
-* [Example](#example)
-* [Contributing](#contributing)
-* [API](#api)
- * [`fetch`](#fetch)
- * [`fetch.json`](#fetch-json)
- * [`fetch` options](#fetch-opts)
-
-### Install
-
-`$ npm install npm-registry-fetch`
-
-### Contributing
-
-The npm team enthusiastically welcomes contributions and project participation!
-There's a bunch of things you can do if you want to contribute! The [Contributor
-Guide](CONTRIBUTING.md) has all the information you need for everything from
-reporting bugs to contributing entire new features. Please don't hesitate to
-jump in if you'd like to, or even ask us questions if something isn't clear.
-
-All participants and maintainers in this project are expected to follow [Code of
-Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
-
-Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
-
-Happy hacking!
-
-### API
-
-#### <a name="fetch"></a> `> fetch(url, [opts]) -> Promise<Response>`
-
-Performs a request to a given URL.
-
-The URL can be either a full URL, or a path to one. The appropriate registry
-will be automatically picked if only a URL path is given.
-
-For available options, please see the section on [`fetch` options](#fetch-opts).
-
-##### Example
-
-```javascript
-const res = await fetch('/-/ping')
-console.log(res.headers)
-res.on('data', d => console.log(d.toString('utf8')))
-```
-
-#### <a name="fetch-json"></a> `> fetch.json(url, [opts]) -> Promise<ResponseJSON>`
-
-Performs a request to a given registry URL, parses the body of the response as
-JSON, and returns it as its final value. This is a utility shorthand for
-`fetch(url).then(res => res.json())`.
-
-For available options, please see the section on [`fetch` options](#fetch-opts).
-
-##### Example
-
-```javascript
-const res = await fetch.json('/-/ping')
-console.log(res) // Body parsed as JSON
-```
-
-#### <a name="fetch-opts"></a> `fetch` Options
-
-Fetch options are optional, and can be passed in as either a Map-like object
-(one with a `.get()` method), a plain javascript object, or a
-[`figgy-pudding`](https://npm.im/figgy-pudding) instance.
-
-##### <a name="opts-agent"></a> `opts.agent`
-
-* Type: http.Agent
-* Default: an appropriate agent based on URL protocol and proxy settings
-
-An [`Agent`](https://nodejs.org/api/http.html#http_class_http_agent) instance to
-be shared across requests. This allows multiple concurrent `fetch` requests to
-happen on the same socket.
-
-You do _not_ need to provide this option unless you want something particularly
-specialized, since proxy configurations and http/https agents are already
-automatically managed internally when this option is not passed through.
-
-##### <a name="opts-body"></a> `opts.body`
-
-* Type: Buffer | Stream | Object
-* Default: null
-
-Request body to send through the outgoing request. Buffers and Streams will be
-passed through as-is, with a default `content-type` of
-`application/octet-stream`. Plain JavaScript objects will be `JSON.stringify`ed
-and the `content-type` will default to `application/json`.
-
-Use [`opts.headers`](#opts-headers) to set the content-type to something else.
-
-##### <a name="opts-ca"></a> `opts.ca`
-
-* Type: String, Array, or null
-* Default: null
-
-The Certificate Authority signing certificate that is trusted for SSL
-connections to the registry. Values should be in PEM format (Windows calls it
-"Base-64 encoded X.509 (.CER)") with newlines replaced by the string `'\n'`. For
-example:
-
-```
-{
- ca: '-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----'
-}
-```
-
-Set to `null` to only allow "known" registrars, or to a specific CA cert
-to trust only that specific signing authority.
-
-Multiple CAs can be trusted by specifying an array of certificates instead of a
-single string.
-
-See also [`opts.strict-ssl`](#opts-strict-ssl), [`opts.ca`](#opts-ca) and
-[`opts.key`](#opts-key)
-
-##### <a name="opts-cache"></a> `opts.cache`
-
-* Type: path
-* Default: null
-
-The location of the http cache directory. If provided, certain cachable requests
-will be cached according to [IETF RFC 7234](https://tools.ietf.org/html/rfc7234)
-rules. This will speed up future requests, as well as make the cached data
-available offline if necessary/requested.
-
-See also [`offline`](#opts-offline), [`prefer-offline`](#opts-prefer-offline),
-and [`prefer-online`](#opts-prefer-online).
-
-##### <a name="opts-cert"></a> `opts.cert`
-
-* Type: String
-* Default: null
-
-A client certificate to pass when accessing the registry. Values should be in
-PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines
-replaced by the string `'\n'`. For example:
-
-```
-{
- cert: '-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----'
-}
-```
-
-It is _not_ the path to a certificate file (and there is no "certfile" option).
-
-See also: [`opts.ca`](#opts-ca) and [`opts.key`](#opts-key)
-
-##### <a name="opts-fetch-retries"></a> `opts.fetch-retries`
-
-* Type: Number
-* Default: 2
-
-The "retries" config for [`retry`](https://npm.im/retry) to use when fetching
-packages from the registry.
-
-See also [`opts.retry`](#opts-retry) to provide all retry options as a single
-object.
-
-##### <a name="opts-fetch-retry-factor"></a> `opts.fetch-retry-factor`
-
-* Type: Number
-* Default: 10
-
-The "factor" config for [`retry`](https://npm.im/retry) to use when fetching
-packages.
-
-See also [`opts.retry`](#opts-retry) to provide all retry options as a single
-object.
-
-##### <a name="opts-fetch-retry-mintimeout"></a> `opts.fetch-retry-mintimeout`
-
-* Type: Number
-* Default: 10000 (10 seconds)
-
-The "minTimeout" config for [`retry`](https://npm.im/retry) to use when fetching
-packages.
-
-See also [`opts.retry`](#opts-retry) to provide all retry options as a single
-object.
-
-##### <a name="opts-fetch-retry-maxtimeout"></a> `opts.fetch-retry-maxtimeout`
-
-* Type: Number
-* Default: 60000 (1 minute)
-
-The "maxTimeout" config for [`retry`](https://npm.im/retry) to use when fetching
-packages.
-
-See also [`opts.retry`](#opts-retry) to provide all retry options as a single
-object.
-
-##### <a name="opts-headers"></a> `opts.headers`
-
-* Type: Object
-* Default: null
-
-Additional headers for the outgoing request. This option can also be used to
-override headers automatically generated by `npm-registry-fetch`, such as
-`Content-Type`.
-
-##### <a name="opts-integrity"></a> `opts.integrity`
-
-* Type: String | [SRI object](https://npm.im/ssri)
-* Default: null
-
-If provided, the response body's will be verified against this integrity string,
-using [`ssri`](https://npm.im/ssri). If verification succeeds, the response will
-complete as normal. If verification fails, the response body will error with an
-`EINTEGRITY` error.
-
-Body integrity is only verified if the body is actually consumed to completion --
-that is, if you use `res.json()`/`res.buffer()`, or if you consume the default
-`res` stream data to its end.
-
-Cached data will have its integrity automatically verified using the
-previously-generated integrity hash for the saved request information, so
-`EINTEGRITY` errors can happen if [`opts.cache`](#opts-cache) is used, even if
-`opts.integrity` is not passed in.
-
-##### <a name='opts-is-from-ci'></a> `opts.is-from-ci`
-
-* Alias: `opts.isFromCI`
-* Type: Boolean
-* Default: Based on environment variables
-
-This is used to populate the `npm-in-ci` request header sent to the registry.
-
-##### <a name="opts-key"></a> `opts.key`
-
-* Type: String
-* Default: null
-
-A client key to pass when accessing the registry. Values should be in PEM
-format with newlines replaced by the string `'\n'`. For example:
-
-```
-{
- key: '-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----'
-}
-```
-
-It is _not_ the path to a key file (and there is no "keyfile" option).
-
-See also: [`opts.ca`](#opts-ca) and [`opts.cert`](#opts-cert)
-
-##### <a name="opts-local-address"></a> `opts.local-address`
-
-* Type: IP Address String
-* Default: null
-
-The IP address of the local interface to use when making connections
-to the registry.
-
-See also [`opts.proxy`](#opts-proxy)
-
-##### <a name="opts-log"></a> `opts.log`
-
-* Type: [`npmlog`](https://npm.im/npmlog)-like
-* Default: null
-
-Logger object to use for logging operation details. Must have the same methods
-as `npmlog`.
-
-##### <a name="opts-maxsockets"></a> `opts.maxsockets`
-
-* Alias: `opts.max-sockets`
-* Type: Integer
-* Default: 12
-
-Maximum number of sockets to keep open during requests. Has no effect if
-[`opts.agent`](#opts-agent) is used.
-
-##### <a name="opts-method"></a> `opts.method`
-
-* Type: String
-* Default: 'GET'
-
-HTTP method to use for the outgoing request. Case-insensitive.
-
-##### <a name="opts-noproxy"></a> `opts.noproxy`
-
-* Type: Boolean
-* Default: process.env.NOPROXY
-
-If true, proxying will be disabled even if [`opts.proxy`](#opts-proxy) is used.
-
-##### <a name="opts-npm-session"></a> `opts.npm-session`
-
-* Alias: `opts.npmSession`
-* Type: String
-* Default: null
-
-If provided, will be sent in the `npm-session` header. This header is used by
-the npm registry to identify individual user sessions (usually individual
-invocations of the CLI).
-
-##### <a name="opts-offline"></a> `opts.offline`
-
-* Type: Boolean
-* Default: false
-
-Force offline mode: no network requests will be done during install. To allow
-`npm-registry-fetch` to fill in missing cache data, see
-[`opts.prefer-offline`](#opts-prefer-offline).
-
-This option is only really useful if you're also using
-[`opts.cache`](#opts-cache).
-
-##### <a name="opts-otp"></a> `opts.otp`
-
-* Type: Number | String
-* Default: null
-
-This is a one-time password from a two-factor authenticator. It is required for
-certain registry interactions when two-factor auth is enabled for a user
-account.
-
-##### <a name="opts-password"></a> `opts.password`
-
-* Alias: _password
-* Type: String
-* Default: null
-
-Password used for basic authentication. For the more modern authentication
-method, please use the (more secure) [`opts.token`](#opts-token)
-
-Can optionally be scoped to a registry by using a "nerf dart" for that registry.
-That is:
-
-```
-{
- '//registry.npmjs.org/:password': 't0k3nH34r'
-}
-```
-
-See also [`opts.username`](#opts-username)
-
-##### <a name="opts-prefer-offline"></a> `opts.prefer-offline`
-
-* Type: Boolean
-* Default: false
-
-If true, staleness checks for cached data will be bypassed, but missing data
-will be requested from the server. To force full offline mode, use
-[`opts.offline`](#opts-offline).
-
-This option is generally only useful if you're also using
-[`opts.cache`](#opts-cache).
-
-##### <a name="opts-prefer-online"></a> `opts.prefer-online`
-
-* Type: Boolean
-* Default: false
-
-If true, staleness checks for cached data will be forced, making the CLI look
-for updates immediately even for fresh package data.
-
-This option is generally only useful if you're also using
-[`opts.cache`](#opts-cache).
-
-
-##### <a name="opts-project-scope"></a> `opts.project-scope`
-
-* Alias: `opts.projectScope`
-* Type: String
-* Default: null
-
-If provided, will be sent in the `npm-scope` header. This header is used by the
-npm registry to identify the toplevel package scope that a particular project
-installation is using.
-
-##### <a name="opts-proxy"></a> `opts.proxy`
-
-* Type: url
-* Default: null
-
-A proxy to use for outgoing http requests. If not passed in, the `HTTP(S)_PROXY`
-environment variable will be used.
-
-##### <a name="opts-query"></a> `opts.query`
-
-* Type: String | Object
-* Default: null
-
-If provided, the request URI will have a query string appended to it using this
-query. If `opts.query` is an object, it will be converted to a query string
-using
-[`querystring.stringify()`](https://nodejs.org/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options).
-
-If the request URI already has a query string, it will be merged with
-`opts.query`, preferring `opts.query` values.
-
-##### <a name="opts-refer"></a> `opts.refer`
-
-* Alias: `opts.referer`
-* Type: String
-* Default: null
-
-Value to use for the `Referer` header. The npm CLI itself uses this to serialize
-the npm command line using the given request.
-
-##### <a name="opts-registry"></a> `opts.registry`
-
-* Type: URL
-* Default: `'https://registry.npmjs.org'`
-
-Registry configuration for a request. If a request URL only includes the URL
-path, this registry setting will be prepended. This configuration is also used
-to determine authentication details, so even if the request URL references a
-completely different host, `opts.registry` will be used to find the auth details
-for that request.
-
-See also [`opts.scope`](#opts-scope), [`opts.spec`](#opts-spec), and
-[`opts.<scope>:registry`](#opts-scope-registry) which can all affect the actual
-registry URL used by the outgoing request.
-
-##### <a name="opts-retry"></a> `opts.retry`
-
-* Type: Object
-* Default: null
-
-Single-object configuration for request retry settings. If passed in, will
-override individually-passed `fetch-retry-*` settings.
-
-##### <a name="opts-scope"></a> `opts.scope`
-
-* Type: String
-* Default: null
-
-Associate an operation with a scope for a scoped registry. This option can force
-lookup of scope-specific registries and authentication.
-
-See also [`opts.<scope>:registry`](#opts-scope-registry) and
-[`opts.spec`](#opts-spec) for interactions with this option.
-
-##### <a name="opts-scope-registry"></a> `opts.<scope>:registry`
-
-* Type: String
-* Default: null
-
-This option type can be used to configure the registry used for requests
-involving a particular scope. For example, `opts['@myscope:registry'] =
-'https://scope-specific.registry/'` will make it so requests go out to this
-registry instead of [`opts.registry`](#opts-registry) when
-[`opts.scope`](#opts-scope) is used, or when [`opts.spec`](#opts-spec) is a
-scoped package spec.
-
-The `@` before the scope name is optional, but recommended.
-
-##### <a name="opts-spec"></a> `opts.spec`
-
-* Type: String | [`npm-registry-arg`](https://npm.im/npm-registry-arg) object.
-* Default: null
-
-If provided, can be used to automatically configure [`opts.scope`](#opts-scope)
-based on a specific package name. Non-registry package specs will throw an
-error.
-
-##### <a name="opts-strict-ssl"></a> `opts.strict-ssl`
-
-* Type: Boolean
-* Default: true
-
-Whether or not to do SSL key validation when making requests to the
-registry via https.
-
-See also [`opts.ca`](#opts-ca).
-
-##### <a name="opts-timeout"></a> `opts.timeout`
-
-* Type: Milliseconds
-* Default: 30000 (30 seconds)
-
-Time before a hanging request times out.
-
-##### <a name="opts-token"></a> `opts.token`
-
-* Alias: `opts._authToken`
-* Type: String
-* Default: null
-
-Authentication token string.
-
-Can be scoped to a registry by using a "nerf dart" for that registry. That is:
-
-```
-{
- '//registry.npmjs.org/:token': 't0k3nH34r'
-}
-```
-
-##### <a name="opts-user-agent"></a> `opts.user-agent`
-
-* Type: String
-* Default: `'npm-registry-fetch@<version>/node@<node-version>+<arch> (<platform>)'`
-
-User agent string to send in the `User-Agent` header.
-
-##### <a name="opts-username"></a> `opts.username`
-
-* Type: String
-* Default: null
-
-Username used for basic authentication. For the more modern authentication
-method, please use the (more secure) [`opts.token`](#opts-token)
-
-Can optionally be scoped to a registry by using a "nerf dart" for that registry.
-That is:
-
-```
-{
- '//registry.npmjs.org/:username': 't0k3nH34r'
-}
-```
-
-See also [`opts.password`](#opts-password)
-
-##### <a name="opts-auth"></a> `opts._auth`
-
-* Type: String
-* Default: null
-
-** DEPRECATED ** This is a legacy authentication token supported only for
-*compatibility. Please use [`opts.token`](#opts-token) instead.
diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/auth.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/auth.js
deleted file mode 100644
index 9532341db1..0000000000
--- a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/auth.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict'
-
-const config = require('./config.js')
-const url = require('url')
-
-module.exports = getAuth
-function getAuth (registry, opts) {
- if (!registry) { throw new Error('registry is required') }
- opts = config(opts)
- let AUTH = {}
- const regKey = registry && registryKey(registry)
- const doKey = (key, alias) => addKey(opts, AUTH, regKey, key, alias)
- doKey('token')
- doKey('_authToken', 'token')
- doKey('username')
- doKey('password')
- doKey('_password', 'password')
- doKey('email')
- doKey('_auth')
- doKey('otp')
- doKey('always-auth', 'alwaysAuth')
- if (AUTH.password) {
- AUTH.password = Buffer.from(AUTH.password, 'base64').toString('utf8')
- }
- AUTH.alwaysAuth = AUTH.alwaysAuth === 'false' ? false : !!AUTH.alwaysAuth
- return AUTH
-}
-
-function addKey (opts, obj, scope, key, objKey) {
- if (opts.get(key)) {
- obj[objKey || key] = opts.get(key)
- }
- if (scope && opts.get(`${scope}:${key}`)) {
- obj[objKey || key] = opts.get(`${scope}:${key}`)
- }
-}
-
-// Called a nerf dart in the main codebase. Used as a "safe"
-// key when fetching registry info from config.
-function registryKey (registry) {
- const parsed = url.parse(registry)
- const formatted = url.format({
- host: parsed.host,
- pathname: parsed.pathname,
- slashes: parsed.slashes
- })
- return url.resolve(formatted, '.')
-}
diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/check-response.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/check-response.js
deleted file mode 100644
index 407a80e4ce..0000000000
--- a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/check-response.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict'
-
-const config = require('./config.js')
-const errors = require('./errors.js')
-const LRU = require('lru-cache')
-
-module.exports = checkResponse
-function checkResponse (method, res, registry, startTime, opts) {
- opts = config(opts)
- if (res.headers.has('npm-notice') && !res.headers.has('x-local-cache')) {
- opts.get('log').notice('', res.headers.get('npm-notice'))
- }
- checkWarnings(res, registry, opts)
- if (res.status >= 400) {
- logRequest(method, res, startTime, opts)
- return checkErrors(method, res, startTime, opts)
- } else {
- res.body.on('end', () => logRequest(method, res, startTime, opts))
- return res
- }
-}
-
-function logRequest (method, res, startTime, opts) {
- const elapsedTime = Date.now() - startTime
- const attempt = res.headers.get('x-fetch-attempts')
- const attemptStr = attempt && attempt > 1 ? ` attempt #${attempt}` : ''
- const cacheStr = res.headers.get('x-local-cache') ? ' (from cache)' : ''
- opts.get('log').http(
- 'fetch',
- `${method.toUpperCase()} ${res.status} ${res.url} ${elapsedTime}ms${attemptStr}${cacheStr}`
- )
-}
-
-const WARNING_REGEXP = /^\s*(\d{3})\s+(\S+)\s+"(.*)"\s+"([^"]+)"/
-const BAD_HOSTS = new LRU({ max: 50 })
-
-function checkWarnings (res, registry, opts) {
- if (res.headers.has('warning') && !BAD_HOSTS.has(registry)) {
- const warnings = {}
- res.headers.raw()['warning'].forEach(w => {
- const match = w.match(WARNING_REGEXP)
- if (match) {
- warnings[match[1]] = {
- code: match[1],
- host: match[2],
- message: match[3],
- date: new Date(match[4])
- }
- }
- })
- BAD_HOSTS.set(registry, true)
- if (warnings['199']) {
- if (warnings['199'].message.match(/ENOTFOUND/)) {
- opts.get('log').warn('registry', `Using stale data from ${registry} because the host is inaccessible -- are you offline?`)
- } else {
- opts.get('log').warn('registry', `Unexpected warning for ${registry}: ${warnings['199'].message}`)
- }
- }
- if (warnings['111']) {
- // 111 Revalidation failed -- we're using stale data
- opts.get('log').warn(
- 'registry',
- `Using stale data from ${registry} due to a request error during revalidation.`
- )
- }
- }
-}
-
-function checkErrors (method, res, startTime, opts) {
- return res.buffer()
- .catch(() => null)
- .then(body => {
- try {
- body = JSON.parse(body.toString('utf8'))
- } catch (e) {}
- if (res.status === 401 && res.headers.get('www-authenticate')) {
- const auth = res.headers.get('www-authenticate')
- .split(/,\s*/)
- .map(s => s.toLowerCase())
- if (auth.indexOf('ipaddress') !== -1) {
- throw new errors.HttpErrorAuthIPAddress(
- method, res, body, opts.spec
- )
- } else if (auth.indexOf('otp') !== -1) {
- throw new errors.HttpErrorAuthOTP(
- method, res, body, opts.spec
- )
- } else {
- throw new errors.HttpErrorAuthUnknown(
- method, res, body, opts.spec
- )
- }
- } else {
- throw new errors.HttpErrorGeneral(
- method, res, body, opts.spec
- )
- }
- })
-}
diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/config.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/config.js
deleted file mode 100644
index db08c1e470..0000000000
--- a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/config.js
+++ /dev/null
@@ -1,90 +0,0 @@
-'use strict'
-
-const pkg = require('./package.json')
-const figgyPudding = require('figgy-pudding')
-const silentLog = require('./silentlog.js')
-
-const AUTH_REGEX = /^(?:.*:)?(token|_authToken|username|_password|password|email|always-auth|_auth|otp)$/
-const SCOPE_REGISTRY_REGEX = /@.*:registry$/gi
-module.exports = figgyPudding({
- 'agent': {},
- 'algorithms': {},
- 'body': {},
- 'ca': {},
- 'cache': {},
- 'cert': {},
- 'fetch-retries': {},
- 'fetch-retry-factor': {},
- 'fetch-retry-maxtimeout': {},
- 'fetch-retry-mintimeout': {},
- 'gid': {},
- 'headers': {},
- 'https-proxy': {},
- 'integrity': {},
- 'is-from-ci': 'isFromCI',
- 'isFromCI': {
- default () {
- return (
- process.env['CI'] === 'true' ||
- process.env['TDDIUM'] ||
- process.env['JENKINS_URL'] ||
- process.env['bamboo.buildKey'] ||
- process.env['GO_PIPELINE_NAME']
- )
- }
- },
- 'key': {},
- 'local-address': {},
- 'log': {
- default: silentLog
- },
- 'max-sockets': 'maxsockets',
- 'maxsockets': {
- default: 12
- },
- 'memoize': {},
- 'method': {
- default: 'GET'
- },
- 'no-proxy': {},
- 'noproxy': {},
- 'npm-session': 'npmSession',
- 'npmSession': {},
- 'offline': {},
- 'otp': {},
- 'prefer-offline': {},
- 'prefer-online': {},
- 'projectScope': {},
- 'project-scope': 'projectScope',
- 'Promise': {},
- 'proxy': {},
- 'query': {},
- 'refer': {},
- 'referer': 'refer',
- 'registry': {
- default: 'https://registry.npmjs.org/'
- },
- 'retry': {},
- 'scope': {},
- 'spec': {},
- 'strict-ssl': {},
- 'timeout': {},
- 'uid': {},
- 'user-agent': {
- default: `${
- pkg.name
- }@${
- pkg.version
- }/node@${
- process.version
- }+${
- process.arch
- } (${
- process.platform
- })`
- }
-}, {
- other (key) {
- return key.match(AUTH_REGEX) || key.match(SCOPE_REGISTRY_REGEX)
- }
-})
diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/errors.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/errors.js
deleted file mode 100644
index 217f46f977..0000000000
--- a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/errors.js
+++ /dev/null
@@ -1,58 +0,0 @@
-'use strict'
-
-class HttpErrorBase extends Error {
- constructor (method, res, body, spec) {
- super()
- this.headers = res.headers.raw()
- this.statusCode = res.status
- this.code = `E${res.status}`
- this.method = method
- this.uri = res.url
- this.body = body
- }
-}
-module.exports.HttpErrorBase = HttpErrorBase
-
-class HttpErrorGeneral extends HttpErrorBase {
- constructor (method, res, body, spec) {
- super(method, res, body, spec)
- this.message = `${res.status} ${res.statusText} - ${
- this.method.toUpperCase()
- } ${
- this.spec || this.uri
- }${
- (body && body.error) ? ' - ' + body.error : ''
- }`
- Error.captureStackTrace(this, HttpErrorGeneral)
- }
-}
-module.exports.HttpErrorGeneral = HttpErrorGeneral
-
-class HttpErrorAuthOTP extends HttpErrorBase {
- constructor (method, res, body, spec) {
- super(method, res, body, spec)
- this.message = 'OTP required for authentication'
- this.code = 'EOTP'
- Error.captureStackTrace(this, HttpErrorAuthOTP)
- }
-}
-module.exports.HttpErrorAuthOTP = HttpErrorAuthOTP
-
-class HttpErrorAuthIPAddress extends HttpErrorBase {
- constructor (method, res, body, spec) {
- super(method, res, body, spec)
- this.message = 'Login is not allowed from your IP address'
- this.code = 'EAUTHIP'
- Error.captureStackTrace(this, HttpErrorAuthIPAddress)
- }
-}
-module.exports.HttpErrorAuthIPAddress = HttpErrorAuthIPAddress
-
-class HttpErrorAuthUnknown extends HttpErrorBase {
- constructor (method, res, body, spec) {
- super(method, res, body, spec)
- this.message = 'Unable to authenticate, need: ' + res.headers.get('www-authenticate')
- Error.captureStackTrace(this, HttpErrorAuthUnknown)
- }
-}
-module.exports.HttpErrorAuthUnknown = HttpErrorAuthUnknown
diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/index.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/index.js
deleted file mode 100644
index bb6ddeaee0..0000000000
--- a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/index.js
+++ /dev/null
@@ -1,160 +0,0 @@
-'use strict'
-
-const Buffer = require('safe-buffer').Buffer
-
-const checkResponse = require('./check-response.js')
-const config = require('./config.js')
-const getAuth = require('./auth.js')
-const fetch = require('make-fetch-happen')
-const npa = require('npm-package-arg')
-const qs = require('querystring')
-const url = require('url')
-
-module.exports = regFetch
-function regFetch (uri, opts) {
- opts = config(opts)
- const registry = (
- (opts.get('spec') && pickRegistry(opts.get('spec'), opts)) ||
- opts.get('registry') ||
- 'https://registry.npmjs.org/'
- )
- uri = url.parse(uri).protocol
- ? uri
- : `${
- registry.trim().replace(/\/?$/g, '')
- }/${
- uri.trim().replace(/^\//, '')
- }`
- // through that takes into account the scope, the prefix of `uri`, etc
- const startTime = Date.now()
- const headers = getHeaders(registry, uri, opts)
- let body = opts.get('body')
- const bodyIsStream = body &&
- typeof body === 'object' &&
- typeof body.pipe === 'function'
- if (body && !bodyIsStream && typeof body !== 'string' && !Buffer.isBuffer(body)) {
- headers['content-type'] = headers['content-type'] || 'application/json'
- body = JSON.stringify(body)
- } else if (body && !headers['content-type']) {
- headers['content-type'] = 'application/octet-stream'
- }
- if (opts.get('query')) {
- let q = opts.get('query')
- if (typeof q === 'string') {
- q = qs.parse(q)
- }
- const parsed = url.parse(uri)
- parsed.search = '?' + qs.stringify(
- parsed.query
- ? Object.assign(qs.parse(parsed.query), q)
- : q
- )
- uri = url.format(parsed)
- }
- return fetch(uri, {
- agent: opts.get('agent'),
- algorithms: opts.get('algorithms'),
- body,
- cache: getCacheMode(opts),
- cacheManager: opts.get('cache'),
- ca: opts.get('ca'),
- cert: opts.get('cert'),
- headers,
- integrity: opts.get('integrity'),
- key: opts.get('key'),
- localAddress: opts.get('local-address'),
- maxSockets: opts.get('maxsockets'),
- memoize: opts.get('memoize'),
- method: opts.get('method') || 'GET',
- noProxy: opts.get('no-proxy') || opts.get('noproxy'),
- Promise: opts.get('Promise'),
- proxy: opts.get('https-proxy') || opts.get('proxy'),
- referer: opts.get('refer'),
- retry: opts.get('retry') || {
- retries: opts.get('fetch-retries'),
- factor: opts.get('fetch-retry-factor'),
- minTimeout: opts.get('fetch-retry-mintimeout'),
- maxTimeout: opts.get('fetch-retry-maxtimeout')
- },
- strictSSL: !!opts.get('strict-ssl'),
- timeout: opts.get('timeout'),
- uid: opts.get('uid'),
- gid: opts.get('gid')
- }).then(res => checkResponse(
- opts.get('method') || 'GET', res, registry, startTime, opts
- ))
-}
-
-module.exports.json = fetchJSON
-function fetchJSON (uri, opts) {
- return regFetch(uri, opts).then(res => res.json())
-}
-
-module.exports.pickRegistry = pickRegistry
-function pickRegistry (spec, opts) {
- spec = npa(spec)
- opts = config(opts)
- let registry = spec.scope &&
- opts.get(spec.scope.replace(/^@?/, '@') + ':registry')
-
- if (!registry && opts.get('scope')) {
- registry = opts.get(
- opts.get('scope').replace(/^@?/, '@') + ':registry'
- )
- }
-
- if (!registry) {
- registry = opts.get('registry') || 'https://registry.npmjs.org/'
- }
-
- return registry
-}
-
-function getCacheMode (opts) {
- return opts.get('offline')
- ? 'only-if-cached'
- : opts.get('prefer-offline')
- ? 'force-cache'
- : opts.get('prefer-online')
- ? 'no-cache'
- : 'default'
-}
-
-function getHeaders (registry, uri, opts) {
- const headers = Object.assign({
- 'npm-in-ci': !!(
- opts.get('is-from-ci') ||
- process.env['CI'] === 'true' ||
- process.env['TDDIUM'] ||
- process.env['JENKINS_URL'] ||
- process.env['bamboo.buildKey'] ||
- process.env['GO_PIPELINE_NAME']
- ),
- 'npm-scope': opts.get('project-scope'),
- 'npm-session': opts.get('npm-session'),
- 'user-agent': opts.get('user-agent'),
- 'referer': opts.get('refer')
- }, opts.get('headers'))
-
- const auth = getAuth(registry, opts)
- // If a tarball is hosted on a different place than the manifest, only send
- // credentials on `alwaysAuth`
- const shouldAuth = (
- auth.alwaysAuth ||
- url.parse(uri).host === url.parse(registry).host
- )
- if (shouldAuth && auth.token) {
- headers.authorization = `Bearer ${auth.token}`
- } else if (shouldAuth && auth.username && auth.password) {
- const encoded = Buffer.from(
- `${auth.username}:${auth.password}`, 'utf8'
- ).toString('base64')
- headers.authorization = `Basic ${encoded}`
- } else if (shouldAuth && auth._auth) {
- headers.authorization = `Basic ${auth._auth}`
- }
- if (shouldAuth && auth.otp) {
- headers['npm-otp'] = auth.otp
- }
- return headers
-}
diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/package.json b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/package.json
deleted file mode 100644
index f17636c6cf..0000000000
--- a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/package.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "_from": "npm-registry-fetch@^3.0.0",
- "_id": "npm-registry-fetch@3.1.1",
- "_inBundle": false,
- "_integrity": "sha512-xBobENeenvjIG8PgQ1dy77AXTI25IbYhmA3DusMIfw/4EL5BaQ5e1V9trkPrqHvyjR3/T0cnH6o0Wt/IzcI5Ag==",
- "_location": "/libnpmhook/npm-registry-fetch",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "npm-registry-fetch@^3.0.0",
- "name": "npm-registry-fetch",
- "escapedName": "npm-registry-fetch",
- "rawSpec": "^3.0.0",
- "saveSpec": null,
- "fetchSpec": "^3.0.0"
- },
- "_requiredBy": [
- "/libnpmhook"
- ],
- "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.1.1.tgz",
- "_shasum": "e96bae698afdd45d4a01aca29e881fc0bc55206c",
- "_spec": "npm-registry-fetch@^3.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/libnpmhook",
- "author": {
- "name": "Kat Marchán",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/npm/registry-fetch/issues"
- },
- "bundleDependencies": false,
- "config": {
- "nyc": {
- "exclude": [
- "node_modules/**",
- "test/**"
- ]
- }
- },
- "dependencies": {
- "bluebird": "^3.5.1",
- "figgy-pudding": "^3.1.0",
- "lru-cache": "^4.1.2",
- "make-fetch-happen": "^4.0.0",
- "npm-package-arg": "^6.0.0"
- },
- "deprecated": false,
- "description": "Fetch-based http client for use with npm registry APIs",
- "devDependencies": {
- "cacache": "^11.0.0",
- "mkdirp": "^0.5.1",
- "nock": "^9.2.3",
- "npmlog": "^4.1.2",
- "rimraf": "^2.6.2",
- "ssri": "^6.0.0",
- "standard": "^11.0.1",
- "standard-version": "^4.2.0",
- "tap": "^11.1.3",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
- },
- "files": [
- "*.js",
- "lib"
- ],
- "homepage": "https://github.com/npm/registry-fetch#readme",
- "keywords": [
- "npm",
- "registry",
- "fetch"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "npm-registry-fetch",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/registry-fetch.git"
- },
- "scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard",
- "release": "standard-version -s",
- "test": "tap -J --coverage test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "3.1.1"
-}
diff --git a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/silentlog.js b/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/silentlog.js
deleted file mode 100644
index 886c5d55b2..0000000000
--- a/deps/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch/silentlog.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict'
-
-const noop = Function.prototype
-module.exports = {
- error: noop,
- warn: noop,
- notice: noop,
- info: noop,
- verbose: noop,
- silly: noop,
- http: noop,
- pause: noop,
- resume: noop
-}
diff --git a/deps/npm/node_modules/libnpmhook/package.json b/deps/npm/node_modules/libnpmhook/package.json
index 2f06e7a6b5..ebcc752a3c 100644
--- a/deps/npm/node_modules/libnpmhook/package.json
+++ b/deps/npm/node_modules/libnpmhook/package.json
@@ -1,38 +1,28 @@
{
- "_args": [
- [
- "libnpmhook@4.0.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "libnpmhook@4.0.1",
- "_id": "libnpmhook@4.0.1",
+ "_from": "libnpmhook@5.0.2",
+ "_id": "libnpmhook@5.0.2",
"_inBundle": false,
- "_integrity": "sha512-3qqpfqvBD1712WA6iGe0stkG40WwAeoWcujA6BlC0Be1JArQbqwabnEnZ0CRcD05Tf1fPYJYdCbSfcfedEJCOg==",
+ "_integrity": "sha512-vLenmdFWhRfnnZiNFPNMog6CK7Ujofy2TWiM2CrpZUjBRIhHkJeDaAbJdYCT6W4lcHtyrJR8yXW8KFyq6UAp1g==",
"_location": "/libnpmhook",
- "_phantomChildren": {
- "bluebird": "3.5.1",
- "figgy-pudding": "3.1.0",
- "lru-cache": "4.1.3",
- "make-fetch-happen": "4.0.1",
- "npm-package-arg": "6.1.0"
- },
+ "_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "libnpmhook@4.0.1",
+ "raw": "libnpmhook@5.0.2",
"name": "libnpmhook",
"escapedName": "libnpmhook",
- "rawSpec": "4.0.1",
+ "rawSpec": "5.0.2",
"saveSpec": null,
- "fetchSpec": "4.0.1"
+ "fetchSpec": "5.0.2"
},
"_requiredBy": [
+ "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-4.0.1.tgz",
- "_spec": "4.0.1",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-5.0.2.tgz",
+ "_shasum": "d12817b0fb893f36f1d5be20017f2aea25825d94",
+ "_spec": "libnpmhook@5.0.2",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -40,16 +30,20 @@
"bugs": {
"url": "https://github.com/npm/libnpmhook/issues"
},
+ "bundleDependencies": false,
"dependencies": {
- "figgy-pudding": "^3.1.0",
- "npm-registry-fetch": "^3.0.0"
+ "aproba": "^2.0.0",
+ "figgy-pudding": "^3.4.1",
+ "get-stream": "^4.0.0",
+ "npm-registry-fetch": "^3.8.0"
},
+ "deprecated": false,
"description": "programmatic API for managing npm registry hooks",
"devDependencies": {
- "nock": "^9.2.3",
+ "nock": "^9.6.1",
"standard": "^11.0.1",
- "standard-version": "^4.3.0",
- "tap": "^11.1.3",
+ "standard-version": "^4.4.0",
+ "tap": "^12.0.1",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
@@ -76,9 +70,9 @@
"prerelease": "npm t",
"pretest": "standard",
"release": "standard-version -s",
- "test": "tap -J --coverage test/*.js",
+ "test": "tap -J --100 --coverage test/*.js",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "4.0.1"
+ "version": "5.0.2"
}
diff --git a/deps/npm/node_modules/libnpmorg/CHANGELOG.md b/deps/npm/node_modules/libnpmorg/CHANGELOG.md
new file mode 100644
index 0000000000..03392b64cd
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/CHANGELOG.md
@@ -0,0 +1,11 @@
+# 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="1.0.0"></a>
+# 1.0.0 (2018-08-23)
+
+
+### Features
+
+* **API:** implement org api ([731b9c6](https://github.com/npm/libnpmorg/commit/731b9c6))
diff --git a/deps/npm/node_modules/libnpmorg/CODE_OF_CONDUCT.md b/deps/npm/node_modules/libnpmorg/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000000..aeb72f598d
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/CODE_OF_CONDUCT.md
@@ -0,0 +1,151 @@
+# Code of Conduct
+
+## When Something Happens
+
+If you see a Code of Conduct violation, follow these steps:
+
+1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
+2. That person should immediately stop the behavior and correct the issue.
+3. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
+4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
+
+When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
+
+**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+ * Using welcoming and inclusive language.
+ * Being respectful of differing viewpoints and experiences.
+ * Gracefully accepting constructive feedback.
+ * Focusing on what is best for the community.
+ * Showing empathy and kindness towards other community members.
+ * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
+
+Examples of unacceptable behavior by participants include:
+
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
+ * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
+ * Making light of/making mocking comments about trigger warnings and content warnings.
+ * Trolling, insulting/derogatory comments, and personal or political attacks.
+ * Public or private harassment, deliberate intimidation, or threats.
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
+ * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
+ * Publishing of private communication that doesn't have to do with reporting harrassment.
+ * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
+ * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
+ * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
+ * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
+ * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
+ * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
+
+## Scope
+
+This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
+
+Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
+
+### Other Community Standards
+
+As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
+
+Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
+
+Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
+
+## Maintainer Enforcement Process
+
+Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
+
+### Contacting Maintainers
+
+You may get in touch with the maintainer team through any of the following methods:
+
+ * Through email:
+ * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchán)
+
+ * Through Twitter:
+ * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchán)
+
+### Further Enforcement
+
+If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
+
+ 1. Repeat the request to stop.
+ 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
+ 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
+ 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
+
+On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
+
+Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
+
+Members expelled from events or venues with any sort of paid attendance will not be refunded.
+
+### Who Watches the Watchers?
+
+Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
+
+Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
+
+### Enforcement Examples
+
+#### The Best Case
+
+The vast majority of situations work out like this. This interaction is common, and generally positive.
+
+> Alex: "Yeah I used X and it was really crazy!"
+
+> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
+
+> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
+
+#### The Maintainer Case
+
+Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
+
+> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
+
+> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
+
+> Patt: "I'm not attacking anyone, what's your problem?"
+
+> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
+
+> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
+
+> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
+
+> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
+
+> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
+
+> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
+
+#### The Nope Case
+
+> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
+
+> Patt: "NOOOOPE. OH NOPE NOPE."
+
+> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
+
+> KeeperOfCommitBits: "👀 Nope. NOPE NOPE NOPE. 🔥"
+
+> PepeTheFrog🐸 has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
+
+## Attribution
+
+This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
+Conduct](https://wealljs.org/code-of-conduct), which is itself based on
+[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
+at
+[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
+and the LGBTQ in Technology Slack [Code of
+Conduct](http://lgbtq.technology/coc.html).
diff --git a/deps/npm/node_modules/libnpmorg/CONTRIBUTING.md b/deps/npm/node_modules/libnpmorg/CONTRIBUTING.md
new file mode 100644
index 0000000000..eb4b58b03e
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/CONTRIBUTING.md
@@ -0,0 +1,256 @@
+# Contributing
+
+## How do I... <a name="toc"></a>
+
+* [Use This Guide](#introduction)?
+* Ask or Say Something? 🤔🐛😱
+ * [Request Support](#request-support)
+ * [Report an Error or Bug](#report-an-error-or-bug)
+ * [Request a Feature](#request-a-feature)
+* Make Something? 🤓👩🏽‍💻📜🍳
+ * [Project Setup](#project-setup)
+ * [Contribute Documentation](#contribute-documentation)
+ * [Contribute Code](#contribute-code)
+* Manage Something ✅🙆🏼💃👔
+ * [Provide Support on Issues](#provide-support-on-issues)
+ * [Label Issues](#label-issues)
+ * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
+ * [Review Pull Requests](#review-pull-requests)
+ * [Merge Pull Requests](#merge-pull-requests)
+ * [Tag a Release](#tag-a-release)
+ * [Join the Project Team](#join-the-project-team)
+* Add a Guide Like This One [To My Project](#attribution)? 🤖😻👻
+
+## Introduction
+
+Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝
+
+Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 💚
+
+The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨
+
+## Request Support
+
+If you have a question about this project, how to use it, or just need clarification about something:
+
+* Open an Issue at https://github.com/npm/libnpmorg/issues
+* Provide as much context as you can about what you're running into.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* Someone will try to have a response soon.
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+
+## Report an Error or Bug
+
+If you run into an error or bug with the project:
+
+* Open an Issue at https://github.com/npm/libnpmorg/issues
+* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
+* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
+
+## Request a Feature
+
+If the project doesn't do something you need or want it to do:
+
+* Open an Issue at https://github.com/npm/libnpmorg/issues
+* Provide as much context as you can about what you're running into.
+* Please try and be clear about why existing features and alternatives would not work for you.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
+* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
+
+Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
+
+## Project Setup
+
+So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
+
+If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
+
+If you want to go the usual route and run the project locally, though:
+
+* [Install Node.js](https://nodejs.org/en/download/)
+* [Fork the project](https://guides.github.com/activities/forking/#fork)
+
+Then in your terminal:
+* `cd path/to/your/clone`
+* `npm install`
+* `npm test`
+
+And you should be ready to go!
+
+## Contribute Documentation
+
+Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
+
+Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
+
+To contribute documentation:
+
+* [Set up the project](#project-setup).
+* Edit or add any relevant documentation.
+* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
+* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
+* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(<component>): <message>`.
+* Go to https://github.com/npm/libnpmorg/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Contribute Code
+
+We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
+
+Code contributions of just about any size are acceptable!
+
+The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
+
+To contribute code:
+
+* [Set up the project](#project-setup).
+* Make any necessary changes to the source code.
+* Include any [additional documentation](#contribute-documentation) the changes might need.
+* Write tests that verify that your contribution works as expected.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
+* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `<prefix>(deps): PKG@VERSION`, where `<prefix>` is any of the usual `conventional-changelog` prefixes, at your discretion.
+* Go to https://github.com/npm/libnpmorg/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Provide Support on Issues
+
+[Needs Collaborator](#join-the-project-team): none
+
+Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
+
+Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
+
+In order to help other folks out with their questions:
+
+* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmorg/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
+* Read through the list until you find something that you're familiar enough with to give an answer to.
+* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
+* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
+
+Some notes on picking up support issues:
+
+* Avoid responding to issues you don't know you can answer accurately.
+* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
+* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
+
+## Label Issues
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
+
+In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmorg/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
+
+Label | Apply When | Notes
+--- | --- | ---
+`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
+`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
+`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
+`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
+`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
+`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
+`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
+`performance` | This issue or PR is directly related to improving performance. |
+`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
+`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
+`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
+`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
+`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
+
+## Clean Up Issues and PRs
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
+
+In these cases, they should be closed until they're brought up again or the interaction starts over.
+
+To clean up issues and PRs:
+
+* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
+* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
+ * not opened by a maintainer
+ * not marked as `critical`
+ * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
+ * no explicit messages in the comments asking for it to be left open
+ * does not belong to a milestone
+* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmorg/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
+
+## Review Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
+
+PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
+
+Some notes:
+
+* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
+* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
+* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
+* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
+
+## Merge Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process.
+
+## Tag A Release
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
+
+## Join the Project Team
+
+### Ways to Join
+
+There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
+
+All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
+
+You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
+
+Permission | Description
+--- | ---
+Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
+Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
+Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
+
+## Attribution
+
+This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/deps/npm/node_modules/libnpmorg/LICENSE b/deps/npm/node_modules/libnpmorg/LICENSE
new file mode 100644
index 0000000000..209e4477f3
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/LICENSE
@@ -0,0 +1,13 @@
+Copyright 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 AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmorg/PULL_REQUEST_TEMPLATE b/deps/npm/node_modules/libnpmorg/PULL_REQUEST_TEMPLATE
new file mode 100644
index 0000000000..9471c6d325
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/PULL_REQUEST_TEMPLATE
@@ -0,0 +1,7 @@
+<!--
+⚠️🚨 BEFORE FILING A PR: 🚨⚠️
+
+👉🏼 CONTRIBUTING.md 👈🏼 (the "contribution guidelines" up there ☝🏼)
+
+I PROMISE IT'S A VERY VERY SHORT READ.🙇🏼
+-->
diff --git a/deps/npm/node_modules/libnpmorg/README.md b/deps/npm/node_modules/libnpmorg/README.md
new file mode 100644
index 0000000000..6244794eda
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/README.md
@@ -0,0 +1,144 @@
+# libnpmorg [![npm version](https://img.shields.io/npm/v/libnpmorg.svg)](https://npm.im/libnpmorg) [![license](https://img.shields.io/npm/l/libnpmorg.svg)](https://npm.im/libnpmorg) [![Travis](https://img.shields.io/travis/npm/libnpmorg.svg)](https://travis-ci.org/npm/libnpmorg) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmorg?svg=true)](https://ci.appveyor.com/project/zkat/libnpmorg) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmorg/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmorg?branch=latest)
+
+[`libnpmorg`](https://github.com/npm/libnpmorg) is a Node.js library for
+programmatically accessing the [npm Org membership
+API](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#membership-detail).
+
+## Example
+
+```js
+const org = require('libnpmorg')
+
+console.log(await org.ls('myorg', {token: 'deadbeef'}))
+=>
+Roster {
+ zkat: 'developer',
+ iarna: 'admin',
+ isaacs: 'owner'
+}
+```
+
+## Install
+
+`$ npm install libnpmorg`
+
+## Table of Contents
+
+* [Example](#example)
+* [Install](#install)
+* [API](#api)
+ * [hook opts](#opts)
+ * [`set()`](#set)
+ * [`rm()`](#rm)
+ * [`ls()`](#ls)
+ * [`ls.stream()`](#ls-stream)
+
+### API
+
+#### <a name="opts"></a> `opts` for `libnpmorg` commands
+
+`libnpmorg` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch).
+All options are passed through directly to that library, so please refer to [its
+own `opts`
+documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options)
+for options that can be passed in.
+
+A couple of options of note for those in a hurry:
+
+* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs.
+* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmorg` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}`
+* `opts.Promise` - If you pass this in, the Promises returned by `libnpmorg` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}`
+
+#### <a name="set"></a> `> org.set(org, user, [role], [opts]) -> Promise`
+
+The returned Promise resolves to a [Membership
+Detail](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#membership-detail)
+object.
+
+The `role` is optional and should be one of `admin`, `owner`, or `developer`.
+`developer` is the default if no `role` is provided.
+
+`org` and `user` must be scope names for the org name and user name
+respectively. They can optionally be prefixed with `@`.
+
+See also: [`PUT
+/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-membership-replace)
+
+##### Example
+
+```javascript
+await org.set('@myorg', '@myuser', 'admin', {token: 'deadbeef'})
+=>
+MembershipDetail {
+ org: {
+ name: 'myorg',
+ size: 15
+ },
+ user: 'myuser',
+ role: 'admin'
+}
+```
+
+#### <a name="rm"></a> `> org.rm(org, user, [opts]) -> Promise`
+
+The Promise resolves to `null` on success.
+
+`org` and `user` must be scope names for the org name and user name
+respectively. They can optionally be prefixed with `@`.
+
+See also: [`DELETE
+/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-membership-delete)
+
+##### Example
+
+```javascript
+await org.rm('myorg', 'myuser', {token: 'deadbeef'})
+```
+
+#### <a name="ls"></a> `> org.ls(org, [opts]) -> Promise`
+
+The Promise resolves to a
+[Roster](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#roster)
+object.
+
+`org` must be a scope name for an org, and can be optionally prefixed with `@`.
+
+See also: [`GET
+/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-roster)
+
+##### Example
+
+```javascript
+await org.ls('myorg', {token: 'deadbeef'})
+=>
+Roster {
+ zkat: 'developer',
+ iarna: 'admin',
+ isaacs: 'owner'
+}
+```
+
+#### <a name="ls-stream"></a> `> org.ls.stream(org, [opts]) -> Stream`
+
+Returns a stream of entries for a
+[Roster](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#roster),
+with each emitted entry in `[key, value]` format.
+
+`org` must be a scope name for an org, and can be optionally prefixed with `@`.
+
+The returned stream is a valid `Symbol.asyncIterator`.
+
+See also: [`GET
+/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-roster)
+
+##### Example
+
+```javascript
+for await (let [user, role] of org.ls.stream('myorg', {token: 'deadbeef'})) {
+ console.log(`user: ${user} (${role})`)
+}
+=>
+user: zkat (developer)
+user: iarna (admin)
+user: isaacs (owner)
+```
diff --git a/deps/npm/node_modules/libnpmorg/index.js b/deps/npm/node_modules/libnpmorg/index.js
new file mode 100644
index 0000000000..bff806aa58
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/index.js
@@ -0,0 +1,71 @@
+'use strict'
+
+const eu = encodeURIComponent
+const fetch = require('npm-registry-fetch')
+const figgyPudding = require('figgy-pudding')
+const getStream = require('get-stream')
+const validate = require('aproba')
+
+const OrgConfig = figgyPudding({
+ Promise: {default: () => Promise}
+})
+
+// From https://github.com/npm/registry/blob/master/docs/orgs/memberships.md
+const cmd = module.exports = {}
+
+class MembershipDetail {}
+cmd.set = (org, user, role, opts) => {
+ if (typeof role === 'object' && !opts) {
+ opts = role
+ role = undefined
+ }
+ opts = OrgConfig(opts)
+ return new opts.Promise((resolve, reject) => {
+ validate('SSSO|SSZO', [org, user, role, opts])
+ user = user.replace(/^@?/, '')
+ org = org.replace(/^@?/, '')
+ fetch.json(`/-/org/${eu(org)}/user`, opts.concat({
+ method: 'PUT',
+ body: {user, role}
+ })).then(resolve, reject)
+ }).then(ret => Object.assign(new MembershipDetail(), ret))
+}
+
+cmd.rm = (org, user, opts) => {
+ opts = OrgConfig(opts)
+ return new opts.Promise((resolve, reject) => {
+ validate('SSO', [org, user, opts])
+ user = user.replace(/^@?/, '')
+ org = org.replace(/^@?/, '')
+ fetch(`/-/org/${eu(org)}/user`, opts.concat({
+ method: 'DELETE',
+ body: {user},
+ ignoreBody: true
+ })).then(resolve, reject)
+ }).then(() => null)
+}
+
+class Roster {}
+cmd.ls = (org, opts) => {
+ opts = OrgConfig(opts)
+ return new opts.Promise((resolve, reject) => {
+ getStream.array(cmd.ls.stream(org, opts)).then(entries => {
+ const obj = {}
+ for (let [key, val] of entries) {
+ obj[key] = val
+ }
+ return obj
+ }).then(resolve, reject)
+ }).then(ret => Object.assign(new Roster(), ret))
+}
+
+cmd.ls.stream = (org, opts) => {
+ opts = OrgConfig(opts)
+ validate('SO', [org, opts])
+ org = org.replace(/^@?/, '')
+ return fetch.json.stream(`/-/org/${eu(org)}/user`, '*', opts.concat({
+ mapJson (value, [key]) {
+ return [key, value]
+ }
+ }))
+}
diff --git a/deps/npm/node_modules/libnpmorg/node_modules/aproba/CHANGELOG.md b/deps/npm/node_modules/libnpmorg/node_modules/aproba/CHANGELOG.md
new file mode 100644
index 0000000000..bab30ecb7e
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/node_modules/aproba/CHANGELOG.md
@@ -0,0 +1,4 @@
+2.0.0
+ * Drop support for 0.10 and 0.12. They haven't been in travis but still,
+ since we _know_ we'll break with them now it's only polite to do a
+ major bump.
diff --git a/deps/npm/node_modules/libnpmorg/node_modules/aproba/LICENSE b/deps/npm/node_modules/libnpmorg/node_modules/aproba/LICENSE
new file mode 100644
index 0000000000..2a4982dc40
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/node_modules/aproba/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmorg/node_modules/aproba/README.md b/deps/npm/node_modules/libnpmorg/node_modules/aproba/README.md
new file mode 100644
index 0000000000..e94799201c
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/node_modules/aproba/README.md
@@ -0,0 +1,93 @@
+aproba
+======
+
+A ridiculously light-weight function argument validator
+
+```
+var validate = require("aproba")
+
+function myfunc(a, b, c) {
+ // `a` must be a string, `b` a number, `c` a function
+ validate('SNF', arguments) // [a,b,c] is also valid
+}
+
+myfunc('test', 23, function () {}) // ok
+myfunc(123, 23, function () {}) // type error
+myfunc('test', 23) // missing arg error
+myfunc('test', 23, function () {}, true) // too many args error
+
+```
+
+Valid types are:
+
+| type | description
+| :--: | :----------
+| * | matches any type
+| A | `Array.isArray` OR an `arguments` object
+| S | typeof == string
+| N | typeof == number
+| F | typeof == function
+| O | typeof == object and not type A and not type E
+| B | typeof == boolean
+| E | `instanceof Error` OR `null` **(special: see below)**
+| Z | == `null`
+
+Validation failures throw one of three exception types, distinguished by a
+`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
+
+If you pass in an invalid type then it will throw with a code of
+`EUNKNOWNTYPE`.
+
+If an **error** argument is found and is not null then the remaining
+arguments are optional. That is, if you say `ESO` then that's like using a
+non-magical `E` in: `E|ESO|ZSO`.
+
+### But I have optional arguments?!
+
+You can provide more than one signature by separating them with pipes `|`.
+If any signature matches the arguments then they'll be considered valid.
+
+So for example, say you wanted to write a signature for
+`fs.createWriteStream`. The docs for it describe it thusly:
+
+```
+fs.createWriteStream(path[, options])
+```
+
+This would be a signature of `SO|S`. That is, a string and and object, or
+just a string.
+
+Now, if you read the full `fs` docs, you'll see that actually path can ALSO
+be a buffer. And options can be a string, that is:
+```
+path <String> | <Buffer>
+options <String> | <Object>
+```
+
+To reproduce this you have to fully enumerate all of the possible
+combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
+awkwardness is a feature: It reminds you of the complexity you're adding to
+your API when you do this sort of thing.
+
+
+### Browser support
+
+This has no dependencies and should work in browsers, though you'll have
+noisier stack traces.
+
+### Why this exists
+
+I wanted a very simple argument validator. It needed to do two things:
+
+1. Be more concise and easier to use than assertions
+
+2. Not encourage an infinite bikeshed of DSLs
+
+This is why types are specified by a single character and there's no such
+thing as an optional argument.
+
+This is not intended to validate user data. This is specifically about
+asserting the interface of your functions.
+
+If you need greater validation, I encourage you to write them by hand or
+look elsewhere.
diff --git a/deps/npm/node_modules/libnpmorg/node_modules/aproba/index.js b/deps/npm/node_modules/libnpmorg/node_modules/aproba/index.js
new file mode 100644
index 0000000000..fd947481ba
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/node_modules/aproba/index.js
@@ -0,0 +1,105 @@
+'use strict'
+module.exports = validate
+
+function isArguments (thingy) {
+ return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
+}
+
+const types = {
+ '*': {label: 'any', check: () => true},
+ A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)},
+ S: {label: 'string', check: _ => typeof _ === 'string'},
+ N: {label: 'number', check: _ => typeof _ === 'number'},
+ F: {label: 'function', check: _ => typeof _ === 'function'},
+ O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)},
+ B: {label: 'boolean', check: _ => typeof _ === 'boolean'},
+ E: {label: 'error', check: _ => _ instanceof Error},
+ Z: {label: 'null', check: _ => _ == null}
+}
+
+function addSchema (schema, arity) {
+ const group = arity[schema.length] = arity[schema.length] || []
+ if (group.indexOf(schema) === -1) group.push(schema)
+}
+
+function validate (rawSchemas, args) {
+ if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
+ if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
+ if (!args) throw missingRequiredArg(1, 'args')
+ if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
+ if (!types.A.check(args)) throw invalidType(1, ['array'], args)
+ const schemas = rawSchemas.split('|')
+ const arity = {}
+
+ schemas.forEach(schema => {
+ for (let ii = 0; ii < schema.length; ++ii) {
+ const type = schema[ii]
+ if (!types[type]) throw unknownType(ii, type)
+ }
+ if (/E.*E/.test(schema)) throw moreThanOneError(schema)
+ addSchema(schema, arity)
+ if (/E/.test(schema)) {
+ addSchema(schema.replace(/E.*$/, 'E'), arity)
+ addSchema(schema.replace(/E/, 'Z'), arity)
+ if (schema.length === 1) addSchema('', arity)
+ }
+ })
+ let matching = arity[args.length]
+ if (!matching) {
+ throw wrongNumberOfArgs(Object.keys(arity), args.length)
+ }
+ for (let ii = 0; ii < args.length; ++ii) {
+ let newMatching = matching.filter(schema => {
+ const type = schema[ii]
+ const typeCheck = types[type].check
+ return typeCheck(args[ii])
+ })
+ if (!newMatching.length) {
+ const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null)
+ throw invalidType(ii, labels, args[ii])
+ }
+ matching = newMatching
+ }
+}
+
+function missingRequiredArg (num) {
+ return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
+}
+
+function unknownType (num, type) {
+ return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
+}
+
+function invalidType (num, expectedTypes, value) {
+ let valueType
+ Object.keys(types).forEach(typeCode => {
+ if (types[typeCode].check(value)) valueType = types[typeCode].label
+ })
+ return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
+ englishList(expectedTypes) + ' but got ' + valueType)
+}
+
+function englishList (list) {
+ return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
+}
+
+function wrongNumberOfArgs (expected, got) {
+ const english = englishList(expected)
+ const args = expected.every(ex => ex.length === 1)
+ ? 'argument'
+ : 'arguments'
+ return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
+}
+
+function moreThanOneError (schema) {
+ return newException('ETOOMANYERRORTYPES',
+ 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
+}
+
+function newException (code, msg) {
+ const err = new Error(msg)
+ err.code = code
+ /* istanbul ignore else */
+ if (Error.captureStackTrace) Error.captureStackTrace(err, validate)
+ return err
+}
diff --git a/deps/npm/node_modules/libnpmorg/node_modules/aproba/package.json b/deps/npm/node_modules/libnpmorg/node_modules/aproba/package.json
new file mode 100644
index 0000000000..3268a9ec7f
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/node_modules/aproba/package.json
@@ -0,0 +1,66 @@
+{
+ "_args": [
+ [
+ "aproba@2.0.0",
+ "/Users/zkat/Documents/code/work/npm"
+ ]
+ ],
+ "_from": "aproba@2.0.0",
+ "_id": "aproba@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
+ "_location": "/libnpmorg/aproba",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "aproba@2.0.0",
+ "name": "aproba",
+ "escapedName": "aproba",
+ "rawSpec": "2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "2.0.0"
+ },
+ "_requiredBy": [
+ "/libnpmorg"
+ ],
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
+ "_spec": "2.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/aproba/issues"
+ },
+ "dependencies": {},
+ "description": "A ridiculously light-weight argument validator (now browser friendly)",
+ "devDependencies": {
+ "standard": "^11.0.1",
+ "tap": "^12.0.1"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/iarna/aproba",
+ "keywords": [
+ "argument",
+ "validate"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "aproba",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/aproba.git"
+ },
+ "scripts": {
+ "pretest": "standard",
+ "test": "tap --100 -J test/*.js"
+ },
+ "version": "2.0.0"
+}
diff --git a/deps/npm/node_modules/libnpmorg/package.json b/deps/npm/node_modules/libnpmorg/package.json
new file mode 100644
index 0000000000..3f1941298e
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/package.json
@@ -0,0 +1,77 @@
+{
+ "_args": [
+ [
+ "libnpmorg@1.0.0",
+ "/Users/zkat/Documents/code/work/npm"
+ ]
+ ],
+ "_from": "libnpmorg@1.0.0",
+ "_id": "libnpmorg@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-o+4eVJBoDGMgRwh2lJY0a8pRV2c/tQM/SxlqXezjcAg26Qe9jigYVs+Xk0vvlYDWCDhP0g74J8UwWeAgsB7gGw==",
+ "_location": "/libnpmorg",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "libnpmorg@1.0.0",
+ "name": "libnpmorg",
+ "escapedName": "libnpmorg",
+ "rawSpec": "1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "1.0.0"
+ },
+ "_requiredBy": [
+ "/libnpm"
+ ],
+ "_resolved": "https://registry.npmjs.org/libnpmorg/-/libnpmorg-1.0.0.tgz",
+ "_spec": "1.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm",
+ "author": {
+ "name": "Kat Marchán",
+ "email": "kzm@zkat.tech"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/libnpmorg/issues"
+ },
+ "dependencies": {
+ "aproba": "^2.0.0",
+ "figgy-pudding": "^3.4.1",
+ "get-stream": "^4.0.0",
+ "npm-registry-fetch": "^3.8.0"
+ },
+ "description": "Programmatic api for `npm org` commands",
+ "devDependencies": {
+ "nock": "^9.6.1",
+ "standard": "*",
+ "standard-version": "*",
+ "tap": "*",
+ "weallbehave": "*",
+ "weallcontribute": "*"
+ },
+ "homepage": "https://npmjs.com/package/libnpmorg",
+ "keywords": [
+ "libnpm",
+ "npm",
+ "package manager",
+ "api",
+ "orgs",
+ "teams"
+ ],
+ "license": "ISC",
+ "name": "libnpmorg",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/libnpmorg.git"
+ },
+ "scripts": {
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap -J --100 test/*.js",
+ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
+ "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/libnpmorg/test/index.js b/deps/npm/node_modules/libnpmorg/test/index.js
new file mode 100644
index 0000000000..f5e163a06a
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/test/index.js
@@ -0,0 +1,81 @@
+'use strict'
+
+const figgyPudding = require('figgy-pudding')
+const getStream = require('get-stream')
+const test = require('tap').test
+const tnock = require('./util/tnock.js')
+
+const org = require('../index.js')
+
+const OPTS = figgyPudding({registry: {}})({
+ registry: 'https://mock.reg/'
+})
+
+test('set', t => {
+ const memDeets = {
+ org: {
+ name: 'myorg',
+ size: 15
+ },
+ user: 'myuser',
+ role: 'admin'
+ }
+ tnock(t, OPTS.registry).put('/-/org/myorg/user', {
+ user: 'myuser',
+ role: 'admin'
+ }).reply(201, memDeets)
+ return org.set('myorg', 'myuser', 'admin', OPTS).then(res => {
+ t.deepEqual(res, memDeets, 'got a membership details object back')
+ })
+})
+
+test('optional role for set', t => {
+ const memDeets = {
+ org: {
+ name: 'myorg',
+ size: 15
+ },
+ user: 'myuser',
+ role: 'developer'
+ }
+ tnock(t, OPTS.registry).put('/-/org/myorg/user', {
+ user: 'myuser'
+ }).reply(201, memDeets)
+ return org.set('myorg', 'myuser', OPTS).then(res => {
+ t.deepEqual(res, memDeets, 'got a membership details object back')
+ })
+})
+
+test('rm', t => {
+ tnock(t, OPTS.registry).delete('/-/org/myorg/user', {
+ user: 'myuser'
+ }).reply(204)
+ return org.rm('myorg', 'myuser', OPTS).then(() => {
+ t.ok(true, 'request succeeded')
+ })
+})
+
+test('ls', t => {
+ const roster = {
+ 'zkat': 'developer',
+ 'iarna': 'admin',
+ 'isaacs': 'owner'
+ }
+ tnock(t, OPTS.registry).get('/-/org/myorg/user').reply(200, roster)
+ return org.ls('myorg', OPTS).then(res => {
+ t.deepEqual(res, roster, 'got back a roster')
+ })
+})
+
+test('ls stream', t => {
+ const roster = {
+ 'zkat': 'developer',
+ 'iarna': 'admin',
+ 'isaacs': 'owner'
+ }
+ const rosterArr = Object.keys(roster).map(k => [k, roster[k]])
+ tnock(t, OPTS.registry).get('/-/org/myorg/user').reply(200, roster)
+ return getStream.array(org.ls.stream('myorg', OPTS)).then(res => {
+ t.deepEqual(res, rosterArr, 'got back a roster, in entries format')
+ })
+})
diff --git a/deps/npm/node_modules/libnpmorg/test/util/tnock.js b/deps/npm/node_modules/libnpmorg/test/util/tnock.js
new file mode 100644
index 0000000000..00b6e160e1
--- /dev/null
+++ b/deps/npm/node_modules/libnpmorg/test/util/tnock.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const nock = require('nock')
+
+module.exports = tnock
+function tnock (t, host) {
+ const server = nock(host)
+ t.tearDown(function () {
+ server.done()
+ })
+ return server
+}
diff --git a/deps/npm/node_modules/libnpmpublish/.travis.yml b/deps/npm/node_modules/libnpmpublish/.travis.yml
new file mode 100644
index 0000000000..db5ea8b018
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/.travis.yml
@@ -0,0 +1,7 @@
+language: node_js
+sudo: false
+node_js:
+ - "10"
+ - "9"
+ - "8"
+ - "6"
diff --git a/deps/npm/node_modules/libnpmpublish/CHANGELOG.md b/deps/npm/node_modules/libnpmpublish/CHANGELOG.md
new file mode 100644
index 0000000000..529fa805a0
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/CHANGELOG.md
@@ -0,0 +1,50 @@
+# 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="1.1.1"></a>
+## [1.1.1](https://github.com/npm/libnpmpublish/compare/v1.1.0...v1.1.1) (2019-01-22)
+
+
+### Bug Fixes
+
+* **auth:** send username in correct key ([#3](https://github.com/npm/libnpmpublish/issues/3)) ([38422d0](https://github.com/npm/libnpmpublish/commit/38422d0))
+
+
+
+<a name="1.1.0"></a>
+# [1.1.0](https://github.com/npm/libnpmpublish/compare/v1.0.1...v1.1.0) (2018-08-31)
+
+
+### Features
+
+* **publish:** add support for publishConfig on manifests ([161723b](https://github.com/npm/libnpmpublish/commit/161723b))
+
+
+
+<a name="1.0.1"></a>
+## [1.0.1](https://github.com/npm/libnpmpublish/compare/v1.0.0...v1.0.1) (2018-08-31)
+
+
+### Bug Fixes
+
+* **opts:** remove unused opts ([2837098](https://github.com/npm/libnpmpublish/commit/2837098))
+
+
+
+<a name="1.0.0"></a>
+# 1.0.0 (2018-08-31)
+
+
+### Bug Fixes
+
+* **api:** use opts.algorithms, return true on success ([80fe34b](https://github.com/npm/libnpmpublish/commit/80fe34b))
+* **publish:** first test pass w/ bugfixes ([74135c9](https://github.com/npm/libnpmpublish/commit/74135c9))
+* **publish:** full coverage test and related fixes ([b5a3446](https://github.com/npm/libnpmpublish/commit/b5a3446))
+
+
+### Features
+
+* **docs:** add README with api docs ([553c13d](https://github.com/npm/libnpmpublish/commit/553c13d))
+* **publish:** add initial publish support. tests tbd ([5b3fe94](https://github.com/npm/libnpmpublish/commit/5b3fe94))
+* **unpublish:** add new api with unpublish support ([1c9d594](https://github.com/npm/libnpmpublish/commit/1c9d594))
diff --git a/deps/npm/node_modules/libnpmpublish/CODE_OF_CONDUCT.md b/deps/npm/node_modules/libnpmpublish/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000000..aeb72f598d
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/CODE_OF_CONDUCT.md
@@ -0,0 +1,151 @@
+# Code of Conduct
+
+## When Something Happens
+
+If you see a Code of Conduct violation, follow these steps:
+
+1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
+2. That person should immediately stop the behavior and correct the issue.
+3. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
+4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
+
+When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
+
+**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+ * Using welcoming and inclusive language.
+ * Being respectful of differing viewpoints and experiences.
+ * Gracefully accepting constructive feedback.
+ * Focusing on what is best for the community.
+ * Showing empathy and kindness towards other community members.
+ * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
+
+Examples of unacceptable behavior by participants include:
+
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
+ * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
+ * Making light of/making mocking comments about trigger warnings and content warnings.
+ * Trolling, insulting/derogatory comments, and personal or political attacks.
+ * Public or private harassment, deliberate intimidation, or threats.
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
+ * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
+ * Publishing of private communication that doesn't have to do with reporting harrassment.
+ * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
+ * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
+ * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
+ * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
+ * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
+ * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
+
+## Scope
+
+This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
+
+Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
+
+### Other Community Standards
+
+As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
+
+Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
+
+Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
+
+## Maintainer Enforcement Process
+
+Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
+
+### Contacting Maintainers
+
+You may get in touch with the maintainer team through any of the following methods:
+
+ * Through email:
+ * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchán)
+
+ * Through Twitter:
+ * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchán)
+
+### Further Enforcement
+
+If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
+
+ 1. Repeat the request to stop.
+ 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
+ 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
+ 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
+
+On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
+
+Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
+
+Members expelled from events or venues with any sort of paid attendance will not be refunded.
+
+### Who Watches the Watchers?
+
+Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
+
+Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
+
+### Enforcement Examples
+
+#### The Best Case
+
+The vast majority of situations work out like this. This interaction is common, and generally positive.
+
+> Alex: "Yeah I used X and it was really crazy!"
+
+> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
+
+> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
+
+#### The Maintainer Case
+
+Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
+
+> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
+
+> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
+
+> Patt: "I'm not attacking anyone, what's your problem?"
+
+> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
+
+> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
+
+> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
+
+> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
+
+> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
+
+> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
+
+#### The Nope Case
+
+> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
+
+> Patt: "NOOOOPE. OH NOPE NOPE."
+
+> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
+
+> KeeperOfCommitBits: "👀 Nope. NOPE NOPE NOPE. 🔥"
+
+> PepeTheFrog🐸 has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
+
+## Attribution
+
+This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
+Conduct](https://wealljs.org/code-of-conduct), which is itself based on
+[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
+at
+[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
+and the LGBTQ in Technology Slack [Code of
+Conduct](http://lgbtq.technology/coc.html).
diff --git a/deps/npm/node_modules/libnpmpublish/CONTRIBUTING.md b/deps/npm/node_modules/libnpmpublish/CONTRIBUTING.md
new file mode 100644
index 0000000000..780044ffcc
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/CONTRIBUTING.md
@@ -0,0 +1,256 @@
+# Contributing
+
+## How do I... <a name="toc"></a>
+
+* [Use This Guide](#introduction)?
+* Ask or Say Something? 🤔🐛😱
+ * [Request Support](#request-support)
+ * [Report an Error or Bug](#report-an-error-or-bug)
+ * [Request a Feature](#request-a-feature)
+* Make Something? 🤓👩🏽‍💻📜🍳
+ * [Project Setup](#project-setup)
+ * [Contribute Documentation](#contribute-documentation)
+ * [Contribute Code](#contribute-code)
+* Manage Something ✅🙆🏼💃👔
+ * [Provide Support on Issues](#provide-support-on-issues)
+ * [Label Issues](#label-issues)
+ * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
+ * [Review Pull Requests](#review-pull-requests)
+ * [Merge Pull Requests](#merge-pull-requests)
+ * [Tag a Release](#tag-a-release)
+ * [Join the Project Team](#join-the-project-team)
+* Add a Guide Like This One [To My Project](#attribution)? 🤖😻👻
+
+## Introduction
+
+Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝
+
+Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 💚
+
+The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨
+
+## Request Support
+
+If you have a question about this project, how to use it, or just need clarification about something:
+
+* Open an Issue at https://github.com/npm/libnpmpublish/issues
+* Provide as much context as you can about what you're running into.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* Someone will try to have a response soon.
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+
+## Report an Error or Bug
+
+If you run into an error or bug with the project:
+
+* Open an Issue at https://github.com/npm/libnpmpublish/issues
+* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
+* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
+
+## Request a Feature
+
+If the project doesn't do something you need or want it to do:
+
+* Open an Issue at https://github.com/npm/libnpmpublish/issues
+* Provide as much context as you can about what you're running into.
+* Please try and be clear about why existing features and alternatives would not work for you.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
+* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
+
+Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
+
+## Project Setup
+
+So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
+
+If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
+
+If you want to go the usual route and run the project locally, though:
+
+* [Install Node.js](https://nodejs.org/en/download/)
+* [Fork the project](https://guides.github.com/activities/forking/#fork)
+
+Then in your terminal:
+* `cd path/to/your/clone`
+* `npm install`
+* `npm test`
+
+And you should be ready to go!
+
+## Contribute Documentation
+
+Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
+
+Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
+
+To contribute documentation:
+
+* [Set up the project](#project-setup).
+* Edit or add any relevant documentation.
+* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
+* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
+* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(<component>): <message>`.
+* Go to https://github.com/npm/libnpmpublish/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Contribute Code
+
+We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
+
+Code contributions of just about any size are acceptable!
+
+The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
+
+To contribute code:
+
+* [Set up the project](#project-setup).
+* Make any necessary changes to the source code.
+* Include any [additional documentation](#contribute-documentation) the changes might need.
+* Write tests that verify that your contribution works as expected.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
+* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `<prefix>(deps): PKG@VERSION`, where `<prefix>` is any of the usual `conventional-changelog` prefixes, at your discretion.
+* Go to https://github.com/npm/libnpmpublish/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Provide Support on Issues
+
+[Needs Collaborator](#join-the-project-team): none
+
+Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
+
+Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
+
+In order to help other folks out with their questions:
+
+* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmpublish/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
+* Read through the list until you find something that you're familiar enough with to give an answer to.
+* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
+* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
+
+Some notes on picking up support issues:
+
+* Avoid responding to issues you don't know you can answer accurately.
+* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
+* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
+
+## Label Issues
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
+
+In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmpublish/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
+
+Label | Apply When | Notes
+--- | --- | ---
+`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
+`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
+`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
+`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
+`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
+`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
+`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
+`performance` | This issue or PR is directly related to improving performance. |
+`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
+`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
+`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
+`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
+`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
+
+## Clean Up Issues and PRs
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
+
+In these cases, they should be closed until they're brought up again or the interaction starts over.
+
+To clean up issues and PRs:
+
+* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
+* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
+ * not opened by a maintainer
+ * not marked as `critical`
+ * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
+ * no explicit messages in the comments asking for it to be left open
+ * does not belong to a milestone
+* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmpublish/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
+
+## Review Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
+
+PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
+
+Some notes:
+
+* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
+* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
+* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
+* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
+
+## Merge Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process.
+
+## Tag A Release
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
+
+## Join the Project Team
+
+### Ways to Join
+
+There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
+
+All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
+
+You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
+
+Permission | Description
+--- | ---
+Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
+Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
+Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
+
+## Attribution
+
+This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/deps/npm/node_modules/libnpmpublish/LICENSE b/deps/npm/node_modules/libnpmpublish/LICENSE
new file mode 100644
index 0000000000..209e4477f3
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/LICENSE
@@ -0,0 +1,13 @@
+Copyright 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 AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmpublish/PULL_REQUEST_TEMPLATE b/deps/npm/node_modules/libnpmpublish/PULL_REQUEST_TEMPLATE
new file mode 100644
index 0000000000..9471c6d325
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/PULL_REQUEST_TEMPLATE
@@ -0,0 +1,7 @@
+<!--
+⚠️🚨 BEFORE FILING A PR: 🚨⚠️
+
+👉🏼 CONTRIBUTING.md 👈🏼 (the "contribution guidelines" up there ☝🏼)
+
+I PROMISE IT'S A VERY VERY SHORT READ.🙇🏼
+-->
diff --git a/deps/npm/node_modules/libnpmpublish/README.md b/deps/npm/node_modules/libnpmpublish/README.md
new file mode 100644
index 0000000000..1511b7c14e
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/README.md
@@ -0,0 +1,111 @@
+# libnpmpublish [![npm version](https://img.shields.io/npm/v/libnpmpublish.svg)](https://npm.im/libnpmpublish) [![license](https://img.shields.io/npm/l/libnpmpublish.svg)](https://npm.im/libnpmpublish) [![Travis](https://img.shields.io/travis/npm/libnpmpublish.svg)](https://travis-ci.org/npm/libnpmpublish) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmpublish?svg=true)](https://ci.appveyor.com/project/zkat/libnpmpublish) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmpublish/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmpublish?branch=latest)
+
+[`libnpmpublish`](https://github.com/npm/libnpmpublish) is a Node.js library for
+programmatically publishing and unpublishing npm packages. It does not take care
+of packing tarballs from source code, but once you have a tarball, it can take
+care of putting it up on a nice registry for you.
+
+## Example
+
+```js
+const { publish, unpublish } = require('libnpmpublish')
+
+```
+
+## Install
+
+`$ npm install libnpmpublish`
+
+## Table of Contents
+
+* [Example](#example)
+* [Install](#install)
+* [API](#api)
+ * [publish/unpublish opts](#opts)
+ * [`publish()`](#publish)
+ * [`unpublish()`](#unpublish)
+
+### API
+
+#### <a name="opts"></a> `opts` for `libnpmpublish` commands
+
+`libnpmpublish` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch).
+Most options are passed through directly to that library, so please refer to
+[its own `opts`
+documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options)
+for options that can be passed in.
+
+A couple of options of note for those in a hurry:
+
+* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs.
+* `opts.Promise` - If you pass this in, the Promises returned by `libnpmpublish` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}`
+
+#### <a name="publish"></a> `> libpub.publish(pkgJson, tarData, [opts]) -> Promise`
+
+Publishes `tarData` to the appropriate configured registry. `pkgJson` should be
+the parsed `package.json` for the package that is being published.
+
+`tarData` can be a Buffer, a base64-encoded string, or a binary stream of data.
+Note that publishing itself can't be streamed, so the entire stream will be
+consumed into RAM before publishing (and are thus limited in how big they can
+be).
+
+Since `libnpmpublish` does not generate tarballs itself, one way to build your
+own tarball for publishing is to do `npm pack` in the directory you wish to
+pack. You can then `fs.createReadStream('my-proj-1.0.0.tgz')` and pass that to
+`libnpmpublish`, along with `require('./package.json')`.
+
+`publish()` does its best to emulate legacy publish logic in the standard npm
+client, and so should generally be compatible with any registry the npm CLI has
+been able to publish to in the past.
+
+If `opts.npmVersion` is passed in, it will be used as the `_npmVersion` field in
+the outgoing packument. It's recommended you add your own user agent string in
+there!
+
+If `opts.algorithms` is passed in, it should be an array of hashing algorithms
+to generate `integrity` hashes for. The default is `['sha512']`, which means you
+end up with `dist.integrity = 'sha512-deadbeefbadc0ffee'`. Any algorithm
+supported by your current node version is allowed -- npm clients that do not
+support those algorithms will simply ignore the unsupported hashes.
+
+If `opts.access` is passed in, it must be one of `public` or `restricted`.
+Unscoped packages cannot be `restricted`, and the registry may agree or disagree
+with whether you're allowed to publish a restricted package.
+
+##### Example
+
+```javascript
+const pkg = require('./dist/package.json')
+const tarball = fs.createReadStream('./dist/pkg-1.0.1.tgz')
+await libpub.publish(pkg, tarball, {
+ npmVersion: 'my-pub-script@1.0.2',
+ token: 'my-auth-token-here'
+})
+// Package has been published to the npm registry.
+```
+
+#### <a name="unpublish"></a> `> libpub.unpublish(spec, [opts]) -> Promise`
+
+Unpublishes `spec` from the appropriate registry. The registry in question may
+have its own limitations on unpublishing.
+
+`spec` should be either a string, or a valid
+[`npm-package-arg`](https://npm.im/npm-package-arg) parsed spec object. For
+legacy compatibility reasons, only `tag` and `version` specs will work as
+expected. `range` specs will fail silently in most cases.
+
+##### Example
+
+```javascript
+await libpub.unpublish('lodash', { token: 'i-am-the-worst'})
+//
+// `lodash` has now been unpublished, along with all its versions, and the world
+// devolves into utter chaos.
+//
+// That, or we all go home to our friends and/or family and have a nice time
+// doing nothing having to do with programming or JavaScript and realize our
+// lives are just so much happier now, and we just can't understand why we ever
+// got so into this JavaScript thing but damn did it pay well. I guess you'll
+// settle for gardening or something.
+```
diff --git a/deps/npm/node_modules/libnpmpublish/appveyor.yml b/deps/npm/node_modules/libnpmpublish/appveyor.yml
new file mode 100644
index 0000000000..9cc64c58e0
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/appveyor.yml
@@ -0,0 +1,22 @@
+environment:
+ matrix:
+ - nodejs_version: "10"
+ - nodejs_version: "9"
+ - nodejs_version: "8"
+ - nodejs_version: "6"
+
+platform:
+ - x64
+
+install:
+ - ps: Install-Product node $env:nodejs_version $env:platform
+ - npm config set spin false
+ - npm install
+
+test_script:
+ - npm test
+
+matrix:
+ fast_finish: true
+
+build: off
diff --git a/deps/npm/node_modules/libnpmpublish/index.js b/deps/npm/node_modules/libnpmpublish/index.js
new file mode 100644
index 0000000000..38de9ece14
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/index.js
@@ -0,0 +1,4 @@
+module.exports = {
+ publish: require('./publish.js'),
+ unpublish: require('./unpublish.js')
+}
diff --git a/deps/npm/node_modules/libnpmpublish/package.json b/deps/npm/node_modules/libnpmpublish/package.json
new file mode 100644
index 0000000000..4df1f0011d
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "libnpmpublish@^1.1.0",
+ "_id": "libnpmpublish@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-nefbvJd/wY38zdt+b9SHL6171vqBrMtZ56Gsgfd0duEKb/pB8rDT4/ObUQLrHz1tOfht1flt2zM+UGaemzAG5g==",
+ "_location": "/libnpmpublish",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "libnpmpublish@^1.1.0",
+ "name": "libnpmpublish",
+ "escapedName": "libnpmpublish",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/libnpm"
+ ],
+ "_resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-1.1.1.tgz",
+ "_shasum": "ff0c6bb0b4ad2bda2ad1f5fba6760a4af37125f0",
+ "_spec": "libnpmpublish@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpm",
+ "author": {
+ "name": "Kat Marchán",
+ "email": "kzm@zkat.tech"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/libnpmpublish/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "aproba": "^2.0.0",
+ "figgy-pudding": "^3.5.1",
+ "get-stream": "^4.0.0",
+ "lodash.clonedeep": "^4.5.0",
+ "normalize-package-data": "^2.4.0",
+ "npm-package-arg": "^6.1.0",
+ "npm-registry-fetch": "^3.8.0",
+ "semver": "^5.5.1",
+ "ssri": "^6.0.1"
+ },
+ "deprecated": false,
+ "description": "Programmatic API for the bits behind npm publish and unpublish",
+ "devDependencies": {
+ "bluebird": "^3.5.1",
+ "nock": "^9.6.1",
+ "standard": "*",
+ "standard-version": "*",
+ "tap": "*",
+ "tar-stream": "^1.6.1",
+ "weallbehave": "*",
+ "weallcontribute": "*"
+ },
+ "homepage": "https://npmjs.com/package/libnpmpublish",
+ "license": "ISC",
+ "name": "libnpmpublish",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/libnpmpublish.git"
+ },
+ "scripts": {
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap -J --100 test/*.js",
+ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
+ "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/libnpmpublish/publish.js b/deps/npm/node_modules/libnpmpublish/publish.js
new file mode 100644
index 0000000000..de5af4f5d3
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/publish.js
@@ -0,0 +1,218 @@
+'use strict'
+
+const cloneDeep = require('lodash.clonedeep')
+const figgyPudding = require('figgy-pudding')
+const { fixer } = require('normalize-package-data')
+const getStream = require('get-stream')
+const npa = require('npm-package-arg')
+const npmAuth = require('npm-registry-fetch/auth.js')
+const npmFetch = require('npm-registry-fetch')
+const semver = require('semver')
+const ssri = require('ssri')
+const url = require('url')
+const validate = require('aproba')
+
+const PublishConfig = figgyPudding({
+ access: {},
+ algorithms: { default: ['sha512'] },
+ npmVersion: {},
+ tag: { default: 'latest' },
+ Promise: { default: () => Promise }
+})
+
+module.exports = publish
+function publish (manifest, tarball, opts) {
+ opts = PublishConfig(opts)
+ return new opts.Promise(resolve => resolve()).then(() => {
+ validate('OSO|OOO', [manifest, tarball, opts])
+ if (manifest.private) {
+ throw Object.assign(new Error(
+ 'This package has been marked as private\n' +
+ "Remove the 'private' field from the package.json to publish it."
+ ), { code: 'EPRIVATE' })
+ }
+ const spec = npa.resolve(manifest.name, manifest.version)
+ // NOTE: spec is used to pick the appropriate registry/auth combo.
+ opts = opts.concat(manifest.publishConfig, { spec })
+ const reg = npmFetch.pickRegistry(spec, opts)
+ const auth = npmAuth(reg, opts)
+ const pubManifest = patchedManifest(spec, auth, manifest, opts)
+
+ // registry-frontdoor cares about the access level, which is only
+ // configurable for scoped packages
+ if (!spec.scope && opts.access === 'restricted') {
+ throw Object.assign(
+ new Error("Can't restrict access to unscoped packages."),
+ { code: 'EUNSCOPED' }
+ )
+ }
+
+ return slurpTarball(tarball, opts).then(tardata => {
+ const metadata = buildMetadata(
+ spec, auth, reg, pubManifest, tardata, opts
+ )
+ return npmFetch(spec.escapedName, opts.concat({
+ method: 'PUT',
+ body: metadata,
+ ignoreBody: true
+ })).catch(err => {
+ if (err.code !== 'E409') { throw err }
+ return npmFetch.json(spec.escapedName, opts.concat({
+ query: { write: true }
+ })).then(
+ current => patchMetadata(current, metadata, opts)
+ ).then(newMetadata => {
+ return npmFetch(spec.escapedName, opts.concat({
+ method: 'PUT',
+ body: newMetadata,
+ ignoreBody: true
+ }))
+ })
+ })
+ })
+ }).then(() => true)
+}
+
+function patchedManifest (spec, auth, base, opts) {
+ const manifest = cloneDeep(base)
+ manifest._nodeVersion = process.versions.node
+ if (opts.npmVersion) {
+ manifest._npmVersion = opts.npmVersion
+ }
+ if (auth.username || auth.email) {
+ // NOTE: This is basically pointless, but reproduced because it's what
+ // legacy does: tl;dr `auth.username` and `auth.email` are going to be
+ // undefined in any auth situation that uses tokens instead of plain
+ // auth. I can only assume some registries out there decided that
+ // _npmUser would be of any use to them, but _npmUser in packuments
+ // currently gets filled in by the npm registry itself, based on auth
+ // information.
+ manifest._npmUser = {
+ name: auth.username,
+ email: auth.email
+ }
+ }
+
+ fixer.fixNameField(manifest, { strict: true, allowLegacyCase: true })
+ const version = semver.clean(manifest.version)
+ if (!version) {
+ throw Object.assign(
+ new Error('invalid semver: ' + manifest.version),
+ { code: 'EBADSEMVER' }
+ )
+ }
+ manifest.version = version
+ return manifest
+}
+
+function buildMetadata (spec, auth, registry, manifest, tardata, opts) {
+ const root = {
+ _id: manifest.name,
+ name: manifest.name,
+ description: manifest.description,
+ 'dist-tags': {},
+ versions: {},
+ readme: manifest.readme || ''
+ }
+
+ if (opts.access) root.access = opts.access
+
+ if (!auth.token) {
+ root.maintainers = [{ name: auth.username, email: auth.email }]
+ manifest.maintainers = JSON.parse(JSON.stringify(root.maintainers))
+ }
+
+ root.versions[ manifest.version ] = manifest
+ const tag = manifest.tag || opts.tag
+ root['dist-tags'][tag] = manifest.version
+
+ const tbName = manifest.name + '-' + manifest.version + '.tgz'
+ const tbURI = manifest.name + '/-/' + tbName
+ const integrity = ssri.fromData(tardata, {
+ algorithms: [...new Set(['sha1'].concat(opts.algorithms))]
+ })
+
+ manifest._id = manifest.name + '@' + manifest.version
+ manifest.dist = manifest.dist || {}
+ // Don't bother having sha1 in the actual integrity field
+ manifest.dist.integrity = integrity['sha512'][0].toString()
+ // Legacy shasum support
+ manifest.dist.shasum = integrity['sha1'][0].hexDigest()
+ manifest.dist.tarball = url.resolve(registry, tbURI)
+ .replace(/^https:\/\//, 'http://')
+
+ root._attachments = {}
+ root._attachments[ tbName ] = {
+ 'content_type': 'application/octet-stream',
+ 'data': tardata.toString('base64'),
+ 'length': tardata.length
+ }
+
+ return root
+}
+
+function patchMetadata (current, newData, opts) {
+ const curVers = Object.keys(current.versions || {}).map(v => {
+ return semver.clean(v, true)
+ }).concat(Object.keys(current.time || {}).map(v => {
+ if (semver.valid(v, true)) { return semver.clean(v, true) }
+ })).filter(v => v)
+
+ const newVersion = Object.keys(newData.versions)[0]
+
+ if (curVers.indexOf(newVersion) !== -1) {
+ throw ConflictError(newData.name, newData.version)
+ }
+
+ current.versions = current.versions || {}
+ current.versions[newVersion] = newData.versions[newVersion]
+ for (var i in newData) {
+ switch (i) {
+ // objects that copy over the new stuffs
+ case 'dist-tags':
+ case 'versions':
+ case '_attachments':
+ for (var j in newData[i]) {
+ current[i] = current[i] || {}
+ current[i][j] = newData[i][j]
+ }
+ break
+
+ // ignore these
+ case 'maintainers':
+ break
+
+ // copy
+ default:
+ current[i] = newData[i]
+ }
+ }
+ const maint = newData.maintainers && JSON.parse(JSON.stringify(newData.maintainers))
+ newData.versions[newVersion].maintainers = maint
+ return current
+}
+
+function slurpTarball (tarSrc, opts) {
+ if (Buffer.isBuffer(tarSrc)) {
+ return opts.Promise.resolve(tarSrc)
+ } else if (typeof tarSrc === 'string') {
+ return opts.Promise.resolve(Buffer.from(tarSrc, 'base64'))
+ } else if (typeof tarSrc.pipe === 'function') {
+ return getStream.buffer(tarSrc)
+ } else {
+ return opts.Promise.reject(Object.assign(
+ new Error('invalid tarball argument. Must be a Buffer, a base64 string, or a binary stream'), {
+ code: 'EBADTAR'
+ }))
+ }
+}
+
+function ConflictError (pkgid, version) {
+ return Object.assign(new Error(
+ `Cannot publish ${pkgid}@${version} over existing version.`
+ ), {
+ code: 'EPUBLISHCONFLICT',
+ pkgid,
+ version
+ })
+}
diff --git a/deps/npm/node_modules/libnpmpublish/test/publish.js b/deps/npm/node_modules/libnpmpublish/test/publish.js
new file mode 100644
index 0000000000..65b8c82524
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/test/publish.js
@@ -0,0 +1,919 @@
+'use strict'
+
+const crypto = require('crypto')
+const cloneDeep = require('lodash.clonedeep')
+const figgyPudding = require('figgy-pudding')
+const mockTar = require('./util/mock-tarball.js')
+const { PassThrough } = require('stream')
+const ssri = require('ssri')
+const { test } = require('tap')
+const tnock = require('./util/tnock.js')
+
+const publish = require('../publish.js')
+
+const OPTS = figgyPudding({ registry: {} })({
+ registry: 'https://mock.reg/'
+})
+
+const REG = OPTS.registry
+
+test('basic publish', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const packument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ _id: 'libnpmpublish',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.deepEqual(body, packument, 'posted packument matches expectations')
+ return true
+ }, {
+ authorization: 'Bearer deadbeef'
+ }).reply(201, {})
+
+ return publish(manifest, tarData, OPTS.concat({
+ token: 'deadbeef'
+ })).then(ret => {
+ t.ok(ret, 'publish succeeded')
+ })
+ })
+})
+
+test('scoped publish', t => {
+ const manifest = {
+ name: '@zkat/libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const packument = {
+ name: '@zkat/libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ _id: '@zkat/libnpmpublish',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ _id: '@zkat/libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ _npmVersion: '6.9.0',
+ name: '@zkat/libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/@zkat/libnpmpublish/-/@zkat/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ '@zkat/libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.put('/@zkat%2flibnpmpublish', body => {
+ t.deepEqual(body, packument, 'posted packument matches expectations')
+ return true
+ }, {
+ authorization: 'Bearer deadbeef'
+ }).reply(201, {})
+
+ return publish(manifest, tarData, OPTS.concat({
+ npmVersion: '6.9.0',
+ token: 'deadbeef'
+ })).then(() => {
+ t.ok(true, 'publish succeeded')
+ })
+ })
+})
+
+test('retry after a conflict', t => {
+ const REV = '72-47f2986bfd8e8b55068b204588bbf484'
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const basePackument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ _id: 'libnpmpublish',
+ 'dist-tags': {},
+ versions: {},
+ _attachments: {}
+ }
+ const currentPackument = cloneDeep(Object.assign({}, basePackument, {
+ time: {
+ modified: new Date().toISOString(),
+ created: new Date().toISOString(),
+ '1.0.1': new Date().toISOString()
+ },
+ 'dist-tags': { latest: '1.0.1' },
+ maintainers: [{ name: 'zkat', email: 'idk@idk.tech' }],
+ versions: {
+ '1.0.1': {
+ _id: 'libnpmpublish@1.0.1',
+ _nodeVersion: process.versions.node,
+ _npmVersion: '6.9.0',
+ name: 'libnpmpublish',
+ version: '1.0.1',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.1.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.1.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }))
+ const newPackument = cloneDeep(Object.assign({}, basePackument, {
+ 'dist-tags': { latest: '1.0.0' },
+ maintainers: [{ name: 'other', email: 'other@idk.tech' }],
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ _npmVersion: '6.9.0',
+ _npmUser: {
+ name: 'other',
+ email: 'other@idk.tech'
+ },
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ maintainers: [{ name: 'other', email: 'other@idk.tech' }],
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }))
+ const mergedPackument = cloneDeep(Object.assign({}, basePackument, {
+ time: currentPackument.time,
+ 'dist-tags': { latest: '1.0.0' },
+ maintainers: currentPackument.maintainers,
+ versions: Object.assign({}, currentPackument.versions, newPackument.versions),
+ _attachments: Object.assign({}, currentPackument._attachments, newPackument._attachments)
+ }))
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.notOk(body._rev, 'no _rev in initial post')
+ t.deepEqual(body, newPackument, 'got conflicting packument')
+ return true
+ }).reply(409, { error: 'gimme _rev plz' })
+ srv.get('/libnpmpublish?write=true').reply(200, Object.assign({
+ _rev: REV
+ }, currentPackument))
+ srv.put('/libnpmpublish', body => {
+ t.deepEqual(body, Object.assign({
+ _rev: REV
+ }, mergedPackument), 'posted packument includes _rev and a merged version')
+ return true
+ }).reply(201, {})
+ return publish(manifest, tarData, OPTS.concat({
+ npmVersion: '6.9.0',
+ username: 'other',
+ email: 'other@idk.tech'
+ })).then(() => {
+ t.ok(true, 'publish succeeded')
+ })
+ })
+})
+
+test('retry after a conflict -- no versions on remote', t => {
+ const REV = '72-47f2986bfd8e8b55068b204588bbf484'
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const basePackument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ _id: 'libnpmpublish'
+ }
+ const currentPackument = cloneDeep(Object.assign({}, basePackument, {
+ maintainers: [{ name: 'zkat', email: 'idk@idk.tech' }]
+ }))
+ const newPackument = cloneDeep(Object.assign({}, basePackument, {
+ 'dist-tags': { latest: '1.0.0' },
+ maintainers: [{ name: 'other', email: 'other@idk.tech' }],
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ _npmVersion: '6.9.0',
+ _npmUser: {
+ name: 'other',
+ email: 'other@idk.tech'
+ },
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ maintainers: [{ name: 'other', email: 'other@idk.tech' }],
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }))
+ const mergedPackument = cloneDeep(Object.assign({}, basePackument, {
+ 'dist-tags': { latest: '1.0.0' },
+ maintainers: currentPackument.maintainers,
+ versions: Object.assign({}, currentPackument.versions, newPackument.versions),
+ _attachments: Object.assign({}, currentPackument._attachments, newPackument._attachments)
+ }))
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.notOk(body._rev, 'no _rev in initial post')
+ t.deepEqual(body, newPackument, 'got conflicting packument')
+ return true
+ }).reply(409, { error: 'gimme _rev plz' })
+ srv.get('/libnpmpublish?write=true').reply(200, Object.assign({
+ _rev: REV
+ }, currentPackument))
+ srv.put('/libnpmpublish', body => {
+ t.deepEqual(body, Object.assign({
+ _rev: REV
+ }, mergedPackument), 'posted packument includes _rev and a merged version')
+ return true
+ }).reply(201, {})
+ return publish(manifest, tarData, OPTS.concat({
+ npmVersion: '6.9.0',
+ username: 'other',
+ email: 'other@idk.tech'
+ })).then(() => {
+ t.ok(true, 'publish succeeded')
+ })
+ })
+})
+test('version conflict', t => {
+ const REV = '72-47f2986bfd8e8b55068b204588bbf484'
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const basePackument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ _id: 'libnpmpublish',
+ 'dist-tags': {},
+ versions: {},
+ _attachments: {}
+ }
+ const newPackument = cloneDeep(Object.assign({}, basePackument, {
+ 'dist-tags': { latest: '1.0.0' },
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ _npmVersion: '6.9.0',
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }))
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.notOk(body._rev, 'no _rev in initial post')
+ t.deepEqual(body, newPackument, 'got conflicting packument')
+ return true
+ }).reply(409, { error: 'gimme _rev plz' })
+ srv.get('/libnpmpublish?write=true').reply(200, Object.assign({
+ _rev: REV
+ }, newPackument))
+ return publish(manifest, tarData, OPTS.concat({
+ npmVersion: '6.9.0',
+ token: 'deadbeef'
+ })).then(
+ () => { throw new Error('should not succeed') },
+ err => {
+ t.equal(err.code, 'EPUBLISHCONFLICT', 'got publish conflict code')
+ }
+ )
+ })
+})
+
+test('publish with basic auth', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const packument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ _id: 'libnpmpublish',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ maintainers: [{
+ name: 'zkat',
+ email: 'kat@example.tech'
+ }],
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ _npmVersion: '6.9.0',
+ _npmUser: {
+ name: 'zkat',
+ email: 'kat@example.tech'
+ },
+ maintainers: [{
+ name: 'zkat',
+ email: 'kat@example.tech'
+ }],
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.deepEqual(body, packument, 'posted packument matches expectations')
+ return true
+ }, {
+ authorization: /^Basic /
+ }).reply(201, {})
+
+ return publish(manifest, tarData, OPTS.concat({
+ npmVersion: '6.9.0',
+ username: 'zkat',
+ email: 'kat@example.tech'
+ })).then(() => {
+ t.ok(true, 'publish succeeded')
+ })
+ })
+})
+
+test('publish base64 string', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const packument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ _id: 'libnpmpublish',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ _npmVersion: '6.9.0',
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.deepEqual(body, packument, 'posted packument matches expectations')
+ return true
+ }, {
+ authorization: 'Bearer deadbeef'
+ }).reply(201, {})
+
+ return publish(manifest, tarData.toString('base64'), OPTS.concat({
+ npmVersion: '6.9.0',
+ token: 'deadbeef'
+ })).then(() => {
+ t.ok(true, 'publish succeeded')
+ })
+ })
+})
+
+test('publish tar stream', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const packument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ _id: 'libnpmpublish',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ _npmVersion: '6.9.0',
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.deepEqual(body, packument, 'posted packument matches expectations')
+ return true
+ }, {
+ authorization: 'Bearer deadbeef'
+ }).reply(201, {})
+
+ const stream = new PassThrough()
+ setTimeout(() => stream.end(tarData), 0)
+ return publish(manifest, stream, OPTS.concat({
+ npmVersion: '6.9.0',
+ token: 'deadbeef'
+ })).then(() => {
+ t.ok(true, 'publish succeeded')
+ })
+ })
+})
+
+test('refuse if package marked private', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ private: true
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ return publish(manifest, tarData, OPTS.concat({
+ npmVersion: '6.9.0',
+ token: 'deadbeef'
+ })).then(
+ () => { throw new Error('should not have succeeded') },
+ err => {
+ t.equal(err.code, 'EPRIVATE', 'got correct error code')
+ }
+ )
+ })
+})
+
+test('publish includes access', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const packument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ access: 'public',
+ _id: 'libnpmpublish',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.deepEqual(body, packument, 'posted packument matches expectations')
+ return true
+ }, {
+ authorization: 'Bearer deadbeef'
+ }).reply(201, {})
+
+ return publish(manifest, tarData, OPTS.concat({
+ token: 'deadbeef',
+ access: 'public'
+ })).then(() => {
+ t.ok(true, 'publish succeeded')
+ })
+ })
+})
+
+test('refuse if package is unscoped plus `restricted` access', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ return publish(manifest, tarData, OPTS.concat({
+ npmVersion: '6.9.0',
+ access: 'restricted'
+ })).then(
+ () => { throw new Error('should not have succeeded') },
+ err => {
+ t.equal(err.code, 'EUNSCOPED', 'got correct error code')
+ }
+ )
+ })
+})
+
+test('refuse if tarball is wrong type', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return publish(manifest, { data: 42 }, OPTS.concat({
+ npmVersion: '6.9.0',
+ token: 'deadbeef'
+ })).then(
+ () => { throw new Error('should not have succeeded') },
+ err => {
+ t.equal(err.code, 'EBADTAR', 'got correct error code')
+ }
+ )
+})
+
+test('refuse if bad semver on manifest', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: 'lmao',
+ description: 'some stuff'
+ }
+ return publish(manifest, 'deadbeef', OPTS).then(
+ () => { throw new Error('should not have succeeded') },
+ err => {
+ t.equal(err.code, 'EBADSEMVER', 'got correct error code')
+ }
+ )
+})
+
+test('other error code', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const packument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ _id: 'libnpmpublish',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ _npmVersion: '6.9.0',
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.deepEqual(body, packument, 'posted packument matches expectations')
+ return true
+ }, {
+ authorization: 'Bearer deadbeef'
+ }).reply(500, { error: 'go away' })
+
+ return publish(manifest, tarData, OPTS.concat({
+ npmVersion: '6.9.0',
+ token: 'deadbeef'
+ })).then(
+ () => { throw new Error('should not succeed') },
+ err => {
+ t.match(err.message, /go away/, 'no retry on non-409')
+ }
+ )
+ })
+})
+
+test('publish includes access', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff'
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const packument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ access: 'public',
+ _id: 'libnpmpublish',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.deepEqual(body, packument, 'posted packument matches expectations')
+ return true
+ }, {
+ authorization: 'Bearer deadbeef'
+ }).reply(201, {})
+
+ return publish(manifest, tarData, OPTS.concat({
+ token: 'deadbeef',
+ access: 'public'
+ })).then(() => {
+ t.ok(true, 'publish succeeded')
+ })
+ })
+})
+
+test('publishConfig on manifest', t => {
+ const manifest = {
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ publishConfig: {
+ registry: REG
+ }
+ }
+ return mockTar({
+ 'package.json': JSON.stringify(manifest),
+ 'index.js': 'console.log("hello world")'
+ }).then(tarData => {
+ const shasum = crypto.createHash('sha1').update(tarData).digest('hex')
+ const integrity = ssri.fromData(tarData, { algorithms: ['sha512'] })
+ const packument = {
+ name: 'libnpmpublish',
+ description: 'some stuff',
+ readme: '',
+ _id: 'libnpmpublish',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ _id: 'libnpmpublish@1.0.0',
+ _nodeVersion: process.versions.node,
+ name: 'libnpmpublish',
+ version: '1.0.0',
+ description: 'some stuff',
+ dist: {
+ shasum,
+ integrity: integrity.toString(),
+ tarball: `http://mock.reg/libnpmpublish/-/libnpmpublish-1.0.0.tgz`
+ },
+ publishConfig: {
+ registry: REG
+ }
+ }
+ },
+ _attachments: {
+ 'libnpmpublish-1.0.0.tgz': {
+ 'content_type': 'application/octet-stream',
+ data: tarData.toString('base64'),
+ length: tarData.length
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.put('/libnpmpublish', body => {
+ t.deepEqual(body, packument, 'posted packument matches expectations')
+ return true
+ }, {
+ authorization: 'Bearer deadbeef'
+ }).reply(201, {})
+
+ return publish(manifest, tarData, { token: 'deadbeef' }).then(ret => {
+ t.ok(ret, 'publish succeeded')
+ })
+ })
+})
diff --git a/deps/npm/node_modules/libnpmpublish/test/unpublish.js b/deps/npm/node_modules/libnpmpublish/test/unpublish.js
new file mode 100644
index 0000000000..19ac464a3b
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/test/unpublish.js
@@ -0,0 +1,249 @@
+'use strict'
+
+const figgyPudding = require('figgy-pudding')
+const test = require('tap').test
+const tnock = require('./util/tnock.js')
+
+const OPTS = figgyPudding({ registry: {} })({
+ registry: 'https://mock.reg/'
+})
+
+const REG = OPTS.registry
+const REV = '72-47f2986bfd8e8b55068b204588bbf484'
+const unpub = require('../unpublish.js')
+
+test('basic test', t => {
+ const doc = {
+ _id: 'foo',
+ _rev: REV,
+ name: 'foo',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ name: 'foo',
+ dist: {
+ tarball: `${REG}/foo/-/foo-1.0.0.tgz`
+ }
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.get('/foo?write=true').reply(200, doc)
+ srv.delete(`/foo/-rev/${REV}`).reply(201)
+ return unpub('foo', OPTS).then(ret => {
+ t.ok(ret, 'foo was unpublished')
+ })
+})
+
+test('scoped basic test', t => {
+ const doc = {
+ _id: '@foo/bar',
+ _rev: REV,
+ name: '@foo/bar',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ name: '@foo/bar',
+ dist: {
+ tarball: `${REG}/@foo/bar/-/foo-1.0.0.tgz`
+ }
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.get('/@foo%2fbar?write=true').reply(200, doc)
+ srv.delete(`/@foo%2fbar/-rev/${REV}`).reply(201)
+ return unpub('@foo/bar', OPTS).then(() => {
+ t.ok(true, 'foo was unpublished')
+ })
+})
+
+test('unpublish specific, last version', t => {
+ const doc = {
+ _id: 'foo',
+ _rev: REV,
+ name: 'foo',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ name: 'foo',
+ dist: {
+ tarball: `${REG}/foo/-/foo-1.0.0.tgz`
+ }
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.get('/foo?write=true').reply(200, doc)
+ srv.delete(`/foo/-rev/${REV}`).reply(201)
+ return unpub('foo@1.0.0', OPTS).then(() => {
+ t.ok(true, 'foo was unpublished')
+ })
+})
+
+test('unpublish specific version', t => {
+ const doc = {
+ _id: 'foo',
+ _rev: REV,
+ _revisions: [1, 2, 3],
+ _attachments: [1, 2, 3],
+ name: 'foo',
+ 'dist-tags': {
+ latest: '1.0.1'
+ },
+ versions: {
+ '1.0.0': {
+ name: 'foo',
+ dist: {
+ tarball: `${REG}/foo/-/foo-1.0.0.tgz`
+ }
+ },
+ '1.0.1': {
+ name: 'foo',
+ dist: {
+ tarball: `${REG}/foo/-/foo-1.0.1.tgz`
+ }
+ }
+ }
+ }
+ const postEdit = {
+ _id: 'foo',
+ _rev: REV,
+ name: 'foo',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ name: 'foo',
+ dist: {
+ tarball: `${REG}/foo/-/foo-1.0.0.tgz`
+ }
+ }
+ }
+ }
+
+ const srv = tnock(t, REG)
+ srv.get('/foo?write=true').reply(200, doc)
+ srv.put(`/foo/-rev/${REV}`, postEdit).reply(200)
+ srv.get('/foo?write=true').reply(200, postEdit)
+ srv.delete(`/foo/-/foo-1.0.1.tgz/-rev/${REV}`).reply(200)
+ return unpub('foo@1.0.1', OPTS).then(() => {
+ t.ok(true, 'foo was unpublished')
+ })
+})
+
+test('404 considered a success', t => {
+ const srv = tnock(t, REG)
+ srv.get('/foo?write=true').reply(404)
+ return unpub('foo', OPTS).then(() => {
+ t.ok(true, 'foo was unpublished')
+ })
+})
+
+test('non-404 errors', t => {
+ const srv = tnock(t, REG)
+ srv.get('/foo?write=true').reply(500)
+ return unpub('foo', OPTS).then(
+ () => { throw new Error('should not have succeeded') },
+ err => { t.equal(err.code, 'E500', 'got right error from server') }
+ )
+})
+
+test('packument with missing versions unpublishes whole thing', t => {
+ const doc = {
+ _id: 'foo',
+ _rev: REV,
+ name: 'foo',
+ 'dist-tags': {
+ latest: '1.0.0'
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.get('/foo?write=true').reply(200, doc)
+ srv.delete(`/foo/-rev/${REV}`).reply(201)
+ return unpub('foo@1.0.0', OPTS).then(() => {
+ t.ok(true, 'foo was unpublished')
+ })
+})
+
+test('packument with missing specific version assumed unpublished', t => {
+ const doc = {
+ _id: 'foo',
+ _rev: REV,
+ name: 'foo',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ name: 'foo',
+ dist: {
+ tarball: `${REG}/foo/-/foo-1.0.0.tgz`
+ }
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.get('/foo?write=true').reply(200, doc)
+ return unpub('foo@1.0.1', OPTS).then(() => {
+ t.ok(true, 'foo was unpublished')
+ })
+})
+
+test('unpublish specific version without dist-tag update', t => {
+ const doc = {
+ _id: 'foo',
+ _rev: REV,
+ _revisions: [1, 2, 3],
+ _attachments: [1, 2, 3],
+ name: 'foo',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ name: 'foo',
+ dist: {
+ tarball: `${REG}/foo/-/foo-1.0.0.tgz`
+ }
+ },
+ '1.0.1': {
+ name: 'foo',
+ dist: {
+ tarball: `${REG}/foo/-/foo-1.0.1.tgz`
+ }
+ }
+ }
+ }
+ const postEdit = {
+ _id: 'foo',
+ _rev: REV,
+ name: 'foo',
+ 'dist-tags': {
+ latest: '1.0.0'
+ },
+ versions: {
+ '1.0.0': {
+ name: 'foo',
+ dist: {
+ tarball: `${REG}/foo/-/foo-1.0.0.tgz`
+ }
+ }
+ }
+ }
+ const srv = tnock(t, REG)
+ srv.get('/foo?write=true').reply(200, doc)
+ srv.put(`/foo/-rev/${REV}`, postEdit).reply(200)
+ srv.get('/foo?write=true').reply(200, postEdit)
+ srv.delete(`/foo/-/foo-1.0.1.tgz/-rev/${REV}`).reply(200)
+ return unpub('foo@1.0.1', OPTS).then(() => {
+ t.ok(true, 'foo was unpublished')
+ })
+})
diff --git a/deps/npm/node_modules/libnpmpublish/test/util/mock-tarball.js b/deps/npm/node_modules/libnpmpublish/test/util/mock-tarball.js
new file mode 100644
index 0000000000..c6253cd218
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/test/util/mock-tarball.js
@@ -0,0 +1,47 @@
+'use strict'
+
+const BB = require('bluebird')
+
+const getStream = require('get-stream')
+const tar = require('tar-stream')
+const zlib = require('zlib')
+
+module.exports = makeTarball
+function makeTarball (files, opts) {
+ opts = opts || {}
+ const pack = tar.pack()
+ Object.keys(files).forEach(function (filename) {
+ const entry = files[filename]
+ pack.entry({
+ name: (opts.noPrefix ? '' : 'package/') + filename,
+ type: entry.type,
+ size: entry.size,
+ mode: entry.mode,
+ mtime: entry.mtime || new Date(0),
+ linkname: entry.linkname,
+ uid: entry.uid,
+ gid: entry.gid,
+ uname: entry.uname,
+ gname: entry.gname
+ }, typeof files[filename] === 'string'
+ ? files[filename]
+ : files[filename].data)
+ })
+ pack.finalize()
+ return BB.try(() => {
+ if (opts.stream && opts.gzip) {
+ const gz = zlib.createGzip()
+ pack.on('error', err => gz.emit('error', err)).pipe(gz)
+ } else if (opts.stream) {
+ return pack
+ } else {
+ return getStream.buffer(pack).then(ret => {
+ if (opts.gzip) {
+ return BB.fromNode(cb => zlib.gzip(ret, cb))
+ } else {
+ return ret
+ }
+ })
+ }
+ })
+}
diff --git a/deps/npm/node_modules/libnpmpublish/test/util/tnock.js b/deps/npm/node_modules/libnpmpublish/test/util/tnock.js
new file mode 100644
index 0000000000..00b6e160e1
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/test/util/tnock.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const nock = require('nock')
+
+module.exports = tnock
+function tnock (t, host) {
+ const server = nock(host)
+ t.tearDown(function () {
+ server.done()
+ })
+ return server
+}
diff --git a/deps/npm/node_modules/libnpmpublish/unpublish.js b/deps/npm/node_modules/libnpmpublish/unpublish.js
new file mode 100644
index 0000000000..d7d98243c6
--- /dev/null
+++ b/deps/npm/node_modules/libnpmpublish/unpublish.js
@@ -0,0 +1,86 @@
+'use strict'
+
+const figgyPudding = require('figgy-pudding')
+const npa = require('npm-package-arg')
+const npmFetch = require('npm-registry-fetch')
+const semver = require('semver')
+const url = require('url')
+
+const UnpublishConfig = figgyPudding({
+ force: { default: false },
+ Promise: { default: () => Promise }
+})
+
+module.exports = unpublish
+function unpublish (spec, opts) {
+ opts = UnpublishConfig(opts)
+ return new opts.Promise(resolve => resolve()).then(() => {
+ spec = npa(spec)
+ // NOTE: spec is used to pick the appropriate registry/auth combo.
+ opts = opts.concat({ spec })
+ const pkgUri = spec.escapedName
+ return npmFetch.json(pkgUri, opts.concat({
+ query: { write: true }
+ })).then(pkg => {
+ if (!spec.rawSpec || spec.rawSpec === '*') {
+ return npmFetch(`${pkgUri}/-rev/${pkg._rev}`, opts.concat({
+ method: 'DELETE',
+ ignoreBody: true
+ }))
+ } else {
+ const version = spec.rawSpec
+ const allVersions = pkg.versions || {}
+ const versionPublic = allVersions[version]
+ let dist
+ if (versionPublic) {
+ dist = allVersions[version].dist
+ }
+ delete allVersions[version]
+ // if it was the only version, then delete the whole package.
+ if (!Object.keys(allVersions).length) {
+ return npmFetch(`${pkgUri}/-rev/${pkg._rev}`, opts.concat({
+ method: 'DELETE',
+ ignoreBody: true
+ }))
+ } else if (versionPublic) {
+ const latestVer = pkg['dist-tags'].latest
+ Object.keys(pkg['dist-tags']).forEach(tag => {
+ if (pkg['dist-tags'][tag] === version) {
+ delete pkg['dist-tags'][tag]
+ }
+ })
+
+ if (latestVer === version) {
+ pkg['dist-tags'].latest = Object.keys(
+ allVersions
+ ).sort(semver.compareLoose).pop()
+ }
+
+ delete pkg._revisions
+ delete pkg._attachments
+ // Update packument with removed versions
+ return npmFetch(`${pkgUri}/-rev/${pkg._rev}`, opts.concat({
+ method: 'PUT',
+ body: pkg,
+ ignoreBody: true
+ })).then(() => {
+ // Remove the tarball itself
+ return npmFetch.json(pkgUri, opts.concat({
+ query: { write: true }
+ })).then(({ _rev, _id }) => {
+ const tarballUrl = url.parse(dist.tarball).pathname.substr(1)
+ return npmFetch(`${tarballUrl}/-rev/${_rev}`, opts.concat({
+ method: 'DELETE',
+ ignoreBody: true
+ }))
+ })
+ })
+ }
+ }
+ }, err => {
+ if (err.code !== 'E404') {
+ throw err
+ }
+ })
+ }).then(() => true)
+}
diff --git a/deps/npm/node_modules/libnpmsearch/CHANGELOG.md b/deps/npm/node_modules/libnpmsearch/CHANGELOG.md
new file mode 100644
index 0000000000..6ca044d3f4
--- /dev/null
+++ b/deps/npm/node_modules/libnpmsearch/CHANGELOG.md
@@ -0,0 +1,26 @@
+# 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="2.0.0"></a>
+# [2.0.0](https://github.com/npm/libnpmsearch/compare/v1.0.0...v2.0.0) (2018-08-28)
+
+
+### Features
+
+* **opts:** added options for pagination, details, and sorting weights ([ff97eb5](https://github.com/npm/libnpmsearch/commit/ff97eb5))
+
+
+### BREAKING CHANGES
+
+* **opts:** this changes default requests and makes libnpmsearch return more complete data for individual packages, without null-defaulting
+
+
+
+<a name="1.0.0"></a>
+# 1.0.0 (2018-08-27)
+
+
+### Features
+
+* **api:** got API working ([fe90008](https://github.com/npm/libnpmsearch/commit/fe90008))
diff --git a/deps/npm/node_modules/libnpmsearch/CODE_OF_CONDUCT.md b/deps/npm/node_modules/libnpmsearch/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000000..aeb72f598d
--- /dev/null
+++ b/deps/npm/node_modules/libnpmsearch/CODE_OF_CONDUCT.md
@@ -0,0 +1,151 @@
+# Code of Conduct
+
+## When Something Happens
+
+If you see a Code of Conduct violation, follow these steps:
+
+1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
+2. That person should immediately stop the behavior and correct the issue.
+3. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
+4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
+
+When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
+
+**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+ * Using welcoming and inclusive language.
+ * Being respectful of differing viewpoints and experiences.
+ * Gracefully accepting constructive feedback.
+ * Focusing on what is best for the community.
+ * Showing empathy and kindness towards other community members.
+ * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
+
+Examples of unacceptable behavior by participants include:
+
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
+ * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
+ * Making light of/making mocking comments about trigger warnings and content warnings.
+ * Trolling, insulting/derogatory comments, and personal or political attacks.
+ * Public or private harassment, deliberate intimidation, or threats.
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
+ * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
+ * Publishing of private communication that doesn't have to do with reporting harrassment.
+ * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
+ * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
+ * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
+ * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
+ * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
+ * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
+
+## Scope
+
+This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
+
+Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
+
+### Other Community Standards
+
+As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
+
+Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
+
+Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
+
+## Maintainer Enforcement Process
+
+Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
+
+### Contacting Maintainers
+
+You may get in touch with the maintainer team through any of the following methods:
+
+ * Through email:
+ * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchán)
+
+ * Through Twitter:
+ * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchán)
+
+### Further Enforcement
+
+If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
+
+ 1. Repeat the request to stop.
+ 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
+ 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
+ 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
+
+On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
+
+Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
+
+Members expelled from events or venues with any sort of paid attendance will not be refunded.
+
+### Who Watches the Watchers?
+
+Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
+
+Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
+
+### Enforcement Examples
+
+#### The Best Case
+
+The vast majority of situations work out like this. This interaction is common, and generally positive.
+
+> Alex: "Yeah I used X and it was really crazy!"
+
+> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
+
+> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
+
+#### The Maintainer Case
+
+Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
+
+> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
+
+> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
+
+> Patt: "I'm not attacking anyone, what's your problem?"
+
+> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
+
+> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
+
+> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
+
+> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
+
+> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
+
+> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
+
+#### The Nope Case
+
+> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
+
+> Patt: "NOOOOPE. OH NOPE NOPE."
+
+> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
+
+> KeeperOfCommitBits: "👀 Nope. NOPE NOPE NOPE. 🔥"
+
+> PepeTheFrog🐸 has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
+
+## Attribution
+
+This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
+Conduct](https://wealljs.org/code-of-conduct), which is itself based on
+[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
+at
+[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
+and the LGBTQ in Technology Slack [Code of
+Conduct](http://lgbtq.technology/coc.html).
diff --git a/deps/npm/node_modules/libnpmsearch/CONTRIBUTING.md b/deps/npm/node_modules/libnpmsearch/CONTRIBUTING.md
new file mode 100644
index 0000000000..1a61601a16
--- /dev/null
+++ b/deps/npm/node_modules/libnpmsearch/CONTRIBUTING.md
@@ -0,0 +1,256 @@
+# Contributing
+
+## How do I... <a name="toc"></a>
+
+* [Use This Guide](#introduction)?
+* Ask or Say Something? 🤔🐛😱
+ * [Request Support](#request-support)
+ * [Report an Error or Bug](#report-an-error-or-bug)
+ * [Request a Feature](#request-a-feature)
+* Make Something? 🤓👩🏽‍💻📜🍳
+ * [Project Setup](#project-setup)
+ * [Contribute Documentation](#contribute-documentation)
+ * [Contribute Code](#contribute-code)
+* Manage Something ✅🙆🏼💃👔
+ * [Provide Support on Issues](#provide-support-on-issues)
+ * [Label Issues](#label-issues)
+ * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
+ * [Review Pull Requests](#review-pull-requests)
+ * [Merge Pull Requests](#merge-pull-requests)
+ * [Tag a Release](#tag-a-release)
+ * [Join the Project Team](#join-the-project-team)
+* Add a Guide Like This One [To My Project](#attribution)? 🤖😻👻
+
+## Introduction
+
+Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝
+
+Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 💚
+
+The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨
+
+## Request Support
+
+If you have a question about this project, how to use it, or just need clarification about something:
+
+* Open an Issue at https://github.com/npm/libnpmsearch/issues
+* Provide as much context as you can about what you're running into.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* Someone will try to have a response soon.
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+
+## Report an Error or Bug
+
+If you run into an error or bug with the project:
+
+* Open an Issue at https://github.com/npm/libnpmsearch/issues
+* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
+* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
+
+## Request a Feature
+
+If the project doesn't do something you need or want it to do:
+
+* Open an Issue at https://github.com/npm/libnpmsearch/issues
+* Provide as much context as you can about what you're running into.
+* Please try and be clear about why existing features and alternatives would not work for you.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
+* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
+
+Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
+
+## Project Setup
+
+So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
+
+If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
+
+If you want to go the usual route and run the project locally, though:
+
+* [Install Node.js](https://nodejs.org/en/download/)
+* [Fork the project](https://guides.github.com/activities/forking/#fork)
+
+Then in your terminal:
+* `cd path/to/your/clone`
+* `npm install`
+* `npm test`
+
+And you should be ready to go!
+
+## Contribute Documentation
+
+Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
+
+Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
+
+To contribute documentation:
+
+* [Set up the project](#project-setup).
+* Edit or add any relevant documentation.
+* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
+* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
+* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(<component>): <message>`.
+* Go to https://github.com/npm/libnpmsearch/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Contribute Code
+
+We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
+
+Code contributions of just about any size are acceptable!
+
+The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
+
+To contribute code:
+
+* [Set up the project](#project-setup).
+* Make any necessary changes to the source code.
+* Include any [additional documentation](#contribute-documentation) the changes might need.
+* Write tests that verify that your contribution works as expected.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
+* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `<prefix>(deps): PKG@VERSION`, where `<prefix>` is any of the usual `conventional-changelog` prefixes, at your discretion.
+* Go to https://github.com/npm/libnpmsearch/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Provide Support on Issues
+
+[Needs Collaborator](#join-the-project-team): none
+
+Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
+
+Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
+
+In order to help other folks out with their questions:
+
+* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmsearch/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
+* Read through the list until you find something that you're familiar enough with to give an answer to.
+* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
+* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
+
+Some notes on picking up support issues:
+
+* Avoid responding to issues you don't know you can answer accurately.
+* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
+* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
+
+## Label Issues
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
+
+In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmsearch/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
+
+Label | Apply When | Notes
+--- | --- | ---
+`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
+`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
+`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
+`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
+`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
+`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
+`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
+`performance` | This issue or PR is directly related to improving performance. |
+`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
+`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
+`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
+`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
+`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
+
+## Clean Up Issues and PRs
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
+
+In these cases, they should be closed until they're brought up again or the interaction starts over.
+
+To clean up issues and PRs:
+
+* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
+* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
+ * not opened by a maintainer
+ * not marked as `critical`
+ * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
+ * no explicit messages in the comments asking for it to be left open
+ * does not belong to a milestone
+* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmsearch/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
+
+## Review Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
+
+PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
+
+Some notes:
+
+* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
+* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
+* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
+* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
+
+## Merge Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process.
+
+## Tag A Release
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
+
+## Join the Project Team
+
+### Ways to Join
+
+There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
+
+All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
+
+You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
+
+Permission | Description
+--- | ---
+Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
+Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
+Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
+
+## Attribution
+
+This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/deps/npm/node_modules/libnpmsearch/LICENSE b/deps/npm/node_modules/libnpmsearch/LICENSE
new file mode 100644
index 0000000000..209e4477f3
--- /dev/null
+++ b/deps/npm/node_modules/libnpmsearch/LICENSE
@@ -0,0 +1,13 @@
+Copyright 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 AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmsearch/PULL_REQUEST_TEMPLATE b/deps/npm/node_modules/libnpmsearch/PULL_REQUEST_TEMPLATE
new file mode 100644
index 0000000000..9471c6d325
--- /dev/null
+++ b/deps/npm/node_modules/libnpmsearch/PULL_REQUEST_TEMPLATE
@@ -0,0 +1,7 @@
+<!--
+⚠️🚨 BEFORE FILING A PR: 🚨⚠️
+
+👉🏼 CONTRIBUTING.md 👈🏼 (the "contribution guidelines" up there ☝🏼)
+
+I PROMISE IT'S A VERY VERY SHORT READ.🙇🏼
+-->
diff --git a/deps/npm/node_modules/libnpmsearch/README.md b/deps/npm/node_modules/libnpmsearch/README.md
new file mode 100644
index 0000000000..6617ddb89d
--- /dev/null
+++ b/deps/npm/node_modules/libnpmsearch/README.md
@@ -0,0 +1,169 @@
+# libnpmsearch [![npm version](https://img.shields.io/npm/v/libnpmsearch.svg)](https://npm.im/libnpmsearch) [![license](https://img.shields.io/npm/l/libnpmsearch.svg)](https://npm.im/libnpmsearch) [![Travis](https://img.shields.io/travis/npm/libnpmsearch.svg)](https://travis-ci.org/npm/libnpmsearch) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmsearch?svg=true)](https://ci.appveyor.com/project/zkat/libnpmsearch) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmsearch/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmsearch?branch=latest)
+
+[`libnpmsearch`](https://github.com/npm/libnpmsearch) is a Node.js library for
+programmatically accessing the npm search endpoint. It does **not** support
+legacy search through `/-/all`.
+
+## Example
+
+```js
+const search = require('libnpmsearch')
+
+console.log(await search('libnpm'))
+=>
+[
+ {
+ name: 'libnpm',
+ description: 'programmatic npm API',
+ ...etc
+ },
+ {
+ name: 'libnpmsearch',
+ description: 'Programmatic API for searching in npm and compatible registries',
+ ...etc
+ },
+ ...more
+]
+```
+
+## Install
+
+`$ npm install libnpmsearch`
+
+## Table of Contents
+
+* [Example](#example)
+* [Install](#install)
+* [API](#api)
+ * [search opts](#opts)
+ * [`search()`](#search)
+ * [`search.stream()`](#search-stream)
+
+### API
+
+#### <a name="opts"></a> `opts` for `libnpmsearch` commands
+
+The following opts are used directly by `libnpmsearch` itself:
+
+* `opts.limit` - Number of results to limit the query to. Default: 20
+* `opts.offset` - Offset number for results. Used with `opts.limit` for pagination. Default: 0
+* `opts.detailed` - If true, returns an object with `package`, `score`, and `searchScore` fields, with `package` being what would usually be returned, and the other two containing details about how that package scored. Useful for UIs. Default: false
+* `opts.sortBy` - Used as a shorthand to set `opts.quality`, `opts.maintenance`, and `opts.popularity` with values that prioritize each one. Should be one of `'optimal'`, `'quality'`, `'maintenance'`, or `'popularity'`. Default: `'optimal'`
+* `opts.maintenance` - Decimal number between `0` and `1` that defines the weight of `maintenance` metrics when scoring and sorting packages. Default: `0.65` (same as `opts.sortBy: 'optimal'`)
+* `opts.popularity` - Decimal number between `0` and `1` that defines the weight of `popularity` metrics when scoring and sorting packages. Default: `0.98` (same as `opts.sortBy: 'optimal'`)
+* `opts.quality` - Decimal number between `0` and `1` that defines the weight of `quality` metrics when scoring and sorting packages. Default: `0.5` (same as `opts.sortBy: 'optimal'`)
+
+`libnpmsearch` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch).
+Most options are passed through directly to that library, so please refer to
+[its own `opts`
+documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options)
+for options that can be passed in.
+
+A couple of options of note for those in a hurry:
+
+* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs.
+* `opts.Promise` - If you pass this in, the Promises returned by `libnpmsearch` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}`
+
+#### <a name="search"></a> `> search(query, [opts]) -> Promise`
+
+`query` must be either a String or an Array of search terms.
+
+If `opts.limit` is provided, it will be sent to the API to constrain the number
+of returned results. You may receive more, or fewer results, at the endpoint's
+discretion.
+
+The returned Promise resolved to an Array of search results with the following
+format:
+
+```js
+{
+ name: String,
+ version: SemverString,
+ description: String || null,
+ maintainers: [
+ {
+ username: String,
+ email: String
+ },
+ ...etc
+ ] || null,
+ keywords: [String] || null,
+ date: Date || null
+}
+```
+
+If `opts.limit` is provided, it will be sent to the API to constrain the number
+of returned results. You may receive more, or fewer results, at the endpoint's
+discretion.
+
+For streamed results, see [`search.stream`](#search-stream).
+
+##### Example
+
+```javascript
+await search('libnpm')
+=>
+[
+ {
+ name: 'libnpm',
+ description: 'programmatic npm API',
+ ...etc
+ },
+ {
+ name: 'libnpmsearch',
+ description: 'Programmatic API for searching in npm and compatible registries',
+ ...etc
+ },
+ ...more
+]
+```
+
+#### <a name="search-stream"></a> `> search.stream(query, [opts]) -> Stream`
+
+`query` must be either a String or an Array of search terms.
+
+If `opts.limit` is provided, it will be sent to the API to constrain the number
+of returned results. You may receive more, or fewer results, at the endpoint's
+discretion.
+
+The returned Stream emits one entry per search result, with each entry having
+the following format:
+
+```js
+{
+ name: String,
+ version: SemverString,
+ description: String || null,
+ maintainers: [
+ {
+ username: String,
+ email: String
+ },
+ ...etc
+ ] || null,
+ keywords: [String] || null,
+ date: Date || null
+}
+```
+
+For getting results in one chunk, see [`search`](#search-stream).
+
+##### Example
+
+```javascript
+search.stream('libnpm').on('data', console.log)
+=>
+// entry 1
+{
+ name: 'libnpm',
+ description: 'programmatic npm API',
+ ...etc
+}
+// entry 2
+{
+ name: 'libnpmsearch',
+ description: 'Programmatic API for searching in npm and compatible registries',
+ ...etc
+}
+// etc
+```
diff --git a/deps/npm/node_modules/libnpmsearch/index.js b/deps/npm/node_modules/libnpmsearch/index.js
new file mode 100644
index 0000000000..b84cab150b
--- /dev/null
+++ b/deps/npm/node_modules/libnpmsearch/index.js
@@ -0,0 +1,79 @@
+'use strict'
+
+const figgyPudding = require('figgy-pudding')
+const getStream = require('get-stream')
+const npmFetch = require('npm-registry-fetch')
+
+const SearchOpts = figgyPudding({
+ detailed: {default: false},
+ limit: {default: 20},
+ from: {default: 0},
+ quality: {default: 0.65},
+ popularity: {default: 0.98},
+ maintenance: {default: 0.5},
+ sortBy: {}
+})
+
+module.exports = search
+function search (query, opts) {
+ return getStream.array(search.stream(query, opts))
+}
+search.stream = searchStream
+function searchStream (query, opts) {
+ opts = SearchOpts(opts)
+ switch (opts.sortBy) {
+ case 'optimal': {
+ opts = opts.concat({
+ quality: 0.65,
+ popularity: 0.98,
+ maintenance: 0.5
+ })
+ break
+ }
+ case 'quality': {
+ opts = opts.concat({
+ quality: 1,
+ popularity: 0,
+ maintenance: 0
+ })
+ break
+ }
+ case 'popularity': {
+ opts = opts.concat({
+ quality: 0,
+ popularity: 1,
+ maintenance: 0
+ })
+ break
+ }
+ case 'maintenance': {
+ opts = opts.concat({
+ quality: 0,
+ popularity: 0,
+ maintenance: 1
+ })
+ break
+ }
+ }
+ return npmFetch.json.stream('/-/v1/search', 'objects.*',
+ opts.concat({
+ query: {
+ text: Array.isArray(query) ? query.join(' ') : query,
+ size: opts.limit,
+ quality: opts.quality,
+ popularity: opts.popularity,
+ maintenance: opts.maintenance
+ },
+ mapJson (obj) {
+ if (obj.package.date) {
+ obj.package.date = new Date(obj.package.date)
+ }
+ if (opts.detailed) {
+ return obj
+ } else {
+ return obj.package
+ }
+ }
+ })
+ )
+}
diff --git a/deps/npm/node_modules/libnpmsearch/package.json b/deps/npm/node_modules/libnpmsearch/package.json
new file mode 100644
index 0000000000..50e74c7adb
--- /dev/null
+++ b/deps/npm/node_modules/libnpmsearch/package.json
@@ -0,0 +1,74 @@
+{
+ "_args": [
+ [
+ "libnpmsearch@2.0.0",
+ "/Users/zkat/Documents/code/work/npm"
+ ]
+ ],
+ "_from": "libnpmsearch@2.0.0",
+ "_id": "libnpmsearch@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-vd+JWbTGzOSfiOc+72MU6y7WqmBXn49egCCrIXp27iE/88bX8EpG64ST1blWQI1bSMUr9l1AKPMVsqa2tS5KWA==",
+ "_location": "/libnpmsearch",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "libnpmsearch@2.0.0",
+ "name": "libnpmsearch",
+ "escapedName": "libnpmsearch",
+ "rawSpec": "2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "2.0.0"
+ },
+ "_requiredBy": [
+ "/libnpm"
+ ],
+ "_resolved": "https://registry.npmjs.org/libnpmsearch/-/libnpmsearch-2.0.0.tgz",
+ "_spec": "2.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm",
+ "author": {
+ "name": "Kat Marchán",
+ "email": "kzm@zkat.tech"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/libnpmsearch/issues"
+ },
+ "dependencies": {
+ "figgy-pudding": "^3.5.1",
+ "get-stream": "^4.0.0",
+ "npm-registry-fetch": "^3.8.0"
+ },
+ "description": "Programmatic API for searching in npm and compatible registries.",
+ "devDependencies": {
+ "nock": "^9.6.1",
+ "standard": "*",
+ "standard-version": "*",
+ "tap": "*",
+ "weallbehave": "*",
+ "weallcontribute": "*"
+ },
+ "homepage": "https://npmjs.com/package/libnpmsearch",
+ "keywords": [
+ "npm",
+ "search",
+ "api",
+ "libnpm"
+ ],
+ "license": "ISC",
+ "name": "libnpmsearch",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/libnpmsearch.git"
+ },
+ "scripts": {
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap -J --100 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": "2.0.0"
+}
diff --git a/deps/npm/node_modules/libnpmsearch/test/index.js b/deps/npm/node_modules/libnpmsearch/test/index.js
new file mode 100644
index 0000000000..f926af6da8
--- /dev/null
+++ b/deps/npm/node_modules/libnpmsearch/test/index.js
@@ -0,0 +1,268 @@
+'use strict'
+
+const figgyPudding = require('figgy-pudding')
+const getStream = require('get-stream')
+const qs = require('querystring')
+const test = require('tap').test
+const tnock = require('./util/tnock.js')
+
+const OPTS = figgyPudding({registry: {}})({
+ registry: 'https://mock.reg/'
+})
+
+const REG = OPTS.registry
+const search = require('../index.js')
+
+test('basic test', t => {
+ const query = qs.stringify({
+ text: 'oo',
+ size: 20,
+ quality: 0.65,
+ popularity: 0.98,
+ maintenance: 0.5
+ })
+ tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, {
+ objects: [
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'foo', version: '2.0.0' } }
+ ]
+ })
+ return search('oo', OPTS).then(results => {
+ t.similar(results, [{
+ name: 'cool',
+ version: '1.0.0'
+ }, {
+ name: 'foo',
+ version: '2.0.0'
+ }], 'got back an array of search results')
+ })
+})
+
+test('search.stream', t => {
+ const query = qs.stringify({
+ text: 'oo',
+ size: 20,
+ quality: 0.65,
+ popularity: 0.98,
+ maintenance: 0.5
+ })
+ tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, {
+ objects: [
+ { package: { name: 'cool', version: '1.0.0', date: new Date().toISOString() } },
+ { package: { name: 'foo', version: '2.0.0' } }
+ ]
+ })
+ return getStream.array(
+ search.stream('oo', OPTS)
+ ).then(results => {
+ t.similar(results, [{
+ name: 'cool',
+ version: '1.0.0'
+ }, {
+ name: 'foo',
+ version: '2.0.0'
+ }], 'has a stream-based API function with identical results')
+ })
+})
+
+test('accepts a limit option', t => {
+ const query = qs.stringify({
+ text: 'oo',
+ size: 3,
+ quality: 0.65,
+ popularity: 0.98,
+ maintenance: 0.5
+ })
+ tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, {
+ objects: [
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } }
+ ]
+ })
+ return search('oo', OPTS.concat({limit: 3})).then(results => {
+ t.equal(results.length, 4, 'returns more results if endpoint does so')
+ })
+})
+
+test('accepts quality/mainenance/popularity options', t => {
+ const query = qs.stringify({
+ text: 'oo',
+ size: 20,
+ quality: 1,
+ popularity: 2,
+ maintenance: 3
+ })
+ tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, {
+ objects: [
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } }
+ ]
+ })
+ return search('oo', OPTS.concat({
+ quality: 1,
+ popularity: 2,
+ maintenance: 3
+ })).then(results => {
+ t.equal(results.length, 4, 'returns more results if endpoint does so')
+ })
+})
+
+test('sortBy: quality', t => {
+ const query = qs.stringify({
+ text: 'oo',
+ size: 20,
+ quality: 1,
+ popularity: 0,
+ maintenance: 0
+ })
+ tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, {
+ objects: [
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } }
+ ]
+ })
+ return search('oo', OPTS.concat({
+ sortBy: 'quality'
+ })).then(results => {
+ t.equal(results.length, 4, 'returns more results if endpoint does so')
+ })
+})
+
+test('sortBy: popularity', t => {
+ const query = qs.stringify({
+ text: 'oo',
+ size: 20,
+ quality: 0,
+ popularity: 1,
+ maintenance: 0
+ })
+ tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, {
+ objects: [
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } }
+ ]
+ })
+ return search('oo', OPTS.concat({
+ sortBy: 'popularity'
+ })).then(results => {
+ t.equal(results.length, 4, 'returns more results if endpoint does so')
+ })
+})
+
+test('sortBy: maintenance', t => {
+ const query = qs.stringify({
+ text: 'oo',
+ size: 20,
+ quality: 0,
+ popularity: 0,
+ maintenance: 1
+ })
+ tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, {
+ objects: [
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } }
+ ]
+ })
+ return search('oo', OPTS.concat({
+ sortBy: 'maintenance'
+ })).then(results => {
+ t.equal(results.length, 4, 'returns more results if endpoint does so')
+ })
+})
+
+test('sortBy: optimal', t => {
+ const query = qs.stringify({
+ text: 'oo',
+ size: 20,
+ quality: 0.65,
+ popularity: 0.98,
+ maintenance: 0.5
+ })
+ tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, {
+ objects: [
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } },
+ { package: { name: 'cool', version: '1.0.0' } }
+ ]
+ })
+ return search('oo', OPTS.concat({
+ sortBy: 'optimal'
+ })).then(results => {
+ t.equal(results.length, 4, 'returns more results if endpoint does so')
+ })
+})
+
+test('detailed format', t => {
+ const query = qs.stringify({
+ text: 'oo',
+ size: 20,
+ quality: 0,
+ popularity: 0,
+ maintenance: 1
+ })
+ const results = [
+ {
+ package: { name: 'cool', version: '1.0.0' },
+ score: {
+ final: 0.9237841281241451,
+ detail: {
+ quality: 0.9270640902288084,
+ popularity: 0.8484861649808381,
+ maintenance: 0.9962706951777409
+ }
+ },
+ searchScore: 100000.914
+ },
+ {
+ package: { name: 'ok', version: '2.0.0' },
+ score: {
+ final: 0.9237841281451,
+ detail: {
+ quality: 0.9270602288084,
+ popularity: 0.8461649808381,
+ maintenance: 0.9706951777409
+ }
+ },
+ searchScore: 1000.91
+ }
+ ]
+ tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, {
+ objects: results
+ })
+ return search('oo', OPTS.concat({
+ sortBy: 'maintenance',
+ detailed: true
+ })).then(res => {
+ t.deepEqual(res, results, 'return full-format results with opts.detailed')
+ })
+})
+
+test('space-separates and URI-encodes multiple search params', t => {
+ const query = qs.stringify({
+ text: 'foo bar:baz quux?=',
+ size: 1,
+ quality: 1,
+ popularity: 2,
+ maintenance: 3
+ })
+ tnock(t, REG).get(`/-/v1/search?${query}`).reply(200, { objects: [] })
+ return search(['foo', 'bar:baz', 'quux?='], OPTS.concat({
+ limit: 1,
+ quality: 1,
+ popularity: 2,
+ maintenance: 3
+ })).then(
+ () => t.ok(true, 'sent parameters correctly urlencoded')
+ )
+})
diff --git a/deps/npm/node_modules/libnpmsearch/test/util/tnock.js b/deps/npm/node_modules/libnpmsearch/test/util/tnock.js
new file mode 100644
index 0000000000..00b6e160e1
--- /dev/null
+++ b/deps/npm/node_modules/libnpmsearch/test/util/tnock.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const nock = require('nock')
+
+module.exports = tnock
+function tnock (t, host) {
+ const server = nock(host)
+ t.tearDown(function () {
+ server.done()
+ })
+ return server
+}
diff --git a/deps/npm/node_modules/libnpmteam/.travis.yml b/deps/npm/node_modules/libnpmteam/.travis.yml
new file mode 100644
index 0000000000..db5ea8b018
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/.travis.yml
@@ -0,0 +1,7 @@
+language: node_js
+sudo: false
+node_js:
+ - "10"
+ - "9"
+ - "8"
+ - "6"
diff --git a/deps/npm/node_modules/libnpmteam/CHANGELOG.md b/deps/npm/node_modules/libnpmteam/CHANGELOG.md
new file mode 100644
index 0000000000..65a73146ed
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/CHANGELOG.md
@@ -0,0 +1,18 @@
+# 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="1.0.1"></a>
+## [1.0.1](https://github.com/npm/libnpmteam/compare/v1.0.0...v1.0.1) (2018-08-24)
+
+
+
+<a name="1.0.0"></a>
+# 1.0.0 (2018-08-22)
+
+
+### Features
+
+* **api:** implement team api ([50dd0e1](https://github.com/npm/libnpmteam/commit/50dd0e1))
+* **docs:** add fully-documented readme ([b1370f3](https://github.com/npm/libnpmteam/commit/b1370f3))
+* **test:** test --100 ftw ([9d3bdc3](https://github.com/npm/libnpmteam/commit/9d3bdc3))
diff --git a/deps/npm/node_modules/libnpmteam/CODE_OF_CONDUCT.md b/deps/npm/node_modules/libnpmteam/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000000..aeb72f598d
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/CODE_OF_CONDUCT.md
@@ -0,0 +1,151 @@
+# Code of Conduct
+
+## When Something Happens
+
+If you see a Code of Conduct violation, follow these steps:
+
+1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits.
+2. That person should immediately stop the behavior and correct the issue.
+3. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers).
+4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban.
+
+When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
+
+**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+ * Using welcoming and inclusive language.
+ * Being respectful of differing viewpoints and experiences.
+ * Gracefully accepting constructive feedback.
+ * Focusing on what is best for the community.
+ * Showing empathy and kindness towards other community members.
+ * Encouraging and raising up your peers in the project so you can all bask in hacks and glory.
+
+Examples of unacceptable behavior by participants include:
+
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
+ * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
+ * Making light of/making mocking comments about trigger warnings and content warnings.
+ * Trolling, insulting/derogatory comments, and personal or political attacks.
+ * Public or private harassment, deliberate intimidation, or threats.
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
+ * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent.
+ * Publishing of private communication that doesn't have to do with reporting harrassment.
+ * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
+ * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
+ * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
+ * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
+ * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
+ * Other conduct which could reasonably be considered inappropriate in a professional or community setting.
+
+## Scope
+
+This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members.
+
+Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
+
+### Other Community Standards
+
+As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/).
+
+Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct).
+
+Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities.
+
+## Maintainer Enforcement Process
+
+Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps.
+
+### Contacting Maintainers
+
+You may get in touch with the maintainer team through any of the following methods:
+
+ * Through email:
+ * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchán)
+
+ * Through Twitter:
+ * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchán)
+
+### Further Enforcement
+
+If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed:
+
+ 1. Repeat the request to stop.
+ 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked.
+ 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours.
+ 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used.
+
+On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary.
+
+Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
+
+Members expelled from events or venues with any sort of paid attendance will not be refunded.
+
+### Who Watches the Watchers?
+
+Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community.
+
+Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures.
+
+### Enforcement Examples
+
+#### The Best Case
+
+The vast majority of situations work out like this. This interaction is common, and generally positive.
+
+> Alex: "Yeah I used X and it was really crazy!"
+
+> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?"
+
+> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!"
+
+#### The Maintainer Case
+
+Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
+
+> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job."
+
+> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
+
+> Patt: "I'm not attacking anyone, what's your problem?"
+
+> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
+
+> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space."
+
+> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
+
+> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?"
+
+> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
+
+> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
+
+#### The Nope Case
+
+> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
+
+> Patt: "NOOOOPE. OH NOPE NOPE."
+
+> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE"
+
+> KeeperOfCommitBits: "👀 Nope. NOPE NOPE NOPE. 🔥"
+
+> PepeTheFrog🐸 has been banned from all organization or user repositories belonging to KeeperOfCommitBits.
+
+## Attribution
+
+This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of
+Conduct](https://wealljs.org/code-of-conduct), which is itself based on
+[Contributor Covenant](http://contributor-covenant.org), version 1.4, available
+at
+[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4),
+and the LGBTQ in Technology Slack [Code of
+Conduct](http://lgbtq.technology/coc.html).
diff --git a/deps/npm/node_modules/libnpmteam/CONTRIBUTING.md b/deps/npm/node_modules/libnpmteam/CONTRIBUTING.md
new file mode 100644
index 0000000000..3fd40076ca
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/CONTRIBUTING.md
@@ -0,0 +1,256 @@
+# Contributing
+
+## How do I... <a name="toc"></a>
+
+* [Use This Guide](#introduction)?
+* Ask or Say Something? 🤔🐛😱
+ * [Request Support](#request-support)
+ * [Report an Error or Bug](#report-an-error-or-bug)
+ * [Request a Feature](#request-a-feature)
+* Make Something? 🤓👩🏽‍💻📜🍳
+ * [Project Setup](#project-setup)
+ * [Contribute Documentation](#contribute-documentation)
+ * [Contribute Code](#contribute-code)
+* Manage Something ✅🙆🏼💃👔
+ * [Provide Support on Issues](#provide-support-on-issues)
+ * [Label Issues](#label-issues)
+ * [Clean Up Issues and PRs](#clean-up-issues-and-prs)
+ * [Review Pull Requests](#review-pull-requests)
+ * [Merge Pull Requests](#merge-pull-requests)
+ * [Tag a Release](#tag-a-release)
+ * [Join the Project Team](#join-the-project-team)
+* Add a Guide Like This One [To My Project](#attribution)? 🤖😻👻
+
+## Introduction
+
+Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝
+
+Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 💚
+
+The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨
+
+## Request Support
+
+If you have a question about this project, how to use it, or just need clarification about something:
+
+* Open an Issue at https://github.com/npm/libnpmteam/issues
+* Provide as much context as you can about what you're running into.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* Someone will try to have a response soon.
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+
+## Report an Error or Bug
+
+If you run into an error or bug with the project:
+
+* Open an Issue at https://github.com/npm/libnpmteam/issues
+* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
+* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
+* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code).
+* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made.
+* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline.
+
+## Request a Feature
+
+If the project doesn't do something you need or want it to do:
+
+* Open an Issue at https://github.com/npm/libnpmteam/issues
+* Provide as much context as you can about what you're running into.
+* Please try and be clear about why existing features and alternatives would not work for you.
+
+Once it's filed:
+
+* The project team will [label the issue](#label-issues).
+* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward.
+* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code).
+
+Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no.
+
+## Project Setup
+
+So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
+
+If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
+
+If you want to go the usual route and run the project locally, though:
+
+* [Install Node.js](https://nodejs.org/en/download/)
+* [Fork the project](https://guides.github.com/activities/forking/#fork)
+
+Then in your terminal:
+* `cd path/to/your/clone`
+* `npm install`
+* `npm test`
+
+And you should be ready to go!
+
+## Contribute Documentation
+
+Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
+
+Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
+
+To contribute documentation:
+
+* [Set up the project](#project-setup).
+* Edit or add any relevant documentation.
+* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
+* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
+* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(<component>): <message>`.
+* Go to https://github.com/npm/libnpmteam/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Contribute Code
+
+We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
+
+Code contributions of just about any size are acceptable!
+
+The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
+
+To contribute code:
+
+* [Set up the project](#project-setup).
+* Make any necessary changes to the source code.
+* Include any [additional documentation](#contribute-documentation) the changes might need.
+* Write tests that verify that your contribution works as expected.
+* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
+* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `<prefix>(deps): PKG@VERSION`, where `<prefix>` is any of the usual `conventional-changelog` prefixes, at your discretion.
+* Go to https://github.com/npm/libnpmteam/pulls and open a new pull request with your changes.
+* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
+* One or more maintainers will use GitHub's review feature to review your PR.
+* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
+* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Provide Support on Issues
+
+[Needs Collaborator](#join-the-project-team): none
+
+Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
+
+Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
+
+In order to help other folks out with their questions:
+
+* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmteam/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
+* Read through the list until you find something that you're familiar enough with to give an answer to.
+* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
+* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
+
+Some notes on picking up support issues:
+
+* Avoid responding to issues you don't know you can answer accurately.
+* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
+* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
+
+## Label Issues
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.
+
+In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmteam/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
+
+Label | Apply When | Notes
+--- | --- | ---
+`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label.
+`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. |
+`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`.
+`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`)
+`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. |
+`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling.
+`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete.
+`performance` | This issue or PR is directly related to improving performance. |
+`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. |
+`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority.
+`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes.
+`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests)
+`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not.
+
+## Clean Up Issues and PRs
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon.
+
+In these cases, they should be closed until they're brought up again or the interaction starts over.
+
+To clean up issues and PRs:
+
+* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today.
+* Go through each issue *from oldest to newest*, and close them if **all of the following are true**:
+ * not opened by a maintainer
+ * not marked as `critical`
+ * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
+ * no explicit messages in the comments asking for it to be left open
+ * does not belong to a milestone
+* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmteam/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
+
+## Review Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions.
+
+PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
+
+Some notes:
+
+* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
+* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
+* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
+* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
+
+## Merge Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process.
+
+## Tag A Release
+
+[Needs Collaborator](#join-the-project-team): Committer
+
+TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org).
+
+## Join the Project Team
+
+### Ways to Join
+
+There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
+
+All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
+
+You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
+
+Permission | Description
+--- | ---
+Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker.
+Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team.
+Admin/Owner | Granted to people ultimately responsible for the project, its community, etc.
+
+## Attribution
+
+This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)!
diff --git a/deps/npm/node_modules/libnpmteam/LICENSE b/deps/npm/node_modules/libnpmteam/LICENSE
new file mode 100644
index 0000000000..209e4477f3
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/LICENSE
@@ -0,0 +1,13 @@
+Copyright 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 AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmteam/PULL_REQUEST_TEMPLATE b/deps/npm/node_modules/libnpmteam/PULL_REQUEST_TEMPLATE
new file mode 100644
index 0000000000..9471c6d325
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/PULL_REQUEST_TEMPLATE
@@ -0,0 +1,7 @@
+<!--
+⚠️🚨 BEFORE FILING A PR: 🚨⚠️
+
+👉🏼 CONTRIBUTING.md 👈🏼 (the "contribution guidelines" up there ☝🏼)
+
+I PROMISE IT'S A VERY VERY SHORT READ.🙇🏼
+-->
diff --git a/deps/npm/node_modules/libnpmteam/README.md b/deps/npm/node_modules/libnpmteam/README.md
new file mode 100644
index 0000000000..e0e771c7fa
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/README.md
@@ -0,0 +1,185 @@
+# libnpmteam [![npm version](https://img.shields.io/npm/v/libnpmteam.svg)](https://npm.im/libnpmteam) [![license](https://img.shields.io/npm/l/libnpmteam.svg)](https://npm.im/libnpmteam) [![Travis](https://img.shields.io/travis/npm/libnpmteam/latest.svg)](https://travis-ci.org/npm/libnpmteam) [![AppVeyor](https://img.shields.io/appveyor/ci/zkat/libnpmteam/latest.svg)](https://ci.appveyor.com/project/zkat/libnpmteam) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmteam/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmteam?branch=latest)
+
+[`libnpmteam`](https://github.com/npm/libnpmteam) is a Node.js
+library that provides programmatic access to the guts of the npm CLI's `npm
+team` command and its various subcommands.
+
+## Example
+
+```javascript
+const access = require('libnpmteam')
+
+// List all teams for the @npm org.
+console.log(await team.lsTeams('npm'))
+```
+
+## Table of Contents
+
+* [Installing](#install)
+* [Example](#example)
+* [Contributing](#contributing)
+* [API](#api)
+ * [team opts](#opts)
+ * [`create()`](#create)
+ * [`destroy()`](#destroy)
+ * [`add()`](#add)
+ * [`rm()`](#rm)
+ * [`lsTeams()`](#ls-teams)
+ * [`lsTeams.stream()`](#ls-teams-stream)
+ * [`lsUsers()`](#ls-users)
+ * [`lsUsers.stream()`](#ls-users-stream)
+
+### Install
+
+`$ npm install libnpmteam`
+
+### Contributing
+
+The npm team enthusiastically welcomes contributions and project participation!
+There's a bunch of things you can do if you want to contribute! The [Contributor
+Guide](CONTRIBUTING.md) has all the information you need for everything from
+reporting bugs to contributing entire new features. Please don't hesitate to
+jump in if you'd like to, or even ask us questions if something isn't clear.
+
+All participants and maintainers in this project are expected to follow [Code of
+Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
+
+Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
+
+Happy hacking!
+
+### API
+
+#### <a name="opts"></a> `opts` for `libnpmteam` commands
+
+`libnpmteam` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch).
+All options are passed through directly to that library, so please refer to [its
+own `opts`
+documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options)
+for options that can be passed in.
+
+A couple of options of note for those in a hurry:
+
+* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs.
+* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmteam` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}`
+* `opts.Promise` - If you pass this in, the Promises returned by `libnpmteam` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}`
+
+#### <a name="create"></a> `> team.create(team, [opts]) -> Promise`
+
+Creates a team named `team`. Team names use the format `@<scope>:<name>`, with
+the `@` being optional.
+
+Additionally, `opts.description` may be passed in to include a description.
+
+##### Example
+
+```javascript
+await team.create('@npm:cli', {token: 'myregistrytoken'})
+// The @npm:cli team now exists.
+```
+
+#### <a name="destroy"></a> `> team.destroy(team, [opts]) -> Promise`
+
+Destroys a team named `team`. Team names use the format `@<scope>:<name>`, with
+the `@` being optional.
+
+##### Example
+
+```javascript
+await team.destroy('@npm:cli', {token: 'myregistrytoken'})
+// The @npm:cli team has been destroyed.
+```
+
+#### <a name="add"></a> `> team.add(user, team, [opts]) -> Promise`
+
+Adds `user` to `team`.
+
+##### Example
+
+```javascript
+await team.add('zkat', '@npm:cli', {token: 'myregistrytoken'})
+// @zkat now belongs to the @npm:cli team.
+```
+
+#### <a name="rm"></a> `> team.rm(user, team, [opts]) -> Promise`
+
+Removes `user` from `team`.
+
+##### Example
+
+```javascript
+await team.rm('zkat', '@npm:cli', {token: 'myregistrytoken'})
+// @zkat is no longer part of the @npm:cli team.
+```
+
+#### <a name="ls-teams"></a> `> team.lsTeams(scope, [opts]) -> Promise`
+
+Resolves to an array of team names belonging to `scope`.
+
+##### Example
+
+```javascript
+await team.lsTeams('@npm', {token: 'myregistrytoken'})
+=>
+[
+ 'npm:cli',
+ 'npm:web',
+ 'npm:registry',
+ 'npm:developers'
+]
+```
+
+#### <a name="ls-teams-stream"></a> `> team.lsTeams.stream(scope, [opts]) -> Stream`
+
+Returns a stream of teams belonging to `scope`.
+
+For a Promise-based version of these results, see [`team.lsTeams()`](#ls-teams).
+
+##### Example
+
+```javascript
+for await (let team of team.lsTeams.stream('@npm', {token: 'myregistrytoken'})) {
+ console.log(team)
+}
+
+// outputs
+// npm:cli
+// npm:web
+// npm:registry
+// npm:developers
+```
+
+#### <a name="ls-users"></a> `> team.lsUsers(team, [opts]) -> Promise`
+
+Resolves to an array of usernames belonging to `team`.
+
+For a streamed version of these results, see [`team.lsUsers.stream()`](#ls-users-stream).
+
+##### Example
+
+```javascript
+await team.lsUsers('@npm:cli', {token: 'myregistrytoken'})
+=>
+[
+ 'iarna',
+ 'zkat'
+]
+```
+
+#### <a name="ls-users-stream"></a> `> team.lsUsers.stream(team, [opts]) -> Stream`
+
+Returns a stream of usernames belonging to `team`.
+
+For a Promise-based version of these results, see [`team.lsUsers()`](#ls-users).
+
+##### Example
+
+```javascript
+for await (let user of team.lsUsers.stream('@npm:cli', {token: 'myregistrytoken'})) {
+ console.log(user)
+}
+
+// outputs
+// iarna
+// zkat
+```
diff --git a/deps/npm/node_modules/libnpmteam/appveyor.yml b/deps/npm/node_modules/libnpmteam/appveyor.yml
new file mode 100644
index 0000000000..9cc64c58e0
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/appveyor.yml
@@ -0,0 +1,22 @@
+environment:
+ matrix:
+ - nodejs_version: "10"
+ - nodejs_version: "9"
+ - nodejs_version: "8"
+ - nodejs_version: "6"
+
+platform:
+ - x64
+
+install:
+ - ps: Install-Product node $env:nodejs_version $env:platform
+ - npm config set spin false
+ - npm install
+
+test_script:
+ - npm test
+
+matrix:
+ fast_finish: true
+
+build: off
diff --git a/deps/npm/node_modules/libnpmteam/index.js b/deps/npm/node_modules/libnpmteam/index.js
new file mode 100644
index 0000000000..c0bd0609aa
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/index.js
@@ -0,0 +1,106 @@
+'use strict'
+
+const eu = encodeURIComponent
+const figgyPudding = require('figgy-pudding')
+const getStream = require('get-stream')
+const npmFetch = require('npm-registry-fetch')
+const validate = require('aproba')
+
+const TeamConfig = figgyPudding({
+ description: {},
+ Promise: {default: () => Promise}
+})
+
+const cmd = module.exports = {}
+
+cmd.create = (entity, opts) => {
+ opts = TeamConfig(opts)
+ return pwrap(opts, () => {
+ const {scope, team} = splitEntity(entity)
+ validate('SSO', [scope, team, opts])
+ return npmFetch.json(`/-/org/${eu(scope)}/team`, opts.concat({
+ method: 'PUT',
+ scope,
+ body: {name: team, description: opts.description}
+ }))
+ })
+}
+
+cmd.destroy = (entity, opts) => {
+ opts = TeamConfig(opts)
+ return pwrap(opts, () => {
+ const {scope, team} = splitEntity(entity)
+ validate('SSO', [scope, team, opts])
+ return npmFetch.json(`/-/team/${eu(scope)}/${eu(team)}`, opts.concat({
+ method: 'DELETE',
+ scope
+ }))
+ })
+}
+
+cmd.add = (user, entity, opts) => {
+ opts = TeamConfig(opts)
+ return pwrap(opts, () => {
+ const {scope, team} = splitEntity(entity)
+ validate('SSO', [scope, team, opts])
+ return npmFetch.json(`/-/team/${eu(scope)}/${eu(team)}/user`, opts.concat({
+ method: 'PUT',
+ scope,
+ body: {user}
+ }))
+ })
+}
+
+cmd.rm = (user, entity, opts) => {
+ opts = TeamConfig(opts)
+ return pwrap(opts, () => {
+ const {scope, team} = splitEntity(entity)
+ validate('SSO', [scope, team, opts])
+ return npmFetch.json(`/-/team/${eu(scope)}/${eu(team)}/user`, opts.concat({
+ method: 'DELETE',
+ scope,
+ body: {user}
+ }))
+ })
+}
+
+cmd.lsTeams = (scope, opts) => {
+ opts = TeamConfig(opts)
+ return pwrap(opts, () => getStream.array(cmd.lsTeams.stream(scope, opts)))
+}
+cmd.lsTeams.stream = (scope, opts) => {
+ opts = TeamConfig(opts)
+ validate('SO', [scope, opts])
+ return npmFetch.json.stream(`/-/org/${eu(scope)}/team`, '.*', opts.concat({
+ query: {format: 'cli'}
+ }))
+}
+
+cmd.lsUsers = (entity, opts) => {
+ opts = TeamConfig(opts)
+ return pwrap(opts, () => getStream.array(cmd.lsUsers.stream(entity, opts)))
+}
+cmd.lsUsers.stream = (entity, opts) => {
+ opts = TeamConfig(opts)
+ const {scope, team} = splitEntity(entity)
+ validate('SSO', [scope, team, opts])
+ const uri = `/-/team/${eu(scope)}/${eu(team)}/user`
+ return npmFetch.json.stream(uri, '.*', opts.concat({
+ query: {format: 'cli'}
+ }))
+}
+
+cmd.edit = () => {
+ throw new Error('edit is not implemented yet')
+}
+
+function splitEntity (entity = '') {
+ let [, scope, team] = entity.match(/^@?([^:]+):(.*)$/) || []
+ return {scope, team}
+}
+
+function pwrap (opts, fn) {
+ return new opts.Promise((resolve, reject) => {
+ fn().then(resolve, reject)
+ })
+}
diff --git a/deps/npm/node_modules/libnpmteam/node_modules/aproba/CHANGELOG.md b/deps/npm/node_modules/libnpmteam/node_modules/aproba/CHANGELOG.md
new file mode 100644
index 0000000000..bab30ecb7e
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/node_modules/aproba/CHANGELOG.md
@@ -0,0 +1,4 @@
+2.0.0
+ * Drop support for 0.10 and 0.12. They haven't been in travis but still,
+ since we _know_ we'll break with them now it's only polite to do a
+ major bump.
diff --git a/deps/npm/node_modules/libnpmteam/node_modules/aproba/LICENSE b/deps/npm/node_modules/libnpmteam/node_modules/aproba/LICENSE
new file mode 100644
index 0000000000..2a4982dc40
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/node_modules/aproba/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libnpmteam/node_modules/aproba/README.md b/deps/npm/node_modules/libnpmteam/node_modules/aproba/README.md
new file mode 100644
index 0000000000..e94799201c
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/node_modules/aproba/README.md
@@ -0,0 +1,93 @@
+aproba
+======
+
+A ridiculously light-weight function argument validator
+
+```
+var validate = require("aproba")
+
+function myfunc(a, b, c) {
+ // `a` must be a string, `b` a number, `c` a function
+ validate('SNF', arguments) // [a,b,c] is also valid
+}
+
+myfunc('test', 23, function () {}) // ok
+myfunc(123, 23, function () {}) // type error
+myfunc('test', 23) // missing arg error
+myfunc('test', 23, function () {}, true) // too many args error
+
+```
+
+Valid types are:
+
+| type | description
+| :--: | :----------
+| * | matches any type
+| A | `Array.isArray` OR an `arguments` object
+| S | typeof == string
+| N | typeof == number
+| F | typeof == function
+| O | typeof == object and not type A and not type E
+| B | typeof == boolean
+| E | `instanceof Error` OR `null` **(special: see below)**
+| Z | == `null`
+
+Validation failures throw one of three exception types, distinguished by a
+`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
+
+If you pass in an invalid type then it will throw with a code of
+`EUNKNOWNTYPE`.
+
+If an **error** argument is found and is not null then the remaining
+arguments are optional. That is, if you say `ESO` then that's like using a
+non-magical `E` in: `E|ESO|ZSO`.
+
+### But I have optional arguments?!
+
+You can provide more than one signature by separating them with pipes `|`.
+If any signature matches the arguments then they'll be considered valid.
+
+So for example, say you wanted to write a signature for
+`fs.createWriteStream`. The docs for it describe it thusly:
+
+```
+fs.createWriteStream(path[, options])
+```
+
+This would be a signature of `SO|S`. That is, a string and and object, or
+just a string.
+
+Now, if you read the full `fs` docs, you'll see that actually path can ALSO
+be a buffer. And options can be a string, that is:
+```
+path <String> | <Buffer>
+options <String> | <Object>
+```
+
+To reproduce this you have to fully enumerate all of the possible
+combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
+awkwardness is a feature: It reminds you of the complexity you're adding to
+your API when you do this sort of thing.
+
+
+### Browser support
+
+This has no dependencies and should work in browsers, though you'll have
+noisier stack traces.
+
+### Why this exists
+
+I wanted a very simple argument validator. It needed to do two things:
+
+1. Be more concise and easier to use than assertions
+
+2. Not encourage an infinite bikeshed of DSLs
+
+This is why types are specified by a single character and there's no such
+thing as an optional argument.
+
+This is not intended to validate user data. This is specifically about
+asserting the interface of your functions.
+
+If you need greater validation, I encourage you to write them by hand or
+look elsewhere.
diff --git a/deps/npm/node_modules/libnpmteam/node_modules/aproba/index.js b/deps/npm/node_modules/libnpmteam/node_modules/aproba/index.js
new file mode 100644
index 0000000000..fd947481ba
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/node_modules/aproba/index.js
@@ -0,0 +1,105 @@
+'use strict'
+module.exports = validate
+
+function isArguments (thingy) {
+ return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
+}
+
+const types = {
+ '*': {label: 'any', check: () => true},
+ A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)},
+ S: {label: 'string', check: _ => typeof _ === 'string'},
+ N: {label: 'number', check: _ => typeof _ === 'number'},
+ F: {label: 'function', check: _ => typeof _ === 'function'},
+ O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)},
+ B: {label: 'boolean', check: _ => typeof _ === 'boolean'},
+ E: {label: 'error', check: _ => _ instanceof Error},
+ Z: {label: 'null', check: _ => _ == null}
+}
+
+function addSchema (schema, arity) {
+ const group = arity[schema.length] = arity[schema.length] || []
+ if (group.indexOf(schema) === -1) group.push(schema)
+}
+
+function validate (rawSchemas, args) {
+ if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
+ if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
+ if (!args) throw missingRequiredArg(1, 'args')
+ if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
+ if (!types.A.check(args)) throw invalidType(1, ['array'], args)
+ const schemas = rawSchemas.split('|')
+ const arity = {}
+
+ schemas.forEach(schema => {
+ for (let ii = 0; ii < schema.length; ++ii) {
+ const type = schema[ii]
+ if (!types[type]) throw unknownType(ii, type)
+ }
+ if (/E.*E/.test(schema)) throw moreThanOneError(schema)
+ addSchema(schema, arity)
+ if (/E/.test(schema)) {
+ addSchema(schema.replace(/E.*$/, 'E'), arity)
+ addSchema(schema.replace(/E/, 'Z'), arity)
+ if (schema.length === 1) addSchema('', arity)
+ }
+ })
+ let matching = arity[args.length]
+ if (!matching) {
+ throw wrongNumberOfArgs(Object.keys(arity), args.length)
+ }
+ for (let ii = 0; ii < args.length; ++ii) {
+ let newMatching = matching.filter(schema => {
+ const type = schema[ii]
+ const typeCheck = types[type].check
+ return typeCheck(args[ii])
+ })
+ if (!newMatching.length) {
+ const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null)
+ throw invalidType(ii, labels, args[ii])
+ }
+ matching = newMatching
+ }
+}
+
+function missingRequiredArg (num) {
+ return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
+}
+
+function unknownType (num, type) {
+ return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
+}
+
+function invalidType (num, expectedTypes, value) {
+ let valueType
+ Object.keys(types).forEach(typeCode => {
+ if (types[typeCode].check(value)) valueType = types[typeCode].label
+ })
+ return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
+ englishList(expectedTypes) + ' but got ' + valueType)
+}
+
+function englishList (list) {
+ return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
+}
+
+function wrongNumberOfArgs (expected, got) {
+ const english = englishList(expected)
+ const args = expected.every(ex => ex.length === 1)
+ ? 'argument'
+ : 'arguments'
+ return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
+}
+
+function moreThanOneError (schema) {
+ return newException('ETOOMANYERRORTYPES',
+ 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
+}
+
+function newException (code, msg) {
+ const err = new Error(msg)
+ err.code = code
+ /* istanbul ignore else */
+ if (Error.captureStackTrace) Error.captureStackTrace(err, validate)
+ return err
+}
diff --git a/deps/npm/node_modules/libnpmteam/node_modules/aproba/package.json b/deps/npm/node_modules/libnpmteam/node_modules/aproba/package.json
new file mode 100644
index 0000000000..d941c6159f
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/node_modules/aproba/package.json
@@ -0,0 +1,66 @@
+{
+ "_args": [
+ [
+ "aproba@2.0.0",
+ "/Users/zkat/Documents/code/work/npm"
+ ]
+ ],
+ "_from": "aproba@2.0.0",
+ "_id": "aproba@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
+ "_location": "/libnpmteam/aproba",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "aproba@2.0.0",
+ "name": "aproba",
+ "escapedName": "aproba",
+ "rawSpec": "2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "2.0.0"
+ },
+ "_requiredBy": [
+ "/libnpmteam"
+ ],
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
+ "_spec": "2.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/aproba/issues"
+ },
+ "dependencies": {},
+ "description": "A ridiculously light-weight argument validator (now browser friendly)",
+ "devDependencies": {
+ "standard": "^11.0.1",
+ "tap": "^12.0.1"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/iarna/aproba",
+ "keywords": [
+ "argument",
+ "validate"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "aproba",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/aproba.git"
+ },
+ "scripts": {
+ "pretest": "standard",
+ "test": "tap --100 -J test/*.js"
+ },
+ "version": "2.0.0"
+}
diff --git a/deps/npm/node_modules/libnpmteam/package.json b/deps/npm/node_modules/libnpmteam/package.json
new file mode 100644
index 0000000000..8b9fcd60ea
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/package.json
@@ -0,0 +1,69 @@
+{
+ "_args": [
+ [
+ "libnpmteam@1.0.1",
+ "/Users/zkat/Documents/code/work/npm"
+ ]
+ ],
+ "_from": "libnpmteam@1.0.1",
+ "_id": "libnpmteam@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-gDdrflKFCX7TNwOMX1snWojCoDE5LoRWcfOC0C/fqF7mBq8Uz9zWAX4B2RllYETNO7pBupBaSyBDkTAC15cAMg==",
+ "_location": "/libnpmteam",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "libnpmteam@1.0.1",
+ "name": "libnpmteam",
+ "escapedName": "libnpmteam",
+ "rawSpec": "1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "1.0.1"
+ },
+ "_requiredBy": [
+ "/libnpm"
+ ],
+ "_resolved": "https://registry.npmjs.org/libnpmteam/-/libnpmteam-1.0.1.tgz",
+ "_spec": "1.0.1",
+ "_where": "/Users/zkat/Documents/code/work/npm",
+ "author": {
+ "name": "Kat Marchán",
+ "email": "kzm@zkat.tech"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/libnpmteam/issues"
+ },
+ "dependencies": {
+ "aproba": "^2.0.0",
+ "figgy-pudding": "^3.4.1",
+ "get-stream": "^4.0.0",
+ "npm-registry-fetch": "^3.8.0"
+ },
+ "description": "npm Team management APIs",
+ "devDependencies": {
+ "nock": "^9.6.1",
+ "standard": "*",
+ "standard-version": "*",
+ "tap": "*",
+ "weallbehave": "*",
+ "weallcontribute": "*"
+ },
+ "homepage": "https://npmjs.com/package/libnpmteam",
+ "license": "ISC",
+ "name": "libnpmteam",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/libnpmteam.git"
+ },
+ "scripts": {
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap -J --100 test/*.js",
+ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
+ "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ },
+ "version": "1.0.1"
+}
diff --git a/deps/npm/node_modules/libnpmteam/test/index.js b/deps/npm/node_modules/libnpmteam/test/index.js
new file mode 100644
index 0000000000..2271c28840
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/test/index.js
@@ -0,0 +1,138 @@
+'use strict'
+
+const figgyPudding = require('figgy-pudding')
+const getStream = require('get-stream')
+const {test} = require('tap')
+const tnock = require('./util/tnock.js')
+
+const team = require('../index.js')
+
+const REG = 'http://localhost:1337'
+const OPTS = figgyPudding({})({
+ registry: REG
+})
+
+test('create', t => {
+ tnock(t, REG).put(
+ '/-/org/foo/team', {name: 'cli'}
+ ).reply(201, {name: 'cli'})
+ return team.create('@foo:cli', OPTS).then(ret => {
+ t.deepEqual(ret, {name: 'cli'}, 'request succeeded')
+ })
+})
+
+test('create bad entity name', t => {
+ return team.create('go away', OPTS).then(
+ () => { throw new Error('should not succeed') },
+ err => { t.ok(err, 'error on bad entity name') }
+ )
+})
+
+test('create empty entity', t => {
+ return team.create(undefined, OPTS).then(
+ () => { throw new Error('should not succeed') },
+ err => { t.ok(err, 'error on bad entity name') }
+ )
+})
+
+test('create w/ description', t => {
+ tnock(t, REG).put('/-/org/foo/team', {
+ name: 'cli',
+ description: 'just some cool folx'
+ }).reply(201, {name: 'cli'})
+ return team.create('@foo:cli', OPTS.concat({
+ description: 'just some cool folx'
+ })).then(ret => {
+ t.deepEqual(ret, {name: 'cli'}, 'no desc in return')
+ })
+})
+
+test('destroy', t => {
+ tnock(t, REG).delete(
+ '/-/team/foo/cli'
+ ).reply(204, {})
+ return team.destroy('@foo:cli', OPTS).then(ret => {
+ t.deepEqual(ret, {}, 'request succeeded')
+ })
+})
+
+test('add', t => {
+ tnock(t, REG).put(
+ '/-/team/foo/cli/user', {user: 'zkat'}
+ ).reply(201, {})
+ return team.add('zkat', '@foo:cli', OPTS).then(ret => {
+ t.deepEqual(ret, {}, 'request succeeded')
+ })
+})
+
+test('rm', t => {
+ tnock(t, REG).delete(
+ '/-/team/foo/cli/user', {user: 'zkat'}
+ ).reply(204, {})
+ return team.rm('zkat', '@foo:cli', OPTS).then(ret => {
+ t.deepEqual(ret, {}, 'request succeeded')
+ })
+})
+
+test('lsTeams', t => {
+ tnock(t, REG).get(
+ '/-/org/foo/team?format=cli'
+ ).reply(200, ['foo:bar', 'foo:cli'])
+ return team.lsTeams('foo', OPTS).then(ret => {
+ t.deepEqual(ret, ['foo:bar', 'foo:cli'], 'got teams')
+ })
+})
+
+test('lsTeams error', t => {
+ tnock(t, REG).get(
+ '/-/org/foo/team?format=cli'
+ ).reply(500)
+ return team.lsTeams('foo', OPTS).then(
+ () => { throw new Error('should not succeed') },
+ err => { t.equal(err.code, 'E500', 'got error code') }
+ )
+})
+
+test('lsTeams.stream', t => {
+ tnock(t, REG).get(
+ '/-/org/foo/team?format=cli'
+ ).reply(200, ['foo:bar', 'foo:cli'])
+ return getStream.array(team.lsTeams.stream('foo', OPTS)).then(ret => {
+ t.deepEqual(ret, ['foo:bar', 'foo:cli'], 'got teams')
+ })
+})
+
+test('lsUsers', t => {
+ tnock(t, REG).get(
+ '/-/team/foo/cli/user?format=cli'
+ ).reply(500)
+ return team.lsUsers('@foo:cli', OPTS).then(
+ () => { throw new Error('should not succeed') },
+ err => { t.equal(err.code, 'E500', 'got error code') }
+ )
+})
+
+test('lsUsers error', t => {
+ tnock(t, REG).get(
+ '/-/team/foo/cli/user?format=cli'
+ ).reply(200, ['iarna', 'zkat'])
+ return team.lsUsers('@foo:cli', OPTS).then(ret => {
+ t.deepEqual(ret, ['iarna', 'zkat'], 'got team members')
+ })
+})
+
+test('lsUsers.stream', t => {
+ tnock(t, REG).get(
+ '/-/team/foo/cli/user?format=cli'
+ ).reply(200, ['iarna', 'zkat'])
+ return getStream.array(team.lsUsers.stream('@foo:cli', OPTS)).then(ret => {
+ t.deepEqual(ret, ['iarna', 'zkat'], 'got team members')
+ })
+})
+
+test('edit', t => {
+ t.throws(() => {
+ team.edit()
+ }, /not implemented/)
+ t.done()
+})
diff --git a/deps/npm/node_modules/libnpmteam/test/util/tnock.js b/deps/npm/node_modules/libnpmteam/test/util/tnock.js
new file mode 100644
index 0000000000..00b6e160e1
--- /dev/null
+++ b/deps/npm/node_modules/libnpmteam/test/util/tnock.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const nock = require('nock')
+
+module.exports = tnock
+function tnock (t, host) {
+ const server = nock(host)
+ t.tearDown(function () {
+ server.done()
+ })
+ return server
+}
diff --git a/deps/npm/node_modules/lru-cache/index.js b/deps/npm/node_modules/lru-cache/index.js
index 3f047f8ca7..bd35b53589 100644
--- a/deps/npm/node_modules/lru-cache/index.js
+++ b/deps/npm/node_modules/lru-cache/index.js
@@ -11,7 +11,7 @@ var util = require('util')
var Yallist = require('yallist')
// use symbols if possible, otherwise just _props
-var hasSymbol = typeof Symbol === 'function'
+var hasSymbol = typeof Symbol === 'function' && process.env._nodeLRUCacheForceNoSymbol !== '1'
var makeSymbol
if (hasSymbol) {
makeSymbol = function (key) {
@@ -221,6 +221,7 @@ LRUCache.prototype.dumpLru = function () {
return this[LRU_LIST]
}
+/* istanbul ignore next */
LRUCache.prototype.inspect = function (n, opts) {
var str = 'LRUCache {'
var extras = false
@@ -434,7 +435,7 @@ function isStale (self, hit) {
function trim (self) {
if (self[LENGTH] > self[MAX]) {
for (var walker = self[LRU_LIST].tail;
- self[LENGTH] > self[MAX] && walker !== null;) {
+ self[LENGTH] > self[MAX] && walker !== null;) {
// We know that we're about to delete this one, and also
// what the next least recently used key will be, so just
// go ahead and set it now.
diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json
index 238a6894e9..14760df465 100644
--- a/deps/npm/node_modules/lru-cache/package.json
+++ b/deps/npm/node_modules/lru-cache/package.json
@@ -1,43 +1,32 @@
{
- "_args": [
- [
- "lru-cache@4.1.3",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "lru-cache@4.1.3",
- "_id": "lru-cache@4.1.3",
+ "_from": "lru-cache@4.1.5",
+ "_id": "lru-cache@4.1.5",
"_inBundle": false,
- "_integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==",
+ "_integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"_location": "/lru-cache",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "lru-cache@4.1.3",
+ "raw": "lru-cache@4.1.5",
"name": "lru-cache",
"escapedName": "lru-cache",
- "rawSpec": "4.1.3",
+ "rawSpec": "4.1.5",
"saveSpec": null,
- "fetchSpec": "4.1.3"
+ "fetchSpec": "4.1.5"
},
"_requiredBy": [
+ "#USER",
"/",
- "/cacache",
"/cross-spawn",
"/foreground-child/cross-spawn",
- "/libnpmhook/npm-registry-fetch",
"/make-fetch-happen",
- "/npm-profile/cacache",
- "/npm-profile/make-fetch-happen",
- "/npm-registry-fetch",
- "/npm-registry-fetch/cacache",
- "/npm-registry-fetch/make-fetch-happen",
- "/pacote"
+ "/npm-registry-fetch"
],
- "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz",
- "_spec": "4.1.3",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
+ "_shasum": "8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd",
+ "_spec": "lru-cache@4.1.5",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me"
@@ -45,15 +34,17 @@
"bugs": {
"url": "https://github.com/isaacs/node-lru-cache/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
},
+ "deprecated": false,
"description": "A cache object that deletes the least-recently-used items.",
"devDependencies": {
"benchmark": "^2.1.4",
- "standard": "^5.4.1",
- "tap": "^11.1.4"
+ "standard": "^12.0.1",
+ "tap": "^12.1.0"
},
"files": [
"index.js"
@@ -72,11 +63,14 @@
"url": "git://github.com/isaacs/node-lru-cache.git"
},
"scripts": {
+ "coveragerport": "tap --coverage-report=html",
+ "lintfix": "standard --fix test/*.js index.js",
"postpublish": "git push origin --all; git push origin --tags",
"posttest": "standard test/*.js index.js",
- "postversion": "npm publish",
+ "postversion": "npm publish --tag=legacy",
"preversion": "npm test",
+ "snap": "TAP_SNAPSHOT=1 tap test/*.js -J",
"test": "tap test/*.js --100 -J"
},
- "version": "4.1.3"
+ "version": "4.1.5"
}
diff --git a/deps/npm/node_modules/move-concurrently/node_modules/aproba/LICENSE b/deps/npm/node_modules/move-concurrently/node_modules/aproba/LICENSE
new file mode 100644
index 0000000000..2a4982dc40
--- /dev/null
+++ b/deps/npm/node_modules/move-concurrently/node_modules/aproba/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/move-concurrently/node_modules/aproba/README.md b/deps/npm/node_modules/move-concurrently/node_modules/aproba/README.md
new file mode 100644
index 0000000000..e94799201c
--- /dev/null
+++ b/deps/npm/node_modules/move-concurrently/node_modules/aproba/README.md
@@ -0,0 +1,93 @@
+aproba
+======
+
+A ridiculously light-weight function argument validator
+
+```
+var validate = require("aproba")
+
+function myfunc(a, b, c) {
+ // `a` must be a string, `b` a number, `c` a function
+ validate('SNF', arguments) // [a,b,c] is also valid
+}
+
+myfunc('test', 23, function () {}) // ok
+myfunc(123, 23, function () {}) // type error
+myfunc('test', 23) // missing arg error
+myfunc('test', 23, function () {}, true) // too many args error
+
+```
+
+Valid types are:
+
+| type | description
+| :--: | :----------
+| * | matches any type
+| A | `Array.isArray` OR an `arguments` object
+| S | typeof == string
+| N | typeof == number
+| F | typeof == function
+| O | typeof == object and not type A and not type E
+| B | typeof == boolean
+| E | `instanceof Error` OR `null` **(special: see below)**
+| Z | == `null`
+
+Validation failures throw one of three exception types, distinguished by a
+`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
+
+If you pass in an invalid type then it will throw with a code of
+`EUNKNOWNTYPE`.
+
+If an **error** argument is found and is not null then the remaining
+arguments are optional. That is, if you say `ESO` then that's like using a
+non-magical `E` in: `E|ESO|ZSO`.
+
+### But I have optional arguments?!
+
+You can provide more than one signature by separating them with pipes `|`.
+If any signature matches the arguments then they'll be considered valid.
+
+So for example, say you wanted to write a signature for
+`fs.createWriteStream`. The docs for it describe it thusly:
+
+```
+fs.createWriteStream(path[, options])
+```
+
+This would be a signature of `SO|S`. That is, a string and and object, or
+just a string.
+
+Now, if you read the full `fs` docs, you'll see that actually path can ALSO
+be a buffer. And options can be a string, that is:
+```
+path <String> | <Buffer>
+options <String> | <Object>
+```
+
+To reproduce this you have to fully enumerate all of the possible
+combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
+awkwardness is a feature: It reminds you of the complexity you're adding to
+your API when you do this sort of thing.
+
+
+### Browser support
+
+This has no dependencies and should work in browsers, though you'll have
+noisier stack traces.
+
+### Why this exists
+
+I wanted a very simple argument validator. It needed to do two things:
+
+1. Be more concise and easier to use than assertions
+
+2. Not encourage an infinite bikeshed of DSLs
+
+This is why types are specified by a single character and there's no such
+thing as an optional argument.
+
+This is not intended to validate user data. This is specifically about
+asserting the interface of your functions.
+
+If you need greater validation, I encourage you to write them by hand or
+look elsewhere.
diff --git a/deps/npm/node_modules/move-concurrently/node_modules/aproba/index.js b/deps/npm/node_modules/move-concurrently/node_modules/aproba/index.js
new file mode 100644
index 0000000000..6f3f797c09
--- /dev/null
+++ b/deps/npm/node_modules/move-concurrently/node_modules/aproba/index.js
@@ -0,0 +1,105 @@
+'use strict'
+
+function isArguments (thingy) {
+ return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
+}
+
+var types = {
+ '*': {label: 'any', check: function () { return true }},
+ A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
+ S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
+ N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
+ F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
+ O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
+ B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
+ E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
+ Z: {label: 'null', check: function (thingy) { return thingy == null }}
+}
+
+function addSchema (schema, arity) {
+ var group = arity[schema.length] = arity[schema.length] || []
+ if (group.indexOf(schema) === -1) group.push(schema)
+}
+
+var validate = module.exports = function (rawSchemas, args) {
+ if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
+ if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
+ if (!args) throw missingRequiredArg(1, 'args')
+ if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
+ if (!types.A.check(args)) throw invalidType(1, ['array'], args)
+ var schemas = rawSchemas.split('|')
+ var arity = {}
+
+ schemas.forEach(function (schema) {
+ for (var ii = 0; ii < schema.length; ++ii) {
+ var type = schema[ii]
+ if (!types[type]) throw unknownType(ii, type)
+ }
+ if (/E.*E/.test(schema)) throw moreThanOneError(schema)
+ addSchema(schema, arity)
+ if (/E/.test(schema)) {
+ addSchema(schema.replace(/E.*$/, 'E'), arity)
+ addSchema(schema.replace(/E/, 'Z'), arity)
+ if (schema.length === 1) addSchema('', arity)
+ }
+ })
+ var matching = arity[args.length]
+ if (!matching) {
+ throw wrongNumberOfArgs(Object.keys(arity), args.length)
+ }
+ for (var ii = 0; ii < args.length; ++ii) {
+ var newMatching = matching.filter(function (schema) {
+ var type = schema[ii]
+ var typeCheck = types[type].check
+ return typeCheck(args[ii])
+ })
+ if (!newMatching.length) {
+ var labels = matching.map(function (schema) {
+ return types[schema[ii]].label
+ }).filter(function (schema) { return schema != null })
+ throw invalidType(ii, labels, args[ii])
+ }
+ matching = newMatching
+ }
+}
+
+function missingRequiredArg (num) {
+ return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
+}
+
+function unknownType (num, type) {
+ return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
+}
+
+function invalidType (num, expectedTypes, value) {
+ var valueType
+ Object.keys(types).forEach(function (typeCode) {
+ if (types[typeCode].check(value)) valueType = types[typeCode].label
+ })
+ return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
+ englishList(expectedTypes) + ' but got ' + valueType)
+}
+
+function englishList (list) {
+ return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
+}
+
+function wrongNumberOfArgs (expected, got) {
+ var english = englishList(expected)
+ var args = expected.every(function (ex) { return ex.length === 1 })
+ ? 'argument'
+ : 'arguments'
+ return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
+}
+
+function moreThanOneError (schema) {
+ return newException('ETOOMANYERRORTYPES',
+ 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
+}
+
+function newException (code, msg) {
+ var e = new Error(msg)
+ e.code = code
+ if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
+ return e
+}
diff --git a/deps/npm/node_modules/move-concurrently/node_modules/aproba/package.json b/deps/npm/node_modules/move-concurrently/node_modules/aproba/package.json
new file mode 100644
index 0000000000..eba0d3e6ea
--- /dev/null
+++ b/deps/npm/node_modules/move-concurrently/node_modules/aproba/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "aproba@^1.1.1",
+ "_id": "aproba@1.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "_location": "/move-concurrently/aproba",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "aproba@^1.1.1",
+ "name": "aproba",
+ "escapedName": "aproba",
+ "rawSpec": "^1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.1"
+ },
+ "_requiredBy": [
+ "/move-concurrently"
+ ],
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
+ "_spec": "aproba@^1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/move-concurrently",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/aproba/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "A ridiculously light-weight argument validator (now browser friendly)",
+ "devDependencies": {
+ "standard": "^10.0.3",
+ "tap": "^10.0.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/iarna/aproba",
+ "keywords": [
+ "argument",
+ "validate"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "aproba",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/aproba.git"
+ },
+ "scripts": {
+ "test": "standard && tap -j3 test/*.js"
+ },
+ "version": "1.2.0"
+}
diff --git a/deps/npm/node_modules/npm-audit-report/CHANGELOG.md b/deps/npm/node_modules/npm-audit-report/CHANGELOG.md
index 4cf6a1acda..941a18741b 100644
--- a/deps/npm/node_modules/npm-audit-report/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-audit-report/CHANGELOG.md
@@ -2,6 +2,18 @@
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="1.3.2"></a>
+## [1.3.2](https://github.com/npm/npm-audit-report/compare/v1.3.1...v1.3.2) (2018-12-18)
+
+
+### Bug Fixes
+
+* **parseable:** add support for critical vulns and more resolves on update/install action ([#28](https://github.com/npm/npm-audit-report/issues/28)) ([5e27893](https://github.com/npm/npm-audit-report/commit/5e27893))
+* **security:** audit fix ([ff9faf3](https://github.com/npm/npm-audit-report/commit/ff9faf3))
+* **urls:** Replace hardcoded URL to advisory with a URL from audit response ([#34](https://github.com/npm/npm-audit-report/issues/34)) ([e2fe95b](https://github.com/npm/npm-audit-report/commit/e2fe95b))
+
+
+
<a name="1.3.1"></a>
## [1.3.1](https://github.com/npm/npm-audit-report/compare/v1.3.0...v1.3.1) (2018-07-10)
diff --git a/deps/npm/node_modules/npm-audit-report/package.json b/deps/npm/node_modules/npm-audit-report/package.json
index 0f76601e27..905c0ce33d 100644
--- a/deps/npm/node_modules/npm-audit-report/package.json
+++ b/deps/npm/node_modules/npm-audit-report/package.json
@@ -1,27 +1,27 @@
{
- "_from": "npm-audit-report@^1.2.1",
- "_id": "npm-audit-report@1.3.1",
+ "_from": "npm-audit-report@1.3.2",
+ "_id": "npm-audit-report@1.3.2",
"_inBundle": false,
- "_integrity": "sha512-SjTF8ZP4rOu3JiFrTMi4M1CmVo2tni2sP4TzhyCMHwnMGf6XkdGLZKt9cdZ12esKf0mbQqFyU9LtY0SoeahL7g==",
+ "_integrity": "sha512-abeqS5ONyXNaZJPGAf6TOUMNdSe1Y6cpc9MLBRn+CuUoYbfdca6AxOyXVlfIv9OgKX+cacblbG5w7A6ccwoTPw==",
"_location": "/npm-audit-report",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "npm-audit-report@^1.2.1",
+ "raw": "npm-audit-report@1.3.2",
"name": "npm-audit-report",
"escapedName": "npm-audit-report",
- "rawSpec": "^1.2.1",
+ "rawSpec": "1.3.2",
"saveSpec": null,
- "fetchSpec": "^1.2.1"
+ "fetchSpec": "1.3.2"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.1.tgz",
- "_shasum": "e79ea1fcb5ffaf3031102b389d5222c2b0459632",
- "_spec": "npm-audit-report@^1.2.1",
+ "_resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.2.tgz",
+ "_shasum": "303bc78cd9e4c226415076a4f7e528c89fc77018",
+ "_spec": "npm-audit-report@1.3.2",
"_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Adam Baldwin"
@@ -76,5 +76,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "1.3.1"
+ "version": "1.3.2"
}
diff --git a/deps/npm/node_modules/npm-audit-report/reporters/detail.js b/deps/npm/node_modules/npm-audit-report/reporters/detail.js
index 2cbb8fea50..f6e822eb7a 100644
--- a/deps/npm/node_modules/npm-audit-report/reporters/detail.js
+++ b/deps/npm/node_modules/npm-audit-report/reporters/detail.js
@@ -117,7 +117,7 @@ const report = function (data, options) {
{'Package': advisory.module_name},
{'Dependency of': `${resolution.path.split('>')[0]} ${resolution.dev ? '[dev]' : ''}`},
{'Path': `${resolution.path.split('>').join(Utils.color(' > ', 'grey', config.withColor))}`},
- {'More info': `https://nodesecurity.io/advisories/${advisory.id}`}
+ {'More info': advisory.url || `https://www.npmjs.com/advisories/${advisory.id}`}
)
log(table.toString() + '\n\n')
@@ -160,7 +160,7 @@ const report = function (data, options) {
{'Patched in': patchedIn},
{'Dependency of': `${resolution.path.split('>')[0]} ${resolution.dev ? '[dev]' : ''}`},
{'Path': `${resolution.path.split('>').join(Utils.color(' > ', 'grey', config.withColor))}`},
- {'More info': `https://nodesecurity.io/advisories/${advisory.id}`}
+ {'More info': advisory.url || `https://www.npmjs.com/advisories/${advisory.id}`}
)
log(table.toString())
})
diff --git a/deps/npm/node_modules/npm-audit-report/reporters/parseable.js b/deps/npm/node_modules/npm-audit-report/reporters/parseable.js
index 3633597729..1d46ef2271 100644
--- a/deps/npm/node_modules/npm-audit-report/reporters/parseable.js
+++ b/deps/npm/node_modules/npm-audit-report/reporters/parseable.js
@@ -11,6 +11,7 @@ const report = function (data, options) {
const actions = function (data, config) {
let accumulator = {
+ critical: '',
high: '',
moderate: '',
low: ''
@@ -25,16 +26,18 @@ const report = function (data, options) {
l.recommendation = recommendation.cmd
l.breaking = recommendation.isBreaking ? 'Y' : 'N'
- // TODO: Verify: The advisory seems to repeat and be the same for all the 'resolves'. Is it true?
- const advisory = data.advisories[action.resolves[0].id]
- l.sevLevel = advisory.severity
- l.severity = advisory.title
- l.package = advisory.module_name
- l.moreInfo = `https://nodesecurity.io/advisories/${advisory.id}`
- l.path = action.resolves[0].path
+ action.resolves.forEach((resolution) => {
+ const advisory = data.advisories[resolution.id]
+
+ l.sevLevel = advisory.severity
+ l.severity = advisory.title
+ l.package = advisory.module_name
+ l.moreInfo = advisory.url || `https://www.npmjs.com/advisories/${advisory.id}`
+ l.path = resolution.path
- accumulator[advisory.severity] += [action.action, l.package, l.sevLevel, l.recommendation, l.severity, l.moreInfo, l.path, l.breaking]
- .join('\t') + '\n'
+ accumulator[advisory.severity] += [action.action, l.package, l.sevLevel, l.recommendation, l.severity, l.moreInfo, l.path, l.breaking]
+ .join('\t') + '\n'
+ }) // forEach resolves
}
if (action.action === 'review') {
@@ -44,7 +47,7 @@ const report = function (data, options) {
l.sevLevel = advisory.severity
l.severity = advisory.title
l.package = advisory.module_name
- l.moreInfo = `https://nodesecurity.io/advisories/${advisory.id}`
+ l.moreInfo = advisory.url || `https://www.npmjs.com/advisories/${advisory.id}`
l.patchedIn = advisory.patched_versions.replace(' ', '') === '<0.0.0' ? 'No patch available' : advisory.patched_versions
l.path = resolution.path
@@ -53,7 +56,7 @@ const report = function (data, options) {
} // is review
}) // forEach actions
}
- return accumulator['high'] + accumulator['moderate'] + accumulator['low']
+ return accumulator['critical'] + accumulator['high'] + accumulator['moderate'] + accumulator['low']
}
const exitCode = function (metadata) {
diff --git a/deps/npm/node_modules/npm-packlist/index.js b/deps/npm/node_modules/npm-packlist/index.js
index 2cdd37ec3d..110a344cb0 100644
--- a/deps/npm/node_modules/npm-packlist/index.js
+++ b/deps/npm/node_modules/npm-packlist/index.js
@@ -57,7 +57,11 @@ const npmWalker = Class => class Walker extends Class {
opt.includeEmpty = false
opt.path = opt.path || process.cwd()
- opt.follow = path.basename(opt.path) === 'node_modules'
+ const dirName = path.basename(opt.path)
+ const parentName = path.basename(path.dirname(opt.path))
+ opt.follow =
+ dirName === 'node_modules' ||
+ (parentName === 'node_modules' && /^@/.test(dirName))
super(opt)
// ignore a bunch of things by default at the root level.
diff --git a/deps/npm/node_modules/npm-packlist/package.json b/deps/npm/node_modules/npm-packlist/package.json
index f1188c393f..d37a7bd1bb 100644
--- a/deps/npm/node_modules/npm-packlist/package.json
+++ b/deps/npm/node_modules/npm-packlist/package.json
@@ -1,29 +1,29 @@
{
- "_from": "npm-packlist@1.1.12",
- "_id": "npm-packlist@1.1.12",
+ "_from": "npm-packlist@1.2.0",
+ "_id": "npm-packlist@1.2.0",
"_inBundle": false,
- "_integrity": "sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g==",
+ "_integrity": "sha512-7Mni4Z8Xkx0/oegoqlcao/JpPCPEMtUvsmB0q7mgvlMinykJLSRTYuFqoQLYgGY8biuxIeiHO+QNJKbCfljewQ==",
"_location": "/npm-packlist",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-packlist@1.1.12",
+ "raw": "npm-packlist@1.2.0",
"name": "npm-packlist",
"escapedName": "npm-packlist",
- "rawSpec": "1.1.12",
+ "rawSpec": "1.2.0",
"saveSpec": null,
- "fetchSpec": "1.1.12"
+ "fetchSpec": "1.2.0"
},
"_requiredBy": [
"#USER",
"/",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.12.tgz",
- "_shasum": "22bde2ebc12e72ca482abd67afc51eb49377243a",
- "_spec": "npm-packlist@1.1.12",
- "_where": "/Users/zkat/Documents/code/work/npm",
+ "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.2.0.tgz",
+ "_shasum": "55a60e793e272f00862c7089274439a4cc31fc7f",
+ "_spec": "npm-packlist@1.2.0",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -64,5 +64,5 @@
"preversion": "npm test",
"test": "tap test/*.js --100 -J"
},
- "version": "1.1.12"
+ "version": "1.2.0"
}
diff --git a/deps/npm/node_modules/npm-pick-manifest/CHANGELOG.md b/deps/npm/node_modules/npm-pick-manifest/CHANGELOG.md
index 5f53e8fce5..2112665f75 100644
--- a/deps/npm/node_modules/npm-pick-manifest/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-pick-manifest/CHANGELOG.md
@@ -2,6 +2,46 @@
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="2.2.3"></a>
+## [2.2.3](https://github.com/zkat/npm-pick-manifest/compare/v2.2.2...v2.2.3) (2018-10-31)
+
+
+### Bug Fixes
+
+* **enjoyBy:** rework semantics for enjoyBy again ([5e89b62](https://github.com/zkat/npm-pick-manifest/commit/5e89b62))
+
+
+
+<a name="2.2.2"></a>
+## [2.2.2](https://github.com/zkat/npm-pick-manifest/compare/v2.2.1...v2.2.2) (2018-10-31)
+
+
+### Bug Fixes
+
+* **enjoyBy:** rework semantics for enjoyBy ([5684f45](https://github.com/zkat/npm-pick-manifest/commit/5684f45))
+
+
+
+<a name="2.2.1"></a>
+## [2.2.1](https://github.com/zkat/npm-pick-manifest/compare/v2.2.0...v2.2.1) (2018-10-30)
+
+
+
+<a name="2.2.0"></a>
+# [2.2.0](https://github.com/zkat/npm-pick-manifest/compare/v2.1.0...v2.2.0) (2018-10-30)
+
+
+### Bug Fixes
+
+* **audit:** npm audit fix --force ([d5ae6c4](https://github.com/zkat/npm-pick-manifest/commit/d5ae6c4))
+
+
+### Features
+
+* **enjoyBy:** add opts.enjoyBy option to filter versions by date ([0b8a790](https://github.com/zkat/npm-pick-manifest/commit/0b8a790))
+
+
+
<a name="2.1.0"></a>
# [2.1.0](https://github.com/zkat/npm-pick-manifest/compare/v2.0.1...v2.1.0) (2017-10-18)
diff --git a/deps/npm/node_modules/npm-pick-manifest/README.md b/deps/npm/node_modules/npm-pick-manifest/README.md
index 206af2f317..a9a027bfcb 100644
--- a/deps/npm/node_modules/npm-pick-manifest/README.md
+++ b/deps/npm/node_modules/npm-pick-manifest/README.md
@@ -74,3 +74,11 @@ The function will throw `ETARGET` if there was no matching manifest, and
If `opts.defaultTag` is provided, it will be used instead of `latest`. That is,
if that tag matches the selector, it will be used, even if a higher available
version matches the range.
+
+If `opts.enjoyBy` is provided, it should be something that can be passed to `new
+Date(x)`, such as a `Date` object or a timestamp string. It will be used to
+filter the selected versions such that only versions less than or equal to
+`enjoyBy` are considered.
+
+If `opts.includeDeprecated` passed in as true, deprecated versions will be
+selected. By default, deprecated versions other than `defaultTag` are ignored.
diff --git a/deps/npm/node_modules/npm-pick-manifest/index.js b/deps/npm/node_modules/npm-pick-manifest/index.js
index 133b627234..d9a8373e57 100644
--- a/deps/npm/node_modules/npm-pick-manifest/index.js
+++ b/deps/npm/node_modules/npm-pick-manifest/index.js
@@ -1,19 +1,35 @@
'use strict'
+const figgyPudding = require('figgy-pudding')
const npa = require('npm-package-arg')
const semver = require('semver')
+const PickerOpts = figgyPudding({
+ defaultTag: { default: 'latest' },
+ enjoyBy: {},
+ includeDeprecated: { default: false }
+})
+
module.exports = pickManifest
function pickManifest (packument, wanted, opts) {
- opts = opts || {}
+ opts = PickerOpts(opts)
+ const time = opts.enjoyBy && packument.time && +(new Date(opts.enjoyBy))
const spec = npa.resolve(packument.name, wanted)
const type = spec.type
if (type === 'version' || type === 'range') {
wanted = semver.clean(wanted, true) || wanted
}
const distTags = packument['dist-tags'] || {}
- const versions = Object.keys(packument.versions || {}).filter(v => semver.valid(v, true))
- const undeprecated = versions.filter(v => !packument.versions[v].deprecated)
+ const versions = Object.keys(packument.versions || {}).filter(v => {
+ return semver.valid(v, true)
+ })
+
+ function enjoyableBy (v) {
+ return !time || (
+ packument.time[v] && time >= +(new Date(packument.time[v]))
+ )
+ }
+
let err
if (!versions.length) {
@@ -27,43 +43,69 @@ function pickManifest (packument, wanted, opts) {
let target
- if (type === 'tag') {
+ if (type === 'tag' && enjoyableBy(distTags[wanted])) {
target = distTags[wanted]
} else if (type === 'version') {
target = wanted
- } else if (type !== 'range') {
+ } else if (type !== 'range' && enjoyableBy(distTags[wanted])) {
throw new Error('Only tag, version, and range are supported')
}
- const tagVersion = distTags[opts.defaultTag || 'latest']
+ const tagVersion = distTags[opts.defaultTag]
if (
!target &&
tagVersion &&
packument.versions[tagVersion] &&
+ enjoyableBy(tagVersion) &&
semver.satisfies(tagVersion, wanted, true)
) {
target = tagVersion
}
if (!target && !opts.includeDeprecated) {
+ const undeprecated = versions.filter(v => !packument.versions[v].deprecated && enjoyableBy(v)
+ )
target = semver.maxSatisfying(undeprecated, wanted, true)
}
if (!target) {
- target = semver.maxSatisfying(versions, wanted, true)
+ const stillFresh = versions.filter(enjoyableBy)
+ target = semver.maxSatisfying(stillFresh, wanted, true)
}
- if (!target && wanted === '*') {
+ if (!target && wanted === '*' && enjoyableBy(tagVersion)) {
// This specific corner is meant for the case where
// someone is using `*` as a selector, but all versions
// are pre-releases, which don't match ranges at all.
target = tagVersion
}
- const manifest = target && packument.versions[target]
+ if (
+ !target &&
+ time &&
+ type === 'tag' &&
+ distTags[wanted] &&
+ !enjoyableBy(distTags[wanted])
+ ) {
+ const stillFresh = versions.filter(v =>
+ enjoyableBy(v) && semver.lte(v, distTags[wanted], true)
+ ).sort(semver.rcompare)
+ target = stillFresh[0]
+ }
+
+ const manifest = (
+ target &&
+ packument.versions[target]
+ )
if (!manifest) {
err = new Error(
- `No matching version found for ${packument.name}@${wanted}`
+ `No matching version found for ${packument.name}@${wanted}${
+ opts.enjoyBy
+ ? ` with an Enjoy By date of ${
+ new Date(opts.enjoyBy).toLocaleString()
+ }. Maybe try a different date?`
+ : ''
+ }`
)
err.code = 'ETARGET'
err.name = packument.name
diff --git a/deps/npm/node_modules/npm-pick-manifest/package.json b/deps/npm/node_modules/npm-pick-manifest/package.json
index 4cf8bf1a13..a80c76d372 100644
--- a/deps/npm/node_modules/npm-pick-manifest/package.json
+++ b/deps/npm/node_modules/npm-pick-manifest/package.json
@@ -1,33 +1,28 @@
{
- "_args": [
- [
- "npm-pick-manifest@2.1.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "npm-pick-manifest@2.1.0",
- "_id": "npm-pick-manifest@2.1.0",
+ "_from": "npm-pick-manifest@2.2.3",
+ "_id": "npm-pick-manifest@2.2.3",
"_inBundle": false,
- "_integrity": "sha512-q9zLP8cTr8xKPmMZN3naxp1k/NxVFsjxN6uWuO1tiw9gxg7wZWQ/b5UTfzD0ANw2q1lQxdLKTeCCksq+bPSgbQ==",
+ "_integrity": "sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==",
"_location": "/npm-pick-manifest",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-pick-manifest@2.1.0",
+ "raw": "npm-pick-manifest@2.2.3",
"name": "npm-pick-manifest",
"escapedName": "npm-pick-manifest",
- "rawSpec": "2.1.0",
+ "rawSpec": "2.2.3",
"saveSpec": null,
- "fetchSpec": "2.1.0"
+ "fetchSpec": "2.2.3"
},
"_requiredBy": [
- "/",
- "/pacote"
+ "#USER",
+ "/"
],
- "_resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.1.0.tgz",
- "_spec": "2.1.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz",
+ "_shasum": "32111d2a9562638bb2c8f2bf27f7f3092c8fae40",
+ "_spec": "npm-pick-manifest@2.2.3",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -35,6 +30,7 @@
"bugs": {
"url": "https://github.com/zkat/npm-pick-manifest/issues"
},
+ "bundleDependencies": false,
"config": {
"nyc": {
"exclude": [
@@ -44,15 +40,17 @@
}
},
"dependencies": {
+ "figgy-pudding": "^3.5.1",
"npm-package-arg": "^6.0.0",
"semver": "^5.4.1"
},
+ "deprecated": false,
"description": "Resolves a matching manifest from a package metadata document according to standard npm semver resolution rules.",
"devDependencies": {
- "nyc": "^11.2.1",
+ "nyc": "^13.1.0",
"standard": "^10.0.3",
- "standard-version": "^4.2.0",
- "tap": "^10.7.0",
+ "standard-version": "^4.4.0",
+ "tap": "^12.0.1",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
@@ -81,5 +79,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "2.1.0"
+ "version": "2.2.3"
}
diff --git a/deps/npm/node_modules/npm-profile/CHANGELOG.md b/deps/npm/node_modules/npm-profile/CHANGELOG.md
index cc36c38570..6d937580c3 100644
--- a/deps/npm/node_modules/npm-profile/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-profile/CHANGELOG.md
@@ -1,3 +1,14 @@
+# v4.0.1 (2018-08-29)
+
+- `opts.password` needs to be base64-encoded when passed in for login
+- Bump `npm-registry-fetch` dep because we depend on `opts.forceAuth`
+
+# v4.0.0 (2018-08-28)
+
+## BREAKING CHANGES:
+
+- Networking and auth-related options now use the latest [`npm-registry-fetch` config format](https://www.npmjs.com/package/npm-registry-fetch#fetch-opts).
+
# v3.0.2 (2018-06-07)
- Allow newer make-fetch-happen.
diff --git a/deps/npm/node_modules/npm-profile/README.md b/deps/npm/node_modules/npm-profile/README.md
index 1937e23f72..7a80a729e8 100644
--- a/deps/npm/node_modules/npm-profile/README.md
+++ b/deps/npm/node_modules/npm-profile/README.md
@@ -4,9 +4,8 @@ Provides functions for fetching and updating an npmjs.com profile.
```js
const profile = require('npm-profile')
-profile.get(registry, {token}).then(result => {
- // …
-})
+const result = await profile.get(registry, {token})
+//...
```
The API that this implements is documented here:
@@ -14,22 +13,37 @@ The API that this implements is documented here:
* [authentication](https://github.com/npm/registry/blob/master/docs/user/authentication.md)
* [profile editing](https://github.com/npm/registry/blob/master/docs/user/profile.md) (and two-factor authentication)
-## Functions
+## Table of Contents
+
+* [API](#api)
+ * Login and Account Creation
+ * [`adduser()`](#adduser)
+ * [`login()`](#login)
+ * [`adduserWeb()`](#adduser-web)
+ * [`loginWeb()`](#login-web)
+ * [`adduserCouch()`](#adduser-couch)
+ * [`loginCouch()`](#login-couch)
+ * Profile Data Management
+ * [`get()`](#get)
+ * [`set()`](#set)
+ * Token Management
+ * [`listTokens()`](#list-tokens)
+ * [`removeToken()`](#remove-token)
+ * [`createToken()`](#create-token)
-### profile.adduser(opener, prompter, config) → Promise
+## API
+
+### <a name="adduser"></a> `> profile.adduser(opener, prompter, [opts]) → Promise`
Tries to create a user new web based login, if that fails it falls back to
using the legacy CouchDB APIs.
* `opener` Function (url) → Promise, returns a promise that resolves after a browser has been opened for the user at `url`.
* `prompter` Function (creds) → Promise, returns a promise that resolves to an object with `username`, `email` and `password` properties.
-* `config` Object
+* [`opts`](#opts) Object (optional) plus extra keys:
* `creds` Object, passed through to prompter, common values are:
* `username` String, default value for username
* `email` String, default value for email
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
#### **Promise Value**
@@ -50,21 +64,16 @@ on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be `'E'` followed by the HTTP response code, for
example a Forbidden response would be `E403`.
-### profile.login(opener, prompter, config) → Promise
+### <a name="login"></a> `> profile.login(opener, prompter, [opts]) → Promise`
Tries to login using new web based login, if that fails it falls back to
using the legacy CouchDB APIs.
* `opener` Function (url) → Promise, returns a promise that resolves after a browser has been opened for the user at `url`.
* `prompter` Function (creds) → Promise, returns a promise that resolves to an object with `username`, and `password` properties.
-* `config` Object
+* [`opts`](#opts) Object (optional) plus extra keys:
* `creds` Object, passed through to prompter, common values are:
* `name` String, default value for username
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `auth` Object, properties: `otp`
- the one-time password from a two-factor authentication device.
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
#### **Promise Value**
@@ -89,16 +98,13 @@ on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be `'E'` followed by the HTTP response code, for
example a Forbidden response would be `E403`.
-### profile.adduserWeb(opener, config) → Promise
+### <a name="adduser-web"></a> `> profile.adduserWeb(opener, [opts]) → Promise`
Tries to create a user new web based login, if that fails it falls back to
using the legacy CouchDB APIs.
* `opener` Function (url) → Promise, returns a promise that resolves after a browser has been opened for the user at `url`.
-* `config` Object
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
+* [`opts`](#opts) Object
#### **Promise Value**
@@ -123,16 +129,13 @@ on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be `'E'` followed by the HTTP response code, for
example a Forbidden response would be `E403`.
-### profile.loginWeb(opener, config) → Promise
+### <a name="login-web"></a> `> profile.loginWeb(opener, [opts]) → Promise`
Tries to login using new web based login, if that fails it falls back to
using the legacy CouchDB APIs.
* `opener` Function (url) → Promise, returns a promise that resolves after a browser has been opened for the user at `url`.
-* `config` Object
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
+* [`opts`](#opts) Object (optional)
#### **Promise Value**
@@ -151,19 +154,17 @@ If the registry does not support web-login then an error will be thrown with
its `code` property set to `ENYI` . You should retry with `loginCouch`.
If you use `login` then this fallback will be done automatically.
-
If the action was denied because it came from an IP address that this action
on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be `'E'` followed by the HTTP response code, for
example a Forbidden response would be `E403`.
-### profile.adduserCouch(username, email, password, config) → Promise
+### <a name="adduser-couch"></a> `> profile.adduserCouch(username, email, password, [opts]) → Promise`
```js
-profile.adduser(username, email, password, {registry}).then(result => {
- // do something with result.token
-})
+const {token} = await profile.adduser(username, email, password, {registry})
+// `token` can be passed in through `opts` for authentication.
```
Creates a new user on the server along with a fresh bearer token for future
@@ -176,10 +177,7 @@ this is registry specific and not guaranteed.
* `username` String
* `email` String
* `password` String
-* `config` Object
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
+* [`opts`](#opts) Object (optional)
#### **Promise Value**
@@ -203,18 +201,19 @@ on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be `'E'` followed by the HTTP response code, for
example a Forbidden response would be `E403`.
-### profile.loginCouch(username, password, config) → Promise
+### <a name="login-couch"></a> `> profile.loginCouch(username, password, [opts]) → Promise`
```js
-profile.login(username, password, {registry}).catch(err => {
+let token
+try {
+ {token} = await profile.login(username, password, {registry})
+} catch (err) {
if (err.code === 'otp') {
- return getOTPFromSomewhere().then(otp => {
- return profile.login(username, password, {registry, auth: {otp}})
- })
+ const otp = await getOTPFromSomewhere()
+ {token} = await profile.login(username, password, {otp})
}
-}).then(result => {
- // do something with result.token
-})
+}
+// `token` can now be passed in through `opts` for authentication.
```
Logs you into an existing user. Does not create the user if they do not
@@ -224,12 +223,7 @@ future authentication. This is what you use as an `authToken` in an `.npmrc`.
* `username` String
* `email` String
* `password` String
-* `config` Object
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `auth` Object, properties: `otp` — the one-time password from a two-factor
- authentication device.
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
+* [`opts`](#opts) Object (optional)
#### **Promise Value**
@@ -254,24 +248,16 @@ If the error was neither of these then the error object will have a
`code` property set to the HTTP response code and a `headers` property with
the HTTP headers in the response.
-### profile.get(config) → Promise
+### <a name="get"></a> `> profile.get([opts]) → Promise`
```js
-profile.get(registry, {auth: {token}}).then(userProfile => {
- // do something with userProfile
-})
+const {name, email} = await profile.get({token})
+console.log(`${token} belongs to https://npm.im/~${name}, (mailto:${email})`)
```
Fetch profile information for the authenticated user.
-* `config` Object
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `auth` Object, properties: `token` — a bearer token returned from
- `adduser`, `login` or `createToken`, or, `username`, `password` (and
- optionally `otp`). Authenticating for this command via a username and
- password will likely not be supported in the future.
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
+* [`opts`](#opts) Object
#### **Promise Value**
@@ -313,24 +299,17 @@ on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be the HTTP response code.
-### profile.set(profileData, config) → Promise
+### <a name="set"></a> `> profile.set(profileData, [opts]) → Promise`
```js
-profile.set({github: 'great-github-account-name'}, {registry, auth: {token}})
+await profile.set({github: 'great-github-account-name'}, {token})
```
Update profile information for the authenticated user.
* `profileData` An object, like that returned from `profile.get`, but see
below for caveats relating to `password`, `tfa` and `cidr_whitelist`.
-* `config` Object
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `auth` Object, properties: `token` — a bearer token returned from
- `adduser`, `login` or `createToken`, or, `username`, `password` (and
- optionally `otp`). Authenticating for this command via a username and
- password will likely not be supported in the future.
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
+* [`opts`](#opts) Object (optional)
#### **SETTING `password`**
@@ -340,7 +319,12 @@ and `new` properties, where the former has the user's current password and
the latter has the desired new password. For example
```js
-profile.set({password: {old: 'abc123', new: 'my new (more secure) password'}}, {registry, auth: {token}})
+await profile.set({
+ password: {
+ old: 'abc123',
+ new: 'my new (more secure) password'
+ }
+}, {token})
```
#### **SETTING `cidr_whitelist`**
@@ -350,7 +334,9 @@ Be very careful as it's possible to lock yourself out of your account with
this. This is not currently exposed in `npm` itself.
```js
-profile.set({cidr_whitelist: [ '8.8.8.8/32' ], {registry, auth: {token}})
+await profile.set({
+ cidr_whitelist: [ '8.8.8.8/32' ]
+}, {token})
// ↑ only one of google's dns servers can now access this account.
```
@@ -360,7 +346,7 @@ Enabling two-factor authentication is a multi-step process.
1. Call `profile.get` and check the status of `tfa`. If `pending` is true then
you'll need to disable it with `profile.set({tfa: {password, mode: 'disable'}, …)`.
-2. `profile.set({tfa: {password, mode}}, {registry, auth: {token}})`
+2. `profile.set({tfa: {password, mode}}, {registry, token})`
* Note that the user's `password` is required here in the `tfa` object,
regardless of how you're authenticating.
* `mode` is either `auth-only` which requires an `otp` when calling `login`
@@ -381,7 +367,7 @@ Enabling two-factor authentication is a multi-step process.
and they can type or copy paste that in.
4. To complete setting up two factor auth you need to make a second call to
`profile.set` with `tfa` set to an array of TWO codes from the user's
- authenticator, eg: `profile.set(tfa: [otp1, otp2]}, registry, {token})`
+ authenticator, eg: `profile.set(tfa: [otp1, otp2]}, {registry, token})`
5. On success you'll get a result object with a `tfa` property that has an
array of one-time-use recovery codes. These are used to authenticate
later if the second factor is lost and generally should be printed and
@@ -391,7 +377,7 @@ Disabling two-factor authentication is more straightforward, set the `tfa`
attribute to an object with a `password` property and a `mode` of `disable`.
```js
-profile.set({tfa: {password, mode: 'disable'}, {registry, auth: {token}}}
+await profile.set({tfa: {password, mode: 'disable'}}, {token})
```
#### **Promise Value**
@@ -412,24 +398,16 @@ on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be the HTTP response code.
-### profile.listTokens(config) → Promise
+### <a name="list-tokens"></a> `> profile.listTokens([opts]) → Promise`
```js
-profile.listTokens(registry, {token}).then(tokens => {
- // do something with tokens
-})
+const tokens = await profile.listTokens({registry, token})
+console.log(`Number of tokens in your accounts: ${tokens.length}`)
```
Fetch a list of all of the authentication tokens the authenticated user has.
-* `config` Object
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `auth` Object, properties: `token` — a bearer token returned from
- `adduser`, `login` or `createToken`, or, `username`, `password` (and
- optionally `otp`). Authenticating for this command via a username and
- password will likely not be supported in the future.
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
+* [`opts`](#opts) Object (optional)
#### **Promise Value**
@@ -456,25 +434,17 @@ on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be the HTTP response code.
-### profile.removeToken(token|key, config) → Promise
+### <a name="remove-token"><a> `> profile.removeToken(token|key, opts) → Promise`
```js
-profile.removeToken(key, registry, {token}).then(() => {
- // token is gone!
-})
+await profile.removeToken(key, {token})
+// token is gone!
```
Remove a specific authentication token.
* `token|key` String, either a complete authentication token or the key returned by `profile.listTokens`.
-* `config` Object
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `auth` Object, properties: `token` — a bearer token returned from
- `adduser`, `login` or `createToken`, or, `username`, `password` (and
- optionally `otp`). Authenticating for this command via a username and
- password will likely not be supported in the future.
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
+* [`opts`](#opts) Object (optional)
#### **Promise Value**
@@ -494,12 +464,13 @@ on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be the HTTP response code.
-### profile.createToken(password, readonly, cidr_whitelist, config) → Promise
+### <a name="create-token"></a> `> profile.createToken(password, readonly, cidr_whitelist, [opts]) → Promise`
```js
-profile.createToken(password, readonly, cidr_whitelist, registry, {token, otp}).then(newToken => {
- // do something with the newToken
-})
+const newToken = await profile.createToken(
+ password, readonly, cidr_whitelist, {token, otp}
+)
+// do something with the newToken
```
Create a new authentication token, possibly with restrictions.
@@ -507,21 +478,14 @@ Create a new authentication token, possibly with restrictions.
* `password` String
* `readonly` Boolean
* `cidr_whitelist` Array
-* `config` Object
- * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
- * `auth` Object, properties: `token` — a bearer token returned from
- `adduser`, `login` or `createToken`, or, `username`, `password` (and
- optionally `otp`). Authenticating for this command via a username and
- password will likely not be supported in the future.
- * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
- things like cache, proxy, SSL CA and retry rules.
+* [`opts`](#opts) Object Optional
#### **Promise Value**
The promise will resolve with an object very much like the one's returned by
`profile.listTokens`. The only difference is that `token` is not truncated.
-```
+```js
{
token: String,
key: String, // sha512 hash of the token UUID
@@ -545,12 +509,28 @@ on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be the HTTP response code.
-## Logging
+### <a name="opts"></a> options objects
+
+The various API functions accept an optional `opts` object as a final
+argument. This opts object can either be a regular Object, or a
+[`figgy-pudding`](https://npm.im/figgy-pudding) options object instance.
+
+Unless otherwise noted, the options accepted are the same as the
+[`npm-registry-fetch`
+options](https://www.npmjs.com/package/npm-registry-fetch#fetch-opts).
+
+Of particular note are `opts.registry`, and the auth-related options:
+
+* `opts.token` - used for Bearer auth
+* `opts.username` and `opts.password` - used for Basic auth
+* `opts.otp` - the 2fa OTP token
+
+## <a name="logging"></a> Logging
This modules logs by emitting `log` events on the global `process` object.
These events look like this:
-```
+```js
process.emit('log', 'loglevel', 'feature', 'message part 1', 'part 2', 'part 3', 'etc')
```
@@ -562,13 +542,13 @@ The remaining arguments are evaluated like `console.log` and joined together wit
A real world example of this is:
-```
- process.emit('log', 'http', 'request', '→',conf.method || 'GET', conf.target)
+```js
+ process.emit('log', 'http', 'request', '→', conf.method || 'GET', conf.target)
```
To handle the log events, you would do something like this:
-```
+```js
const log = require('npmlog')
process.on('log', function (level) {
return log[level].apply(log, [].slice.call(arguments, 1))
diff --git a/deps/npm/node_modules/npm-profile/index.js b/deps/npm/node_modules/npm-profile/index.js
index 023ddae40c..b7f753fb4d 100644
--- a/deps/npm/node_modules/npm-profile/index.js
+++ b/deps/npm/node_modules/npm-profile/index.js
@@ -1,8 +1,10 @@
'use strict'
-const fetch = require('make-fetch-happen').defaults({retry: false})
-const validate = require('aproba')
-const url = require('url')
+
+const fetch = require('npm-registry-fetch')
+const {HttpErrorBase} = require('npm-registry-fetch/errors.js')
const os = require('os')
+const pudding = require('figgy-pudding')
+const validate = require('aproba')
exports.adduserCouch = adduserCouch
exports.loginCouch = loginCouch
@@ -16,99 +18,83 @@ exports.listTokens = listTokens
exports.removeToken = removeToken
exports.createToken = createToken
+const ProfileConfig = pudding({
+ creds: {},
+ hostname: {},
+ otp: {}
+})
+
// try loginWeb, catch the "not supported" message and fall back to couch
-function login (opener, prompter, conf) {
+function login (opener, prompter, opts) {
validate('FFO', arguments)
- return loginWeb(opener, conf).catch(er => {
+ opts = ProfileConfig(opts)
+ return loginWeb(opener, opts).catch(er => {
if (er instanceof WebLoginNotSupported) {
process.emit('log', 'verbose', 'web login not supported, trying couch')
- return prompter(conf.creds)
- .then(data => loginCouch(data.username, data.password, conf))
+ return prompter(opts.creds)
+ .then(data => loginCouch(data.username, data.password, opts))
} else {
throw er
}
})
}
-function adduser (opener, prompter, conf) {
+function adduser (opener, prompter, opts) {
validate('FFO', arguments)
- return adduserWeb(opener, conf).catch(er => {
+ opts = ProfileConfig(opts)
+ return adduserWeb(opener, opts).catch(er => {
if (er instanceof WebLoginNotSupported) {
process.emit('log', 'verbose', 'web adduser not supported, trying couch')
- return prompter(conf.creds)
- .then(data => adduserCouch(data.username, data.email, data.password, conf))
+ return prompter(opts.creds)
+ .then(data => adduserCouch(data.username, data.email, data.password, opts))
} else {
throw er
}
})
}
-function adduserWeb (opener, conf) {
+function adduserWeb (opener, opts) {
validate('FO', arguments)
const body = { create: true }
process.emit('log', 'verbose', 'web adduser', 'before first POST')
- return webAuth(opener, conf, body)
+ return webAuth(opener, opts, body)
}
-function loginWeb (opener, conf) {
+function loginWeb (opener, opts) {
validate('FO', arguments)
process.emit('log', 'verbose', 'web login', 'before first POST')
- return webAuth(opener, conf, {})
+ return webAuth(opener, opts, {})
}
-function webAuth (opener, conf, body) {
- if (!conf.opts) conf.opts = {}
- const target = url.resolve(conf.registry, '-/v1/login')
- body.hostname = conf.hostname || os.hostname()
- return fetchJSON({
- target: target,
+function webAuth (opener, opts, body) {
+ opts = ProfileConfig(opts)
+ body.hostname = opts.hostname || os.hostname()
+ const target = '/-/v1/login'
+ return fetch(target, opts.concat({
method: 'POST',
- body: body,
- opts: conf.opts,
- saveResponse: true
- }).then(result => {
- const res = result[0]
- const content = result[1]
+ body
+ })).then(res => {
+ return Promise.all([res, res.json()])
+ }).then(([res, content]) => {
+ const {doneUrl, loginUrl} = content
process.emit('log', 'verbose', 'web auth', 'got response', content)
- const doneUrl = content.doneUrl
- const loginUrl = content.loginUrl
- if (typeof doneUrl !== 'string' ||
- typeof loginUrl !== 'string' ||
- !doneUrl || !loginUrl) {
- throw new WebLoginInvalidResponse('POST', target, res, content)
+ if (
+ typeof doneUrl !== 'string' ||
+ typeof loginUrl !== 'string' ||
+ !doneUrl ||
+ !loginUrl
+ ) {
+ throw new WebLoginInvalidResponse('POST', res, content)
}
+ return content
+ }).then(({doneUrl, loginUrl}) => {
process.emit('log', 'verbose', 'web auth', 'opening url pair')
- const doneConf = {
- target: doneUrl,
- method: 'GET',
- opts: conf.opts,
- saveResponse: true
- }
- return opener(loginUrl).then(() => fetchJSON(doneConf)).then(onDone)
- function onDone (result) {
- const res = result[0]
- const content = result[1]
- if (res.status === 200) {
- if (!content.token) {
- throw new WebLoginInvalidResponse('GET', doneUrl, res, content)
- } else {
- return content
- }
- } else if (res.status === 202) {
- const retry = +res.headers.get('retry-after')
- if (retry > 0) {
- return new Promise(resolve => setTimeout(resolve, 1000 * retry))
- .then(() => fetchJSON(doneConf)).then(onDone)
- } else {
- return fetchJSON(doneConf).then(onDone)
- }
- } else {
- throw new WebLoginInvalidResponse('GET', doneUrl, res, content)
- }
- }
+ return opener(loginUrl).then(
+ () => webAuthCheckLogin(doneUrl, opts.concat({cache: false}))
+ )
}).catch(er => {
if ((er.statusCode >= 400 && er.statusCode <= 499) || er.statusCode === 500) {
- throw new WebLoginNotSupported('POST', target, {
+ throw new WebLoginNotSupported('POST', {
status: er.statusCode,
headers: { raw: () => er.headers }
}, er.body)
@@ -118,10 +104,33 @@ function webAuth (opener, conf, body) {
})
}
-function adduserCouch (username, email, password, conf) {
+function webAuthCheckLogin (doneUrl, opts) {
+ return fetch(doneUrl, opts).then(res => {
+ return Promise.all([res, res.json()])
+ }).then(([res, content]) => {
+ if (res.status === 200) {
+ if (!content.token) {
+ throw new WebLoginInvalidResponse('GET', res, content)
+ } else {
+ return content
+ }
+ } else if (res.status === 202) {
+ const retry = +res.headers.get('retry-after') * 1000
+ if (retry > 0) {
+ return sleep(retry).then(() => webAuthCheckLogin(doneUrl, opts))
+ } else {
+ return webAuthCheckLogin(doneUrl, opts)
+ }
+ } else {
+ throw new WebLoginInvalidResponse('GET', res, content)
+ }
+ })
+}
+
+function adduserCouch (username, email, password, opts) {
validate('SSSO', arguments)
- if (!conf.opts) conf.opts = {}
- const userobj = {
+ opts = ProfileConfig(opts)
+ const body = {
_id: 'org.couchdb.user:' + username,
name: username,
password: password,
@@ -131,23 +140,25 @@ function adduserCouch (username, email, password, conf) {
date: new Date().toISOString()
}
const logObj = {}
- Object.keys(userobj).forEach(k => {
- logObj[k] = k === 'password' ? 'XXXXX' : userobj[k]
+ Object.keys(body).forEach(k => {
+ logObj[k] = k === 'password' ? 'XXXXX' : body[k]
})
process.emit('log', 'verbose', 'adduser', 'before first PUT', logObj)
- const target = url.resolve(conf.registry, '-/user/org.couchdb.user:' + encodeURIComponent(username))
-
- return fetchJSON({target: target, method: 'PUT', body: userobj, opts: conf.opts})
- .then(result => {
- result.username = username
- return result
- })
+ const target = '/-/user/org.couchdb.user:' + encodeURIComponent(username)
+ return fetch.json(target, opts.concat({
+ method: 'PUT',
+ body
+ })).then(result => {
+ result.username = username
+ return result
+ })
}
-function loginCouch (username, password, conf) {
+function loginCouch (username, password, opts) {
validate('SSO', arguments)
- const userobj = {
+ opts = ProfileConfig(opts)
+ const body = {
_id: 'org.couchdb.user:' + username,
name: username,
password: password,
@@ -156,36 +167,38 @@ function loginCouch (username, password, conf) {
date: new Date().toISOString()
}
const logObj = {}
- Object.keys(userobj).forEach(k => {
- logObj[k] = k === 'password' ? 'XXXXX' : userobj[k]
+ Object.keys(body).forEach(k => {
+ logObj[k] = k === 'password' ? 'XXXXX' : body[k]
})
process.emit('log', 'verbose', 'login', 'before first PUT', logObj)
- const target = url.resolve(conf.registry, '-/user/org.couchdb.user:' + encodeURIComponent(username))
- return fetchJSON(Object.assign({method: 'PUT', target: target, body: userobj}, conf)).catch(err => {
+ const target = '-/user/org.couchdb.user:' + encodeURIComponent(username)
+ return fetch.json(target, opts.concat({
+ method: 'PUT',
+ body
+ })).catch(err => {
if (err.code === 'E400') {
err.message = `There is no user with the username "${username}".`
throw err
}
if (err.code !== 'E409') throw err
- return fetchJSON(Object.assign({method: 'GET', target: target + '?write=true'}, conf)).then(result => {
+ return fetch.json(target, opts.concat({
+ query: {write: true}
+ })).then(result => {
Object.keys(result).forEach(function (k) {
- if (!userobj[k] || k === 'roles') {
- userobj[k] = result[k]
+ if (!body[k] || k === 'roles') {
+ body[k] = result[k]
}
})
- const req = {
+ return fetch.json(`${target}/-rev/${body._rev}`, opts.concat({
method: 'PUT',
- target: target + '/-rev/' + userobj._rev,
- body: userobj,
- auth: {
- basic: {
- username: username,
- password: password
- }
+ body,
+ forceAuth: {
+ username,
+ password: Buffer.from(password, 'utf8').toString('base64'),
+ otp: opts.otp
}
- }
- return fetchJSON(Object.assign({}, conf, req))
+ }))
})
}).then(result => {
result.username = username
@@ -193,29 +206,31 @@ function loginCouch (username, password, conf) {
})
}
-function get (conf) {
+function get (opts) {
validate('O', arguments)
- const target = url.resolve(conf.registry, '-/npm/v1/user')
- return fetchJSON(Object.assign({target: target}, conf))
+ return fetch.json('/-/npm/v1/user', opts)
}
-function set (profile, conf) {
+function set (profile, opts) {
validate('OO', arguments)
- const target = url.resolve(conf.registry, '-/npm/v1/user')
Object.keys(profile).forEach(key => {
// profile keys can't be empty strings, but they CAN be null
if (profile[key] === '') profile[key] = null
})
- return fetchJSON(Object.assign({target: target, method: 'POST', body: profile}, conf))
+ return fetch.json('/-/npm/v1/user', ProfileConfig(opts, {
+ method: 'POST',
+ body: profile
+ }))
}
-function listTokens (conf) {
+function listTokens (opts) {
validate('O', arguments)
+ opts = ProfileConfig(opts)
- return untilLastPage(`-/npm/v1/tokens`)
+ return untilLastPage('/-/npm/v1/tokens')
function untilLastPage (href, objects) {
- return fetchJSON(Object.assign({target: url.resolve(conf.registry, href)}, conf)).then(result => {
+ return fetch.json(href, opts).then(result => {
objects = objects ? objects.concat(result.objects) : result.objects
if (result.urls.next) {
return untilLastPage(result.urls.next, objects)
@@ -226,174 +241,44 @@ function listTokens (conf) {
}
}
-function removeToken (tokenKey, conf) {
+function removeToken (tokenKey, opts) {
validate('SO', arguments)
- const target = url.resolve(conf.registry, `-/npm/v1/tokens/token/${tokenKey}`)
- return fetchJSON(Object.assign({target: target, method: 'DELETE'}, conf))
+ const target = `/-/npm/v1/tokens/token/${tokenKey}`
+ return fetch(target, ProfileConfig(opts, {
+ method: 'DELETE',
+ ignoreBody: true
+ })).then(() => null)
}
-function createToken (password, readonly, cidrs, conf) {
+function createToken (password, readonly, cidrs, opts) {
validate('SBAO', arguments)
- const target = url.resolve(conf.registry, '-/npm/v1/tokens')
- const props = {
- password: password,
- readonly: readonly,
- cidr_whitelist: cidrs
- }
- return fetchJSON(Object.assign({target: target, method: 'POST', body: props}, conf))
-}
-
-function FetchError (err, method, target) {
- err.method = method
- err.href = target
- return err
-}
-
-class HttpErrorBase extends Error {
- constructor (method, target, res, body) {
- super()
- this.headers = res.headers.raw()
- this.statusCode = res.status
- this.code = 'E' + res.status
- this.method = method
- this.target = target
- this.body = body
- this.pkgid = packageName(target)
- }
-}
-
-class HttpErrorGeneral extends HttpErrorBase {
- constructor (method, target, res, body) {
- super(method, target, res, body)
- if (body && body.error) {
- this.message = `Registry returned ${this.statusCode} for ${this.method} on ${this.target}: ${body.error}`
- } else {
- this.message = `Registry returned ${this.statusCode} for ${this.method} on ${this.target}`
+ return fetch.json('/-/npm/v1/tokens', ProfileConfig(opts, {
+ method: 'POST',
+ body: {
+ password: password,
+ readonly: readonly,
+ cidr_whitelist: cidrs
}
- Error.captureStackTrace(this, HttpErrorGeneral)
- }
+ }))
}
class WebLoginInvalidResponse extends HttpErrorBase {
- constructor (method, target, res, body) {
- super(method, target, res, body)
+ constructor (method, res, body) {
+ super(method, res, body)
this.message = 'Invalid response from web login endpoint'
Error.captureStackTrace(this, WebLoginInvalidResponse)
}
}
class WebLoginNotSupported extends HttpErrorBase {
- constructor (method, target, res, body) {
- super(method, target, res, body)
+ constructor (method, res, body) {
+ super(method, res, body)
this.message = 'Web login not supported'
this.code = 'ENYI'
Error.captureStackTrace(this, WebLoginNotSupported)
}
}
-class HttpErrorAuthOTP extends HttpErrorBase {
- constructor (method, target, res, body) {
- super(method, target, res, body)
- this.message = 'OTP required for authentication'
- this.code = 'EOTP'
- Error.captureStackTrace(this, HttpErrorAuthOTP)
- }
-}
-
-class HttpErrorAuthIPAddress extends HttpErrorBase {
- constructor (method, target, res, body) {
- super(method, target, res, body)
- this.message = 'Login is not allowed from your IP address'
- this.code = 'EAUTHIP'
- Error.captureStackTrace(this, HttpErrorAuthIPAddress)
- }
-}
-
-class HttpErrorAuthUnknown extends HttpErrorBase {
- constructor (method, target, res, body) {
- super(method, target, res, body)
- this.message = 'Unable to authenticate, need: ' + res.headers.get('www-authenticate')
- this.code = 'EAUTHUNKNOWN'
- Error.captureStackTrace(this, HttpErrorAuthUnknown)
- }
-}
-
-function authHeaders (auth) {
- const headers = {}
- if (!auth) return headers
- if (auth.otp) headers['npm-otp'] = auth.otp
- if (auth.token) {
- headers['Authorization'] = 'Bearer ' + auth.token
- } else if (auth.basic) {
- const basic = auth.basic.username + ':' + auth.basic.password
- headers['Authorization'] = 'Basic ' + Buffer.from(basic).toString('base64')
- }
- return headers
-}
-
-function fetchJSON (conf) {
- const fetchOpts = {
- method: conf.method,
- headers: Object.assign({}, conf.headers || (conf.auth && authHeaders(conf.auth)) || {})
- }
- if (conf.body != null) {
- fetchOpts.headers['Content-Type'] = 'application/json'
- fetchOpts.body = JSON.stringify(conf.body)
- }
- process.emit('log', 'http', 'request', '→', conf.method || 'GET', conf.target)
- return fetch.defaults(conf.opts || {})(conf.target, fetchOpts).catch(err => {
- throw new FetchError(err, conf.method, conf.target)
- }).then(res => {
- if (res.headers.has('npm-notice')) {
- process.emit('warn', 'notice', res.headers.get('npm-notice'))
- }
- if (res.headers.get('content-type') === 'application/json') {
- return res.json().then(content => [res, content])
- } else {
- return res.buffer().then(content => {
- try {
- return [res, JSON.parse(content)]
- } catch (_) {
- return [res, content]
- }
- })
- }
- }).then(result => {
- const res = result[0]
- const content = result[1]
- const retVal = conf.saveResponse ? result : content
- process.emit('log', 'http', res.status, `← ${res.statusText} (${conf.target})`)
- if (res.status === 401 && res.headers.get('www-authenticate')) {
- const auth = res.headers.get('www-authenticate').split(/,\s*/).map(s => s.toLowerCase())
- if (auth.indexOf('ipaddress') !== -1) {
- throw new HttpErrorAuthIPAddress(conf.method, conf.target, res, content)
- } else if (auth.indexOf('otp') !== -1) {
- throw new HttpErrorAuthOTP(conf.method, conf.target, res, content)
- } else {
- throw new HttpErrorAuthUnknown(conf.method, conf.target, res, content)
- }
- } else if (res.status < 200 || res.status >= 300) {
- throw new HttpErrorGeneral(conf.method, conf.target, res, content)
- } else {
- return retVal
- }
- })
-}
-
-function packageName (href) {
- try {
- let basePath = url.parse(href).pathname.substr(1)
- if (!basePath.match(/^-/)) {
- basePath = basePath.split('/')
- var index = basePath.indexOf('_rewrite')
- if (index === -1) {
- index = basePath.length - 1
- } else {
- index++
- }
- return decodeURIComponent(basePath[index])
- }
- } catch (_) {
- // this is ok
- }
+function sleep (ms) {
+ return new Promise((resolve, reject) => setTimeout(resolve, ms))
}
diff --git a/deps/npm/node_modules/npm-profile/package.json b/deps/npm/node_modules/npm-profile/package.json
index d158b71863..082da1efca 100644
--- a/deps/npm/node_modules/npm-profile/package.json
+++ b/deps/npm/node_modules/npm-profile/package.json
@@ -1,28 +1,28 @@
{
- "_from": "npm-profile@3.0.2",
- "_id": "npm-profile@3.0.2",
+ "_from": "npm-profile@latest",
+ "_id": "npm-profile@4.0.1",
"_inBundle": false,
- "_integrity": "sha512-rEJOFR6PbwOvvhGa2YTNOJQKNuc6RovJ6T50xPU7pS9h/zKPNCJ+VHZY2OFXyZvEi+UQYtHRTp8O/YM3tUD20A==",
+ "_integrity": "sha512-NQ1I/1Q7YRtHZXkcuU1/IyHeLy6pd+ScKg4+DQHdfsm769TGq6HPrkbuNJVJS4zwE+0mvvmeULzQdWn2L2EsVA==",
"_location": "/npm-profile",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "npm-profile@3.0.2",
+ "raw": "npm-profile@latest",
"name": "npm-profile",
"escapedName": "npm-profile",
- "rawSpec": "3.0.2",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "3.0.2"
+ "fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-3.0.2.tgz",
- "_shasum": "58d568f1b56ef769602fd0aed8c43fa0e0de0f57",
- "_spec": "npm-profile@3.0.2",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-4.0.1.tgz",
+ "_shasum": "d350f7a5e6b60691c7168fbb8392c3603583f5aa",
+ "_spec": "npm-profile@latest",
+ "_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
@@ -34,7 +34,8 @@
"bundleDependencies": false,
"dependencies": {
"aproba": "^1.1.2 || 2",
- "make-fetch-happen": "^2.5.0 || 3 || 4"
+ "figgy-pudding": "^3.4.1",
+ "npm-registry-fetch": "^3.8.0"
},
"deprecated": false,
"description": "Library for updating an npmjs.com profile",
@@ -51,5 +52,5 @@
"type": "git",
"url": "git+https://github.com/npm/npm-profile.git"
},
- "version": "3.0.2"
+ "version": "4.0.1"
}
diff --git a/deps/npm/node_modules/npm-registry-client/CHANGELOG.md b/deps/npm/node_modules/npm-registry-client/CHANGELOG.md
deleted file mode 100644
index 138b3be2d9..0000000000
--- a/deps/npm/node_modules/npm-registry-client/CHANGELOG.md
+++ /dev/null
@@ -1,21 +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="8.6.0"></a>
-# [8.6.0](https://github.com/npm/npm-registry-client/compare/v8.5.1...v8.6.0) (2018-07-13)
-
-
-### Features
-
-* **access:** Add support for npm access to set per-package 2fa requirements ([8b472d2](https://github.com/npm/npm-registry-client/commit/8b472d2))
-
-
-
-<a name="8.5.1"></a>
-## [8.5.1](https://github.com/npm/npm-registry-client/compare/v8.5.0...v8.5.1) (2018-03-08)
-
-
-### Bug Fixes
-
-* **error:** improve `User not found` publish message ([#167](https://github.com/npm/npm-registry-client/issues/167)) ([5ebcffc](https://github.com/npm/npm-registry-client/commit/5ebcffc))
diff --git a/deps/npm/node_modules/npm-registry-client/README.md b/deps/npm/node_modules/npm-registry-client/README.md
deleted file mode 100644
index e9ab77b0dc..0000000000
--- a/deps/npm/node_modules/npm-registry-client/README.md
+++ /dev/null
@@ -1,357 +0,0 @@
-# npm-registry-client
-
-The code that npm uses to talk to the registry.
-
-It handles all the caching and HTTP calls.
-
-## Usage
-
-```javascript
-var RegClient = require('npm-registry-client')
-var client = new RegClient(config)
-var uri = "https://registry.npmjs.org/npm"
-var params = {timeout: 1000}
-
-client.get(uri, params, function (error, data, raw, res) {
- // error is an error if there was a problem.
- // data is the parsed data object
- // raw is the json string
- // res is the response from couch
-})
-```
-
-# Registry URLs
-
-The registry calls take either a full URL pointing to a resource in the
-registry, or a base URL for the registry as a whole (including the registry
-path – but be sure to terminate the path with `/`). `http` and `https` URLs are
-the only ones supported.
-
-## Using the client
-
-Every call to the client follows the same pattern:
-
-* `uri` {String} The *fully-qualified* URI of the registry API method being
- invoked.
-* `params` {Object} Per-request parameters.
-* `callback` {Function} Callback to be invoked when the call is complete.
-
-### Credentials
-
-Many requests to the registry can be authenticated, and require credentials
-for authorization. These credentials always look the same:
-
-* `username` {String}
-* `password` {String}
-* `email` {String}
-* `alwaysAuth` {Boolean} Whether calls to the target registry are always
- authed.
-
-**or**
-
-* `token` {String}
-* `alwaysAuth` {Boolean} Whether calls to the target registry are always
- authed.
-
-## Requests
-
-As of `npm-registry-client@8`, all requests are made with an `Accept` header
-of `application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*`.
-
-This enables filtered document responses to requests for package metadata.
-You know that you got a filtered response if the mime type is set to
-`application/vnd.npm.install-v1+json` and not `application/json`.
-
-This filtering substantially reduces the over all data size. For example
-for `https://registry.npmjs.org/npm`, the compressed metadata goes from
-410kB to 21kB.
-
-## API
-
-### client.access(uri, params, cb)
-
-* `uri` {String} Registry URL for the package's access API endpoint.
- Looks like `/-/package/<package name>/access`.
-* `params` {Object} Object containing per-request properties.
- * `access` {String} New access level for the package. Can be either
- `public` or `restricted`. Registry will raise an error if trying
- to change the access level of an unscoped package.
- * `auth` {Credentials}
-
-Set the access level for scoped packages. For now, there are only two
-access levels: "public" and "restricted".
-
-### client.adduser(uri, params, cb)
-
-* `uri` {String} Base registry URL.
-* `params` {Object} Object containing per-request properties.
- * `auth` {Credentials}
-* `cb` {Function}
- * `error` {Error | null}
- * `data` {Object} the parsed data object
- * `raw` {String} the json
- * `res` {Response Object} response from couch
-
-Add a user account to the registry, or verify the credentials.
-
-### client.deprecate(uri, params, cb)
-
-* `uri` {String} Full registry URI for the deprecated package.
-* `params` {Object} Object containing per-request properties.
- * `version` {String} Semver version range.
- * `message` {String} The message to use as a deprecation warning.
- * `auth` {Credentials}
-* `cb` {Function}
-
-Deprecate a version of a package in the registry.
-
-### client.distTags.fetch(uri, params, cb)
-
-* `uri` {String} Base URL for the registry.
-* `params` {Object} Object containing per-request properties.
- * `package` {String} Name of the package.
- * `auth` {Credentials}
-* `cb` {Function}
-
-Fetch all of the `dist-tags` for the named package.
-
-### client.distTags.add(uri, params, cb)
-
-* `uri` {String} Base URL for the registry.
-* `params` {Object} Object containing per-request properties.
- * `package` {String} Name of the package.
- * `distTag` {String} Name of the new `dist-tag`.
- * `version` {String} Exact version to be mapped to the `dist-tag`.
- * `auth` {Credentials}
-* `cb` {Function}
-
-Add (or replace) a single dist-tag onto the named package.
-
-### client.distTags.set(uri, params, cb)
-
-* `uri` {String} Base URL for the registry.
-* `params` {Object} Object containing per-request properties.
- * `package` {String} Name of the package.
- * `distTags` {Object} Object containing a map from tag names to package
- versions.
- * `auth` {Credentials}
-* `cb` {Function}
-
-Set all of the `dist-tags` for the named package at once, creating any
-`dist-tags` that do not already exist. Any `dist-tags` not included in the
-`distTags` map will be removed.
-
-### client.distTags.update(uri, params, cb)
-
-* `uri` {String} Base URL for the registry.
-* `params` {Object} Object containing per-request properties.
- * `package` {String} Name of the package.
- * `distTags` {Object} Object containing a map from tag names to package
- versions.
- * `auth` {Credentials}
-* `cb` {Function}
-
-Update the values of multiple `dist-tags`, creating any `dist-tags` that do
-not already exist. Any pre-existing `dist-tags` not included in the `distTags`
-map will be left alone.
-
-### client.distTags.rm(uri, params, cb)
-
-* `uri` {String} Base URL for the registry.
-* `params` {Object} Object containing per-request properties.
- * `package` {String} Name of the package.
- * `distTag` {String} Name of the new `dist-tag`.
- * `auth` {Credentials}
-* `cb` {Function}
-
-Remove a single `dist-tag` from the named package.
-
-### client.get(uri, params, cb)
-
-* `uri` {String} The complete registry URI to fetch
-* `params` {Object} Object containing per-request properties.
- * `timeout` {Number} Duration before the request times out. Optional
- (default: never).
- * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).
- * `staleOk` {Boolean} If there's cached data available, then return that to
- the callback quickly, and update the cache the background. Optional
- (default: false).
- * `auth` {Credentials} Optional.
- * `fullMetadata` {Boolean} If true, don't attempt to fetch filtered
- ("corgi") registry metadata. (default: false)
-* `cb` {Function}
-
-Fetches data from the registry via a GET request, saving it in the cache folder
-with the ETag or the "Last Modified" timestamp.
-
-### client.publish(uri, params, cb)
-
-* `uri` {String} The registry URI for the package to publish.
-* `params` {Object} Object containing per-request properties.
- * `metadata` {Object} Package metadata.
- * `access` {String} Access for the package. Can be `public` or `restricted` (no default).
- * `body` {Stream} Stream of the package body / tarball.
- * `auth` {Credentials}
-* `cb` {Function}
-
-Publish a package to the registry.
-
-Note that this does not create the tarball from a folder.
-
-### client.sendAnonymousCLIMetrics(uri, params, cb)
-
-- `uri` {String} Base URL for the registry.
-- `params` {Object} Object containing per-request properties.
- - `metricId` {String} A uuid unique to this dataset.
- - `metrics` {Object} The metrics to share with the registry, with the following properties:
- - `from` {Date} When the first data in this report was collected.
- - `to` {Date} When the last data in this report was collected. Usually right now.
- - `successfulInstalls` {Number} The number of successful installs in this period.
- - `failedInstalls` {Number} The number of installs that ended in error in this period.
-- `cb` {Function}
-
-PUT a metrics object to the `/-/npm/anon-metrics/v1/` endpoint on the registry.
-
-### client.star(uri, params, cb)
-
-* `uri` {String} The complete registry URI for the package to star.
-* `params` {Object} Object containing per-request properties.
- * `starred` {Boolean} True to star the package, false to unstar it. Optional
- (default: false).
- * `auth` {Credentials}
-* `cb` {Function}
-
-Star or unstar a package.
-
-Note that the user does not have to be the package owner to star or unstar a
-package, though other writes do require that the user be the package owner.
-
-### client.stars(uri, params, cb)
-
-* `uri` {String} The base URL for the registry.
-* `params` {Object} Object containing per-request properties.
- * `username` {String} Name of user to fetch starred packages for. Optional
- (default: user in `auth`).
- * `auth` {Credentials} Optional (required if `username` is omitted).
-* `cb` {Function}
-
-View your own or another user's starred packages.
-
-### client.tag(uri, params, cb)
-
-* `uri` {String} The complete registry URI to tag
-* `params` {Object} Object containing per-request properties.
- * `version` {String} Version to tag.
- * `tag` {String} Tag name to apply.
- * `auth` {Credentials}
-* `cb` {Function}
-
-Mark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the
-specified version.
-
-### client.unpublish(uri, params, cb)
-
-* `uri` {String} The complete registry URI of the package to unpublish.
-* `params` {Object} Object containing per-request properties.
- * `version` {String} version to unpublish. Optional – omit to unpublish all
- versions.
- * `auth` {Credentials}
-* `cb` {Function}
-
-Remove a version of a package (or all versions) from the registry. When the
-last version us unpublished, the entire document is removed from the database.
-
-### client.whoami(uri, params, cb)
-
-* `uri` {String} The base registry for the URI.
-* `params` {Object} Object containing per-request properties.
- * `auth` {Credentials}
-* `cb` {Function}
-
-Simple call to see who the registry thinks you are. Especially useful with
-token-based auth.
-
-
-## PLUMBING
-
-The below are primarily intended for use by the rest of the API, or by the npm
-caching logic directly.
-
-### client.request(uri, params, cb)
-
-* `uri` {String} URI pointing to the resource to request.
-* `params` {Object} Object containing per-request properties.
- * `method` {String} HTTP method. Optional (default: "GET").
- * `body` {Stream | Buffer | String | Object} The request body. Objects
- that are not Buffers or Streams are encoded as JSON. Optional – body
- only used for write operations.
- * `etag` {String} The cached ETag. Optional.
- * `lastModified` {String} The cached Last-Modified timestamp. Optional.
- * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).
- * `streaming` {Boolean} Stream the request body as it comes, handling error
- responses in a non-streaming way.
- * `auth` {Credentials} Optional.
-* `cb` {Function}
- * `error` {Error | null}
- * `data` {Object} the parsed data object
- * `raw` {String} the json
- * `res` {Response Object} response from couch
-
-Make a generic request to the registry. All the other methods are wrappers
-around `client.request`.
-
-### client.fetch(uri, params, cb)
-
-* `uri` {String} The complete registry URI to upload to
-* `params` {Object} Object containing per-request properties.
- * `headers` {Stream} HTTP headers to be included with the request. Optional.
- * `auth` {Credentials} Optional.
-* `cb` {Function}
-
-Fetch a package from a URL, with auth set appropriately if included. Used to
-cache remote tarballs as well as request package tarballs from the registry.
-
-# Configuration
-
-The client uses its own configuration, which is just passed in as a simple
-nested object. The following are the supported values (with their defaults, if
-any):
-
-* `proxy.http` {URL} The URL to proxy HTTP requests through.
-* `proxy.https` {URL} The URL to proxy HTTPS requests through. Defaults to be
- the same as `proxy.http` if unset.
-* `proxy.localAddress` {IP} The local address to use on multi-homed systems.
-* `ssl.ca` {String} Certificate signing authority certificates to trust.
-* `ssl.certificate` {String} Client certificate (PEM encoded). Enable access
- to servers that require client certificates.
-* `ssl.key` {String} Private key (PEM encoded) for client certificate.
-* `ssl.strict` {Boolean} Whether or not to be strict with SSL certificates.
- Default = `true`
-* `retry.count` {Number} Number of times to retry on GET failures. Default = 2.
-* `retry.factor` {Number} `factor` setting for `node-retry`. Default = 10.
-* `retry.minTimeout` {Number} `minTimeout` setting for `node-retry`.
- Default = 10000 (10 seconds)
-* `retry.maxTimeout` {Number} `maxTimeout` setting for `node-retry`.
- Default = 60000 (60 seconds)
-* `userAgent` {String} User agent header to send. Default =
- `"node/{process.version}"`
-* `log` {Object} The logger to use. Defaults to `require("npmlog")` if
- that works, otherwise logs are disabled.
-* `defaultTag` {String} The default tag to use when publishing new packages.
- Default = `"latest"`
-* `couchToken` {Object} A token for use with
- [couch-login](https://npmjs.org/package/couch-login).
-* `sessionToken` {String} A random identifier for this set of client requests.
- Default = 8 random hexadecimal bytes.
-* `maxSockets` {Number} The maximum number of connections that will be open per
- origin (unique combination of protocol:host:port). Passed to the
- [httpAgent](https://nodejs.org/api/http.html#http_agent_maxsockets).
- Default = 50
-* `isFromCI` {Boolean} Identify to severs if this request is coming from CI (for statistics purposes).
- Default = detected from environment– primarily this is done by looking for
- the CI environment variable to be set to `true`. Also accepted are the
- existence of the `JENKINS_URL`, `bamboo.buildKey` and `TDDIUM` environment
- variables.
-* `scope` {String} The scope of the project this command is being run for. This is the
- top level npm module in which a command was run.
- Default = none
diff --git a/deps/npm/node_modules/npm-registry-client/index.js b/deps/npm/node_modules/npm-registry-client/index.js
deleted file mode 100644
index 07eab3f36c..0000000000
--- a/deps/npm/node_modules/npm-registry-client/index.js
+++ /dev/null
@@ -1,74 +0,0 @@
-// utilities for working with the js-registry site.
-
-module.exports = RegClient
-
-var npmlog
-try {
- npmlog = require('npmlog')
-} catch (er) {
- npmlog = {
- error: noop,
- warn: noop,
- info: noop,
- verbose: noop,
- silly: noop,
- http: noop,
- pause: noop,
- resume: noop
- }
-}
-
-function noop () {}
-
-function RegClient (config) {
- this.config = Object.create(config || {})
-
- this.config.proxy = this.config.proxy || {}
- if (!this.config.proxy.https && this.config.proxy.http) {
- this.config.proxy.https = this.config.proxy.http
- }
-
- this.config.ssl = this.config.ssl || {}
- if (this.config.ssl.strict === undefined) this.config.ssl.strict = true
-
- this.config.retry = this.config.retry || {}
- if (typeof this.config.retry.retries !== 'number') this.config.retry.retries = 2
- if (typeof this.config.retry.factor !== 'number') this.config.retry.factor = 10
- if (typeof this.config.retry.minTimeout !== 'number') this.config.retry.minTimeout = 10000
- if (typeof this.config.retry.maxTimeout !== 'number') this.config.retry.maxTimeout = 60000
- if (typeof this.config.maxSockets !== 'number') this.config.maxSockets = 50
-
- this.config.userAgent = this.config.userAgent || 'node/' + process.version
- this.config.defaultTag = this.config.defaultTag || 'latest'
-
- this.log = this.config.log || npmlog
- delete this.config.log
-
- var client = this
- client.access = require('./lib/access')
- client.adduser = require('./lib/adduser')
- client.attempt = require('./lib/attempt')
- client.authify = require('./lib/authify')
- client.deprecate = require('./lib/deprecate')
- client.distTags = Object.create(client)
- client.distTags.add = require('./lib/dist-tags/add')
- client.distTags.fetch = require('./lib/dist-tags/fetch')
- client.distTags.rm = require('./lib/dist-tags/rm')
- client.distTags.set = require('./lib/dist-tags/set')
- client.distTags.update = require('./lib/dist-tags/update')
- client.fetch = require('./lib/fetch')
- client.get = require('./lib/get')
- client.initialize = require('./lib/initialize')
- client.logout = require('./lib/logout')
- client.org = require('./lib/org')
- client.ping = require('./lib/ping')
- client.publish = require('./lib/publish')
- client.request = require('./lib/request')
- client.sendAnonymousCLIMetrics = require('./lib/send-anonymous-CLI-metrics')
- client.star = require('./lib/star')
- client.stars = require('./lib/stars')
- client.tag = require('./lib/tag')
- client.team = require('./lib/team')
- client.unpublish = require('./lib/unpublish')
- client.whoami = require('./lib/whoami')
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/access.js b/deps/npm/node_modules/npm-registry-client/lib/access.js
deleted file mode 100644
index caa80b1219..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/access.js
+++ /dev/null
@@ -1,168 +0,0 @@
-module.exports = access
-
-var assert = require('assert')
-var url = require('url')
-var npa = require('npm-package-arg')
-var subcommands = {}
-
-function access (sub, uri, params, cb) {
- accessAssertions(sub, uri, params, cb)
- return subcommands[sub].call(this, uri, params, cb)
-}
-
-subcommands.public = function (uri, params, cb) {
- return setAccess.call(this, 'public', uri, params, cb)
-}
-subcommands.restricted = function (uri, params, cb) {
- return setAccess.call(this, 'restricted', uri, params, cb)
-}
-subcommands['2fa-required'] = function (uri, params, cb) {
- return setRequires2fa.call(this, true, uri, params, cb)
-}
-subcommands['2fa-not-required'] = function (uri, params, cb) {
- return setRequires2fa.call(this, false, uri, params, cb)
-}
-
-function setAccess (access, uri, params, cb) {
- return this.request(apiUri(uri, 'package', params.package, 'access'), {
- method: 'POST',
- auth: params.auth,
- body: JSON.stringify({ access: access })
- }, cb)
-}
-
-function setRequires2fa (requires2fa, uri, params, cb) {
- return this.request(apiUri(uri, 'package', params.package, 'access'), {
- method: 'POST',
- auth: params.auth,
- body: JSON.stringify({ publish_requires_tfa: requires2fa })
- }, cb)
-}
-
-subcommands.grant = function (uri, params, cb) {
- var reqUri = apiUri(uri, 'team', params.scope, params.team, 'package')
- return this.request(reqUri, {
- method: 'PUT',
- auth: params.auth,
- body: JSON.stringify({
- permissions: params.permissions,
- package: params.package
- })
- }, cb)
-}
-
-subcommands.revoke = function (uri, params, cb) {
- var reqUri = apiUri(uri, 'team', params.scope, params.team, 'package')
- return this.request(reqUri, {
- method: 'DELETE',
- auth: params.auth,
- body: JSON.stringify({
- package: params.package
- })
- }, cb)
-}
-
-subcommands['ls-packages'] = function (uri, params, cb, type) {
- type = type || (params.team ? 'team' : 'org')
- var client = this
- var uriParams = '?format=cli'
- var reqUri = apiUri(uri, type, params.scope, params.team, 'package')
- return client.request(reqUri + uriParams, {
- method: 'GET',
- auth: params.auth
- }, function (err, perms) {
- if (err && err.statusCode === 404 && type === 'org') {
- subcommands['ls-packages'].call(client, uri, params, cb, 'user')
- } else {
- cb(err, perms && translatePermissions(perms))
- }
- })
-}
-
-subcommands['ls-collaborators'] = function (uri, params, cb) {
- var uriParams = '?format=cli'
- if (params.user) {
- uriParams += ('&user=' + encodeURIComponent(params.user))
- }
- var reqUri = apiUri(uri, 'package', params.package, 'collaborators')
- return this.request(reqUri + uriParams, {
- method: 'GET',
- auth: params.auth
- }, function (err, perms) {
- cb(err, perms && translatePermissions(perms))
- })
-}
-
-subcommands.edit = function () {
- throw new Error('edit subcommand is not implemented yet')
-}
-
-function apiUri (registryUri) {
- var path = Array.prototype.slice.call(arguments, 1)
- .filter(function (x) { return x })
- .map(encodeURIComponent)
- .join('/')
- return url.resolve(registryUri, '-/' + path)
-}
-
-function accessAssertions (subcommand, uri, params, cb) {
- assert(subcommands.hasOwnProperty(subcommand),
- 'access subcommand must be one of ' +
- Object.keys(subcommands).join(', '))
- typeChecks({
- 'uri': [uri, 'string'],
- 'params': [params, 'object'],
- 'auth': [params.auth, 'object'],
- 'callback': [cb, 'function']
- })
- if (contains([
- 'public', 'restricted'
- ], subcommand)) {
- typeChecks({ 'package': [params.package, 'string'] })
- assert(!!npa(params.package).scope,
- 'access commands are only accessible for scoped packages')
- }
- if (contains(['grant', 'revoke', 'ls-packages'], subcommand)) {
- typeChecks({ 'scope': [params.scope, 'string'] })
- }
- if (contains(['grant', 'revoke'], subcommand)) {
- typeChecks({ 'team': [params.team, 'string'] })
- }
- if (subcommand === 'grant') {
- typeChecks({ 'permissions': [params.permissions, 'string'] })
- assert(params.permissions === 'read-only' ||
- params.permissions === 'read-write',
- 'permissions must be either read-only or read-write')
- }
-}
-
-function typeChecks (specs) {
- Object.keys(specs).forEach(function (key) {
- var checks = specs[key]
- /* eslint valid-typeof:0 */
- assert(typeof checks[0] === checks[1],
- key + ' is required and must be of type ' + checks[1])
- })
-}
-
-function contains (arr, item) {
- return arr.indexOf(item) !== -1
-}
-
-function translatePermissions (perms) {
- var newPerms = {}
- for (var key in perms) {
- if (perms.hasOwnProperty(key)) {
- if (perms[key] === 'read') {
- newPerms[key] = 'read-only'
- } else if (perms[key] === 'write') {
- newPerms[key] = 'read-write'
- } else {
- // This shouldn't happen, but let's not break things
- // if the API starts returning different things.
- newPerms[key] = perms[key]
- }
- }
- }
- return newPerms
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/adduser.js b/deps/npm/node_modules/npm-registry-client/lib/adduser.js
deleted file mode 100644
index a31d5b0333..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/adduser.js
+++ /dev/null
@@ -1,128 +0,0 @@
-module.exports = adduser
-
-var url = require('url')
-var assert = require('assert')
-
-function adduser (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to adduser')
- assert(
- params && typeof params === 'object',
- 'must pass params to adduser'
- )
- assert(typeof cb === 'function', 'must pass callback to adduser')
-
- assert(params.auth && typeof params.auth, 'must pass auth to adduser')
- var auth = params.auth
- assert(typeof auth.username === 'string', 'must include username in auth')
- assert(typeof auth.password === 'string', 'must include password in auth')
- assert(typeof auth.email === 'string', 'must include email in auth')
-
- // normalize registry URL
- if (uri.slice(-1) !== '/') uri += '/'
-
- var username = auth.username.trim()
- var password = auth.password.trim()
- var email = auth.email.trim()
-
- // validation
- if (!username) return cb(new Error('No username supplied.'))
- if (!password) return cb(new Error('No password supplied.'))
- if (!email) return cb(new Error('No email address supplied.'))
- if (!email.match(/^[^@]+@[^.]+\.[^.]+/)) {
- return cb(new Error('Please use a real email address.'))
- }
-
- var userobj = {
- _id: 'org.couchdb.user:' + username,
- name: username,
- password: password,
- email: email,
- type: 'user',
- roles: [],
- date: new Date().toISOString()
- }
-
- var token = this.config.couchToken
- if (this.couchLogin) this.couchLogin.token = null
-
- cb = done.call(this, token, cb)
-
- var logObj = Object.keys(userobj).map(function (k) {
- if (k === 'password') return [k, 'XXXXX']
- return [k, userobj[k]]
- }).reduce(function (s, kv) {
- s[kv[0]] = kv[1]
- return s
- }, {})
-
- this.log.verbose('adduser', 'before first PUT', logObj)
-
- var client = this
-
- uri = url.resolve(uri, '-/user/org.couchdb.user:' + encodeURIComponent(username))
- var options = {
- method: 'PUT',
- body: userobj,
- auth: auth
- }
- this.request(
- uri,
- Object.assign({}, options),
- function (error, data, json, response) {
- if (!error || !response || response.statusCode !== 409) {
- return cb(error, data, json, response)
- }
-
- client.log.verbose('adduser', 'update existing user')
- return client.request(
- uri + '?write=true',
- { auth: auth },
- function (er, data, json, response) {
- if (er || data.error) {
- return cb(er, data, json, response)
- }
- Object.keys(data).forEach(function (k) {
- if (!userobj[k] || k === 'roles') {
- userobj[k] = data[k]
- }
- })
- client.log.verbose('adduser', 'userobj', logObj)
- client.request(uri + '/-rev/' + userobj._rev, options, cb)
- }
- )
- }
- )
-
- function done (token, cb) {
- return function (error, data, json, response) {
- if (!error && (!response || response.statusCode === 201)) {
- return cb(error, data, json, response)
- }
-
- // there was some kind of error, reinstate previous auth/token/etc.
- if (client.couchLogin) {
- client.couchLogin.token = token
- if (client.couchLogin.tokenSet) {
- client.couchLogin.tokenSet(token)
- }
- }
-
- client.log.verbose('adduser', 'back', [error, data, json])
- if (!error) {
- error = new Error(
- ((response && response.statusCode) || '') + ' ' +
- 'Could not create user\n' + JSON.stringify(data)
- )
- }
-
- if (response && (response.statusCode === 401 || response.statusCode === 403)) {
- client.log.warn('adduser', 'Incorrect username or password\n' +
- 'You can reset your account by visiting:\n' +
- '\n' +
- ' https://npmjs.org/forgot\n')
- }
-
- return cb(error)
- }
- }
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/attempt.js b/deps/npm/node_modules/npm-registry-client/lib/attempt.js
deleted file mode 100644
index d41bbc4fae..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/attempt.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var retry = require('retry')
-
-module.exports = attempt
-
-function attempt (cb) {
- // Tuned to spread 3 attempts over about a minute.
- // See formula at <https://github.com/tim-kos/node-retry>.
- var operation = retry.operation(this.config.retry)
-
- var client = this
- operation.attempt(function (currentAttempt) {
- client.log.info(
- 'attempt',
- 'registry request try #' + currentAttempt +
- ' at ' + (new Date()).toLocaleTimeString()
- )
-
- cb(operation)
- })
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/authify.js b/deps/npm/node_modules/npm-registry-client/lib/authify.js
deleted file mode 100644
index 9b38a30a92..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/authify.js
+++ /dev/null
@@ -1,26 +0,0 @@
-module.exports = authify
-
-function authify (authed, parsed, headers, credentials) {
- if (credentials && credentials.otp) {
- this.log.verbose('request', 'passing along npm otp')
- headers['npm-otp'] = credentials.otp
- }
- if (credentials && credentials.token) {
- this.log.verbose('request', 'using bearer token for auth')
- headers.authorization = 'Bearer ' + credentials.token
-
- return null
- }
-
- if (authed) {
- if (credentials && credentials.username && credentials.password) {
- var username = encodeURIComponent(credentials.username)
- var password = encodeURIComponent(credentials.password)
- parsed.auth = username + ':' + password
- } else {
- return new Error(
- 'This request requires auth credentials. Run `npm login` and repeat the request.'
- )
- }
- }
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/deprecate.js b/deps/npm/node_modules/npm-registry-client/lib/deprecate.js
deleted file mode 100644
index 5ff3a8891f..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/deprecate.js
+++ /dev/null
@@ -1,42 +0,0 @@
-module.exports = deprecate
-
-var assert = require('assert')
-var semver = require('semver')
-
-function deprecate (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to deprecate')
- assert(params && typeof params === 'object', 'must pass params to deprecate')
- assert(typeof cb === 'function', 'must pass callback to deprecate')
-
- assert(typeof params.version === 'string', 'must pass version to deprecate')
- assert(typeof params.message === 'string', 'must pass message to deprecate')
- assert(
- params.auth && typeof params.auth === 'object',
- 'must pass auth to deprecate'
- )
-
- var version = params.version
- var message = params.message
- var auth = params.auth
-
- if (semver.validRange(version) === null) {
- return cb(new Error('invalid version range: ' + version))
- }
-
- this.get(uri + '?write=true', { auth: auth }, function (er, data) {
- if (er) return cb(er)
- // filter all the versions that match
- Object.keys(data.versions).filter(function (v) {
- return semver.satisfies(v, version)
- }).forEach(function (v) {
- data.versions[v].deprecated = message
- })
- // now update the doc on the registry
- var options = {
- method: 'PUT',
- body: data,
- auth: auth
- }
- this.request(uri, options, cb)
- }.bind(this))
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/add.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/add.js
deleted file mode 100644
index 924199ad1e..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/add.js
+++ /dev/null
@@ -1,43 +0,0 @@
-module.exports = add
-
-var assert = require('assert')
-var url = require('url')
-
-var npa = require('npm-package-arg')
-
-function add (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to distTags.add')
- assert(
- params && typeof params === 'object',
- 'must pass params to distTags.add'
- )
- assert(typeof cb === 'function', 'muss pass callback to distTags.add')
-
- assert(
- typeof params.package === 'string',
- 'must pass package name to distTags.add'
- )
- assert(
- typeof params.distTag === 'string',
- 'must pass package distTag name to distTags.add'
- )
- assert(
- typeof params.version === 'string',
- 'must pass version to be mapped to distTag to distTags.add'
- )
- assert(
- params.auth && typeof params.auth === 'object',
- 'must pass auth to distTags.add'
- )
-
- var p = npa(params.package)
- var pkg = p.scope ? params.package.replace('/', '%2f') : params.package
- var rest = '-/package/' + pkg + '/dist-tags/' + params.distTag
-
- var options = {
- method: 'PUT',
- body: JSON.stringify(params.version),
- auth: params.auth
- }
- this.request(url.resolve(uri, rest), options, cb)
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js
deleted file mode 100644
index 69a126d1f4..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js
+++ /dev/null
@@ -1,37 +0,0 @@
-module.exports = fetch
-
-var assert = require('assert')
-var url = require('url')
-
-var npa = require('npm-package-arg')
-
-function fetch (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to distTags.fetch')
- assert(
- params && typeof params === 'object',
- 'must pass params to distTags.fetch'
- )
- assert(typeof cb === 'function', 'must pass callback to distTags.fetch')
-
- assert(
- typeof params.package === 'string',
- 'must pass package name to distTags.fetch'
- )
- assert(
- params.auth && typeof params.auth === 'object',
- 'must pass auth to distTags.fetch'
- )
-
- var p = npa(params.package)
- var pkg = p.scope ? params.package.replace('/', '%2f') : params.package
- var rest = '-/package/' + pkg + '/dist-tags'
-
- var options = {
- method: 'GET',
- auth: params.auth
- }
- this.request(url.resolve(uri, rest), options, function (er, data) {
- if (data && typeof data === 'object') delete data._etag
- cb(er, data)
- })
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/rm.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/rm.js
deleted file mode 100644
index d2bdda05da..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/rm.js
+++ /dev/null
@@ -1,38 +0,0 @@
-module.exports = rm
-
-var assert = require('assert')
-var url = require('url')
-
-var npa = require('npm-package-arg')
-
-function rm (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to distTags.rm')
- assert(
- params && typeof params === 'object',
- 'must pass params to distTags.rm'
- )
- assert(typeof cb === 'function', 'muss pass callback to distTags.rm')
-
- assert(
- typeof params.package === 'string',
- 'must pass package name to distTags.rm'
- )
- assert(
- typeof params.distTag === 'string',
- 'must pass package distTag name to distTags.rm'
- )
- assert(
- params.auth && typeof params.auth === 'object',
- 'must pass auth to distTags.rm'
- )
-
- var p = npa(params.package)
- var pkg = p.scope ? params.package.replace('/', '%2f') : params.package
- var rest = '-/package/' + pkg + '/dist-tags/' + params.distTag
-
- var options = {
- method: 'DELETE',
- auth: params.auth
- }
- this.request(url.resolve(uri, rest), options, cb)
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/set.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/set.js
deleted file mode 100644
index 7af351d635..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/set.js
+++ /dev/null
@@ -1,39 +0,0 @@
-module.exports = set
-
-var assert = require('assert')
-var url = require('url')
-
-var npa = require('npm-package-arg')
-
-function set (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to distTags.set')
- assert(
- params && typeof params === 'object',
- 'must pass params to distTags.set'
- )
- assert(typeof cb === 'function', 'muss pass callback to distTags.set')
-
- assert(
- typeof params.package === 'string',
- 'must pass package name to distTags.set'
- )
- assert(
- params.distTags && typeof params.distTags === 'object',
- 'must pass distTags map to distTags.set'
- )
- assert(
- params.auth && typeof params.auth === 'object',
- 'must pass auth to distTags.set'
- )
-
- var p = npa(params.package)
- var pkg = p.scope ? params.package.replace('/', '%2f') : params.package
- var rest = '-/package/' + pkg + '/dist-tags'
-
- var options = {
- method: 'PUT',
- body: JSON.stringify(params.distTags),
- auth: params.auth
- }
- this.request(url.resolve(uri, rest), options, cb)
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/update.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/update.js
deleted file mode 100644
index 07ec3e5e75..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/update.js
+++ /dev/null
@@ -1,39 +0,0 @@
-module.exports = update
-
-var assert = require('assert')
-var url = require('url')
-
-var npa = require('npm-package-arg')
-
-function update (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to distTags.update')
- assert(
- params && typeof params === 'object',
- 'must pass params to distTags.update'
- )
- assert(typeof cb === 'function', 'muss pass callback to distTags.update')
-
- assert(
- typeof params.package === 'string',
- 'must pass package name to distTags.update'
- )
- assert(
- params.distTags && typeof params.distTags === 'object',
- 'must pass distTags map to distTags.update'
- )
- assert(
- params.auth && typeof params.auth === 'object',
- 'must pass auth to distTags.update'
- )
-
- var p = npa(params.package)
- var pkg = p.scope ? params.package.replace('/', '%2f') : params.package
- var rest = '-/package/' + pkg + '/dist-tags'
-
- var options = {
- method: 'POST',
- body: JSON.stringify(params.distTags),
- auth: params.auth
- }
- this.request(url.resolve(uri, rest), options, cb)
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/fetch.js b/deps/npm/node_modules/npm-registry-client/lib/fetch.js
deleted file mode 100644
index 5ab8587780..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/fetch.js
+++ /dev/null
@@ -1,85 +0,0 @@
-var assert = require('assert')
-var url = require('url')
-
-var request = require('request')
-var once = require('once')
-
-module.exports = fetch
-
-function fetch (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass uri to request')
- assert(params && typeof params === 'object', 'must pass params to request')
- assert(typeof cb === 'function', 'must pass callback to request')
-
- cb = once(cb)
-
- var client = this
- this.attempt(function (operation) {
- makeRequest.call(client, uri, params, function (er, req) {
- if (er) return cb(er)
-
- req.once('error', retryOnError)
-
- function retryOnError (er) {
- if (operation.retry(er)) {
- client.log.info('retry', 'will retry, error on last attempt: ' + er)
- } else {
- cb(er)
- }
- }
-
- req.on('response', function (res) {
- client.log.http('fetch', '' + res.statusCode, uri)
- req.removeListener('error', retryOnError)
-
- var er
- var statusCode = res && res.statusCode
- if (statusCode === 200) {
- res.resume()
-
- req.once('error', function (er) {
- res.emit('error', er)
- })
-
- return cb(null, res)
- // Only retry on 408, 5xx or no `response`.
- } else if (statusCode === 408) {
- er = new Error('request timed out')
- } else if (statusCode >= 500) {
- er = new Error('server error ' + statusCode)
- }
-
- if (er && operation.retry(er)) {
- client.log.info('retry', 'will retry, error on last attempt: ' + er)
- } else {
- cb(new Error('fetch failed with status code ' + statusCode))
- }
- })
- })
- })
-}
-
-function makeRequest (remote, params, cb) {
- var parsed = url.parse(remote)
- this.log.http('fetch', 'GET', parsed.href)
-
- var headers = params.headers || {}
- var er = this.authify(
- params.auth && params.auth.alwaysAuth,
- parsed,
- headers,
- params.auth
- )
- if (er) return cb(er)
-
- var opts = this.initialize(
- parsed,
- 'GET',
- 'application/x-tar, application/vnd.github+json; q=0.1',
- headers
- )
- // always want to follow redirects for fetch
- opts.followRedirect = true
-
- cb(null, request(opts))
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/get.js b/deps/npm/node_modules/npm-registry-client/lib/get.js
deleted file mode 100644
index ab0eae10f0..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/get.js
+++ /dev/null
@@ -1,22 +0,0 @@
-module.exports = get
-
-var assert = require('assert')
-var url = require('url')
-
-/*
- * This is meant to be overridden in specific implementations if you
- * want specialized behavior for metadata (i.e. caching).
- */
-function get (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to get')
- assert(params && typeof params === 'object', 'must pass params to get')
- assert(typeof cb === 'function', 'must pass callback to get')
-
- var parsed = url.parse(uri)
- assert(
- parsed.protocol === 'http:' || parsed.protocol === 'https:',
- 'must have a URL that starts with http: or https:'
- )
-
- this.request(uri, params, cb)
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/initialize.js b/deps/npm/node_modules/npm-registry-client/lib/initialize.js
deleted file mode 100644
index a25077eae5..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/initialize.js
+++ /dev/null
@@ -1,91 +0,0 @@
-var crypto = require('crypto')
-var HttpAgent = require('http').Agent
-var HttpsAgent = require('https').Agent
-
-var pkg = require('../package.json')
-
-module.exports = initialize
-
-function initialize (uri, method, accept, headers) {
- if (!this.config.sessionToken) {
- this.config.sessionToken = crypto.randomBytes(8).toString('hex')
- this.log.verbose('request id', this.config.sessionToken)
- }
- if (this.config.isFromCI == null) {
- this.config.isFromCI = Boolean(
- process.env['CI'] === 'true' || process.env['TDDIUM'] ||
- process.env['JENKINS_URL'] || process.env['bamboo.buildKey'] ||
- process.env['GO_PIPELINE_NAME'])
- }
-
- var opts = {
- url: uri,
- method: method,
- headers: headers,
- localAddress: this.config.proxy.localAddress,
- strictSSL: this.config.ssl.strict,
- cert: this.config.ssl.certificate,
- key: this.config.ssl.key,
- ca: this.config.ssl.ca,
- agent: getAgent.call(this, uri.protocol)
- }
-
- // allow explicit disabling of proxy in environment via CLI
- //
- // how false gets here is the CLI's problem (it's gross)
- if (this.config.proxy.http === false) {
- opts.proxy = null
- } else {
- // request will not pay attention to the NOPROXY environment variable if a
- // config value named proxy is passed in, even if it's set to null.
- var proxy
- if (uri.protocol === 'https:') {
- proxy = this.config.proxy.https
- } else {
- proxy = this.config.proxy.http
- }
- if (typeof proxy === 'string') opts.proxy = proxy
- }
-
- headers.version = this.version || pkg.version
- headers.accept = accept
-
- if (this.refer) headers.referer = this.refer
-
- headers['npm-session'] = this.config.sessionToken
- headers['npm-in-ci'] = String(this.config.isFromCI)
- headers['user-agent'] = this.config.userAgent
- if (this.config.scope) {
- headers['npm-scope'] = this.config.scope
- }
-
- return opts
-}
-
-function getAgent (protocol) {
- if (protocol === 'https:') {
- if (!this.httpsAgent) {
- this.httpsAgent = new HttpsAgent({
- keepAlive: true,
- maxSockets: this.config.maxSockets,
- localAddress: this.config.proxy.localAddress,
- rejectUnauthorized: this.config.ssl.strict,
- ca: this.config.ssl.ca,
- cert: this.config.ssl.certificate,
- key: this.config.ssl.key
- })
- }
-
- return this.httpsAgent
- } else {
- if (!this.httpAgent) {
- this.httpAgent = new HttpAgent({
- keepAlive: true,
- maxSockets: this.config.maxSockets,
- localAddress: this.config.proxy.localAddress
- })
- }
-
- return this.httpAgent
- }
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/logout.js b/deps/npm/node_modules/npm-registry-client/lib/logout.js
deleted file mode 100644
index e66e9b78ac..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/logout.js
+++ /dev/null
@@ -1,23 +0,0 @@
-module.exports = logout
-
-var assert = require('assert')
-var url = require('url')
-
-function logout (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to logout')
- assert(params && typeof params === 'object', 'must pass params to logout')
- assert(typeof cb === 'function', 'must pass callback to star')
-
- var auth = params.auth
- assert(auth && typeof auth === 'object', 'must pass auth to logout')
- assert(typeof auth.token === 'string', 'can only log out for token auth')
-
- uri = url.resolve(uri, '-/user/token/' + auth.token)
- var options = {
- method: 'DELETE',
- auth: auth
- }
-
- this.log.verbose('logout', 'invalidating session token for user')
- this.request(uri, options, cb)
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/org.js b/deps/npm/node_modules/npm-registry-client/lib/org.js
deleted file mode 100644
index 3072b3817a..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/org.js
+++ /dev/null
@@ -1,62 +0,0 @@
-'use strict'
-
-module.exports = org
-
-var assert = require('assert')
-var url = require('url')
-
-var subcommands = {}
-
-function org (subcommand, uri, params, cb) {
- orgAssertions(subcommand, uri, params, cb)
- return subcommands[subcommand].call(this, uri, params, cb)
-}
-
-subcommands.set = subcommands.add = function (uri, params, cb) {
- return this.request(apiUri(uri, 'org', params.org, 'user'), {
- method: 'PUT',
- auth: params.auth,
- body: JSON.stringify({
- user: params.user,
- role: params.role
- })
- }, cb)
-}
-
-subcommands.rm = function (uri, params, cb) {
- return this.request(apiUri(uri, 'org', params.org, 'user'), {
- method: 'DELETE',
- auth: params.auth,
- body: JSON.stringify({
- user: params.user
- })
- }, cb)
-}
-
-subcommands.ls = function (uri, params, cb) {
- return this.request(apiUri(uri, 'org', params.org, 'user'), {
- method: 'GET',
- auth: params.auth
- }, cb)
-}
-
-function apiUri (registryUri) {
- var path = Array.prototype.slice.call(arguments, 1)
- .map(encodeURIComponent)
- .join('/')
- return url.resolve(registryUri, '-/' + path)
-}
-
-function orgAssertions (subcommand, uri, params, cb) {
- assert(subcommand, 'subcommand is required')
- assert(subcommands.hasOwnProperty(subcommand),
- 'org subcommand must be one of ' + Object.keys(subcommands))
- assert(typeof uri === 'string', 'registry URI is required')
- assert(typeof params === 'object', 'params are required')
- assert(typeof params.auth === 'object', 'auth is required')
- assert(!cb || typeof cb === 'function', 'callback must be a function')
- assert(typeof params.org === 'string', 'org name is required')
- if (subcommand === 'rm' || subcommand === 'add' || subcommand === 'set') {
- assert(typeof params.user === 'string', 'user is required')
- }
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/ping.js b/deps/npm/node_modules/npm-registry-client/lib/ping.js
deleted file mode 100644
index 5ab98c52d2..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/ping.js
+++ /dev/null
@@ -1,21 +0,0 @@
-module.exports = ping
-
-var url = require('url')
-var assert = require('assert')
-
-function ping (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to ping')
- assert(params && typeof params === 'object', 'must pass params to ping')
- assert(typeof cb === 'function', 'must pass callback to ping')
-
- var auth = params.auth
- assert(auth && typeof auth === 'object', 'must pass auth to ping')
-
- this.request(url.resolve(uri, '-/ping?write=true'), { auth: auth }, function (er, fullData, data, response) {
- if (er || fullData) {
- cb(er, fullData, data, response)
- } else {
- cb(new Error('No data received'))
- }
- })
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/publish.js b/deps/npm/node_modules/npm-registry-client/lib/publish.js
deleted file mode 100644
index fd3adce126..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/publish.js
+++ /dev/null
@@ -1,194 +0,0 @@
-module.exports = publish
-
-var url = require('url')
-var semver = require('semver')
-var Stream = require('stream').Stream
-var assert = require('assert')
-var fixer = require('normalize-package-data').fixer
-var concat = require('concat-stream')
-var ssri = require('ssri')
-
-function escaped (name) {
- return name.replace('/', '%2f')
-}
-
-function publish (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to publish')
- assert(params && typeof params === 'object', 'must pass params to publish')
- assert(typeof cb === 'function', 'must pass callback to publish')
-
- var access = params.access
- assert(
- (!access) || ['public', 'restricted'].indexOf(access) !== -1,
- "if present, access level must be either 'public' or 'restricted'"
- )
-
- var auth = params.auth
- assert(auth && typeof auth === 'object', 'must pass auth to publish')
- if (!(auth.token ||
- (auth.password && auth.username && auth.email))) {
- var er = new Error('auth required for publishing')
- er.code = 'ENEEDAUTH'
- return cb(er)
- }
-
- var metadata = params.metadata
- assert(
- metadata && typeof metadata === 'object',
- 'must pass package metadata to publish'
- )
- try {
- fixer.fixNameField(metadata, {strict: true, allowLegacyCase: true})
- } catch (er) {
- return cb(er)
- }
- var version = semver.clean(metadata.version)
- if (!version) return cb(new Error('invalid semver: ' + metadata.version))
- metadata.version = version
-
- var body = params.body
- assert(body, 'must pass package body to publish')
- assert(body instanceof Stream, 'package body passed to publish must be a stream')
- var client = this
- var sink = concat(function (tarbuffer) {
- putFirst.call(client, uri, metadata, tarbuffer, access, auth, cb)
- })
- sink.on('error', cb)
- body.pipe(sink)
-}
-
-function putFirst (registry, data, tarbuffer, access, auth, cb) {
- // optimistically try to PUT all in one single atomic thing.
- // If 409, then GET and merge, try again.
- // If other error, then fail.
-
- var root = {
- _id: data.name,
- name: data.name,
- description: data.description,
- 'dist-tags': {},
- versions: {},
- readme: data.readme || ''
- }
-
- if (access) root.access = access
-
- if (!auth.token) {
- root.maintainers = [{ name: auth.username, email: auth.email }]
- data.maintainers = JSON.parse(JSON.stringify(root.maintainers))
- }
-
- root.versions[ data.version ] = data
- var tag = data.tag || this.config.defaultTag
- root['dist-tags'][tag] = data.version
-
- var tbName = data.name + '-' + data.version + '.tgz'
- var tbURI = data.name + '/-/' + tbName
- var integrity = ssri.fromData(tarbuffer, {
- algorithms: ['sha1', 'sha512']
- })
-
- data._id = data.name + '@' + data.version
- data.dist = data.dist || {}
- // Don't bother having sha1 in the actual integrity field
- data.dist.integrity = integrity['sha512'][0].toString()
- // Legacy shasum support
- data.dist.shasum = integrity['sha1'][0].hexDigest()
- data.dist.tarball = url.resolve(registry, tbURI)
- .replace(/^https:\/\//, 'http://')
-
- root._attachments = {}
- root._attachments[ tbName ] = {
- 'content_type': 'application/octet-stream',
- 'data': tarbuffer.toString('base64'),
- 'length': tarbuffer.length
- }
-
- var fixed = url.resolve(registry, escaped(data.name))
- var client = this
- var options = {
- method: 'PUT',
- body: root,
- auth: auth
- }
- this.request(fixed, options, function (er, parsed, json, res) {
- var r409 = 'must supply latest _rev to update existing package'
- var r409b = 'Document update conflict.'
- var conflict = res && res.statusCode === 409
- if (parsed && (parsed.reason === r409 || parsed.reason === r409b)) {
- conflict = true
- }
-
- // a 409 is typical here. GET the data and merge in.
- if (er && !conflict) {
- client.log.error('publish', 'Failed PUT ' + (res && res.statusCode))
- return cb(er)
- }
-
- if (!er && !conflict) return cb(er, parsed, json, res)
-
- // let's see what versions are already published.
- client.request(fixed + '?write=true', { auth: auth }, function (er, current) {
- if (er) return cb(er)
-
- putNext.call(client, registry, data.version, root, current, auth, cb)
- })
- })
-}
-
-function putNext (registry, newVersion, root, current, auth, cb) {
- // already have the tardata on the root object
- // just merge in existing stuff
- var curVers = Object.keys(current.versions || {}).map(function (v) {
- return semver.clean(v, true)
- }).concat(Object.keys(current.time || {}).map(function (v) {
- if (semver.valid(v, true)) return semver.clean(v, true)
- }).filter(function (v) {
- return v
- }))
-
- if (curVers.indexOf(newVersion) !== -1) {
- return cb(conflictError(root.name, newVersion))
- }
-
- current.versions[newVersion] = root.versions[newVersion]
- current._attachments = current._attachments || {}
- for (var i in root) {
- switch (i) {
- // objects that copy over the new stuffs
- case 'dist-tags':
- case 'versions':
- case '_attachments':
- for (var j in root[i]) {
- current[i][j] = root[i][j]
- }
- break
-
- // ignore these
- case 'maintainers':
- break
-
- // copy
- default:
- current[i] = root[i]
- }
- }
- var maint = JSON.parse(JSON.stringify(root.maintainers))
- root.versions[newVersion].maintainers = maint
-
- var uri = url.resolve(registry, escaped(root.name))
- var options = {
- method: 'PUT',
- body: current,
- auth: auth
- }
- this.request(uri, options, cb)
-}
-
-function conflictError (pkgid, version) {
- var e = new Error('cannot modify pre-existing version')
- e.code = 'EPUBLISHCONFLICT'
- e.pkgid = pkgid
- e.version = version
- return e
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/request.js b/deps/npm/node_modules/npm-registry-client/lib/request.js
deleted file mode 100644
index 5987bfa6fb..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/request.js
+++ /dev/null
@@ -1,336 +0,0 @@
-module.exports = regRequest
-
-// npm: means
-// 1. https
-// 2. send authorization
-// 3. content-type is 'application/json' -- metadata
-//
-var assert = require('assert')
-var url = require('url')
-var zlib = require('zlib')
-var Stream = require('stream').Stream
-var STATUS_CODES = require('http').STATUS_CODES
-
-var request = require('request')
-var once = require('once')
-
-function regRequest (uri, params, cb_) {
- assert(typeof uri === 'string', 'must pass uri to request')
- assert(params && typeof params === 'object', 'must pass params to request')
- assert(typeof cb_ === 'function', 'must pass callback to request')
-
- params.method = params.method || 'GET'
- this.log.verbose('request', 'uri', uri)
-
- // Since there are multiple places where an error could occur,
- // don't let the cb be called more than once.
- var cb = once(cb_)
-
- if (uri.match(/^\/?favicon.ico/)) {
- return cb(new Error("favicon.ico isn't a package, it's a picture."))
- }
-
- var adduserChange = /\/?-\/user\/org\.couchdb\.user:([^/]+)\/-rev/
- var isUserChange = uri.match(adduserChange)
- var adduserNew = /\/?-\/user\/org\.couchdb\.user:([^/?]+)$/
- var isNewUser = uri.match(adduserNew)
- var alwaysAuth = params.auth && params.auth.alwaysAuth
- var isDelete = params.method === 'DELETE'
- var isWrite = params.body || isDelete
-
- if (isUserChange && !isWrite) {
- return cb(new Error('trying to change user document without writing(?!)'))
- }
-
- if (params.authed == null) {
- // new users can *not* use auth, because they don't *have* auth yet
- if (isUserChange) {
- this.log.verbose('request', 'updating existing user; sending authorization')
- params.authed = true
- } else if (isNewUser) {
- this.log.verbose('request', "new user, so can't send auth")
- params.authed = false
- } else if (alwaysAuth) {
- this.log.verbose('request', 'always-auth set; sending authorization')
- params.authed = true
- } else if (isWrite) {
- this.log.verbose('request', 'sending authorization for write operation')
- params.authed = true
- } else {
- // most of the time we don't want to auth
- this.log.verbose('request', 'no auth needed')
- params.authed = false
- }
- }
-
- var self = this
- this.attempt(function (operation) {
- makeRequest.call(self, uri, params, function (er, parsed, raw, response) {
- if (response) {
- self.log.verbose('headers', response.headers)
- if (response.headers['npm-notice']) {
- self.log.warn('notice', response.headers['npm-notice'])
- }
- }
-
- if (!er || (er.message && er.message.match(/^SSL Error/))) {
- if (er) er.code = 'ESSL'
- return cb(er, parsed, raw, response)
- }
-
- // Only retry on 408, 5xx or no `response`.
- var statusCode = response && response.statusCode
-
- var timeout = statusCode === 408
- var serverError = statusCode >= 500
- var statusRetry = !statusCode || timeout || serverError
- if (er && statusRetry && operation.retry(er)) {
- self.log.info('retry', 'will retry, error on last attempt: ' + er)
- return undefined
- }
- cb.apply(null, arguments)
- })
- })
-}
-
-function makeRequest (uri, params, cb_) {
- var socket
- var cb = once(function (er, parsed, raw, response) {
- if (socket) {
- // The socket might be returned to a pool for re-use, so don’t keep
- // the 'error' listener from here attached.
- socket.removeListener('error', cb)
- }
-
- return cb_(er, parsed, raw, response)
- })
-
- var parsed = url.parse(uri)
- var headers = {}
-
- // metadata should be compressed
- headers['accept-encoding'] = 'gzip'
-
- // metadata should be minified, if the registry supports it
-
- var er = this.authify(params.authed, parsed, headers, params.auth)
- if (er) return cb_(er)
-
- var useCorgi = params.fullMetadata == null ? false : !params.fullMetadata
-
- var opts = this.initialize(
- parsed,
- params.method,
- useCorgi ? 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*' : 'application/json',
- headers
- )
-
- opts.followRedirect = (typeof params.follow === 'boolean' ? params.follow : true)
- opts.encoding = null // tell request let body be Buffer instance
-
- if (params.etag) {
- this.log.verbose('etag', params.etag)
- headers[params.method === 'GET' ? 'if-none-match' : 'if-match'] = params.etag
- }
-
- if (params.lastModified && params.method === 'GET') {
- this.log.verbose('lastModified', params.lastModified)
- headers['if-modified-since'] = params.lastModified
- }
-
- // figure out wth body is
- if (params.body) {
- if (Buffer.isBuffer(params.body)) {
- opts.body = params.body
- headers['content-type'] = 'application/json'
- headers['content-length'] = params.body.length
- } else if (typeof params.body === 'string') {
- opts.body = params.body
- headers['content-type'] = 'application/json'
- headers['content-length'] = Buffer.byteLength(params.body)
- } else if (params.body instanceof Stream) {
- headers['content-type'] = 'application/octet-stream'
- if (params.body.size) headers['content-length'] = params.body.size
- } else {
- delete params.body._etag
- delete params.body._lastModified
- opts.json = params.body
- }
- }
-
- this.log.http('request', params.method, parsed.href || '/')
-
- var done = requestDone.call(this, params.method, uri, cb)
- var req = request(opts, params.streaming ? undefined : decodeResponseBody(done))
-
- req.on('error', cb)
-
- // This should not be necessary, as the HTTP implementation in Node
- // passes errors occurring on the socket to the request itself. Being overly
- // cautious comes at a low cost, though.
- req.on('socket', function (s) {
- socket = s
- socket.on('error', cb)
- })
-
- if (params.streaming) {
- req.on('response', function (response) {
- if (response.statusCode >= 400) {
- var parts = []
- response.on('data', function (data) {
- parts.push(data)
- })
- response.on('end', function () {
- decodeResponseBody(done)(null, response, Buffer.concat(parts))
- })
- } else {
- response.on('end', function () {
- // don't ever re-use connections that had server errors.
- // those sockets connect to the Bad Place!
- if (response.socket && response.statusCode > 500) {
- response.socket.destroy()
- }
- })
-
- return cb(null, response)
- }
- })
- }
-
- if (params.body && (params.body instanceof Stream)) {
- params.body.pipe(req)
- }
-}
-
-function decodeResponseBody (cb) {
- return function (er, response, data) {
- if (er) return cb(er, response, data)
-
- // don't ever re-use connections that had server errors.
- // those sockets connect to the Bad Place!
- if (response.socket && response.statusCode > 500) {
- response.socket.destroy()
- }
-
- if (response.headers['content-encoding'] !== 'gzip') {
- return cb(er, response, data)
- }
-
- zlib.gunzip(data, function (er, buf) {
- if (er) return cb(er, response, data)
-
- cb(null, response, buf)
- })
- }
-}
-
-// cb(er, parsed, raw, response)
-function requestDone (method, where, cb) {
- return function (er, response, data) {
- if (er) return cb(er)
-
- var urlObj = url.parse(where)
- if (urlObj.auth) urlObj.auth = '***'
- this.log.http(response.statusCode, url.format(urlObj))
-
- if (Buffer.isBuffer(data)) {
- data = data.toString()
- }
-
- var parsed
- if (data && typeof data === 'string' && response.statusCode !== 304) {
- try {
- parsed = JSON.parse(data)
- } catch (ex) {
- ex.message += '\n' + data
- this.log.verbose('bad json', data)
- this.log.error('registry', 'error parsing json')
- return cb(ex, null, data, response)
- }
- } else if (data) {
- parsed = data
- data = JSON.stringify(parsed)
- }
-
- // expect data with any error codes
- if (!data && response.statusCode >= 400) {
- var code = response.statusCode
- return cb(
- makeError(code + ' ' + STATUS_CODES[code], null, code),
- null,
- data,
- response
- )
- }
-
- er = null
- if (parsed && response.headers.etag) {
- parsed._etag = response.headers.etag
- }
-
- if (parsed && response.headers['last-modified']) {
- parsed._lastModified = response.headers['last-modified']
- }
-
- // for the search endpoint, the 'error' property can be an object
- if ((parsed && parsed.error && typeof parsed.error !== 'object') ||
- response.statusCode >= 400) {
- var w = url.parse(where).pathname.substr(1)
- var name
- if (!w.match(/^-/)) {
- w = w.split('/')
- var index = w.indexOf('_rewrite')
- if (index === -1) {
- index = w.length - 1
- } else {
- index++
- }
- name = decodeURIComponent(w[index])
- }
-
- if (!parsed.error) {
- if (response.statusCode === 401 && response.headers['www-authenticate']) {
- const auth = response.headers['www-authenticate'].split(/,\s*/).map(s => s.toLowerCase())
- if (auth.indexOf('ipaddress') !== -1) {
- er = makeError('Login is not allowed from your IP address', name, response.statusCode, 'EAUTHIP')
- } else if (auth.indexOf('otp') !== -1) {
- er = makeError('OTP required for this operation', name, response.statusCode, 'EOTP')
- } else {
- er = makeError('Unable to authenticate, need: ' + response.headers['www-authenticate'], name, response.statusCode, 'EAUTHUNKNOWN')
- }
- } else {
- const msg = parsed.message ? ': ' + parsed.message : ''
- er = makeError(
- 'Registry returned ' + response.statusCode +
- ' for ' + method +
- ' on ' + where +
- msg,
- name,
- response.statusCode
- )
- }
- } else if (name && parsed.error === 'not_found') {
- er = makeError('404 Not Found: ' + name, name, response.statusCode)
- } else if (name && parsed.error === 'User not found') {
- er = makeError('User not found. Check `npm whoami` and make sure you have a NPM account.', name, response.statusCode)
- } else {
- er = makeError(
- parsed.error + ' ' + (parsed.reason || '') + ': ' + (name || w),
- name,
- response.statusCode
- )
- }
- }
- return cb(er, parsed, data, response)
- }.bind(this)
-}
-
-function makeError (message, name, statusCode, code) {
- var er = new Error(message)
- if (name) er.pkgid = name
- if (statusCode) {
- er.statusCode = statusCode
- er.code = code || 'E' + statusCode
- }
- return er
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/send-anonymous-CLI-metrics.js b/deps/npm/node_modules/npm-registry-client/lib/send-anonymous-CLI-metrics.js
deleted file mode 100644
index b5b7a1dca1..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/send-anonymous-CLI-metrics.js
+++ /dev/null
@@ -1,19 +0,0 @@
-module.exports = send
-
-var assert = require('assert')
-var url = require('url')
-
-function send (registryUrl, params, cb) {
- assert(typeof registryUrl === 'string', 'must pass registry URI')
- assert(params && typeof params === 'object', 'must pass params')
- assert(typeof cb === 'function', 'must pass callback')
-
- var uri = url.resolve(registryUrl, '-/npm/anon-metrics/v1/' +
- encodeURIComponent(params.metricId))
-
- this.request(uri, {
- method: 'PUT',
- body: JSON.stringify(params.metrics),
- authed: false
- }, cb)
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/star.js b/deps/npm/node_modules/npm-registry-client/lib/star.js
deleted file mode 100644
index 5c9224eaa2..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/star.js
+++ /dev/null
@@ -1,51 +0,0 @@
-module.exports = star
-
-var assert = require('assert')
-
-function star (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to star')
- assert(params && typeof params === 'object', 'must pass params to star')
- assert(typeof cb === 'function', 'must pass callback to star')
-
- var starred = !!params.starred
-
- var auth = params.auth
- assert(auth && typeof auth === 'object', 'must pass auth to star')
- if (!(auth.token || (auth.password && auth.username && auth.email))) {
- var er = new Error('Must be logged in to star/unstar packages')
- er.code = 'ENEEDAUTH'
- return cb(er)
- }
-
- var client = this
- this.request(uri + '?write=true', { auth: auth }, function (er, fullData) {
- if (er) return cb(er)
-
- client.whoami(uri, params, function (er, username) {
- if (er) return cb(er)
-
- var data = {
- _id: fullData._id,
- _rev: fullData._rev,
- users: fullData.users || {}
- }
-
- if (starred) {
- client.log.info('starring', data._id)
- data.users[username] = true
- client.log.verbose('starring', data)
- } else {
- delete data.users[username]
- client.log.info('unstarring', data._id)
- client.log.verbose('unstarring', data)
- }
-
- var options = {
- method: 'PUT',
- body: data,
- auth: auth
- }
- return client.request(uri, options, cb)
- })
- })
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/stars.js b/deps/npm/node_modules/npm-registry-client/lib/stars.js
deleted file mode 100644
index ba47f2c1ef..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/stars.js
+++ /dev/null
@@ -1,18 +0,0 @@
-module.exports = stars
-
-var assert = require('assert')
-var url = require('url')
-
-function stars (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to stars')
- assert(params && typeof params === 'object', 'must pass params to stars')
- assert(typeof cb === 'function', 'must pass callback to stars')
-
- var auth = params.auth
- var name = params.username || (auth && auth.username)
- if (!name) return cb(new Error('must pass either username or auth to stars'))
- var encoded = encodeURIComponent(name)
- var path = '-/_view/starredByUser?key="' + encoded + '"'
-
- this.request(url.resolve(uri, path), { auth: auth }, cb)
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/tag.js b/deps/npm/node_modules/npm-registry-client/lib/tag.js
deleted file mode 100644
index 3b6dad1df2..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/tag.js
+++ /dev/null
@@ -1,23 +0,0 @@
-module.exports = tag
-
-var assert = require('assert')
-
-function tag (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to tag')
- assert(params && typeof params === 'object', 'must pass params to tag')
- assert(typeof cb === 'function', 'must pass callback to tag')
-
- assert(typeof params.version === 'string', 'must pass version to tag')
- assert(typeof params.tag === 'string', 'must pass tag name to tag')
- assert(
- params.auth && typeof params.auth === 'object',
- 'must pass auth to tag'
- )
-
- var options = {
- method: 'PUT',
- body: JSON.stringify(params.version),
- auth: params.auth
- }
- this.request(uri + '/' + params.tag, options, cb)
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/team.js b/deps/npm/node_modules/npm-registry-client/lib/team.js
deleted file mode 100644
index 327fa9cd5a..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/team.js
+++ /dev/null
@@ -1,105 +0,0 @@
-module.exports = team
-
-var assert = require('assert')
-var url = require('url')
-
-var subcommands = {}
-
-function team (sub, uri, params, cb) {
- teamAssertions(sub, uri, params, cb)
- return subcommands[sub].call(this, uri, params, cb)
-}
-
-subcommands.create = function (uri, params, cb) {
- return this.request(apiUri(uri, 'org', params.scope, 'team'), {
- method: 'PUT',
- auth: params.auth,
- body: JSON.stringify({
- name: params.team
- })
- }, cb)
-}
-
-subcommands.destroy = function (uri, params, cb) {
- return this.request(apiUri(uri, 'team', params.scope, params.team), {
- method: 'DELETE',
- auth: params.auth
- }, cb)
-}
-
-subcommands.add = function (uri, params, cb) {
- return this.request(apiUri(uri, 'team', params.scope, params.team, 'user'), {
- method: 'PUT',
- auth: params.auth,
- body: JSON.stringify({
- user: params.user
- })
- }, cb)
-}
-
-subcommands.rm = function (uri, params, cb) {
- return this.request(apiUri(uri, 'team', params.scope, params.team, 'user'), {
- method: 'DELETE',
- auth: params.auth,
- body: JSON.stringify({
- user: params.user
- })
- }, cb)
-}
-
-subcommands.ls = function (uri, params, cb) {
- var uriParams = '?format=cli'
- if (params.team) {
- var reqUri = apiUri(
- uri, 'team', params.scope, params.team, 'user') + uriParams
- return this.request(reqUri, {
- method: 'GET',
- auth: params.auth
- }, cb)
- } else {
- return this.request(apiUri(uri, 'org', params.scope, 'team') + uriParams, {
- method: 'GET',
- auth: params.auth
- }, cb)
- }
-}
-
-// TODO - we punted this to v2
-// subcommands.edit = function (uri, params, cb) {
-// return this.request(apiUri(uri, 'team', params.scope, params.team, 'user'), {
-// method: 'POST',
-// auth: params.auth,
-// body: JSON.stringify({
-// users: params.users
-// })
-// }, cb)
-// }
-
-function apiUri (registryUri) {
- var path = Array.prototype.slice.call(arguments, 1)
- .map(encodeURIComponent)
- .join('/')
- return url.resolve(registryUri, '-/' + path)
-}
-
-function teamAssertions (subcommand, uri, params, cb) {
- assert(subcommand, 'subcommand is required')
- assert(subcommands.hasOwnProperty(subcommand),
- 'team subcommand must be one of ' + Object.keys(subcommands))
- assert(typeof uri === 'string', 'registry URI is required')
- assert(typeof params === 'object', 'params are required')
- assert(typeof params.auth === 'object', 'auth is required')
- assert(typeof params.scope === 'string', 'scope is required')
- assert(!cb || typeof cb === 'function', 'callback must be a function')
- if (subcommand !== 'ls') {
- assert(typeof params.team === 'string', 'team name is required')
- }
- if (subcommand === 'rm' || subcommand === 'add') {
- assert(typeof params.user === 'string', 'user is required')
- }
- if (subcommand === 'edit') {
- assert(typeof params.users === 'object' &&
- params.users.length != null,
- 'users is required')
- }
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/unpublish.js b/deps/npm/node_modules/npm-registry-client/lib/unpublish.js
deleted file mode 100644
index 05c5a4b611..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/unpublish.js
+++ /dev/null
@@ -1,120 +0,0 @@
-module.exports = unpublish
-
-// fetch the data
-// modify to remove the version in question
-// If no versions remaining, then DELETE
-// else, PUT the modified data
-// delete the tarball
-
-var semver = require('semver')
-var url = require('url')
-var chain = require('slide').chain
-var assert = require('assert')
-
-function unpublish (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to unpublish')
- assert(params && typeof params === 'object', 'must pass params to unpublish')
- assert(typeof cb === 'function', 'must pass callback to unpublish')
-
- var ver = params.version
- var auth = params.auth
- assert(auth && typeof auth === 'object', 'must pass auth to unpublish')
-
- var options = {
- timeout: -1,
- follow: false,
- auth: auth
- }
- this.get(uri + '?write=true', options, function (er, data) {
- if (er) {
- this.log.info('unpublish', uri + ' not published')
- return cb()
- }
- // remove all if no version specified
- if (!ver) {
- this.log.info('unpublish', 'No version specified, removing all')
- return this.request(uri + '/-rev/' + data._rev, { method: 'DELETE', auth: auth }, cb)
- }
-
- var versions = data.versions || {}
- var versionPublic = versions.hasOwnProperty(ver)
-
- var dist
- if (!versionPublic) {
- this.log.info('unpublish', uri + '@' + ver + ' not published')
- } else {
- dist = versions[ver].dist
- this.log.verbose('unpublish', 'removing attachments', dist)
- }
-
- delete versions[ver]
- // if it was the only version, then delete the whole package.
- if (!Object.keys(versions).length) {
- this.log.info('unpublish', 'No versions remain, removing entire package')
- return this.request(uri + '/-rev/' + data._rev, { method: 'DELETE', auth: auth }, cb)
- }
-
- if (!versionPublic) return cb()
-
- var latestVer = data['dist-tags'].latest
- for (var tag in data['dist-tags']) {
- if (data['dist-tags'][tag] === ver) delete data['dist-tags'][tag]
- }
-
- if (latestVer === ver) {
- data['dist-tags'].latest =
- Object.getOwnPropertyNames(versions).sort(semver.compareLoose).pop()
- }
-
- var rev = data._rev
- delete data._revisions
- delete data._attachments
- var cb_ = detacher.call(this, uri, data, dist, auth, cb)
-
- this.request(uri + '/-rev/' + rev, { method: 'PUT', body: data, auth: auth }, function (er) {
- if (er) {
- this.log.error('unpublish', 'Failed to update data')
- }
- cb_(er)
- }.bind(this))
- }.bind(this))
-}
-
-function detacher (uri, data, dist, credentials, cb) {
- return function (er) {
- if (er) return cb(er)
- this.get(escape(uri, data.name), { auth: credentials }, function (er, data) {
- if (er) return cb(er)
-
- var tb = url.parse(dist.tarball)
-
- detach.call(this, uri, data, tb.pathname, data._rev, credentials, function (er) {
- if (er || !dist.bin) return cb(er)
- chain(Object.keys(dist.bin).map(function (bt) {
- return function (cb) {
- var d = dist.bin[bt]
- detach.call(this, uri, data, url.parse(d.tarball).pathname, null, credentials, cb)
- }.bind(this)
- }, this), cb)
- }.bind(this))
- }.bind(this))
- }.bind(this)
-}
-
-function detach (uri, data, path, rev, credentials, cb) {
- if (rev) {
- path += '/-rev/' + rev
- this.log.info('detach', path)
- return this.request(url.resolve(uri, path), { method: 'DELETE', auth: credentials }, cb)
- }
- this.get(escape(uri, data.name), { auth: credentials }, function (er, data) {
- rev = data._rev
- if (!rev) return cb(new Error('No _rev found in ' + data._id))
- detach.call(this, data, path, rev, cb)
- }.bind(this))
-}
-
-function escape (base, name) {
- var escaped = name.replace(/\//, '%2f')
- return url.resolve(base, escaped)
-}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/whoami.js b/deps/npm/node_modules/npm-registry-client/lib/whoami.js
deleted file mode 100644
index 68db49e59a..0000000000
--- a/deps/npm/node_modules/npm-registry-client/lib/whoami.js
+++ /dev/null
@@ -1,21 +0,0 @@
-module.exports = whoami
-
-var url = require('url')
-var assert = require('assert')
-
-function whoami (uri, params, cb) {
- assert(typeof uri === 'string', 'must pass registry URI to whoami')
- assert(params && typeof params === 'object', 'must pass params to whoami')
- assert(typeof cb === 'function', 'must pass callback to whoami')
-
- var auth = params.auth
- assert(auth && typeof auth === 'object', 'must pass auth to whoami')
-
- if (auth.username) return process.nextTick(cb.bind(this, null, auth.username))
-
- this.request(url.resolve(uri, '-/whoami'), { auth: auth }, function (er, userdata) {
- if (er) return cb(er)
-
- cb(null, userdata.username)
- })
-}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/.npmignore b/deps/npm/node_modules/npm-registry-client/node_modules/retry/.npmignore
deleted file mode 100644
index e7726a071b..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/node_modules/*
-npm-debug.log
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/License b/deps/npm/node_modules/npm-registry-client/node_modules/retry/License
deleted file mode 100644
index 0b58de379f..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/License
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2011:
-Tim Koschützki (tim@debuggable.com)
-Felix Geisendörfer (felix@debuggable.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/Makefile b/deps/npm/node_modules/npm-registry-client/node_modules/retry/Makefile
deleted file mode 100644
index 98e7167bbe..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-SHELL := /bin/bash
-
-test:
- @node test/runner.js
-
-release-major: test
- npm version major -m "Release %s"
- git push
- npm publish
-
-release-minor: test
- npm version minor -m "Release %s"
- git push
- npm publish
-
-release-patch: test
- npm version patch -m "Release %s"
- git push
- npm publish
-
-.PHONY: test
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md
deleted file mode 100644
index eee05f7bb6..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md
+++ /dev/null
@@ -1,215 +0,0 @@
-# retry
-
-Abstraction for exponential and custom retry strategies for failed operations.
-
-## Installation
-
- npm install retry
-
-## Current Status
-
-This module has been tested and is ready to be used.
-
-## Tutorial
-
-The example below will retry a potentially failing `dns.resolve` operation
-`10` times using an exponential backoff strategy. With the default settings, this
-means the last attempt is made after `17 minutes and 3 seconds`.
-
-``` javascript
-var dns = require('dns');
-var retry = require('retry');
-
-function faultTolerantResolve(address, cb) {
- var operation = retry.operation();
-
- operation.attempt(function(currentAttempt) {
- dns.resolve(address, function(err, addresses) {
- if (operation.retry(err)) {
- return;
- }
-
- cb(err ? operation.mainError() : null, addresses);
- });
- });
-}
-
-faultTolerantResolve('nodejs.org', function(err, addresses) {
- console.log(err, addresses);
-});
-```
-
-Of course you can also configure the factors that go into the exponential
-backoff. See the API documentation below for all available settings.
-currentAttempt is an int representing the number of attempts so far.
-
-``` javascript
-var operation = retry.operation({
- retries: 5,
- factor: 3,
- minTimeout: 1 * 1000,
- maxTimeout: 60 * 1000,
- randomize: true,
-});
-```
-
-## API
-
-### retry.operation([options])
-
-Creates a new `RetryOperation` object. `options` is the same as `retry.timeouts()`'s `options`, with two additions:
-
-* `forever`: Whether to retry forever, defaults to `false`.
-* `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`.
-
-### retry.timeouts([options])
-
-Returns an array of timeouts. All time `options` and return values are in
-milliseconds. If `options` is an array, a copy of that array is returned.
-
-`options` is a JS object that can contain any of the following keys:
-
-* `retries`: The maximum amount of times to retry the operation. Default is `10`.
-* `factor`: The exponential factor to use. Default is `2`.
-* `minTimeout`: The number of milliseconds before starting the first retry. Default is `1000`.
-* `maxTimeout`: The maximum number of milliseconds between two retries. Default is `Infinity`.
-* `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `false`.
-
-The formula used to calculate the individual timeouts is:
-
-```
-Math.min(random * minTimeout * Math.pow(factor, attempt), maxTimeout)
-```
-
-Have a look at [this article][article] for a better explanation of approach.
-
-If you want to tune your `factor` / `times` settings to attempt the last retry
-after a certain amount of time, you can use wolfram alpha. For example in order
-to tune for `10` attempts in `5 minutes`, you can use this equation:
-
-![screenshot](https://github.com/tim-kos/node-retry/raw/master/equation.gif)
-
-Explaining the various values from left to right:
-
-* `k = 0 ... 9`: The `retries` value (10)
-* `1000`: The `minTimeout` value in ms (1000)
-* `x^k`: No need to change this, `x` will be your resulting factor
-* `5 * 60 * 1000`: The desired total amount of time for retrying in ms (5 minutes)
-
-To make this a little easier for you, use wolfram alpha to do the calculations:
-
-<http://www.wolframalpha.com/input/?i=Sum%5B1000*x^k%2C+{k%2C+0%2C+9}%5D+%3D+5+*+60+*+1000>
-
-[article]: http://dthain.blogspot.com/2009/02/exponential-backoff-in-distributed.html
-
-### retry.createTimeout(attempt, opts)
-
-Returns a new `timeout` (integer in milliseconds) based on the given parameters.
-
-`attempt` is an integer representing for which retry the timeout should be calculated. If your retry operation was executed 4 times you had one attempt and 3 retries. If you then want to calculate a new timeout, you should set `attempt` to 4 (attempts are zero-indexed).
-
-`opts` can include `factor`, `minTimeout`, `randomize` (boolean) and `maxTimeout`. They are documented above.
-
-`retry.createTimeout()` is used internally by `retry.timeouts()` and is public for you to be able to create your own timeouts for reinserting an item, see [issue #13](https://github.com/tim-kos/node-retry/issues/13).
-
-### retry.wrap(obj, [options], [methodNames])
-
-Wrap all functions of the `obj` with retry. Optionally you can pass operation options and
-an array of method names which need to be wrapped.
-
-```
-retry.wrap(obj)
-
-retry.wrap(obj, ['method1', 'method2'])
-
-retry.wrap(obj, {retries: 3})
-
-retry.wrap(obj, {retries: 3}, ['method1', 'method2'])
-```
-The `options` object can take any options that the usual call to `retry.operation` can take.
-
-### new RetryOperation(timeouts, [options])
-
-Creates a new `RetryOperation` where `timeouts` is an array where each value is
-a timeout given in milliseconds.
-
-Available options:
-* `forever`: Whether to retry forever, defaults to `false`.
-* `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`.
-
-If `forever` is true, the following changes happen:
-* `RetryOperation.errors()` will only output an array of one item: the last error.
-* `RetryOperation` will repeatedly use the `timeouts` array. Once all of its timeouts have been used up, it restarts with the first timeout, then uses the second and so on.
-
-#### retryOperation.errors()
-
-Returns an array of all errors that have been passed to
-`retryOperation.retry()` so far.
-
-#### retryOperation.mainError()
-
-A reference to the error object that occured most frequently. Errors are
-compared using the `error.message` property.
-
-If multiple error messages occured the same amount of time, the last error
-object with that message is returned.
-
-If no errors occured so far, the value is `null`.
-
-#### retryOperation.attempt(fn, timeoutOps)
-
-Defines the function `fn` that is to be retried and executes it for the first
-time right away. The `fn` function can receive an optional `currentAttempt` callback that represents the number of attempts to execute `fn` so far.
-
-Optionally defines `timeoutOps` which is an object having a property `timeout` in miliseconds and a property `cb` callback function.
-Whenever your retry operation takes longer than `timeout` to execute, the timeout callback function `cb` is called.
-
-
-#### retryOperation.try(fn)
-
-This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead.
-
-#### retryOperation.start(fn)
-
-This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead.
-
-#### retryOperation.retry(error)
-
-Returns `false` when no `error` value is given, or the maximum amount of retries
-has been reached.
-
-Otherwise it returns `true`, and retries the operation after the timeout for
-the current attempt number.
-
-#### retryOperation.stop()
-
-Allows you to stop the operation being retried. Useful for aborting the operation on a fatal error etc.
-
-#### retryOperation.attempts()
-
-Returns an int representing the number of attempts it took to call `fn` before it was successful.
-
-## License
-
-retry is licensed under the MIT license.
-
-
-# Changelog
-
-0.10.0 Adding `stop` functionality, thanks to @maxnachlinger.
-
-0.9.0 Adding `unref` functionality, thanks to @satazor.
-
-0.8.0 Implementing retry.wrap.
-
-0.7.0 Some bug fixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13).
-
-0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in milliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called.
-
-0.5.0 Some minor refactoring.
-
-0.4.0 Changed retryOperation.try() to retryOperation.attempt(). Deprecated the aliases start() and try() for it.
-
-0.3.0 Added retryOperation.start() which is an alias for retryOperation.try().
-
-0.2.0 Added attempts() function and parameter to retryOperation.try() representing the number of attempts it took to call fn().
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/equation.gif b/deps/npm/node_modules/npm-registry-client/node_modules/retry/equation.gif
deleted file mode 100644
index 97107237ba..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/equation.gif
+++ /dev/null
Binary files differ
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js
deleted file mode 100644
index 446729b6f9..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var dns = require('dns');
-var retry = require('../lib/retry');
-
-function faultTolerantResolve(address, cb) {
- var opts = {
- retries: 2,
- factor: 2,
- minTimeout: 1 * 1000,
- maxTimeout: 2 * 1000,
- randomize: true
- };
- var operation = retry.operation(opts);
-
- operation.attempt(function(currentAttempt) {
- dns.resolve(address, function(err, addresses) {
- if (operation.retry(err)) {
- return;
- }
-
- cb(operation.mainError(), operation.errors(), addresses);
- });
- });
-}
-
-faultTolerantResolve('nodejs.org', function(err, errors, addresses) {
- console.warn('err:');
- console.log(err);
-
- console.warn('addresses:');
- console.log(addresses);
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/stop.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/stop.js
deleted file mode 100644
index e1ceafeeba..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/stop.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var retry = require('../lib/retry');
-
-function attemptAsyncOperation(someInput, cb) {
- var opts = {
- retries: 2,
- factor: 2,
- minTimeout: 1 * 1000,
- maxTimeout: 2 * 1000,
- randomize: true
- };
- var operation = retry.operation(opts);
-
- operation.attempt(function(currentAttempt) {
- failingAsyncOperation(someInput, function(err, result) {
-
- if (err && err.message === 'A fatal error') {
- operation.stop();
- return cb(err);
- }
-
- if (operation.retry(err)) {
- return;
- }
-
- cb(operation.mainError(), operation.errors(), result);
- });
- });
-}
-
-attemptAsyncOperation('test input', function(err, errors, result) {
- console.warn('err:');
- console.log(err);
-
- console.warn('result:');
- console.log(result);
-});
-
-function failingAsyncOperation(input, cb) {
- return setImmediate(cb.bind(null, new Error('A fatal error')));
-}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/index.js
deleted file mode 100644
index ee62f3a112..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./lib/retry'); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js
deleted file mode 100644
index 77428cfd00..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js
+++ /dev/null
@@ -1,99 +0,0 @@
-var RetryOperation = require('./retry_operation');
-
-exports.operation = function(options) {
- var timeouts = exports.timeouts(options);
- return new RetryOperation(timeouts, {
- forever: options && options.forever,
- unref: options && options.unref
- });
-};
-
-exports.timeouts = function(options) {
- if (options instanceof Array) {
- return [].concat(options);
- }
-
- var opts = {
- retries: 10,
- factor: 2,
- minTimeout: 1 * 1000,
- maxTimeout: Infinity,
- randomize: false
- };
- for (var key in options) {
- opts[key] = options[key];
- }
-
- if (opts.minTimeout > opts.maxTimeout) {
- throw new Error('minTimeout is greater than maxTimeout');
- }
-
- var timeouts = [];
- for (var i = 0; i < opts.retries; i++) {
- timeouts.push(this.createTimeout(i, opts));
- }
-
- if (options && options.forever && !timeouts.length) {
- timeouts.push(this.createTimeout(i, opts));
- }
-
- // sort the array numerically ascending
- timeouts.sort(function(a,b) {
- return a - b;
- });
-
- return timeouts;
-};
-
-exports.createTimeout = function(attempt, opts) {
- var random = (opts.randomize)
- ? (Math.random() + 1)
- : 1;
-
- var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
- timeout = Math.min(timeout, opts.maxTimeout);
-
- return timeout;
-};
-
-exports.wrap = function(obj, options, methods) {
- if (options instanceof Array) {
- methods = options;
- options = null;
- }
-
- if (!methods) {
- methods = [];
- for (var key in obj) {
- if (typeof obj[key] === 'function') {
- methods.push(key);
- }
- }
- }
-
- for (var i = 0; i < methods.length; i++) {
- var method = methods[i];
- var original = obj[method];
-
- obj[method] = function retryWrapper() {
- var op = exports.operation(options);
- var args = Array.prototype.slice.call(arguments);
- var callback = args.pop();
-
- args.push(function(err) {
- if (op.retry(err)) {
- return;
- }
- if (err) {
- arguments[0] = op.mainError();
- }
- callback.apply(this, arguments);
- });
-
- op.attempt(function() {
- original.apply(obj, args);
- });
- };
- obj[method].options = options;
- }
-};
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js
deleted file mode 100644
index 2b3db8e177..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js
+++ /dev/null
@@ -1,143 +0,0 @@
-function RetryOperation(timeouts, options) {
- // Compatibility for the old (timeouts, retryForever) signature
- if (typeof options === 'boolean') {
- options = { forever: options };
- }
-
- this._timeouts = timeouts;
- this._options = options || {};
- this._fn = null;
- this._errors = [];
- this._attempts = 1;
- this._operationTimeout = null;
- this._operationTimeoutCb = null;
- this._timeout = null;
-
- if (this._options.forever) {
- this._cachedTimeouts = this._timeouts.slice(0);
- }
-}
-module.exports = RetryOperation;
-
-RetryOperation.prototype.stop = function() {
- if (this._timeout) {
- clearTimeout(this._timeout);
- }
-
- this._timeouts = [];
- this._cachedTimeouts = null;
-};
-
-RetryOperation.prototype.retry = function(err) {
- if (this._timeout) {
- clearTimeout(this._timeout);
- }
-
- if (!err) {
- return false;
- }
-
- this._errors.push(err);
-
- var timeout = this._timeouts.shift();
- if (timeout === undefined) {
- if (this._cachedTimeouts) {
- // retry forever, only keep last error
- this._errors.splice(this._errors.length - 1, this._errors.length);
- this._timeouts = this._cachedTimeouts.slice(0);
- timeout = this._timeouts.shift();
- } else {
- return false;
- }
- }
-
- var self = this;
- var timer = setTimeout(function() {
- self._attempts++;
-
- if (self._operationTimeoutCb) {
- self._timeout = setTimeout(function() {
- self._operationTimeoutCb(self._attempts);
- }, self._operationTimeout);
-
- if (this._options.unref) {
- self._timeout.unref();
- }
- }
-
- self._fn(self._attempts);
- }, timeout);
-
- if (this._options.unref) {
- timer.unref();
- }
-
- return true;
-};
-
-RetryOperation.prototype.attempt = function(fn, timeoutOps) {
- this._fn = fn;
-
- if (timeoutOps) {
- if (timeoutOps.timeout) {
- this._operationTimeout = timeoutOps.timeout;
- }
- if (timeoutOps.cb) {
- this._operationTimeoutCb = timeoutOps.cb;
- }
- }
-
- var self = this;
- if (this._operationTimeoutCb) {
- this._timeout = setTimeout(function() {
- self._operationTimeoutCb();
- }, self._operationTimeout);
- }
-
- this._fn(this._attempts);
-};
-
-RetryOperation.prototype.try = function(fn) {
- console.log('Using RetryOperation.try() is deprecated');
- this.attempt(fn);
-};
-
-RetryOperation.prototype.start = function(fn) {
- console.log('Using RetryOperation.start() is deprecated');
- this.attempt(fn);
-};
-
-RetryOperation.prototype.start = RetryOperation.prototype.try;
-
-RetryOperation.prototype.errors = function() {
- return this._errors;
-};
-
-RetryOperation.prototype.attempts = function() {
- return this._attempts;
-};
-
-RetryOperation.prototype.mainError = function() {
- if (this._errors.length === 0) {
- return null;
- }
-
- var counts = {};
- var mainError = null;
- var mainErrorCount = 0;
-
- for (var i = 0; i < this._errors.length; i++) {
- var error = this._errors[i];
- var message = error.message;
- var count = (counts[message] || 0) + 1;
-
- counts[message] = count;
-
- if (count >= mainErrorCount) {
- mainError = error;
- mainErrorCount = count;
- }
- }
-
- return mainError;
-};
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json
deleted file mode 100644
index 26f1daa8ca..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "_from": "retry@^0.10.0",
- "_id": "retry@0.10.1",
- "_inBundle": false,
- "_integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=",
- "_location": "/npm-registry-client/retry",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "retry@^0.10.0",
- "name": "retry",
- "escapedName": "retry",
- "rawSpec": "^0.10.0",
- "saveSpec": null,
- "fetchSpec": "^0.10.0"
- },
- "_requiredBy": [
- "/npm-registry-client"
- ],
- "_resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz",
- "_shasum": "e76388d217992c252750241d3d3956fed98d8ff4",
- "_spec": "retry@^0.10.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-client",
- "author": {
- "name": "Tim Koschützki",
- "email": "tim@debuggable.com",
- "url": "http://debuggable.com/"
- },
- "bugs": {
- "url": "https://github.com/tim-kos/node-retry/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Abstraction for exponential and custom retry strategies for failed operations.",
- "devDependencies": {
- "fake": "0.2.0",
- "far": "0.0.1"
- },
- "directories": {
- "lib": "./lib"
- },
- "engines": {
- "node": "*"
- },
- "homepage": "https://github.com/tim-kos/node-retry",
- "license": "MIT",
- "main": "index",
- "name": "retry",
- "repository": {
- "type": "git",
- "url": "git://github.com/tim-kos/node-retry.git"
- },
- "version": "0.10.1"
-}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/common.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/common.js
deleted file mode 100644
index 224720696e..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/common.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var common = module.exports;
-var path = require('path');
-
-var rootDir = path.join(__dirname, '..');
-common.dir = {
- lib: rootDir + '/lib'
-};
-
-common.assert = require('assert');
-common.fake = require('fake'); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-forever.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-forever.js
deleted file mode 100644
index b41307cb52..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-forever.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var retry = require(common.dir.lib + '/retry');
-
-(function testForeverUsesFirstTimeout() {
- var operation = retry.operation({
- retries: 0,
- minTimeout: 100,
- maxTimeout: 100,
- forever: true
- });
-
- operation.attempt(function(numAttempt) {
- console.log('>numAttempt', numAttempt);
- var err = new Error("foo");
- if (numAttempt == 10) {
- operation.stop();
- }
-
- if (operation.retry(err)) {
- return;
- }
- });
-})();
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js
deleted file mode 100644
index 916936424f..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js
+++ /dev/null
@@ -1,176 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var fake = common.fake.create();
-var retry = require(common.dir.lib + '/retry');
-
-(function testErrors() {
- var operation = retry.operation();
-
- var error = new Error('some error');
- var error2 = new Error('some other error');
- operation._errors.push(error);
- operation._errors.push(error2);
-
- assert.deepEqual(operation.errors(), [error, error2]);
-})();
-
-(function testMainErrorReturnsMostFrequentError() {
- var operation = retry.operation();
- var error = new Error('some error');
- var error2 = new Error('some other error');
-
- operation._errors.push(error);
- operation._errors.push(error2);
- operation._errors.push(error);
-
- assert.strictEqual(operation.mainError(), error);
-})();
-
-(function testMainErrorReturnsLastErrorOnEqualCount() {
- var operation = retry.operation();
- var error = new Error('some error');
- var error2 = new Error('some other error');
-
- operation._errors.push(error);
- operation._errors.push(error2);
-
- assert.strictEqual(operation.mainError(), error2);
-})();
-
-(function testAttempt() {
- var operation = retry.operation();
- var fn = new Function();
-
- var timeoutOpts = {
- timeout: 1,
- cb: function() {}
- };
- operation.attempt(fn, timeoutOpts);
-
- assert.strictEqual(fn, operation._fn);
- assert.strictEqual(timeoutOpts.timeout, operation._operationTimeout);
- assert.strictEqual(timeoutOpts.cb, operation._operationTimeoutCb);
-})();
-
-(function testRetry() {
- var times = 3;
- var error = new Error('some error');
- var operation = retry.operation([1, 2, 3]);
- var attempts = 0;
-
- var finalCallback = fake.callback('finalCallback');
- fake.expectAnytime(finalCallback);
-
- var fn = function() {
- operation.attempt(function(currentAttempt) {
- attempts++;
- assert.equal(currentAttempt, attempts);
- if (operation.retry(error)) {
- return;
- }
-
- assert.strictEqual(attempts, 4);
- assert.strictEqual(operation.attempts(), attempts);
- assert.strictEqual(operation.mainError(), error);
- finalCallback();
- });
- };
-
- fn();
-})();
-
-(function testRetryForever() {
- var error = new Error('some error');
- var operation = retry.operation({ retries: 3, forever: true });
- var attempts = 0;
-
- var finalCallback = fake.callback('finalCallback');
- fake.expectAnytime(finalCallback);
-
- var fn = function() {
- operation.attempt(function(currentAttempt) {
- attempts++;
- assert.equal(currentAttempt, attempts);
- if (attempts !== 6 && operation.retry(error)) {
- return;
- }
-
- assert.strictEqual(attempts, 6);
- assert.strictEqual(operation.attempts(), attempts);
- assert.strictEqual(operation.mainError(), error);
- finalCallback();
- });
- };
-
- fn();
-})();
-
-(function testRetryForeverNoRetries() {
- var error = new Error('some error');
- var delay = 50
- var operation = retry.operation({
- retries: null,
- forever: true,
- minTimeout: delay,
- maxTimeout: delay
- });
-
- var attempts = 0;
- var startTime = new Date().getTime();
-
- var finalCallback = fake.callback('finalCallback');
- fake.expectAnytime(finalCallback);
-
- var fn = function() {
- operation.attempt(function(currentAttempt) {
- attempts++;
- assert.equal(currentAttempt, attempts);
- if (attempts !== 4 && operation.retry(error)) {
- return;
- }
-
- var endTime = new Date().getTime();
- var minTime = startTime + (delay * 3);
- var maxTime = minTime + 20 // add a little headroom for code execution time
- assert(endTime > minTime)
- assert(endTime < maxTime)
- assert.strictEqual(attempts, 4);
- assert.strictEqual(operation.attempts(), attempts);
- assert.strictEqual(operation.mainError(), error);
- finalCallback();
- });
- };
-
- fn();
-})();
-
-(function testStop() {
- var error = new Error('some error');
- var operation = retry.operation([1, 2, 3]);
- var attempts = 0;
-
- var finalCallback = fake.callback('finalCallback');
- fake.expectAnytime(finalCallback);
-
- var fn = function() {
- operation.attempt(function(currentAttempt) {
- attempts++;
- assert.equal(currentAttempt, attempts);
-
- if (attempts === 2) {
- operation.stop();
-
- assert.strictEqual(attempts, 2);
- assert.strictEqual(operation.attempts(), attempts);
- assert.strictEqual(operation.mainError(), error);
- finalCallback();
- }
-
- if (operation.retry(error)) {
- return;
- }
- });
- };
-
- fn();
-})();
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-wrap.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-wrap.js
deleted file mode 100644
index 7ca8bc7eb5..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-wrap.js
+++ /dev/null
@@ -1,77 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var fake = common.fake.create();
-var retry = require(common.dir.lib + '/retry');
-
-function getLib() {
- return {
- fn1: function() {},
- fn2: function() {},
- fn3: function() {}
- };
-}
-
-(function wrapAll() {
- var lib = getLib();
- retry.wrap(lib);
- assert.equal(lib.fn1.name, 'retryWrapper');
- assert.equal(lib.fn2.name, 'retryWrapper');
- assert.equal(lib.fn3.name, 'retryWrapper');
-}());
-
-(function wrapAllPassOptions() {
- var lib = getLib();
- retry.wrap(lib, {retries: 2});
- assert.equal(lib.fn1.name, 'retryWrapper');
- assert.equal(lib.fn2.name, 'retryWrapper');
- assert.equal(lib.fn3.name, 'retryWrapper');
- assert.equal(lib.fn1.options.retries, 2);
- assert.equal(lib.fn2.options.retries, 2);
- assert.equal(lib.fn3.options.retries, 2);
-}());
-
-(function wrapDefined() {
- var lib = getLib();
- retry.wrap(lib, ['fn2', 'fn3']);
- assert.notEqual(lib.fn1.name, 'retryWrapper');
- assert.equal(lib.fn2.name, 'retryWrapper');
- assert.equal(lib.fn3.name, 'retryWrapper');
-}());
-
-(function wrapDefinedAndPassOptions() {
- var lib = getLib();
- retry.wrap(lib, {retries: 2}, ['fn2', 'fn3']);
- assert.notEqual(lib.fn1.name, 'retryWrapper');
- assert.equal(lib.fn2.name, 'retryWrapper');
- assert.equal(lib.fn3.name, 'retryWrapper');
- assert.equal(lib.fn2.options.retries, 2);
- assert.equal(lib.fn3.options.retries, 2);
-}());
-
-(function runWrappedWithoutError() {
- var callbackCalled;
- var lib = {method: function(a, b, callback) {
- assert.equal(a, 1);
- assert.equal(b, 2);
- assert.equal(typeof callback, 'function');
- callback();
- }};
- retry.wrap(lib);
- lib.method(1, 2, function() {
- callbackCalled = true;
- });
- assert.ok(callbackCalled);
-}());
-
-(function runWrappedWithError() {
- var callbackCalled;
- var lib = {method: function(callback) {
- callback(new Error('Some error'));
- }};
- retry.wrap(lib, {retries: 1});
- lib.method(function(err) {
- callbackCalled = true;
- assert.ok(err instanceof Error);
- });
- assert.ok(!callbackCalled);
-}());
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-timeouts.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-timeouts.js
deleted file mode 100644
index 7206b0fb0b..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-timeouts.js
+++ /dev/null
@@ -1,69 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var retry = require(common.dir.lib + '/retry');
-
-(function testDefaultValues() {
- var timeouts = retry.timeouts();
-
- assert.equal(timeouts.length, 10);
- assert.equal(timeouts[0], 1000);
- assert.equal(timeouts[1], 2000);
- assert.equal(timeouts[2], 4000);
-})();
-
-(function testDefaultValuesWithRandomize() {
- var minTimeout = 5000;
- var timeouts = retry.timeouts({
- minTimeout: minTimeout,
- randomize: true
- });
-
- assert.equal(timeouts.length, 10);
- assert.ok(timeouts[0] > minTimeout);
- assert.ok(timeouts[1] > timeouts[0]);
- assert.ok(timeouts[2] > timeouts[1]);
-})();
-
-(function testPassedTimeoutsAreUsed() {
- var timeoutsArray = [1000, 2000, 3000];
- var timeouts = retry.timeouts(timeoutsArray);
- assert.deepEqual(timeouts, timeoutsArray);
- assert.notStrictEqual(timeouts, timeoutsArray);
-})();
-
-(function testTimeoutsAreWithinBoundaries() {
- var minTimeout = 1000;
- var maxTimeout = 10000;
- var timeouts = retry.timeouts({
- minTimeout: minTimeout,
- maxTimeout: maxTimeout
- });
- for (var i = 0; i < timeouts; i++) {
- assert.ok(timeouts[i] >= minTimeout);
- assert.ok(timeouts[i] <= maxTimeout);
- }
-})();
-
-(function testTimeoutsAreIncremental() {
- var timeouts = retry.timeouts();
- var lastTimeout = timeouts[0];
- for (var i = 0; i < timeouts; i++) {
- assert.ok(timeouts[i] > lastTimeout);
- lastTimeout = timeouts[i];
- }
-})();
-
-(function testTimeoutsAreIncrementalForFactorsLessThanOne() {
- var timeouts = retry.timeouts({
- retries: 3,
- factor: 0.5
- });
-
- var expected = [250, 500, 1000];
- assert.deepEqual(expected, timeouts);
-})();
-
-(function testRetries() {
- var timeouts = retry.timeouts({retries: 2});
- assert.strictEqual(timeouts.length, 2);
-})();
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/runner.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/runner.js
deleted file mode 100644
index e0ee2f570f..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/runner.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var far = require('far').create();
-
-far.add(__dirname);
-far.include(/\/test-.*\.js$/);
-far.execute();
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/CHANGELOG.md b/deps/npm/node_modules/npm-registry-client/node_modules/ssri/CHANGELOG.md
deleted file mode 100644
index 5c06894881..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/CHANGELOG.md
+++ /dev/null
@@ -1,256 +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.3.0"></a>
-# [5.3.0](https://github.com/zkat/ssri/compare/v5.2.4...v5.3.0) (2018-03-13)
-
-
-### Features
-
-* **checkData:** optionally throw when checkData fails ([bf26b84](https://github.com/zkat/ssri/commit/bf26b84))
-
-
-
-<a name="5.2.4"></a>
-## [5.2.4](https://github.com/zkat/ssri/compare/v5.2.3...v5.2.4) (2018-02-16)
-
-
-
-<a name="5.2.3"></a>
-## [5.2.3](https://github.com/zkat/ssri/compare/v5.2.2...v5.2.3) (2018-02-16)
-
-
-### Bug Fixes
-
-* **hashes:** filter hash priority list by available hashes ([2fa30b8](https://github.com/zkat/ssri/commit/2fa30b8))
-* **integrityStream:** dedupe algorithms to generate ([d56c654](https://github.com/zkat/ssri/commit/d56c654))
-
-
-
-<a name="5.2.2"></a>
-## [5.2.2](https://github.com/zkat/ssri/compare/v5.2.1...v5.2.2) (2018-02-14)
-
-
-### Bug Fixes
-
-* **security:** tweak strict SRI regex ([#10](https://github.com/zkat/ssri/issues/10)) ([d0ebcdc](https://github.com/zkat/ssri/commit/d0ebcdc))
-
-
-
-<a name="5.2.1"></a>
-## [5.2.1](https://github.com/zkat/ssri/compare/v5.2.0...v5.2.1) (2018-02-06)
-
-
-
-<a name="5.2.0"></a>
-# [5.2.0](https://github.com/zkat/ssri/compare/v5.1.0...v5.2.0) (2018-02-06)
-
-
-### Features
-
-* **match:** add integrity.match() ([3c49cc4](https://github.com/zkat/ssri/commit/3c49cc4))
-
-
-
-<a name="5.1.0"></a>
-# [5.1.0](https://github.com/zkat/ssri/compare/v5.0.0...v5.1.0) (2018-01-18)
-
-
-### Bug Fixes
-
-* **checkStream:** integrityStream now takes opts.integrity algos into account ([d262910](https://github.com/zkat/ssri/commit/d262910))
-
-
-### Features
-
-* **sha3:** do some guesswork about upcoming sha3 ([7fdd9df](https://github.com/zkat/ssri/commit/7fdd9df))
-
-
-
-<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/npm-registry-client/node_modules/ssri/LICENSE.md b/deps/npm/node_modules/npm-registry-client/node_modules/ssri/LICENSE.md
deleted file mode 100644
index 8d28acf866..0000000000
--- a/deps/npm/node_modules/npm-registry-client/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/npm-registry-client/node_modules/ssri/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/ssri/README.md
deleted file mode 100644
index a6c07e7409..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/README.md
+++ /dev/null
@@ -1,488 +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#match`](#integrity-match)
- * [`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-match"></a> `> Integrity#match(sri, [opts]) -> Hash | false`
-
-Returns the matching (truthy) hash if `Integrity` matches the argument passed as
-`sri`, which can be anything that [`parse`](#parse) will accept. `opts` will be
-passed through to `parse` and [`pickAlgorithm()`](#integrity-pick-algorithm).
-
-##### Example
-
-```javascript
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A=='
-
-ssri.parse(integrity).match(integrity)
-// Hash {
-// digest: '9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A=='
-// algorithm: 'sha512'
-// }
-
-ssri.parse(integrity).match('sha1-deadbeef')
-// false
-```
-
-#### <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.
-
-If `opts.error` is true, and verification fails, `checkData` will throw either
-an `EBADSIZE` or an `EINTEGRITY` error, instead of just returning false.
-
-##### 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
-ssri.checkData(data, 'sha1-BaDDigEST', {error: true}) // -> Error! EINTEGRITY
-```
-
-#### <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([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.integrityStream({integrity}))
-```
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/ssri/index.js
deleted file mode 100644
index ff7881f7cb..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/index.js
+++ /dev/null
@@ -1,379 +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+/=]{44,88})(\?[\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()
- }
- match (integrity, opts) {
- const other = parse(integrity, opts)
- const algo = other.pickAlgorithm(opts)
- return (
- this[algo] &&
- other[algo] &&
- this[algo].find(hash =>
- other[algo].find(otherhash =>
- hash.digest === otherhash.digest
- )
- )
- ) || false
- }
- 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) {
- if (opts.error) {
- throw Object.assign(
- new Error('No valid integrity hashes to check against'), {
- code: 'EINTEGRITY'
- }
- )
- } else {
- return false
- }
- }
- const algorithm = sri.pickAlgorithm(opts)
- const digest = crypto.createHash(algorithm).update(data).digest('base64')
- const newSri = parse({algorithm, digest})
- const match = newSri.match(sri, opts)
- if (match || !opts.error) {
- return match
- } else if (typeof opts.size === 'number' && (data.length !== opts.size)) {
- const err = new Error(`data size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${data.length}`)
- err.code = 'EBADSIZE'
- err.found = data.length
- err.expected = opts.size
- err.sri = sri
- throw err
- } else {
- const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`)
- err.code = 'EINTEGRITY'
- err.found = newSri
- err.expected = sri
- err.algorithm = algorithm
- err.sri = sri
- throw err
- }
-}
-
-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 = Array.from(
- new Set(
- (opts.algorithms || ['sha512'])
- .concat(algorithm ? [algorithm] : [])
- )
- )
- 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)
- // Integrity verification mode
- const match = goodSri && newSri.match(sri, opts)
- 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
- }
- }
-}
-
-const NODE_HASHES = new Set(crypto.getHashes())
-
-// This is a Best Effort™ at a reasonable priority for hash algos
-const DEFAULT_PRIORITY = [
- 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512',
- // TODO - it's unclear _which_ of these Node will actually use as its name
- // for the algorithm, so we guesswork it based on the OpenSSL names.
- 'sha3',
- 'sha3-256', 'sha3-384', 'sha3-512',
- 'sha3_256', 'sha3_384', 'sha3_512'
-].filter(algo => NODE_HASHES.has(algo))
-
-function getPrioritizedHash (algo1, algo2) {
- return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase())
- ? algo1
- : algo2
-}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/ssri/package.json
deleted file mode 100644
index 182bdf10fa..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "_from": "ssri@^5.2.4",
- "_id": "ssri@5.3.0",
- "_inBundle": false,
- "_integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==",
- "_location": "/npm-registry-client/ssri",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ssri@^5.2.4",
- "name": "ssri",
- "escapedName": "ssri",
- "rawSpec": "^5.2.4",
- "saveSpec": null,
- "fetchSpec": "^5.2.4"
- },
- "_requiredBy": [
- "/npm-registry-client"
- ],
- "_resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz",
- "_shasum": "ba3872c9c6d33a0704a7d71ff045e5ec48999d06",
- "_spec": "ssri@^5.2.4",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-client",
- "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.1"
- },
- "deprecated": false,
- "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",
- "devDependencies": {
- "nyc": "^11.4.1",
- "standard": "^10.0.3",
- "standard-version": "^4.3.0",
- "tap": "^11.1.0",
- "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.3.0"
-}
diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json
deleted file mode 100644
index 3e0f48be2c..0000000000
--- a/deps/npm/node_modules/npm-registry-client/package.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "_from": "npm-registry-client@8.6.0",
- "_id": "npm-registry-client@8.6.0",
- "_inBundle": false,
- "_integrity": "sha512-Qs6P6nnopig+Y8gbzpeN/dkt+n7IyVd8f45NTMotGk6Qo7GfBmzwYx6jRLoOOgKiMnaQfYxsuyQlD8Mc3guBhg==",
- "_location": "/npm-registry-client",
- "_phantomChildren": {
- "safe-buffer": "5.1.2"
- },
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "npm-registry-client@8.6.0",
- "name": "npm-registry-client",
- "escapedName": "npm-registry-client",
- "rawSpec": "8.6.0",
- "saveSpec": null,
- "fetchSpec": "8.6.0"
- },
- "_requiredBy": [
- "#USER",
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.6.0.tgz",
- "_shasum": "7f1529f91450732e89f8518e0f21459deea3e4c4",
- "_spec": "npm-registry-client@8.6.0",
- "_where": "/Users/zkat/Documents/code/work/npm",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/npm/npm-registry-client/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "concat-stream": "^1.5.2",
- "graceful-fs": "^4.1.6",
- "normalize-package-data": "~1.0.1 || ^2.0.0",
- "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0",
- "npmlog": "2 || ^3.1.0 || ^4.0.0",
- "once": "^1.3.3",
- "request": "^2.74.0",
- "retry": "^0.10.0",
- "safe-buffer": "^5.1.1",
- "semver": "2 >=2.2.1 || 3.x || 4 || 5",
- "slide": "^1.1.3",
- "ssri": "^5.2.4"
- },
- "deprecated": false,
- "description": "Client for the npm registry",
- "devDependencies": {
- "negotiator": "^0.6.1",
- "nock": "^9.0.9",
- "readable-stream": "^2.1.5",
- "require-inject": "^1.4.0",
- "rimraf": "^2.5.4",
- "standard": "^11.0.0",
- "standard-version": "^4.3.0",
- "tap": "^12.0.1"
- },
- "files": [
- "lib",
- "index.js"
- ],
- "homepage": "https://github.com/npm/npm-registry-client#readme",
- "license": "ISC",
- "main": "index.js",
- "name": "npm-registry-client",
- "optionalDependencies": {
- "npmlog": "2 || ^3.1.0 || ^4.0.0"
- },
- "repository": {
- "url": "git+https://github.com/npm/npm-registry-client.git"
- },
- "scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard",
- "release": "standard-version -s",
- "test": "tap --nyc-arg=--all --coverage test/*.js"
- },
- "version": "8.6.0"
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md b/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md
index 05d5741ee8..71232eff75 100644
--- a/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md
@@ -2,6 +2,162 @@
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="3.8.0"></a>
+# [3.8.0](https://github.com/npm/registry-fetch/compare/v3.7.0...v3.8.0) (2018-08-23)
+
+
+### Features
+
+* **mapJson:** add support for passing in json stream mapper ([0600986](https://github.com/npm/registry-fetch/commit/0600986))
+
+
+
+<a name="3.7.0"></a>
+# [3.7.0](https://github.com/npm/registry-fetch/compare/v3.6.0...v3.7.0) (2018-08-23)
+
+
+### Features
+
+* **json.stream:** add utility function for streamed JSON parsing ([051d969](https://github.com/npm/registry-fetch/commit/051d969))
+
+
+
+<a name="3.6.0"></a>
+# [3.6.0](https://github.com/npm/registry-fetch/compare/v3.5.0...v3.6.0) (2018-08-22)
+
+
+### Bug Fixes
+
+* **docs:** document opts.forceAuth ([40bcd65](https://github.com/npm/registry-fetch/commit/40bcd65))
+
+
+### Features
+
+* **opts.ignoreBody:** add a boolean to throw away response bodies ([6923702](https://github.com/npm/registry-fetch/commit/6923702))
+
+
+
+<a name="3.5.0"></a>
+# [3.5.0](https://github.com/npm/registry-fetch/compare/v3.4.0...v3.5.0) (2018-08-22)
+
+
+### Features
+
+* **pkgid:** heuristic pkgid calculation for errors ([2e789a5](https://github.com/npm/registry-fetch/commit/2e789a5))
+
+
+
+<a name="3.4.0"></a>
+# [3.4.0](https://github.com/npm/registry-fetch/compare/v3.3.0...v3.4.0) (2018-08-22)
+
+
+### Bug Fixes
+
+* **deps:** use new figgy-pudding with aliases fix ([0308f54](https://github.com/npm/registry-fetch/commit/0308f54))
+
+
+### Features
+
+* **auth:** add forceAuth option to force a specific auth mechanism ([4524d17](https://github.com/npm/registry-fetch/commit/4524d17))
+
+
+
+<a name="3.3.0"></a>
+# [3.3.0](https://github.com/npm/registry-fetch/compare/v3.2.1...v3.3.0) (2018-08-21)
+
+
+### Bug Fixes
+
+* **query:** stop including undefined keys ([4718b1b](https://github.com/npm/registry-fetch/commit/4718b1b))
+
+
+### Features
+
+* **otp:** use heuristic detection for malformed EOTP responses ([f035194](https://github.com/npm/registry-fetch/commit/f035194))
+
+
+
+<a name="3.2.1"></a>
+## [3.2.1](https://github.com/npm/registry-fetch/compare/v3.2.0...v3.2.1) (2018-08-16)
+
+
+### Bug Fixes
+
+* **opts:** pass through non-null opts.retry ([beba040](https://github.com/npm/registry-fetch/commit/beba040))
+
+
+
+<a name="3.2.0"></a>
+# [3.2.0](https://github.com/npm/registry-fetch/compare/v3.1.1...v3.2.0) (2018-07-27)
+
+
+### Features
+
+* **gzip:** add opts.gzip convenience opt ([340abe0](https://github.com/npm/registry-fetch/commit/340abe0))
+
+
+
+<a name="3.1.1"></a>
+## [3.1.1](https://github.com/npm/registry-fetch/compare/v3.1.0...v3.1.1) (2018-04-09)
+
+
+
+<a name="3.1.0"></a>
+# [3.1.0](https://github.com/npm/registry-fetch/compare/v3.0.0...v3.1.0) (2018-04-09)
+
+
+### Features
+
+* **config:** support no-proxy and https-proxy options ([9aa906b](https://github.com/npm/registry-fetch/commit/9aa906b))
+
+
+
+<a name="3.0.0"></a>
+# [3.0.0](https://github.com/npm/registry-fetch/compare/v2.1.0...v3.0.0) (2018-04-09)
+
+
+### Bug Fixes
+
+* **api:** pacote integration-related fixes ([a29de4f](https://github.com/npm/registry-fetch/commit/a29de4f))
+* **config:** stop caring about opts.config ([5856a6f](https://github.com/npm/registry-fetch/commit/5856a6f))
+
+
+### BREAKING CHANGES
+
+* **config:** opts.config is no longer supported. Pass the options down in opts itself.
+
+
+
+<a name="2.1.0"></a>
+# [2.1.0](https://github.com/npm/registry-fetch/compare/v2.0.0...v2.1.0) (2018-04-08)
+
+
+### Features
+
+* **token:** accept opts.token for opts._authToken ([108c9f0](https://github.com/npm/registry-fetch/commit/108c9f0))
+
+
+
+<a name="2.0.0"></a>
+# [2.0.0](https://github.com/npm/registry-fetch/compare/v1.1.1...v2.0.0) (2018-04-08)
+
+
+### meta
+
+* drop support for node@4 ([758536e](https://github.com/npm/registry-fetch/commit/758536e))
+
+
+### BREAKING CHANGES
+
+* node@4 is no longer supported
+
+
+
+<a name="1.1.1"></a>
+## [1.1.1](https://github.com/npm/registry-fetch/compare/v1.1.0...v1.1.1) (2018-04-06)
+
+
+
<a name="1.1.0"></a>
# [1.1.0](https://github.com/npm/registry-fetch/compare/v1.0.1...v1.1.0) (2018-03-16)
diff --git a/deps/npm/node_modules/npm-registry-fetch/README.md b/deps/npm/node_modules/npm-registry-fetch/README.md
index 4947dc891f..0c3f4f9469 100644
--- a/deps/npm/node_modules/npm-registry-fetch/README.md
+++ b/deps/npm/node_modules/npm-registry-fetch/README.md
@@ -82,27 +82,33 @@ const res = await fetch.json('/-/ping')
console.log(res) // Body parsed as JSON
```
-#### <a name="fetch-opts"></a> `fetch` Options
+#### <a name="fetch-json-stream"></a> `> fetch.json.stream(url, jsonPath, [opts]) -> Stream`
-Fetch options are optional, and can be passed in as either a Map-like object
-(one with a `.get()` method), a plain javascript object, or a
-[`figgy-pudding`](https://npm.im/figgy-pudding) instance.
+Performs a request to a given registry URL and parses the body of the response
+as JSON, with each entry being emitted through the stream.
-##### <a name="opts-auth-token"></a> `opts._authToken`
-
-* Type: String
-* Default: null
+The `jsonPath` argument is a [`JSONStream.parse()`
+path](https://github.com/dominictarr/JSONStream#jsonstreamparsepath), and the
+returned stream (unlike default `JSONStream`s), has a valid
+`Symbol.asyncIterator` implementation.
-Authentication token string.
+For available options, please see the section on [`fetch` options](#fetch-opts).
-Can be scoped to a registry by using a "nerf dart" for that registry. That is:
+##### Example
-```
-{
- '//registry.npmjs.org/:_authToken': 't0k3nH34r'
+```javascript
+console.log('https://npm.im/~zkat has access to the following packages:')
+for await (let {key, value} of fetch.json.stream('/-/user/zkat/package', '$*')) {
+ console.log(`https://npm.im/${key} (perms: ${value})`)
}
```
+#### <a name="fetch-opts"></a> `fetch` Options
+
+Fetch options are optional, and can be passed in as either a Map-like object
+(one with a `.get()` method), a plain javascript object, or a
+[`figgy-pudding`](https://npm.im/figgy-pudding) instance.
+
##### <a name="opts-agent"></a> `opts.agent`
* Type: http.Agent
@@ -229,6 +235,25 @@ packages.
See also [`opts.retry`](#opts-retry) to provide all retry options as a single
object.
+##### <a name="opts-force-auth"></a> `opts.force-auth`
+
+* Alias: `opts.forceAuth`
+* Type: Object
+* Default: null
+
+If present, other auth-related values in `opts` will be completely ignored,
+including `alwaysAuth`, `email`, and `otp`, when calculating auth for a request,
+and the auth details in `opts.forceAuth` will be used instead.
+
+##### <a name="opts-gzip"></a> `opts.gzip`
+
+* Type: Boolean
+* Default: false
+
+If true, `npm-registry-fetch` will set the `Content-Encoding` header to `gzip`
+and use `zlib.gzip()` or `zlib.createGzip()` to gzip-encode
+[`opts.body`](#opts-body).
+
##### <a name="opts-headers"></a> `opts.headers`
* Type: Object
@@ -238,6 +263,16 @@ Additional headers for the outgoing request. This option can also be used to
override headers automatically generated by `npm-registry-fetch`, such as
`Content-Type`.
+##### <a name="opts-ignore-body"></a> `opts.ignore-body`
+
+* Alias: `opts.ignoreBody`
+* Type: Boolean
+* Default: false
+
+If true, the **response body** will be thrown away and `res.body` set to `null`.
+This will prevent dangling response sockets for requests where you don't usually
+care what the response body is.
+
##### <a name="opts-integrity"></a> `opts.integrity`
* Type: String | [SRI object](https://npm.im/ssri)
@@ -301,6 +336,16 @@ See also [`opts.proxy`](#opts-proxy)
Logger object to use for logging operation details. Must have the same methods
as `npmlog`.
+##### <a name="opts-map-json"></a> `opts.map-json`
+
+* Alias: `mapJson`, `mapJSON`
+* Type: Function
+* Default: undefined
+
+When using `fetch.json.stream()` (NOT `fetch.json()`), this will be passed down
+to [`JSONStream`](https://npm.im/JSONStream) as the second argument to
+`JSONStream.parse`, and can be used to transform stream data before output.
+
##### <a name="opts-maxsockets"></a> `opts.maxsockets`
* Alias: `opts.max-sockets`
@@ -362,7 +407,7 @@ account.
* Default: null
Password used for basic authentication. For the more modern authentication
-method, please use the (more secure) [`opts._authToken`](#opts-auth-token)
+method, please use the (more secure) [`opts.token`](#opts-token)
Can optionally be scoped to a registry by using a "nerf dart" for that registry.
That is:
@@ -513,6 +558,22 @@ See also [`opts.ca`](#opts-ca).
Time before a hanging request times out.
+##### <a name="opts-token"></a> `opts.token`
+
+* Alias: `opts._authToken`
+* Type: String
+* Default: null
+
+Authentication token string.
+
+Can be scoped to a registry by using a "nerf dart" for that registry. That is:
+
+```
+{
+ '//registry.npmjs.org/:token': 't0k3nH34r'
+}
+```
+
##### <a name="opts-user-agent"></a> `opts.user-agent`
* Type: String
@@ -526,7 +587,7 @@ User agent string to send in the `User-Agent` header.
* Default: null
Username used for basic authentication. For the more modern authentication
-method, please use the (more secure) [`opts._authToken`](#opts-auth-token)
+method, please use the (more secure) [`opts.token`](#opts-token)
Can optionally be scoped to a registry by using a "nerf dart" for that registry.
That is:
@@ -545,4 +606,4 @@ See also [`opts.password`](#opts-password)
* Default: null
** DEPRECATED ** This is a legacy authentication token supported only for
-*compatibility. Please us [`opts._authToken`](#opts-auth-token) instead.
+*compatibility. Please use [`opts.token`](#opts-token) instead.
diff --git a/deps/npm/node_modules/npm-registry-fetch/auth.js b/deps/npm/node_modules/npm-registry-fetch/auth.js
index f4f7316db1..fa696b97dd 100644
--- a/deps/npm/node_modules/npm-registry-fetch/auth.js
+++ b/deps/npm/node_modules/npm-registry-fetch/auth.js
@@ -9,7 +9,11 @@ function getAuth (registry, opts) {
opts = config(opts)
let AUTH = {}
const regKey = registry && registryKey(registry)
+ if (opts.forceAuth) {
+ opts = opts.forceAuth
+ }
const doKey = (key, alias) => addKey(opts, AUTH, regKey, key, alias)
+ doKey('token')
doKey('_authToken', 'token')
doKey('username')
doKey('password')
@@ -26,11 +30,11 @@ function getAuth (registry, opts) {
}
function addKey (opts, obj, scope, key, objKey) {
- if (opts.get(key)) {
- obj[objKey || key] = opts.get(key)
+ if (opts[key]) {
+ obj[objKey || key] = opts[key]
}
- if (scope && opts.get(`${scope}:${key}`)) {
- obj[objKey || key] = opts.get(`${scope}:${key}`)
+ if (scope && opts[`${scope}:${key}`]) {
+ obj[objKey || key] = opts[`${scope}:${key}`]
}
}
diff --git a/deps/npm/node_modules/npm-registry-fetch/check-response.js b/deps/npm/node_modules/npm-registry-fetch/check-response.js
index 407a80e4ce..bfde699edc 100644
--- a/deps/npm/node_modules/npm-registry-fetch/check-response.js
+++ b/deps/npm/node_modules/npm-registry-fetch/check-response.js
@@ -8,7 +8,7 @@ module.exports = checkResponse
function checkResponse (method, res, registry, startTime, opts) {
opts = config(opts)
if (res.headers.has('npm-notice') && !res.headers.has('x-local-cache')) {
- opts.get('log').notice('', res.headers.get('npm-notice'))
+ opts.log.notice('', res.headers.get('npm-notice'))
}
checkWarnings(res, registry, opts)
if (res.status >= 400) {
@@ -16,6 +16,10 @@ function checkResponse (method, res, registry, startTime, opts) {
return checkErrors(method, res, startTime, opts)
} else {
res.body.on('end', () => logRequest(method, res, startTime, opts))
+ if (opts.ignoreBody) {
+ res.body.resume()
+ res.body = null
+ }
return res
}
}
@@ -25,7 +29,7 @@ function logRequest (method, res, startTime, opts) {
const attempt = res.headers.get('x-fetch-attempts')
const attemptStr = attempt && attempt > 1 ? ` attempt #${attempt}` : ''
const cacheStr = res.headers.get('x-local-cache') ? ' (from cache)' : ''
- opts.get('log').http(
+ opts.log.http(
'fetch',
`${method.toUpperCase()} ${res.status} ${res.url} ${elapsedTime}ms${attemptStr}${cacheStr}`
)
@@ -51,14 +55,14 @@ function checkWarnings (res, registry, opts) {
BAD_HOSTS.set(registry, true)
if (warnings['199']) {
if (warnings['199'].message.match(/ENOTFOUND/)) {
- opts.get('log').warn('registry', `Using stale data from ${registry} because the host is inaccessible -- are you offline?`)
+ opts.log.warn('registry', `Using stale data from ${registry} because the host is inaccessible -- are you offline?`)
} else {
- opts.get('log').warn('registry', `Unexpected warning for ${registry}: ${warnings['199'].message}`)
+ opts.log.warn('registry', `Unexpected warning for ${registry}: ${warnings['199'].message}`)
}
}
if (warnings['111']) {
// 111 Revalidation failed -- we're using stale data
- opts.get('log').warn(
+ opts.log.warn(
'registry',
`Using stale data from ${registry} due to a request error during revalidation.`
)
@@ -70,8 +74,9 @@ function checkErrors (method, res, startTime, opts) {
return res.buffer()
.catch(() => null)
.then(body => {
+ let parsed = body
try {
- body = JSON.parse(body.toString('utf8'))
+ parsed = JSON.parse(body.toString('utf8'))
} catch (e) {}
if (res.status === 401 && res.headers.get('www-authenticate')) {
const auth = res.headers.get('www-authenticate')
@@ -79,20 +84,25 @@ function checkErrors (method, res, startTime, opts) {
.map(s => s.toLowerCase())
if (auth.indexOf('ipaddress') !== -1) {
throw new errors.HttpErrorAuthIPAddress(
- method, res, body, opts.spec
+ method, res, parsed, opts.spec
)
} else if (auth.indexOf('otp') !== -1) {
throw new errors.HttpErrorAuthOTP(
- method, res, body, opts.spec
+ method, res, parsed, opts.spec
)
} else {
throw new errors.HttpErrorAuthUnknown(
- method, res, body, opts.spec
+ method, res, parsed, opts.spec
)
}
+ } else if (res.status === 401 && /one-time pass/.test(body.toString('utf8'))) {
+ // Heuristic for malformed OTP responses that don't include the www-authenticate header.
+ throw new errors.HttpErrorAuthOTP(
+ method, res, parsed, opts.spec
+ )
} else {
throw new errors.HttpErrorGeneral(
- method, res, body, opts.spec
+ method, res, parsed, opts.spec
)
}
})
diff --git a/deps/npm/node_modules/npm-registry-fetch/config.js b/deps/npm/node_modules/npm-registry-fetch/config.js
index 6249f66e05..7fe5dacc94 100644
--- a/deps/npm/node_modules/npm-registry-fetch/config.js
+++ b/deps/npm/node_modules/npm-registry-fetch/config.js
@@ -1,12 +1,12 @@
'use strict'
const pkg = require('./package.json')
-const pudding = require('figgy-pudding')
+const figgyPudding = require('figgy-pudding')
const silentLog = require('./silentlog.js')
-const AUTH_REGEX = /^(?:.*:)?(_authToken|username|_password|password|email|always-auth|_auth|otp)$/
+const AUTH_REGEX = /^(?:.*:)?(token|_authToken|username|_password|password|email|always-auth|_auth|otp)$/
const SCOPE_REGISTRY_REGEX = /@.*:registry$/gi
-const RegFetchConfig = pudding({
+module.exports = figgyPudding({
'agent': {},
'algorithms': {},
'body': {},
@@ -17,8 +17,14 @@ const RegFetchConfig = pudding({
'fetch-retry-factor': {},
'fetch-retry-maxtimeout': {},
'fetch-retry-mintimeout': {},
+ 'force-auth': {},
+ forceAuth: 'force-auth',
'gid': {},
+ 'gzip': {},
'headers': {},
+ 'https-proxy': {},
+ 'ignore-body': {},
+ ignoreBody: 'ignore-body',
'integrity': {},
'is-from-ci': 'isFromCI',
'isFromCI': {
@@ -37,6 +43,9 @@ const RegFetchConfig = pudding({
'log': {
default: silentLog
},
+ 'map-json': 'mapJson',
+ 'mapJSON': 'mapJson',
+ 'mapJson': {},
'max-sockets': 'maxsockets',
'maxsockets': {
default: 12
@@ -45,6 +54,7 @@ const RegFetchConfig = pudding({
'method': {
default: 'GET'
},
+ 'no-proxy': {},
'noproxy': {},
'npm-session': 'npmSession',
'npmSession': {},
@@ -54,7 +64,7 @@ const RegFetchConfig = pudding({
'prefer-online': {},
'projectScope': {},
'project-scope': 'projectScope',
- 'Promise': {},
+ 'Promise': {default: () => Promise},
'proxy': {},
'query': {},
'refer': {},
@@ -86,9 +96,3 @@ const RegFetchConfig = pudding({
return key.match(AUTH_REGEX) || key.match(SCOPE_REGISTRY_REGEX)
}
})
-
-module.exports = config
-function config (opts) {
- opts = opts || {}
- return RegFetchConfig(opts, opts.config)
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/errors.js b/deps/npm/node_modules/npm-registry-fetch/errors.js
index 217f46f977..ba78735fce 100644
--- a/deps/npm/node_modules/npm-registry-fetch/errors.js
+++ b/deps/npm/node_modules/npm-registry-fetch/errors.js
@@ -1,5 +1,25 @@
'use strict'
+const url = require('url')
+
+function packageName (href) {
+ try {
+ let basePath = url.parse(href).pathname.substr(1)
+ if (!basePath.match(/^-/)) {
+ basePath = basePath.split('/')
+ var index = basePath.indexOf('_rewrite')
+ if (index === -1) {
+ index = basePath.length - 1
+ } else {
+ index++
+ }
+ return decodeURIComponent(basePath[index])
+ }
+ } catch (_) {
+ // this is ok
+ }
+}
+
class HttpErrorBase extends Error {
constructor (method, res, body, spec) {
super()
@@ -9,6 +29,7 @@ class HttpErrorBase extends Error {
this.method = method
this.uri = res.url
this.body = body
+ this.pkgid = spec ? spec.toString() : packageName(res.url)
}
}
module.exports.HttpErrorBase = HttpErrorBase
diff --git a/deps/npm/node_modules/npm-registry-fetch/index.js b/deps/npm/node_modules/npm-registry-fetch/index.js
index cf6e8d3bf3..4ba3c19243 100644
--- a/deps/npm/node_modules/npm-registry-fetch/index.js
+++ b/deps/npm/node_modules/npm-registry-fetch/index.js
@@ -6,19 +6,19 @@ const checkResponse = require('./check-response.js')
const config = require('./config.js')
const getAuth = require('./auth.js')
const fetch = require('make-fetch-happen')
+const JSONStream = require('JSONStream')
const npa = require('npm-package-arg')
+const {PassThrough} = require('stream')
const qs = require('querystring')
-const silentLog = require('./silentlog.js')
const url = require('url')
+const zlib = require('zlib')
module.exports = regFetch
function regFetch (uri, opts) {
- opts = config(Object.assign({
- log: silentLog
- }, opts))
+ opts = config(opts)
const registry = (
- (opts.get('spec') && pickRegistry(opts.get('spec'), opts)) ||
- opts.get('registry') ||
+ (opts.spec && pickRegistry(opts.spec, opts)) ||
+ opts.registry ||
'https://registry.npmjs.org/'
)
uri = url.parse(uri).protocol
@@ -31,7 +31,7 @@ function regFetch (uri, opts) {
// through that takes into account the scope, the prefix of `uri`, etc
const startTime = Date.now()
const headers = getHeaders(registry, uri, opts)
- let body = opts.get('body')
+ let body = opts.body
const bodyIsStream = body &&
typeof body === 'object' &&
typeof body.pipe === 'function'
@@ -41,51 +41,70 @@ function regFetch (uri, opts) {
} else if (body && !headers['content-type']) {
headers['content-type'] = 'application/octet-stream'
}
- if (opts.get('query')) {
- let q = opts.get('query')
+ if (opts.gzip) {
+ headers['content-encoding'] = 'gzip'
+ if (bodyIsStream) {
+ const gz = zlib.createGzip()
+ body.on('error', err => gz.emit('error', err))
+ body = body.pipe(gz)
+ } else {
+ body = new opts.Promise((resolve, reject) => {
+ zlib.gzip(body, (err, gz) => err ? reject(err) : resolve(gz))
+ })
+ }
+ }
+ if (opts.query) {
+ let q = opts.query
if (typeof q === 'string') {
q = qs.parse(q)
}
- const parsed = url.parse(uri)
- parsed.search = '?' + qs.stringify(
- parsed.query
- ? Object.assign(qs.parse(parsed.query), q)
- : q
- )
- uri = url.format(parsed)
+ Object.keys(q).forEach(key => {
+ if (q[key] === undefined) {
+ delete q[key]
+ }
+ })
+ if (Object.keys(q).length) {
+ const parsed = url.parse(uri)
+ parsed.search = '?' + qs.stringify(
+ parsed.query
+ ? Object.assign(qs.parse(parsed.query), q)
+ : q
+ )
+ uri = url.format(parsed)
+ }
}
- return fetch(uri, {
- agent: opts.get('agent'),
- algorithms: opts.get('algorithms'),
+ return opts.Promise.resolve(body).then(body => fetch(uri, {
+ agent: opts.agent,
+ algorithms: opts.algorithms,
body,
cache: getCacheMode(opts),
- cacheManager: opts.get('cache'),
- ca: opts.get('ca'),
- cert: opts.get('cert'),
+ cacheManager: opts.cache,
+ ca: opts.ca,
+ cert: opts.cert,
headers,
- integrity: opts.get('integrity'),
- key: opts.get('key'),
- localAddress: opts.get('local-address'),
- maxSockets: opts.get('maxsockets'),
- memoize: opts.get('memoize'),
- method: opts.get('method') || 'GET',
- noProxy: opts.get('noproxy'),
- Promise: opts.get('Promise'),
- proxy: opts.get('proxy'),
- referer: opts.get('refer'),
- retry: opts.get('retry') || {
- retries: opts.get('fetch-retries'),
- factor: opts.get('fetch-retry-factor'),
- minTimeout: opts.get('fetch-retry-mintimeout'),
- maxTimeout: opts.get('fetch-retry-maxtimeout')
+ integrity: opts.integrity,
+ key: opts.key,
+ localAddress: opts['local-address'],
+ maxSockets: opts.maxsockets,
+ memoize: opts.memoize,
+ method: opts.method || 'GET',
+ noProxy: opts['no-proxy'] || opts.noproxy,
+ Promise: opts.Promise,
+ proxy: opts['https-proxy'] || opts.proxy,
+ referer: opts.refer,
+ retry: opts.retry != null ? opts.retry : {
+ retries: opts['fetch-retries'],
+ factor: opts['fetch-retry-factor'],
+ minTimeout: opts['fetch-retry-mintimeout'],
+ maxTimeout: opts['fetch-retry-maxtimeout']
},
- strictSSL: !!opts.get('strict-ssl'),
- timeout: opts.get('timeout'),
- uid: opts.get('uid'),
- gid: opts.get('gid')
+ strictSSL: !!opts['strict-ssl'],
+ timeout: opts.timeout,
+ uid: opts.uid,
+ gid: opts.gid
}).then(res => checkResponse(
- opts.get('method') || 'GET', res, registry, startTime, opts
- ))
+ opts.method || 'GET', res, registry, startTime, opts
+ )))
}
module.exports.json = fetchJSON
@@ -93,35 +112,43 @@ function fetchJSON (uri, opts) {
return regFetch(uri, opts).then(res => res.json())
}
+module.exports.json.stream = fetchJSONStream
+function fetchJSONStream (uri, jsonPath, opts) {
+ opts = config(opts)
+ const parser = JSONStream.parse(jsonPath, opts.mapJson)
+ const pt = parser.pipe(new PassThrough({objectMode: true}))
+ parser.on('error', err => pt.emit('error', err))
+ regFetch(uri, opts).then(res => {
+ res.body.on('error', err => parser.emit('error', err))
+ res.body.pipe(parser)
+ }, err => pt.emit('error', err))
+ return pt
+}
+
module.exports.pickRegistry = pickRegistry
function pickRegistry (spec, opts) {
spec = npa(spec)
opts = config(opts)
- if (!spec.registry) {
- throw new Error(`${spec} is not a valid registry dependency spec`)
- }
let registry = spec.scope &&
- opts.get(spec.scope.replace(/^@?/, '@') + ':registry')
+ opts[spec.scope.replace(/^@?/, '@') + ':registry']
- if (!registry && opts.get('scope')) {
- registry = opts.get(
- opts.get('scope').replace(/^@?/, '@') + ':registry'
- )
+ if (!registry && opts.scope) {
+ registry = opts[opts.scope.replace(/^@?/, '@') + ':registry']
}
if (!registry) {
- registry = opts.get('registry') || 'https://registry.npmjs.org/'
+ registry = opts.registry || 'https://registry.npmjs.org/'
}
return registry
}
function getCacheMode (opts) {
- return opts.get('offline')
+ return opts.offline
? 'only-if-cached'
- : opts.get('prefer-offline')
+ : opts['prefer-offline']
? 'force-cache'
- : opts.get('prefer-online')
+ : opts['prefer-online']
? 'no-cache'
: 'default'
}
@@ -129,18 +156,18 @@ function getCacheMode (opts) {
function getHeaders (registry, uri, opts) {
const headers = Object.assign({
'npm-in-ci': !!(
- opts.get('is-from-ci') ||
+ opts['is-from-ci'] ||
process.env['CI'] === 'true' ||
process.env['TDDIUM'] ||
process.env['JENKINS_URL'] ||
process.env['bamboo.buildKey'] ||
process.env['GO_PIPELINE_NAME']
),
- 'npm-scope': opts.get('project-scope'),
- 'npm-session': opts.get('npm-session'),
- 'user-agent': opts.get('user-agent'),
- 'referer': opts.get('refer')
- }, opts.get('headers'))
+ 'npm-scope': opts['project-scope'],
+ 'npm-session': opts['npm-session'],
+ 'user-agent': opts['user-agent'],
+ 'referer': opts.refer
+ }, opts.headers)
const auth = getAuth(registry, opts)
// If a tarball is hosted on a different place than the manifest, only send
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/CHANGELOG.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/CHANGELOG.md
deleted file mode 100644
index 5c3e7911db..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/CHANGELOG.md
+++ /dev/null
@@ -1,478 +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="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)
-
-
-### Bug Fixes
-
-* **move-file:** actually use the fallback to `move-concurrently` (#110) ([073fbe1](https://github.com/zkat/cacache/commit/073fbe1))
-
-
-
-<a name="10.0.0"></a>
-# [10.0.0](https://github.com/zkat/cacache/compare/v9.3.0...v10.0.0) (2017-10-23)
-
-
-### Features
-
-* **license:** relicense to ISC (#111) ([fdbb4e5](https://github.com/zkat/cacache/commit/fdbb4e5))
-
-
-### Performance Improvements
-
-* more copyFile benchmarks ([63787bb](https://github.com/zkat/cacache/commit/63787bb))
-
-
-### BREAKING CHANGES
-
-* **license:** the license has been changed from CC0-1.0 to ISC.
-
-
-
-<a name="9.3.0"></a>
-# [9.3.0](https://github.com/zkat/cacache/compare/v9.2.9...v9.3.0) (2017-10-07)
-
-
-### Features
-
-* **copy:** added cacache.get.copy api for fast copies (#107) ([067b5f6](https://github.com/zkat/cacache/commit/067b5f6))
-
-
-
-<a name="9.2.9"></a>
-## [9.2.9](https://github.com/zkat/cacache/compare/v9.2.8...v9.2.9) (2017-06-17)
-
-
-
-<a name="9.2.8"></a>
-## [9.2.8](https://github.com/zkat/cacache/compare/v9.2.7...v9.2.8) (2017-06-05)
-
-
-### Bug Fixes
-
-* **ssri:** bump ssri for bugfix ([c3232ea](https://github.com/zkat/cacache/commit/c3232ea))
-
-
-
-<a name="9.2.7"></a>
-## [9.2.7](https://github.com/zkat/cacache/compare/v9.2.6...v9.2.7) (2017-06-05)
-
-
-### Bug Fixes
-
-* **content:** make verified content completely read-only (#96) ([4131196](https://github.com/zkat/cacache/commit/4131196))
-
-
-
-<a name="9.2.6"></a>
-## [9.2.6](https://github.com/zkat/cacache/compare/v9.2.5...v9.2.6) (2017-05-31)
-
-
-### Bug Fixes
-
-* **node:** update ssri to prevent old node 4 crash ([5209ffe](https://github.com/zkat/cacache/commit/5209ffe))
-
-
-
-<a name="9.2.5"></a>
-## [9.2.5](https://github.com/zkat/cacache/compare/v9.2.4...v9.2.5) (2017-05-25)
-
-
-### Bug Fixes
-
-* **deps:** fix lockfile issues and bump ssri ([84e1d7e](https://github.com/zkat/cacache/commit/84e1d7e))
-
-
-
-<a name="9.2.4"></a>
-## [9.2.4](https://github.com/zkat/cacache/compare/v9.2.3...v9.2.4) (2017-05-24)
-
-
-### Bug Fixes
-
-* **deps:** bumping deps ([bbccb12](https://github.com/zkat/cacache/commit/bbccb12))
-
-
-
-<a name="9.2.3"></a>
-## [9.2.3](https://github.com/zkat/cacache/compare/v9.2.2...v9.2.3) (2017-05-24)
-
-
-### Bug Fixes
-
-* **rm:** stop crashing if content is missing on rm ([ac90bc0](https://github.com/zkat/cacache/commit/ac90bc0))
-
-
-
-<a name="9.2.2"></a>
-## [9.2.2](https://github.com/zkat/cacache/compare/v9.2.1...v9.2.2) (2017-05-14)
-
-
-### Bug Fixes
-
-* **i18n:** lets pretend this didn't happen ([519b4ee](https://github.com/zkat/cacache/commit/519b4ee))
-
-
-
-<a name="9.2.1"></a>
-## [9.2.1](https://github.com/zkat/cacache/compare/v9.2.0...v9.2.1) (2017-05-14)
-
-
-### Bug Fixes
-
-* **docs:** fixing translation messup ([bb9e4f9](https://github.com/zkat/cacache/commit/bb9e4f9))
-
-
-
-<a name="9.2.0"></a>
-# [9.2.0](https://github.com/zkat/cacache/compare/v9.1.0...v9.2.0) (2017-05-14)
-
-
-### Features
-
-* **i18n:** add Spanish translation for API ([531f9a4](https://github.com/zkat/cacache/commit/531f9a4))
-
-
-
-<a name="9.1.0"></a>
-# [9.1.0](https://github.com/zkat/cacache/compare/v9.0.0...v9.1.0) (2017-05-14)
-
-
-### Features
-
-* **i18n:** Add Spanish translation and i18n setup (#91) ([323b90c](https://github.com/zkat/cacache/commit/323b90c))
-
-
-
-<a name="9.0.0"></a>
-# [9.0.0](https://github.com/zkat/cacache/compare/v8.0.0...v9.0.0) (2017-04-28)
-
-
-### Bug Fixes
-
-* **memoization:** actually use the LRU ([0e55dc9](https://github.com/zkat/cacache/commit/0e55dc9))
-
-
-### Features
-
-* **memoization:** memoizers can be injected through opts.memoize (#90) ([e5614c7](https://github.com/zkat/cacache/commit/e5614c7))
-
-
-### BREAKING CHANGES
-
-* **memoization:** If you were passing an object to opts.memoize, it will now be used as an injected memoization object. If you were only passing booleans and other non-objects through that option, no changes are needed.
-
-
-
-<a name="8.0.0"></a>
-# [8.0.0](https://github.com/zkat/cacache/compare/v7.1.0...v8.0.0) (2017-04-22)
-
-
-### Features
-
-* **read:** change hasContent to return {sri, size} (#88) ([bad6c49](https://github.com/zkat/cacache/commit/bad6c49)), closes [#87](https://github.com/zkat/cacache/issues/87)
-
-
-### BREAKING CHANGES
-
-* **read:** hasContent now returns an object with `{sri, size}` instead of `sri`. Use `result.sri` anywhere that needed the old return value.
-
-
-
-<a name="7.1.0"></a>
-# [7.1.0](https://github.com/zkat/cacache/compare/v7.0.5...v7.1.0) (2017-04-20)
-
-
-### Features
-
-* **size:** handle content size info (#49) ([91230af](https://github.com/zkat/cacache/commit/91230af))
-
-
-
-<a name="7.0.5"></a>
-## [7.0.5](https://github.com/zkat/cacache/compare/v7.0.4...v7.0.5) (2017-04-18)
-
-
-### Bug Fixes
-
-* **integrity:** new ssri with fixed integrity stream ([6d13e8e](https://github.com/zkat/cacache/commit/6d13e8e))
-* **write:** wrap stuff in promises to improve errors ([3624fc5](https://github.com/zkat/cacache/commit/3624fc5))
-
-
-
-<a name="7.0.4"></a>
-## [7.0.4](https://github.com/zkat/cacache/compare/v7.0.3...v7.0.4) (2017-04-15)
-
-
-### Bug Fixes
-
-* **fix-owner:** throw away ENOENTs on chownr ([d49bbcd](https://github.com/zkat/cacache/commit/d49bbcd))
-
-
-
-<a name="7.0.3"></a>
-## [7.0.3](https://github.com/zkat/cacache/compare/v7.0.2...v7.0.3) (2017-04-05)
-
-
-### Bug Fixes
-
-* **read:** fixing error message for integrity verification failures ([9d4f0a5](https://github.com/zkat/cacache/commit/9d4f0a5))
-
-
-
-<a name="7.0.2"></a>
-## [7.0.2](https://github.com/zkat/cacache/compare/v7.0.1...v7.0.2) (2017-04-03)
-
-
-### Bug Fixes
-
-* **integrity:** use EINTEGRITY error code and update ssri ([8dc2e62](https://github.com/zkat/cacache/commit/8dc2e62))
-
-
-
-<a name="7.0.1"></a>
-## [7.0.1](https://github.com/zkat/cacache/compare/v7.0.0...v7.0.1) (2017-04-03)
-
-
-### Bug Fixes
-
-* **docs:** fix header name conflict in readme ([afcd456](https://github.com/zkat/cacache/commit/afcd456))
-
-
-
-<a name="7.0.0"></a>
-# [7.0.0](https://github.com/zkat/cacache/compare/v6.3.0...v7.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **test:** fix content.write tests when running in docker ([d2e9b6a](https://github.com/zkat/cacache/commit/d2e9b6a))
-
-
-### Features
-
-* **integrity:** subresource integrity support (#78) ([b1e731f](https://github.com/zkat/cacache/commit/b1e731f))
-
-
-### BREAKING CHANGES
-
-* **integrity:** The entire API has been overhauled to use SRI hashes instead of digest/hashAlgorithm pairs. SRI hashes follow the Subresource Integrity standard and support strings and objects compatible with [`ssri`](https://npm.im/ssri).
-
-* This change bumps the index version, which will invalidate all previous index entries. Content entries will remain intact, and existing caches will automatically reuse any content from before this breaking change.
-
-* `cacache.get.info()`, `cacache.ls()`, and `cacache.ls.stream()` will now return objects that looks like this:
-
-```
-{
- key: String,
- integrity: '<algorithm>-<base64hash>',
- path: ContentPath,
- time: Date<ms>,
- metadata: Any
-}
-```
-
-* `opts.digest` and `opts.hashAlgorithm` are obsolete for any API calls that used them.
-
-* Anywhere `opts.digest` was accepted, `opts.integrity` is now an option. Any valid SRI hash is accepted here -- multiple hash entries will be resolved according to the standard: first, the "strongest" hash algorithm will be picked, and then each of the entries for that algorithm will be matched against the content. Content will be validated if *any* of the entries match (so, a single integrity string can be used for multiple "versions" of the same document/data).
-
-* `put.byDigest()`, `put.stream.byDigest`, `get.byDigest()` and `get.stream.byDigest()` now expect an SRI instead of a `digest` + `opts.hashAlgorithm` pairing.
-
-* `get.hasContent()` now expects an integrity hash instead of a digest. If content exists, it will return the specific single integrity hash that was found in the cache.
-
-* `verify()` has learned to handle integrity-based caches, and forgotten how to handle old-style cache indices due to the format change.
-
-* `cacache.rm.content()` now expects an integrity hash instead of a hex digest.
-
-
-
-<a name="6.3.0"></a>
-# [6.3.0](https://github.com/zkat/cacache/compare/v6.2.0...v6.3.0) (2017-04-01)
-
-
-### Bug Fixes
-
-* **fixOwner:** ignore EEXIST race condition from mkdirp ([4670e9b](https://github.com/zkat/cacache/commit/4670e9b))
-* **index:** ignore index removal races when inserting ([b9d2fa2](https://github.com/zkat/cacache/commit/b9d2fa2))
-* **memo:** use lru-cache for better mem management (#75) ([d8ac5aa](https://github.com/zkat/cacache/commit/d8ac5aa))
-
-
-### Features
-
-* **dependencies:** Switch to move-concurrently (#77) ([dc6482d](https://github.com/zkat/cacache/commit/dc6482d))
-
-
-
-<a name="6.2.0"></a>
-# [6.2.0](https://github.com/zkat/cacache/compare/v6.1.2...v6.2.0) (2017-03-15)
-
-
-### Bug Fixes
-
-* **index:** additional bucket entry verification with checksum (#72) ([f8e0f25](https://github.com/zkat/cacache/commit/f8e0f25))
-* **verify:** return fixOwner.chownr promise ([6818521](https://github.com/zkat/cacache/commit/6818521))
-
-
-### Features
-
-* **tmp:** safe tmp dir creation/management util (#73) ([c42da71](https://github.com/zkat/cacache/commit/c42da71))
-
-
-
-<a name="6.1.2"></a>
-## [6.1.2](https://github.com/zkat/cacache/compare/v6.1.1...v6.1.2) (2017-03-13)
-
-
-### Bug Fixes
-
-* **index:** set default hashAlgorithm ([d6eb2f0](https://github.com/zkat/cacache/commit/d6eb2f0))
-
-
-
-<a name="6.1.1"></a>
-## [6.1.1](https://github.com/zkat/cacache/compare/v6.1.0...v6.1.1) (2017-03-13)
-
-
-### Bug Fixes
-
-* **coverage:** bumping coverage for verify (#71) ([0b7faf6](https://github.com/zkat/cacache/commit/0b7faf6))
-* **deps:** glob should have been a regular dep :< ([0640bc4](https://github.com/zkat/cacache/commit/0640bc4))
-
-
-
-<a name="6.1.0"></a>
-# [6.1.0](https://github.com/zkat/cacache/compare/v6.0.2...v6.1.0) (2017-03-12)
-
-
-### Bug Fixes
-
-* **coverage:** more coverage for content reads (#70) ([ef4f70a](https://github.com/zkat/cacache/commit/ef4f70a))
-* **tests:** use safe-buffer because omfg (#69) ([6ab8132](https://github.com/zkat/cacache/commit/6ab8132))
-
-
-### Features
-
-* **rm:** limited rm.all and fixed bugs (#66) ([d5d25ba](https://github.com/zkat/cacache/commit/d5d25ba)), closes [#66](https://github.com/zkat/cacache/issues/66)
-* **verify:** tested, working cache verifier/gc (#68) ([45ad77a](https://github.com/zkat/cacache/commit/45ad77a))
-
-
-
-<a name="6.0.2"></a>
-## [6.0.2](https://github.com/zkat/cacache/compare/v6.0.1...v6.0.2) (2017-03-11)
-
-
-### Bug Fixes
-
-* **index:** segment cache items with another subbucket (#64) ([c3644e5](https://github.com/zkat/cacache/commit/c3644e5))
-
-
-
-<a name="6.0.1"></a>
-## [6.0.1](https://github.com/zkat/cacache/compare/v6.0.0...v6.0.1) (2017-03-05)
-
-
-### Bug Fixes
-
-* **docs:** Missed spots in README ([8ffb7fa](https://github.com/zkat/cacache/commit/8ffb7fa))
-
-
-
-<a name="6.0.0"></a>
-# [6.0.0](https://github.com/zkat/cacache/compare/v5.0.3...v6.0.0) (2017-03-05)
-
-
-### Bug Fixes
-
-* **api:** keep memo cache mostly-internal ([2f72d0a](https://github.com/zkat/cacache/commit/2f72d0a))
-* **content:** use the rest of the string, not the whole string ([fa8f3c3](https://github.com/zkat/cacache/commit/fa8f3c3))
-* **deps:** removed `format-number[@2](https://github.com/2).0.2` ([1187791](https://github.com/zkat/cacache/commit/1187791))
-* **deps:** removed inflight[@1](https://github.com/1).0.6 ([0d1819c](https://github.com/zkat/cacache/commit/0d1819c))
-* **deps:** rimraf[@2](https://github.com/2).6.1 ([9efab6b](https://github.com/zkat/cacache/commit/9efab6b))
-* **deps:** standard[@9](https://github.com/9).0.0 ([4202cba](https://github.com/zkat/cacache/commit/4202cba))
-* **deps:** tap[@10](https://github.com/10).3.0 ([aa03088](https://github.com/zkat/cacache/commit/aa03088))
-* **deps:** weallcontribute[@1](https://github.com/1).0.8 ([ad4f4dc](https://github.com/zkat/cacache/commit/ad4f4dc))
-* **docs:** add security note to hashKey ([03f81ba](https://github.com/zkat/cacache/commit/03f81ba))
-* **hashes:** change default hashAlgorithm to sha512 ([ea00ba6](https://github.com/zkat/cacache/commit/ea00ba6))
-* **hashes:** missed a spot for hashAlgorithm defaults ([45997d8](https://github.com/zkat/cacache/commit/45997d8))
-* **index:** add length header before JSON for verification ([fb8cb4d](https://github.com/zkat/cacache/commit/fb8cb4d))
-* **index:** change index filenames to sha1s of keys ([bbc5fca](https://github.com/zkat/cacache/commit/bbc5fca))
-* **index:** who cares about race conditions anyway ([b1d3888](https://github.com/zkat/cacache/commit/b1d3888))
-* **perf:** bulk-read get+read for massive speed ([d26cdf9](https://github.com/zkat/cacache/commit/d26cdf9))
-* **perf:** use bulk file reads for index reads ([79a8891](https://github.com/zkat/cacache/commit/79a8891))
-* **put-stream:** remove tmp file on stream insert error ([65f6632](https://github.com/zkat/cacache/commit/65f6632))
-* **put-stream:** robustified and predictibilized ([daf9e08](https://github.com/zkat/cacache/commit/daf9e08))
-* **put-stream:** use new promise API for moves ([1d36013](https://github.com/zkat/cacache/commit/1d36013))
-* **readme:** updated to reflect new default hashAlgo ([c60a2fa](https://github.com/zkat/cacache/commit/c60a2fa))
-* **verify:** tiny typo fix ([db22d05](https://github.com/zkat/cacache/commit/db22d05))
-
-
-### Features
-
-* **api:** converted external api ([7bf032f](https://github.com/zkat/cacache/commit/7bf032f))
-* **cacache:** exported clearMemoized() utility ([8d2c5b6](https://github.com/zkat/cacache/commit/8d2c5b6))
-* **cache:** add versioning to content and index ([31bc549](https://github.com/zkat/cacache/commit/31bc549))
-* **content:** collate content files into subdirs ([c094d9f](https://github.com/zkat/cacache/commit/c094d9f))
-* **deps:** [@npmcorp](https://github.com/npmcorp)/move[@1](https://github.com/1).0.0 ([bdd00bf](https://github.com/zkat/cacache/commit/bdd00bf))
-* **deps:** bluebird[@3](https://github.com/3).4.7 ([3a17aff](https://github.com/zkat/cacache/commit/3a17aff))
-* **deps:** promise-inflight[@1](https://github.com/1).0.1 ([a004fe6](https://github.com/zkat/cacache/commit/a004fe6))
-* **get:** added memoization support for get ([c77d794](https://github.com/zkat/cacache/commit/c77d794))
-* **get:** export hasContent ([2956ec3](https://github.com/zkat/cacache/commit/2956ec3))
-* **index:** add hashAlgorithm and format insert ret val ([b639746](https://github.com/zkat/cacache/commit/b639746))
-* **index:** collate index files into subdirs ([e8402a5](https://github.com/zkat/cacache/commit/e8402a5))
-* **index:** promisify entry index ([cda3335](https://github.com/zkat/cacache/commit/cda3335))
-* **memo:** added memoization lib ([da07b92](https://github.com/zkat/cacache/commit/da07b92))
-* **memo:** export memoization api ([954b1b3](https://github.com/zkat/cacache/commit/954b1b3))
-* **move-file:** add move fallback for weird errors ([5cf4616](https://github.com/zkat/cacache/commit/5cf4616))
-* **perf:** bulk content write api ([51b536e](https://github.com/zkat/cacache/commit/51b536e))
-* **put:** added memoization support to put ([b613a70](https://github.com/zkat/cacache/commit/b613a70))
-* **read:** switched to promises ([a869362](https://github.com/zkat/cacache/commit/a869362))
-* **rm:** added memoization support to rm ([4205cf0](https://github.com/zkat/cacache/commit/4205cf0))
-* **rm:** switched to promises ([a000d24](https://github.com/zkat/cacache/commit/a000d24))
-* **util:** promise-inflight ownership fix requests ([9517cd7](https://github.com/zkat/cacache/commit/9517cd7))
-* **util:** use promises for api ([ae204bb](https://github.com/zkat/cacache/commit/ae204bb))
-* **verify:** converted to Promises ([f0b3974](https://github.com/zkat/cacache/commit/f0b3974))
-
-
-### BREAKING CHANGES
-
-* cache: index/content directories are now versioned. Previous caches are no longer compatible and cannot be migrated.
-* util: fix-owner now uses Promises instead of callbacks
-* index: Previously-generated index entries are no longer compatible and the index must be regenerated.
-* index: The index format has changed and previous caches are no longer compatible. Existing caches will need to be regenerated.
-* hashes: Default hashAlgorithm changed from sha1 to sha512. If you
-rely on the prior setting, pass `opts.hashAlgorithm` in explicitly.
-* content: Previously-generated content directories are no longer compatible
-and must be regenerated.
-* verify: API is now promise-based
-* read: Switches to a Promise-based API and removes callback stuff
-* rm: Switches to a Promise-based API and removes callback stuff
-* index: this changes the API to work off promises instead of callbacks
-* api: this means we are going all in on promises now
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/LICENSE.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/LICENSE.md
deleted file mode 100644
index 8d28acf866..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/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/npm-registry-fetch/node_modules/cacache/README.es.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/README.es.md
deleted file mode 100644
index 783a0a19b0..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/README.es.md
+++ /dev/null
@@ -1,628 +0,0 @@
-# cacache [![npm version](https://img.shields.io/npm/v/cacache.svg)](https://npm.im/cacache) [![license](https://img.shields.io/npm/l/cacache.svg)](https://npm.im/cacache) [![Travis](https://img.shields.io/travis/zkat/cacache.svg)](https://travis-ci.org/zkat/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/cacache?svg=true)](https://ci.appveyor.com/project/zkat/cacache) [![Coverage Status](https://coveralls.io/repos/github/zkat/cacache/badge.svg?branch=latest)](https://coveralls.io/github/zkat/cacache?branch=latest)
-
-[`cacache`](https://github.com/zkat/cacache) es una librería de Node.js para
-manejar caches locales en disco, con acceso tanto con claves únicas como
-direcciones de contenido (hashes/hacheos). Es súper rápida, excelente con el
-acceso concurrente, y jamás te dará datos incorrectos, aún si se corrompen o
-manipulan directamente los ficheros del cache.
-
-El propósito original era reemplazar el caché local de
-[npm](https://npm.im/npm), pero se puede usar por su propia cuenta.
-
-_Traducciones: [English](README.md)_
-
-## Instalación
-
-`$ npm install --save cacache`
-
-## Índice
-
-* [Ejemplo](#ejemplo)
-* [Características](#características)
-* [Cómo Contribuir](#cómo-contribuir)
-* [API](#api)
- * [Usando el API en español](#localized-api)
- * Leer
- * [`ls`](#ls)
- * [`ls.flujo`](#ls-stream)
- * [`saca`](#get-data)
- * [`saca.flujo`](#get-stream)
- * [`saca.info`](#get-info)
- * [`saca.tieneDatos`](#get-hasContent)
- * Escribir
- * [`mete`](#put-data)
- * [`mete.flujo`](#put-stream)
- * [opciones para `mete*`](#put-options)
- * [`rm.todo`](#rm-all)
- * [`rm.entrada`](#rm-entry)
- * [`rm.datos`](#rm-content)
- * Utilidades
- * [`ponLenguaje`](#set-locale)
- * [`limpiaMemoizado`](#clear-memoized)
- * [`tmp.hazdir`](#tmp-mkdir)
- * [`tmp.conTmp`](#with-tmp)
- * Integridad
- * [Subresource Integrity](#integrity)
- * [`verifica`](#verify)
- * [`verifica.ultimaVez`](#verify-last-run)
-
-### Ejemplo
-
-```javascript
-const cacache = require('cacache/es')
-const fs = require('fs')
-
-const tarbol = '/ruta/a/mi-tar.tgz'
-const rutaCache = '/tmp/my-toy-cache'
-const clave = 'mi-clave-única-1234'
-
-// ¡Añádelo al caché! Usa `rutaCache` como raíz del caché.
-cacache.mete(rutaCache, clave, '10293801983029384').then(integrity => {
- console.log(`Saved content to ${rutaCache}.`)
-})
-
-const destino = '/tmp/mytar.tgz'
-
-// Copia el contenido del caché a otro fichero, pero esta vez con flujos.
-cacache.saca.flujo(
- rutaCache, clave
-).pipe(
- fs.createWriteStream(destino)
-).on('finish', () => {
- console.log('extracción completada')
-})
-
-// La misma cosa, pero accesando el contenido directamente, sin tocar el índice.
-cacache.saca.porHacheo(rutaCache, integridad).then(datos => {
- fs.writeFile(destino, datos, err => {
- console.log('datos del tarbol sacados basado en su sha512, y escrito a otro fichero')
- })
-})
-```
-
-### Características
-
-* Extracción por clave o por dirección de contenido (shasum, etc)
-* Usa el estándard de web, [Subresource Integrity](#integrity)
-* Compatible con multiples algoritmos - usa sha1, sha512, etc, en el mismo caché sin problema
-* Entradas con contenido idéntico comparten ficheros
-* Tolerancia de fallas (inmune a corrupción, ficheros parciales, carreras de proceso, etc)
-* Verificación completa de datos cuando (escribiendo y leyendo)
-* Concurrencia rápida, segura y "lockless"
-* Compatible con `stream`s (flujos)
-* Compatible con `Promise`s (promesas)
-* Bastante rápida -- acceso, incluyendo verificación, en microsegundos
-* Almacenaje de metadatos arbitrarios
-* Colección de basura y verificación adicional fuera de banda
-* Cobertura rigurosa de pruebas
-* Probablente hay un "Bloom filter" por ahí en algún lado. Eso le mola a la gente, ¿Verdad? 🤔
-
-### Cómo Contribuir
-
-El equipo de cacache felizmente acepta contribuciones de código y otras maneras de participación. ¡Hay muchas formas diferentes de contribuir! La [Guía de Colaboradores](CONTRIBUTING.md) (en inglés) tiene toda la información que necesitas para cualquier tipo de contribución: todo desde cómo reportar errores hasta cómo someter parches con nuevas características. Con todo y eso, no se preocupe por si lo que haces está exáctamente correcto: no hay ningún problema en hacer preguntas si algo no está claro, o no lo encuentras.
-
-El equipo de cacache tiene miembros hispanohablantes: es completamente aceptable crear `issues` y `pull requests` en español/castellano.
-
-Todos los participantes en este proyecto deben obedecer el [Código de Conducta](CODE_OF_CONDUCT.md) (en inglés), y en general actuar de forma amable y respetuosa mientras participan en esta comunidad.
-
-Por favor refiérase al [Historial de Cambios](CHANGELOG.md) (en inglés) para detalles sobre cambios importantes incluídos en cada versión.
-
-Finalmente, cacache tiene un sistema de localización de lenguaje. Si te interesa añadir lenguajes o mejorar los que existen, mira en el directorio `./locales` para comenzar.
-
-Happy hacking!
-
-### API
-
-#### <a name="localized-api"></a> Usando el API en español
-
-cacache incluye una traducción completa de su API al castellano, con las mismas
-características. Para usar el API como está documentado en este documento, usa
-`require('cacache/es')`
-
-cacache también tiene otros lenguajes: encuéntralos bajo `./locales`, y podrás
-usar el API en ese lenguaje con `require('cacache/<lenguaje>')`
-
-#### <a name="ls"></a> `> cacache.ls(cache) -> Promise<Object>`
-
-Enumera todas las entradas en el caché, dentro de un solo objeto. Cada entrada
-en el objeto tendrá como clave la clave única usada para el índice, el valor
-siendo un objeto de [`saca.info`](#get-info).
-
-##### Ejemplo
-
-```javascript
-cacache.ls(rutaCache).then(console.log)
-// Salida
-{
- 'my-thing': {
- key: 'my-thing',
- integrity: 'sha512-BaSe64/EnCoDED+HAsh=='
- path: '.testcache/content/deadbeef', // unido con `rutaCache`
- time: 12345698490,
- size: 4023948,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
- },
- 'other-thing': {
- key: 'other-thing',
- integrity: 'sha1-ANothER+hasH=',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 111112
- }
-}
-```
-
-#### <a name="ls-stream"></a> `> cacache.ls.flujo(cache) -> Readable`
-
-Enumera todas las entradas en el caché, emitiendo un objeto de
-[`saca.info`](#get-info) por cada evento de `data` en el flujo.
-
-##### Ejemplo
-
-```javascript
-cacache.ls.flujo(rutaCache).on('data', console.log)
-// Salida
-{
- key: 'my-thing',
- integrity: 'sha512-BaSe64HaSh',
- path: '.testcache/content/deadbeef', // unido con `rutaCache`
- time: 12345698490,
- size: 13423,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-
-{
- key: 'other-thing',
- integrity: 'whirlpool-WoWSoMuchSupport',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 498023984029
-}
-
-{
- ...
-}
-```
-
-#### <a name="get-data"></a> `> cacache.saca(cache, clave, [ops]) -> Promise({data, metadata, integrity})`
-
-Devuelve un objeto con los datos, hacheo de integridad y metadatos identificados
-por la `clave`. La propiedad `data` de este objeto será una instancia de
-`Buffer` con los datos almacenados en el caché. to do with it! cacache just
-won't care.
-
-`integrity` es un `string` de [Subresource Integrity](#integrity). Dígase, un
-`string` que puede ser usado para verificar a la `data`, que tiene como formato
-`<algoritmo>-<hacheo-integridad-base64>`.
-
-So no existe ninguna entrada identificada por `clave`, o se los datos
-almacenados localmente fallan verificación, el `Promise` fallará.
-
-Una sub-función, `saca.porHacheo`, tiene casi el mismo comportamiento, excepto
-que busca entradas usando el hacheo de integridad, sin tocar el índice general.
-Esta versión *sólo* devuelve `data`, sin ningún objeto conteniéndola.
-
-##### Nota
-
-Esta función lee la entrada completa a la memoria antes de devolverla. Si estás
-almacenando datos Muy Grandes, es posible que [`saca.flujo`](#get-stream) sea
-una mejor solución.
-
-##### Ejemplo
-
-```javascript
-// Busca por clave
-cache.saca(rutaCache, 'my-thing').then(console.log)
-// Salida:
-{
- metadata: {
- thingName: 'my'
- },
- integrity: 'sha512-BaSe64HaSh',
- data: Buffer#<deadbeef>,
- size: 9320
-}
-
-// Busca por hacheo
-cache.saca.porHacheo(rutaCache, 'sha512-BaSe64HaSh').then(console.log)
-// Salida:
-Buffer#<deadbeef>
-```
-
-#### <a name="get-stream"></a> `> cacache.saca.flujo(cache, clave, [ops]) -> Readable`
-
-Devuelve un [Readable
-Stream](https://nodejs.org/api/stream.html#stream_readable_streams) de los datos
-almacenados bajo `clave`.
-
-So no existe ninguna entrada identificada por `clave`, o se los datos
-almacenados localmente fallan verificación, el `Promise` fallará.
-
-`metadata` y `integrity` serán emitidos como eventos antes de que el flujo
-cierre.
-
-Una sub-función, `saca.flujo.porHacheo`, tiene casi el mismo comportamiento,
-excepto que busca entradas usando el hacheo de integridad, sin tocar el índice
-general. Esta versión no emite eventos de `metadata` o `integrity`.
-
-##### Ejemplo
-
-```javascript
-// Busca por clave
-cache.saca.flujo(
- rutaCache, 'my-thing'
-).on('metadata', metadata => {
- console.log('metadata:', metadata)
-}).on('integrity', integrity => {
- console.log('integrity:', integrity)
-}).pipe(
- fs.createWriteStream('./x.tgz')
-)
-// Salidas:
-metadata: { ... }
-integrity: 'sha512-SoMeDIGest+64=='
-
-// Busca por hacheo
-cache.saca.flujo.porHacheo(
- rutaCache, 'sha512-SoMeDIGest+64=='
-).pipe(
- fs.createWriteStream('./x.tgz')
-)
-```
-
-#### <a name="get-info"></a> `> cacache.saca.info(cache, clave) -> Promise`
-
-Busca la `clave` en el índice del caché, devolviendo información sobre la
-entrada si existe.
-
-##### Campos
-
-* `key` - Clave de la entrada. Igual al argumento `clave`.
-* `integrity` - [hacheo de Subresource Integrity](#integrity) del contenido al que se refiere esta entrada.
-* `path` - Dirección del fichero de datos almacenados, relativa al argumento `cache`.
-* `time` - Hora de creación de la entrada
-* `metadata` - Metadatos asignados a esta entrada por el usuario
-
-##### Ejemplo
-
-```javascript
-cacache.saca.info(rutaCache, 'my-thing').then(console.log)
-
-// Salida
-{
- key: 'my-thing',
- integrity: 'sha256-MUSTVERIFY+ALL/THINGS=='
- path: '.testcache/content/deadbeef',
- time: 12345698490,
- size: 849234,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-```
-
-#### <a name="get-hasContent"></a> `> cacache.saca.tieneDatos(cache, integrity) -> Promise`
-
-Busca un [hacheo Subresource Integrity](#integrity) en el caché. Si existe el
-contenido asociado con `integrity`, devuelve un objeto con dos campos: el hacheo
-_específico_ que se usó para la búsqueda, `sri`, y el tamaño total del
-contenido, `size`. Si no existe ningún contenido asociado con `integrity`,
-devuelve `false`.
-
-##### Ejemplo
-
-```javascript
-cacache.saca.tieneDatos(rutaCache, 'sha256-MUSTVERIFY+ALL/THINGS==').then(console.log)
-
-// Salida
-{
- sri: {
- source: 'sha256-MUSTVERIFY+ALL/THINGS==',
- algorithm: 'sha256',
- digest: 'MUSTVERIFY+ALL/THINGS==',
- options: []
- },
- size: 9001
-}
-
-cacache.saca.tieneDatos(rutaCache, 'sha521-NOT+IN/CACHE==').then(console.log)
-
-// Salida
-false
-```
-
-#### <a name="put-data"></a> `> cacache.mete(cache, clave, datos, [ops]) -> Promise`
-
-Inserta `datos` en el caché. El `Promise` devuelto se resuelve con un hacheo
-(generado conforme a [`ops.algorithms`](#optsalgorithms)) después que la entrada
-haya sido escrita en completo.
-
-##### Ejemplo
-
-```javascript
-fetch(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).then(datos => {
- return cacache.mete(rutaCache, 'registry.npmjs.org|cacache@1.0.0', datos)
-}).then(integridad => {
- console.log('el hacheo de integridad es', integridad)
-})
-```
-
-#### <a name="put-stream"></a> `> cacache.mete.flujo(cache, clave, [ops]) -> Writable`
-
-Devuelve un [Writable
-Stream](https://nodejs.org/api/stream.html#stream_writable_streams) que inserta
-al caché los datos escritos a él. Emite un evento `integrity` con el hacheo del
-contenido escrito, cuando completa.
-
-##### Ejemplo
-
-```javascript
-request.get(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).pipe(
- cacache.mete.flujo(
- rutaCache, 'registry.npmjs.org|cacache@1.0.0'
- ).on('integrity', d => console.log(`integrity digest is ${d}`))
-)
-```
-
-#### <a name="put-options"></a> `> opciones para cacache.mete`
-
-La funciones `cacache.mete` tienen un número de opciones en común.
-
-##### `ops.metadata`
-
-Metadatos del usuario que se almacenarán con la entrada.
-
-##### `ops.size`
-
-El tamaño declarado de los datos que se van a insertar. Si es proveído, cacache
-verificará que los datos escritos sean de ese tamaño, o si no, fallará con un
-error con código `EBADSIZE`.
-
-##### `ops.integrity`
-
-El hacheo de integridad de los datos siendo escritos.
-
-Si es proveído, y los datos escritos no le corresponden, la operación fallará
-con un error con código `EINTEGRITY`.
-
-`ops.algorithms` no tiene ningún efecto si esta opción está presente.
-
-##### `ops.algorithms`
-
-Por Defecto: `['sha512']`
-
-Algoritmos que se deben usar cuando se calcule el hacheo de [subresource
-integrity](#integrity) para los datos insertados. Puede usar cualquier algoritmo
-enumerado en `crypto.getHashes()`.
-
-Por el momento, sólo se acepta un algoritmo (dígase, un array con exáctamente un
-valor). No tiene ningún efecto si `ops.integrity` también ha sido proveido.
-
-##### `ops.uid`/`ops.gid`
-
-Si están presentes, cacache hará todo lo posible para asegurarse que todos los
-ficheros creados en el proceso de sus operaciones en el caché usen esta
-combinación en particular.
-
-##### `ops.memoize`
-
-Por Defecto: `null`
-
-Si es verdad, cacache tratará de memoizar los datos de la entrada en memoria. La
-próxima vez que el proceso corriente trate de accesar los datos o entrada,
-cacache buscará en memoria antes de buscar en disco.
-
-Si `ops.memoize` es un objeto regular o un objeto como `Map` (es decir, un
-objeto con métodos `get()` y `set()`), este objeto en sí sera usado en vez del
-caché de memoria global. Esto permite tener lógica específica a tu aplicación
-encuanto al almacenaje en memoria de tus datos.
-
-Si quieres asegurarte que los datos se lean del disco en vez de memoria, usa
-`memoize: false` cuando uses funciones de `cacache.saca`.
-
-#### <a name="rm-all"></a> `> cacache.rm.todo(cache) -> Promise`
-
-Borra el caché completo, incluyendo ficheros temporeros, ficheros de datos, y el
-índice del caché.
-
-##### Ejemplo
-
-```javascript
-cacache.rm.todo(rutaCache).then(() => {
- console.log('THE APOCALYPSE IS UPON US 😱')
-})
-```
-
-#### <a name="rm-entry"></a> `> cacache.rm.entrada(cache, clave) -> Promise`
-
-Alias: `cacache.rm`
-
-Borra la entrada `clave` del índuce. El contenido asociado con esta entrada
-seguirá siendo accesible por hacheo usando
-[`saca.flujo.porHacheo`](#get-stream).
-
-Para borrar el contenido en sí, usa [`rm.datos`](#rm-content). Si quieres hacer
-esto de manera más segura (pues ficheros de contenido pueden ser usados por
-multiples entradas), usa [`verifica`](#verify) para borrar huérfanos.
-
-##### Ejemplo
-
-```javascript
-cacache.rm.entrada(rutaCache, 'my-thing').then(() => {
- console.log('I did not like it anyway')
-})
-```
-
-#### <a name="rm-content"></a> `> cacache.rm.datos(cache, integrity) -> Promise`
-
-Borra el contenido identificado por `integrity`. Cualquier entrada que se
-refiera a este contenido quedarán huérfanas y se invalidarán si se tratan de
-accesar, al menos que contenido idéntico sea añadido bajo `integrity`.
-
-##### Ejemplo
-
-```javascript
-cacache.rm.datos(rutaCache, 'sha512-SoMeDIGest/IN+BaSE64==').then(() => {
- console.log('los datos para `mi-cosa` se borraron')
-})
-```
-
-#### <a name="set-locale"></a> `> cacache.ponLenguaje(locale)`
-
-Configura el lenguaje usado para mensajes y errores de cacache. La lista de
-lenguajes disponibles está en el directorio `./locales` del proyecto.
-
-_Te interesa añadir más lenguajes? [Somete un PR](CONTRIBUTING.md)!_
-
-#### <a name="clear-memoized"></a> `> cacache.limpiaMemoizado()`
-
-Completamente reinicializa el caché de memoria interno. Si estás usando tu
-propio objecto con `ops.memoize`, debes hacer esto de manera específica a él.
-
-#### <a name="tmp-mkdir"></a> `> tmp.hazdir(cache, ops) -> Promise<Path>`
-
-Alias: `tmp.mkdir`
-
-Devuelve un directorio único dentro del directorio `tmp` del caché.
-
-Una vez tengas el directorio, es responsabilidad tuya asegurarte que todos los
-ficheros escrito a él sean creados usando los permisos y `uid`/`gid` concordante
-con el caché. Si no, puedes pedirle a cacache que lo haga llamando a
-[`cacache.tmp.fix()`](#tmp-fix). Esta función arreglará todos los permisos en el
-directorio tmp.
-
-Si quieres que cacache limpie el directorio automáticamente cuando termines, usa
-[`cacache.tmp.conTmp()`](#with-tpm).
-
-##### Ejemplo
-
-```javascript
-cacache.tmp.mkdir(cache).then(dir => {
- fs.writeFile(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-})
-```
-
-#### <a name="with-tmp"></a> `> tmp.conTmp(cache, ops, cb) -> Promise`
-
-Crea un directorio temporero con [`tmp.mkdir()`](#tmp-mkdir) y ejecuta `cb` con
-él como primer argumento. El directorio creado será removido automáticamente
-cuando el valor devolvido por `cb()` se resuelva.
-
-Las mismas advertencias aplican en cuanto a manejando permisos para los ficheros
-dentro del directorio.
-
-##### Ejemplo
-
-```javascript
-cacache.tmp.conTmp(cache, dir => {
- return fs.writeFileAsync(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-}).then(() => {
- // `dir` no longer exists
-})
-```
-
-#### <a name="integrity"></a> Hacheos de Subresource Integrity
-
-cacache usa strings que siguen la especificación de [Subresource Integrity
-spec](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
-
-Es decir, donde quiera cacache espera un argumento o opción `integrity`, ese
-string debería usar el formato `<algoritmo>-<hacheo-base64>`.
-
-Una variación importante sobre los hacheos que cacache acepta es que acepta el
-nombre de cualquier algoritmo aceptado por el proceso de Node.js donde se usa.
-Puedes usar `crypto.getHashes()` para ver cuales están disponibles.
-
-##### Generando tus propios hacheos
-
-Si tienes un `shasum`, en general va a estar en formato de string hexadecimal
-(es decir, un `sha1` se vería como algo así:
-`5f5513f8822fdbe5145af33b64d8d970dcf95c6e`).
-
-Para ser compatible con cacache, necesitas convertir esto a su equivalente en
-subresource integrity. Por ejemplo, el hacheo correspondiente al ejemplo
-anterior sería: `sha1-X1UT+IIv2+UUWvM7ZNjZcNz5XG4=`.
-
-Puedes usar código así para generarlo por tu cuenta:
-
-```javascript
-const crypto = require('crypto')
-const algoritmo = 'sha512'
-const datos = 'foobarbaz'
-
-const integrity = (
- algorithm +
- '-' +
- crypto.createHash(algoritmo).update(datos).digest('base64')
-)
-```
-
-También puedes usar [`ssri`](https://npm.im/ssri) para deferir el trabajo a otra
-librería que garantiza que todo esté correcto, pues maneja probablemente todas
-las operaciones que tendrías que hacer con SRIs, incluyendo convirtiendo entre
-hexadecimal y el formato SRI.
-
-#### <a name="verify"></a> `> cacache.verifica(cache, ops) -> Promise`
-
-Examina y arregla tu caché:
-
-* Limpia entradas inválidas, huérfanas y corrompidas
-* Te deja filtrar cuales entradas retener, con tu propio filtro
-* Reclama cualquier ficheros de contenido sin referencias en el índice
-* Verifica integridad de todos los ficheros de contenido y remueve los malos
-* Arregla permisos del caché
-* Remieve el directorio `tmp` en el caché, y todo su contenido.
-
-Cuando termine, devuelve un objeto con varias estadísticas sobre el proceso de
-verificación, por ejemplo la cantidad de espacio de disco reclamado, el número
-de entradas válidas, número de entradas removidas, etc.
-
-##### Opciones
-
-* `ops.uid` - uid para asignarle al caché y su contenido
-* `ops.gid` - gid para asignarle al caché y su contenido
-* `ops.filter` - recibe una entrada como argumento. Devuelve falso para removerla. Nota: es posible que esta función sea invocada con la misma entrada más de una vez.
-
-##### Example
-
-```sh
-echo somegarbage >> $RUTACACHE/content/deadbeef
-```
-
-```javascript
-cacache.verifica(rutaCache).then(stats => {
- // deadbeef collected, because of invalid checksum.
- console.log('cache is much nicer now! stats:', stats)
-})
-```
-
-#### <a name="verify-last-run"></a> `> cacache.verifica.ultimaVez(cache) -> Promise`
-
-Alias: `últimaVez`
-
-Devuelve un `Date` que representa la última vez que `cacache.verifica` fue
-ejecutada en `cache`.
-
-##### Example
-
-```javascript
-cacache.verifica(rutaCache).then(() => {
- cacache.verifica.ultimaVez(rutaCache).then(última => {
- console.log('La última vez que se usó cacache.verifica() fue ' + última)
- })
-})
-```
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/README.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/README.md
deleted file mode 100644
index 4b284588a6..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/README.md
+++ /dev/null
@@ -1,624 +0,0 @@
-# cacache [![npm version](https://img.shields.io/npm/v/cacache.svg)](https://npm.im/cacache) [![license](https://img.shields.io/npm/l/cacache.svg)](https://npm.im/cacache) [![Travis](https://img.shields.io/travis/zkat/cacache.svg)](https://travis-ci.org/zkat/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/cacache?svg=true)](https://ci.appveyor.com/project/zkat/cacache) [![Coverage Status](https://coveralls.io/repos/github/zkat/cacache/badge.svg?branch=latest)](https://coveralls.io/github/zkat/cacache?branch=latest)
-
-[`cacache`](https://github.com/zkat/cacache) is a Node.js library for managing
-local key and content address caches. It's really fast, really good at
-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.
-
-_Translations: [español](README.es.md)_
-
-## Install
-
-`$ npm install --save cacache`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * [Using localized APIs](#localized-api)
- * Reading
- * [`ls`](#ls)
- * [`ls.stream`](#ls-stream)
- * [`get`](#get-data)
- * [`get.stream`](#get-stream)
- * [`get.info`](#get-info)
- * [`get.hasContent`](#get-hasContent)
- * Writing
- * [`put`](#put-data)
- * [`put.stream`](#put-stream)
- * [`put*` opts](#put-options)
- * [`rm.all`](#rm-all)
- * [`rm.entry`](#rm-entry)
- * [`rm.content`](#rm-content)
- * Utilities
- * [`setLocale`](#set-locale)
- * [`clearMemoized`](#clear-memoized)
- * [`tmp.mkdir`](#tmp-mkdir)
- * [`tmp.withTmp`](#with-tmp)
- * Integrity
- * [Subresource Integrity](#integrity)
- * [`verify`](#verify)
- * [`verify.lastRun`](#verify-last-run)
-
-### Example
-
-```javascript
-const cacache = require('cacache/en')
-const fs = require('fs')
-
-const tarball = '/path/to/mytar.tgz'
-const cachePath = '/tmp/my-toy-cache'
-const key = 'my-unique-key-1234'
-
-// Cache it! Use `cachePath` as the root of the content cache
-cacache.put(cachePath, key, '10293801983029384').then(integrity => {
- console.log(`Saved content to ${cachePath}.`)
-})
-
-const destination = '/tmp/mytar.tgz'
-
-// Copy the contents out of the cache and into their destination!
-// But this time, use stream instead!
-cacache.get.stream(
- cachePath, key
-).pipe(
- fs.createWriteStream(destination)
-).on('finish', () => {
- console.log('done extracting!')
-})
-
-// The same thing, but skip the key index.
-cacache.get.byDigest(cachePath, integrityHash).then(data => {
- fs.writeFile(destination, data, err => {
- console.log('tarball data fetched based on its sha512sum and written out!')
- })
-})
-```
-
-### Features
-
-* Extraction by key or by content address (shasum, etc)
-* [Subresource Integrity](#integrity) web standard support
-* Multi-hash support - safely host sha1, sha512, etc, in a single cache
-* Automatic content deduplication
-* Fault tolerance (immune to corruption, partial writes, process races, etc)
-* Consistency guarantees on read and write (full data verification)
-* Lockless, high-concurrency cache access
-* Streaming support
-* Promise support
-* Pretty darn fast -- sub-millisecond reads and writes including verification
-* Arbitrary metadata storage
-* Garbage collection and additional offline verification
-* Thorough test coverage
-* There's probably a bloom filter in there somewhere. Those are cool, right? 🤔
-
-### Contributing
-
-The cacache team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.
-
-All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
-
-Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
-
-Happy hacking!
-
-### API
-
-#### <a name="localized-api"></a> Using localized APIs
-
-cacache includes a complete API in English, with the same features as other
-translations. To use the English API as documented in this README, use
-`require('cacache/en')`. This is also currently the default if you do
-`require('cacache')`, but may change in the future.
-
-cacache also supports other languages! You can find the list of currently
-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
-copy `./locales/en.js` and `./locales/en.json` and fill them in. Translating the
-`README.md` is a bit more work, but also appreciated if you get around to it. 👍🏼
-
-#### <a name="ls"></a> `> cacache.ls(cache) -> Promise<Object>`
-
-Lists info for all entries currently in the cache as a single large object. Each
-entry in the object will be keyed by the unique index key, with corresponding
-[`get.info`](#get-info) objects as the values.
-
-##### Example
-
-```javascript
-cacache.ls(cachePath).then(console.log)
-// Output
-{
- 'my-thing': {
- key: 'my-thing',
- integrity: 'sha512-BaSe64/EnCoDED+HAsh=='
- path: '.testcache/content/deadbeef', // joined with `cachePath`
- time: 12345698490,
- size: 4023948,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
- },
- 'other-thing': {
- key: 'other-thing',
- integrity: 'sha1-ANothER+hasH=',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 111112
- }
-}
-```
-
-#### <a name="ls-stream"></a> `> cacache.ls.stream(cache) -> Readable`
-
-Lists info for all entries currently in the cache as a single large object.
-
-This works just like [`ls`](#ls), except [`get.info`](#get-info) entries are
-returned as `'data'` events on the returned stream.
-
-##### Example
-
-```javascript
-cacache.ls.stream(cachePath).on('data', console.log)
-// Output
-{
- key: 'my-thing',
- integrity: 'sha512-BaSe64HaSh',
- path: '.testcache/content/deadbeef', // joined with `cachePath`
- time: 12345698490,
- size: 13423,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-
-{
- key: 'other-thing',
- integrity: 'whirlpool-WoWSoMuchSupport',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 498023984029
-}
-
-{
- ...
-}
-```
-
-#### <a name="get-data"></a> `> cacache.get(cache, key, [opts]) -> Promise({data, metadata, integrity})`
-
-Returns an object with the cached data, digest, and metadata identified by
-`key`. The `data` property of this object will be a `Buffer` instance that
-presumably holds some data that means something to you. I'm sure you know what
-to do with it! cacache just won't care.
-
-`integrity` is a [Subresource
-Integrity](#integrity)
-string. That is, a string that can be used to verify `data`, which looks like
-`<hash-algorithm>-<base64-integrity-hash>`.
-
-If there is no content identified by `key`, or if the locally-stored data does
-not pass the validity checksum, the promise will be rejected.
-
-A sub-function, `get.byDigest` may be used for identical behavior, except lookup
-will happen by integrity hash, bypassing the index entirely. This version of the
-function *only* returns `data` itself, without any wrapper.
-
-##### Note
-
-This function loads the entire cache entry into memory before returning it. If
-you're dealing with Very Large data, consider using [`get.stream`](#get-stream)
-instead.
-
-##### Example
-
-```javascript
-// Look up by key
-cache.get(cachePath, 'my-thing').then(console.log)
-// Output:
-{
- metadata: {
- thingName: 'my'
- },
- integrity: 'sha512-BaSe64HaSh',
- data: Buffer#<deadbeef>,
- size: 9320
-}
-
-// Look up by digest
-cache.get.byDigest(cachePath, 'sha512-BaSe64HaSh').then(console.log)
-// Output:
-Buffer#<deadbeef>
-```
-
-#### <a name="get-stream"></a> `> cacache.get.stream(cache, key, [opts]) -> Readable`
-
-Returns a [Readable Stream](https://nodejs.org/api/stream.html#stream_readable_streams) of the cached data identified by `key`.
-
-If there is no content identified by `key`, or if the locally-stored data does
-not pass the validity checksum, an error will be emitted.
-
-`metadata` and `integrity` events will be emitted before the stream closes, if
-you need to collect that extra data about the cached entry.
-
-A sub-function, `get.stream.byDigest` may be used for identical behavior,
-except lookup will happen by integrity hash, bypassing the index entirely. This
-version does not emit the `metadata` and `integrity` events at all.
-
-##### Example
-
-```javascript
-// Look up by key
-cache.get.stream(
- cachePath, 'my-thing'
-).on('metadata', metadata => {
- console.log('metadata:', metadata)
-}).on('integrity', integrity => {
- console.log('integrity:', integrity)
-}).pipe(
- fs.createWriteStream('./x.tgz')
-)
-// Outputs:
-metadata: { ... }
-integrity: 'sha512-SoMeDIGest+64=='
-
-// Look up by digest
-cache.get.stream.byDigest(
- cachePath, 'sha512-SoMeDIGest+64=='
-).pipe(
- fs.createWriteStream('./x.tgz')
-)
-```
-
-#### <a name="get-info"></a> `> cacache.get.info(cache, key) -> Promise`
-
-Looks up `key` in the cache index, returning information about the entry if
-one exists.
-
-##### Fields
-
-* `key` - Key the entry was looked up under. Matches the `key` argument.
-* `integrity` - [Subresource Integrity hash](#integrity) for the content this entry refers to.
-* `path` - Filesystem path relative to `cache` argument where content is stored.
-* `time` - Timestamp the entry was first added on.
-* `metadata` - User-assigned metadata associated with the entry/content.
-
-##### Example
-
-```javascript
-cacache.get.info(cachePath, 'my-thing').then(console.log)
-
-// Output
-{
- key: 'my-thing',
- integrity: 'sha256-MUSTVERIFY+ALL/THINGS=='
- path: '.testcache/content/deadbeef',
- time: 12345698490,
- size: 849234,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-```
-
-#### <a name="get-hasContent"></a> `> cacache.get.hasContent(cache, integrity) -> Promise`
-
-Looks up a [Subresource Integrity hash](#integrity) in the cache. If content
-exists for this `integrity`, it will return an object, with the specific single integrity hash
-that was found in `sri` key, and the size of the found content as `size`. If no content exists for this integrity, it will return `false`.
-
-##### Example
-
-```javascript
-cacache.get.hasContent(cachePath, 'sha256-MUSTVERIFY+ALL/THINGS==').then(console.log)
-
-// Output
-{
- sri: {
- source: 'sha256-MUSTVERIFY+ALL/THINGS==',
- algorithm: 'sha256',
- digest: 'MUSTVERIFY+ALL/THINGS==',
- options: []
- },
- size: 9001
-}
-
-cacache.get.hasContent(cachePath, 'sha521-NOT+IN/CACHE==').then(console.log)
-
-// Output
-false
-```
-
-#### <a name="put-data"></a> `> cacache.put(cache, key, data, [opts]) -> Promise`
-
-Inserts data passed to it into the cache. The returned Promise resolves with a
-digest (generated according to [`opts.algorithms`](#optsalgorithms)) after the
-cache entry has been successfully written.
-
-##### Example
-
-```javascript
-fetch(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).then(data => {
- return cacache.put(cachePath, 'registry.npmjs.org|cacache@1.0.0', data)
-}).then(integrity => {
- console.log('integrity hash is', integrity)
-})
-```
-
-#### <a name="put-stream"></a> `> cacache.put.stream(cache, key, [opts]) -> Writable`
-
-Returns a [Writable
-Stream](https://nodejs.org/api/stream.html#stream_writable_streams) that inserts
-data written to it into the cache. Emits an `integrity` event with the digest of
-written contents when it succeeds.
-
-##### Example
-
-```javascript
-request.get(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).pipe(
- cacache.put.stream(
- cachePath, 'registry.npmjs.org|cacache@1.0.0'
- ).on('integrity', d => console.log(`integrity digest is ${d}`))
-)
-```
-
-#### <a name="put-options"></a> `> cacache.put options`
-
-`cacache.put` functions have a number of options in common.
-
-##### `opts.metadata`
-
-Arbitrary metadata to be attached to the inserted key.
-
-##### `opts.size`
-
-If provided, the data stream will be verified to check that enough data was
-passed through. If there's more or less data than expected, insertion will fail
-with an `EBADSIZE` error.
-
-##### `opts.integrity`
-
-If present, the pre-calculated digest for the inserted content. If this option
-if provided and does not match the post-insertion digest, insertion will fail
-with an `EINTEGRITY` error.
-
-`algorithms` has no effect if this option is present.
-
-##### `opts.algorithms`
-
-Default: ['sha512']
-
-Hashing algorithms to use when calculating the [subresource integrity
-digest](#integrity)
-for inserted data. Can use any algorithm listed in `crypto.getHashes()` or
-`'omakase'`/`'お任せします'` to pick a random hash algorithm on each insertion. You
-may also use any anagram of `'modnar'` to use this feature.
-
-Currently only supports one algorithm at a time (i.e., an array length of
-exactly `1`). Has no effect if `opts.integrity` is present.
-
-##### `opts.uid`/`opts.gid`
-
-If provided, cacache will do its best to make sure any new files added to the
-cache use this particular `uid`/`gid` combination. This can be used,
-for example, to drop permissions when someone uses `sudo`, but cacache makes
-no assumptions about your needs here.
-
-##### `opts.memoize`
-
-Default: null
-
-If provided, cacache will memoize the given cache insertion in memory, bypassing
-any filesystem checks for that key or digest in future cache fetches. Nothing
-will be written to the in-memory cache unless this option is explicitly truthy.
-
-If `opts.memoize` is an object or a `Map`-like (that is, an object with `get`
-and `set` methods), it will be written to instead of the global memoization
-cache.
-
-Reading from disk data can be forced by explicitly passing `memoize: false` to
-the reader functions, but their default will be to read from memory.
-
-#### <a name="rm-all"></a> `> cacache.rm.all(cache) -> Promise`
-
-Clears the entire cache. Mainly by blowing away the cache directory itself.
-
-##### Example
-
-```javascript
-cacache.rm.all(cachePath).then(() => {
- console.log('THE APOCALYPSE IS UPON US 😱')
-})
-```
-
-#### <a name="rm-entry"></a> `> cacache.rm.entry(cache, key) -> Promise`
-
-Alias: `cacache.rm`
-
-Removes the index entry for `key`. Content will still be accessible if
-requested directly by content address ([`get.stream.byDigest`](#get-stream)).
-
-To remove the content itself (which might still be used by other entries), use
-[`rm.content`](#rm-content). Or, to safely vacuum any unused content, use
-[`verify`](#verify).
-
-##### Example
-
-```javascript
-cacache.rm.entry(cachePath, 'my-thing').then(() => {
- console.log('I did not like it anyway')
-})
-```
-
-#### <a name="rm-content"></a> `> cacache.rm.content(cache, integrity) -> Promise`
-
-Removes the content identified by `integrity`. Any index entries referring to it
-will not be usable again until the content is re-added to the cache with an
-identical digest.
-
-##### Example
-
-```javascript
-cacache.rm.content(cachePath, 'sha512-SoMeDIGest/IN+BaSE64==').then(() => {
- console.log('data for my-thing is gone!')
-})
-```
-
-#### <a name="set-locale"></a> `> cacache.setLocale(locale)`
-
-Configure the language/locale used for messages and errors coming from cacache.
-The list of available locales is in the `./locales` directory in the project
-root.
-
-_Interested in contributing more languages! [Submit a PR](CONTRIBUTING.md)!_
-
-#### <a name="clear-memoized"></a> `> cacache.clearMemoized()`
-
-Completely resets the in-memory entry cache.
-
-#### <a name="tmp-mkdir"></a> `> tmp.mkdir(cache, opts) -> Promise<Path>`
-
-Returns a unique temporary directory inside the cache's `tmp` dir. This
-directory will use the same safe user assignment that all the other stuff use.
-
-Once the directory is made, it's the user's responsibility that all files within
-are made according to the same `opts.gid`/`opts.uid` settings that would be
-passed in. If not, you can ask cacache to do it for you by calling
-[`tmp.fix()`](#tmp-fix), which will fix all tmp directory permissions.
-
-If you want automatic cleanup of this directory, use
-[`tmp.withTmp()`](#with-tpm)
-
-##### Example
-
-```javascript
-cacache.tmp.mkdir(cache).then(dir => {
- fs.writeFile(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-})
-```
-
-#### <a name="with-tmp"></a> `> tmp.withTmp(cache, opts, cb) -> Promise`
-
-Creates a temporary directory with [`tmp.mkdir()`](#tmp-mkdir) and calls `cb`
-with it. The created temporary directory will be removed when the return value
-of `cb()` resolves -- that is, if you return a Promise from `cb()`, the tmp
-directory will be automatically deleted once that promise completes.
-
-The same caveats apply when it comes to managing permissions for the tmp dir's
-contents.
-
-##### Example
-
-```javascript
-cacache.tmp.withTmp(cache, dir => {
- return fs.writeFileAsync(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-}).then(() => {
- // `dir` no longer exists
-})
-```
-
-#### <a name="integrity"></a> Subresource Integrity Digests
-
-For content verification and addressing, cacache uses strings following the
-[Subresource
-Integrity spec](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
-That is, any time cacache expects an `integrity` argument or option, it
-should be in the format `<hashAlgorithm>-<base64-hash>`.
-
-One deviation from the current spec is that cacache will support any hash
-algorithms supported by the underlying Node.js process. You can use
-`crypto.getHashes()` to see which ones you can use.
-
-##### Generating Digests Yourself
-
-If you have an existing content shasum, they are generally formatted as a
-hexadecimal string (that is, a sha1 would look like:
-`5f5513f8822fdbe5145af33b64d8d970dcf95c6e`). In order to be compatible with
-cacache, you'll need to convert this to an equivalent subresource integrity
-string. For this example, the corresponding hash would be:
-`sha1-X1UT+IIv2+UUWvM7ZNjZcNz5XG4=`.
-
-If you want to generate an integrity string yourself for existing data, you can
-use something like this:
-
-```javascript
-const crypto = require('crypto')
-const hashAlgorithm = 'sha512'
-const data = 'foobarbaz'
-
-const integrity = (
- hashAlgorithm +
- '-' +
- crypto.createHash(hashAlgorithm).update(data).digest('base64')
-)
-```
-
-You can also use [`ssri`](https://npm.im/ssri) to have a richer set of functionality
-around SRI strings, including generation, parsing, and translating from existing
-hex-formatted strings.
-
-#### <a name="verify"></a> `> cacache.verify(cache, opts) -> Promise`
-
-Checks out and fixes up your cache:
-
-* Cleans up corrupted or invalid index entries.
-* Custom entry filtering options.
-* Garbage collects any content entries not referenced by the index.
-* Checks integrity for all content entries and removes invalid content.
-* Fixes cache ownership.
-* Removes the `tmp` directory in the cache and all its contents.
-
-When it's done, it'll return an object with various stats about the verification
-process, including amount of storage reclaimed, number of valid entries, number
-of entries removed, etc.
-
-##### Options
-
-* `opts.uid` - uid to assign to cache and its contents
-* `opts.gid` - gid to assign to cache and its contents
-* `opts.filter` - receives a formatted entry. Return false to remove it.
- Note: might be called more than once on the same entry.
-
-##### Example
-
-```sh
-echo somegarbage >> $CACHEPATH/content/deadbeef
-```
-
-```javascript
-cacache.verify(cachePath).then(stats => {
- // deadbeef collected, because of invalid checksum.
- console.log('cache is much nicer now! stats:', stats)
-})
-```
-
-#### <a name="verify-last-run"></a> `> cacache.verify.lastRun(cache) -> Promise`
-
-Returns a `Date` representing the last time `cacache.verify` was run on `cache`.
-
-##### Example
-
-```javascript
-cacache.verify(cachePath).then(() => {
- cacache.verify.lastRun(cachePath).then(lastTime => {
- console.log('cacache.verify was last called on' + lastTime)
- })
-})
-```
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/en.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/en.js
deleted file mode 100644
index a3db581c9f..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/en.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./locales/en.js')
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/es.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/es.js
deleted file mode 100644
index 6282363c3b..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/es.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./locales/es.js')
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/get.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/get.js
deleted file mode 100644
index 2bb3afa528..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/get.js
+++ /dev/null
@@ -1,190 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const fs = require('fs')
-const index = require('./lib/entry-index')
-const memo = require('./lib/memoization')
-const pipe = require('mississippi').pipe
-const pipeline = require('mississippi').pipeline
-const read = require('./lib/content/read')
-const through = require('mississippi').through
-
-module.exports = function get (cache, key, opts) {
- return getData(false, cache, key, opts)
-}
-module.exports.byDigest = function getByDigest (cache, digest, opts) {
- return getData(true, cache, digest, opts)
-}
-function getData (byDigest, cache, key, opts) {
- opts = opts || {}
- const memoized = (
- byDigest
- ? memo.get.byDigest(cache, key, opts)
- : memo.get(cache, key, opts)
- )
- if (memoized && opts.memoize !== false) {
- return BB.resolve(byDigest ? memoized : {
- metadata: memoized.entry.metadata,
- data: memoized.data,
- integrity: memoized.entry.integrity,
- size: memoized.entry.size
- })
- }
- return (
- byDigest ? BB.resolve(null) : index.find(cache, key, opts)
- ).then(entry => {
- if (!entry && !byDigest) {
- throw new index.NotFoundError(cache, key)
- }
- return read(cache, byDigest ? key : entry.integrity, {
- integrity: opts.integrity,
- size: opts.size
- }).then(data => byDigest ? data : {
- metadata: entry.metadata,
- data: data,
- size: entry.size,
- integrity: entry.integrity
- }).then(res => {
- if (opts.memoize && byDigest) {
- memo.put.byDigest(cache, key, res, opts)
- } else if (opts.memoize) {
- memo.put(cache, entry, res.data, opts)
- }
- return res
- })
- })
-}
-
-module.exports.stream = getStream
-function getStream (cache, key, opts) {
- opts = opts || {}
- let stream = through()
- const memoized = memo.get(cache, key, opts)
- if (memoized && opts.memoize !== false) {
- stream.on('newListener', function (ev, cb) {
- ev === 'metadata' && cb(memoized.entry.metadata)
- ev === 'integrity' && cb(memoized.entry.integrity)
- ev === 'size' && cb(memoized.entry.size)
- })
- stream.write(memoized.data, () => stream.end())
- return stream
- }
- index.find(cache, key).then(entry => {
- if (!entry) {
- return stream.emit(
- 'error', new index.NotFoundError(cache, key)
- )
- }
- let memoStream
- if (opts.memoize) {
- let memoData = []
- let memoLength = 0
- memoStream = through((c, en, cb) => {
- memoData && memoData.push(c)
- memoLength += c.length
- cb(null, c, en)
- }, cb => {
- memoData && memo.put(cache, entry, Buffer.concat(memoData, memoLength), opts)
- cb()
- })
- } else {
- memoStream = through()
- }
- opts.size = opts.size == null ? entry.size : opts.size
- stream.emit('metadata', entry.metadata)
- stream.emit('integrity', entry.integrity)
- stream.emit('size', entry.size)
- stream.on('newListener', function (ev, cb) {
- ev === 'metadata' && cb(entry.metadata)
- ev === 'integrity' && cb(entry.integrity)
- ev === 'size' && cb(entry.size)
- })
- pipe(
- read.readStream(cache, entry.integrity, opts),
- memoStream,
- stream
- )
- }, err => stream.emit('error', err))
- return stream
-}
-
-module.exports.stream.byDigest = getStreamDigest
-function getStreamDigest (cache, integrity, opts) {
- opts = opts || {}
- const memoized = memo.get.byDigest(cache, integrity, opts)
- if (memoized && opts.memoize !== false) {
- const stream = through()
- stream.write(memoized, () => stream.end())
- return stream
- } else {
- let stream = read.readStream(cache, integrity, opts)
- if (opts.memoize) {
- let memoData = []
- let memoLength = 0
- const memoStream = through((c, en, cb) => {
- memoData && memoData.push(c)
- memoLength += c.length
- cb(null, c, en)
- }, cb => {
- memoData && memo.put.byDigest(
- cache,
- integrity,
- Buffer.concat(memoData, memoLength),
- opts
- )
- cb()
- })
- stream = pipeline(stream, memoStream)
- }
- return stream
- }
-}
-
-module.exports.info = info
-function info (cache, key, opts) {
- opts = opts || {}
- const memoized = memo.get(cache, key, opts)
- if (memoized && opts.memoize !== false) {
- return BB.resolve(memoized.entry)
- } else {
- return index.find(cache, key)
- }
-}
-
-module.exports.hasContent = read.hasContent
-
-module.exports.copy = function cp (cache, key, dest, opts) {
- return copy(false, cache, key, dest, opts)
-}
-module.exports.copy.byDigest = function cpDigest (cache, digest, dest, opts) {
- return copy(true, cache, digest, dest, opts)
-}
-function copy (byDigest, cache, key, dest, opts) {
- opts = opts || {}
- if (read.copy) {
- return (
- byDigest ? BB.resolve(null) : index.find(cache, key, opts)
- ).then(entry => {
- if (!entry && !byDigest) {
- throw new index.NotFoundError(cache, key)
- }
- return read.copy(
- cache, byDigest ? key : entry.integrity, dest, opts
- ).then(() => byDigest ? key : {
- metadata: entry.metadata,
- size: entry.size,
- integrity: entry.integrity
- })
- })
- } else {
- return getData(byDigest, cache, key, opts).then(res => {
- return fs.writeFileAsync(dest, byDigest ? res : res.data)
- .then(() => byDigest ? key : {
- metadata: res.metadata,
- size: res.size,
- integrity: res.integrity
- })
- })
- }
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/index.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/index.js
deleted file mode 100644
index a3db581c9f..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./locales/en.js')
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/path.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/path.js
deleted file mode 100644
index fa6491ba6f..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/path.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict'
-
-const contentVer = require('../../package.json')['cache-version'].content
-const hashToSegments = require('../util/hash-to-segments')
-const path = require('path')
-const ssri = require('ssri')
-
-// Current format of content file path:
-//
-// sha512-BaSE64Hex= ->
-// ~/.my-cache/content-v2/sha512/ba/da/55deadbeefc0ffee
-//
-module.exports = contentPath
-function contentPath (cache, integrity) {
- const sri = ssri.parse(integrity, {single: true})
- // contentPath is the *strongest* algo given
- return path.join.apply(path, [
- contentDir(cache),
- sri.algorithm
- ].concat(hashToSegments(sri.hexDigest())))
-}
-
-module.exports._contentDir = contentDir
-function contentDir (cache) {
- return path.join(cache, `content-v${contentVer}`)
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/read.js
deleted file mode 100644
index 7a4da3beb8..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/read.js
+++ /dev/null
@@ -1,125 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./path')
-const fs = require('graceful-fs')
-const PassThrough = require('stream').PassThrough
-const pipe = BB.promisify(require('mississippi').pipe)
-const ssri = require('ssri')
-const Y = require('../util/y.js')
-
-BB.promisifyAll(fs)
-
-module.exports = read
-function read (cache, integrity, opts) {
- opts = opts || {}
- return pickContentSri(cache, integrity).then(content => {
- const sri = content.sri
- const cpath = contentPath(cache, sri)
- return fs.readFileAsync(cpath, null).then(data => {
- if (typeof opts.size === 'number' && opts.size !== data.length) {
- throw sizeError(opts.size, data.length)
- } else if (ssri.checkData(data, sri)) {
- return data
- } else {
- throw integrityError(sri, cpath)
- }
- })
- })
-}
-
-module.exports.stream = readStream
-module.exports.readStream = readStream
-function readStream (cache, integrity, opts) {
- opts = opts || {}
- const stream = new PassThrough()
- pickContentSri(
- cache, integrity
- ).then(content => {
- const sri = content.sri
- return pipe(
- fs.createReadStream(contentPath(cache, sri)),
- ssri.integrityStream({
- integrity: sri,
- size: opts.size
- }),
- stream
- )
- }).catch(err => {
- stream.emit('error', err)
- })
- return stream
-}
-
-if (fs.copyFile) {
- module.exports.copy = copy
-}
-function copy (cache, integrity, dest, opts) {
- opts = opts || {}
- return pickContentSri(cache, integrity).then(content => {
- const sri = content.sri
- const cpath = contentPath(cache, sri)
- return fs.copyFileAsync(cpath, dest).then(() => content.size)
- })
-}
-
-module.exports.hasContent = hasContent
-function hasContent (cache, integrity) {
- if (!integrity) { return BB.resolve(false) }
- return pickContentSri(cache, integrity)
- .catch({code: 'ENOENT'}, () => false)
- .catch({code: 'EPERM'}, err => {
- if (process.platform !== 'win32') {
- throw err
- } else {
- return false
- }
- }).then(content => {
- if (!content.sri) return false
- return ({ sri: content.sri, size: content.stat.size })
- })
-}
-
-module.exports._pickContentSri = pickContentSri
-function pickContentSri (cache, integrity) {
- const sri = ssri.parse(integrity)
- // If `integrity` has multiple entries, pick the first digest
- // with available local data.
- const algo = sri.pickAlgorithm()
- const digests = sri[algo]
- if (digests.length <= 1) {
- const cpath = contentPath(cache, digests[0])
- return fs.lstatAsync(cpath).then(stat => ({ sri: digests[0], stat }))
- } else {
- 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]
- }
- })
- }
-}
-
-function sizeError (expected, found) {
- var err = new Error(Y`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`)
- err.expected = expected
- err.found = found
- err.code = 'EBADSIZE'
- return err
-}
-
-function integrityError (sri, path) {
- var err = new Error(Y`Integrity verification failed for ${sri} (${path})`)
- err.code = 'EINTEGRITY'
- err.sri = sri
- err.path = path
- return err
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/rm.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/rm.js
deleted file mode 100644
index 12cf158235..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/rm.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./path')
-const hasContent = require('./read').hasContent
-const rimraf = BB.promisify(require('rimraf'))
-
-module.exports = rm
-function rm (cache, integrity) {
- return hasContent(cache, integrity).then(content => {
- if (content) {
- const sri = content.sri
- if (sri) {
- return rimraf(contentPath(cache, sri)).then(() => true)
- }
- } else {
- return false
- }
- })
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/write.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/write.js
deleted file mode 100644
index a79ae92902..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/content/write.js
+++ /dev/null
@@ -1,162 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./path')
-const fixOwner = require('../util/fix-owner')
-const fs = require('graceful-fs')
-const moveFile = require('../util/move-file')
-const PassThrough = require('stream').PassThrough
-const path = require('path')
-const pipe = BB.promisify(require('mississippi').pipe)
-const rimraf = BB.promisify(require('rimraf'))
-const ssri = require('ssri')
-const to = require('mississippi').to
-const uniqueFilename = require('unique-filename')
-const Y = require('../util/y.js')
-
-const writeFileAsync = BB.promisify(fs.writeFile)
-
-module.exports = write
-function write (cache, data, opts) {
- opts = opts || {}
- if (opts.algorithms && opts.algorithms.length > 1) {
- throw new Error(
- Y`opts.algorithms only supports a single algorithm for now`
- )
- }
- if (typeof opts.size === 'number' && data.length !== opts.size) {
- return BB.reject(sizeError(opts.size, data.length))
- }
- const sri = ssri.fromData(data, opts)
- if (opts.integrity && !ssri.checkData(data, opts.integrity, opts)) {
- return BB.reject(checksumError(opts.integrity, sri))
- }
- return BB.using(makeTmp(cache, opts), tmp => (
- writeFileAsync(
- tmp.target, data, {flag: 'wx'}
- ).then(() => (
- moveToDestination(tmp, cache, sri, opts)
- ))
- )).then(() => ({integrity: sri, size: data.length}))
-}
-
-module.exports.stream = writeStream
-function writeStream (cache, opts) {
- opts = opts || {}
- const inputStream = new PassThrough()
- let inputErr = false
- function errCheck () {
- if (inputErr) { throw inputErr }
- }
-
- let allDone
- const ret = to((c, n, cb) => {
- if (!allDone) {
- allDone = handleContent(inputStream, cache, opts, errCheck)
- }
- inputStream.write(c, n, cb)
- }, cb => {
- inputStream.end(() => {
- if (!allDone) {
- const e = new Error(Y`Cache input stream was empty`)
- e.code = 'ENODATA'
- return ret.emit('error', e)
- }
- allDone.then(res => {
- res.integrity && ret.emit('integrity', res.integrity)
- res.size !== null && ret.emit('size', res.size)
- cb()
- }, e => {
- ret.emit('error', e)
- })
- })
- })
- ret.once('error', e => {
- inputErr = e
- })
- return ret
-}
-
-function handleContent (inputStream, cache, opts, errCheck) {
- return BB.using(makeTmp(cache, opts), tmp => {
- errCheck()
- return pipeToTmp(
- inputStream, cache, tmp.target, opts, errCheck
- ).then(res => {
- return moveToDestination(
- tmp, cache, res.integrity, opts, errCheck
- ).then(() => res)
- })
- })
-}
-
-function pipeToTmp (inputStream, cache, tmpTarget, opts, errCheck) {
- return BB.resolve().then(() => {
- let integrity
- let size
- const hashStream = ssri.integrityStream({
- integrity: opts.integrity,
- algorithms: opts.algorithms,
- size: opts.size
- }).on('integrity', s => {
- integrity = s
- }).on('size', s => {
- size = s
- })
- const outStream = fs.createWriteStream(tmpTarget, {
- flags: 'wx'
- })
- errCheck()
- return pipe(inputStream, hashStream, outStream).then(() => {
- return {integrity, size}
- }, err => {
- return rimraf(tmpTarget).then(() => { throw err })
- })
- })
-}
-
-function makeTmp (cache, opts) {
- const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix)
- return fixOwner.mkdirfix(
- path.dirname(tmpTarget), opts.uid, opts.gid
- ).then(() => ({
- target: tmpTarget,
- moved: false
- })).disposer(tmp => (!tmp.moved && rimraf(tmp.target)))
-}
-
-function moveToDestination (tmp, cache, sri, opts, errCheck) {
- errCheck && errCheck()
- const destination = contentPath(cache, sri)
- const destDir = path.dirname(destination)
-
- return fixOwner.mkdirfix(
- destDir, opts.uid, opts.gid
- ).then(() => {
- errCheck && errCheck()
- return moveFile(tmp.target, destination)
- }).then(() => {
- errCheck && errCheck()
- tmp.moved = true
- return fixOwner.chownr(destination, opts.uid, opts.gid)
- })
-}
-
-function sizeError (expected, found) {
- var err = new Error(Y`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`)
- err.expected = expected
- err.found = found
- err.code = 'EBADSIZE'
- return err
-}
-
-function checksumError (expected, found) {
- var err = new Error(Y`Integrity check failed:
- Wanted: ${expected}
- Found: ${found}`)
- err.code = 'EINTEGRITY'
- err.expected = expected
- err.found = found
- return err
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/entry-index.js
deleted file mode 100644
index fe1cd06457..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/entry-index.js
+++ /dev/null
@@ -1,225 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./content/path')
-const crypto = require('crypto')
-const fixOwner = require('./util/fix-owner')
-const fs = require('graceful-fs')
-const hashToSegments = require('./util/hash-to-segments')
-const ms = require('mississippi')
-const path = require('path')
-const ssri = require('ssri')
-const Y = require('./util/y.js')
-
-const indexV = require('../package.json')['cache-version'].index
-
-const appendFileAsync = BB.promisify(fs.appendFile)
-const readFileAsync = BB.promisify(fs.readFile)
-const readdirAsync = BB.promisify(fs.readdir)
-const concat = ms.concat
-const from = ms.from
-
-module.exports.NotFoundError = class NotFoundError extends Error {
- constructor (cache, key) {
- super(Y`No cache entry for \`${key}\` found in \`${cache}\``)
- this.code = 'ENOENT'
- this.cache = cache
- this.key = key
- }
-}
-
-module.exports.insert = insert
-function insert (cache, key, integrity, opts) {
- opts = opts || {}
- const bucket = bucketPath(cache, key)
- const entry = {
- key,
- integrity: integrity && ssri.stringify(integrity),
- time: Date.now(),
- size: opts.size,
- metadata: opts.metadata
- }
- return fixOwner.mkdirfix(
- path.dirname(bucket), opts.uid, opts.gid
- ).then(() => {
- const stringified = JSON.stringify(entry)
- // NOTE - Cleverness ahoy!
- //
- // This works because it's tremendously unlikely for an entry to corrupt
- // another while still preserving the string length of the JSON in
- // question. So, we just slap the length in there and verify it on read.
- //
- // Thanks to @isaacs for the whiteboarding session that ended up with this.
- return appendFileAsync(
- bucket, `\n${hashEntry(stringified)}\t${stringified}`
- )
- }).then(
- () => fixOwner.chownr(bucket, opts.uid, opts.gid)
- ).catch({code: 'ENOENT'}, () => {
- // There's a class of race conditions that happen when things get deleted
- // during fixOwner, or between the two mkdirfix/chownr calls.
- //
- // It's perfectly fine to just not bother in those cases and lie
- // that the index entry was written. Because it's a cache.
- }).then(() => {
- return formatEntry(cache, entry)
- })
-}
-
-module.exports.find = find
-function find (cache, key) {
- const bucket = bucketPath(cache, key)
- return bucketEntries(cache, bucket).then(entries => {
- return entries.reduce((latest, next) => {
- if (next && next.key === key) {
- return formatEntry(cache, next)
- } else {
- return latest
- }
- }, null)
- }).catch(err => {
- if (err.code === 'ENOENT') {
- return null
- } else {
- throw err
- }
- })
-}
-
-module.exports.delete = del
-function del (cache, key, opts) {
- return insert(cache, key, null, opts)
-}
-
-module.exports.lsStream = lsStream
-function lsStream (cache) {
- const indexDir = bucketDir(cache)
- const stream = from.obj()
-
- // "/cachename/*"
- readdirOrEmpty(indexDir).map(bucket => {
- const bucketPath = path.join(indexDir, bucket)
-
- // "/cachename/<bucket 0xFF>/*"
- return readdirOrEmpty(bucketPath).map(subbucket => {
- const subbucketPath = path.join(bucketPath, subbucket)
-
- // "/cachename/<bucket 0xFF>/<bucket 0xFF>/*"
- return readdirOrEmpty(subbucketPath).map(entry => {
- const getKeyToEntry = bucketEntries(
- cache,
- path.join(subbucketPath, entry)
- ).reduce((acc, entry) => {
- acc.set(entry.key, entry)
- return acc
- }, new Map())
-
- return getKeyToEntry.then(reduced => {
- for (let entry of reduced.values()) {
- const formatted = formatEntry(cache, entry)
- formatted && stream.push(formatted)
- }
- }).catch({code: 'ENOENT'}, nop)
- })
- })
- }).then(() => {
- stream.push(null)
- }, err => {
- stream.emit('error', err)
- })
-
- return stream
-}
-
-module.exports.ls = ls
-function ls (cache) {
- return BB.fromNode(cb => {
- lsStream(cache).on('error', cb).pipe(concat(entries => {
- cb(null, entries.reduce((acc, xs) => {
- acc[xs.key] = xs
- return acc
- }, {}))
- }))
- })
-}
-
-function bucketEntries (cache, bucket, filter) {
- return readFileAsync(
- bucket, 'utf8'
- ).then(data => {
- let entries = []
- data.split('\n').forEach(entry => {
- if (!entry) { return }
- const pieces = entry.split('\t')
- if (!pieces[1] || hashEntry(pieces[1]) !== pieces[0]) {
- // Hash is no good! Corruption or malice? Doesn't matter!
- // EJECT EJECT
- return
- }
- let obj
- try {
- obj = JSON.parse(pieces[1])
- } catch (e) {
- // Entry is corrupted!
- return
- }
- if (obj) {
- entries.push(obj)
- }
- })
- return entries
- })
-}
-
-module.exports._bucketDir = bucketDir
-function bucketDir (cache) {
- return path.join(cache, `index-v${indexV}`)
-}
-
-module.exports._bucketPath = bucketPath
-function bucketPath (cache, key) {
- const hashed = hashKey(key)
- return path.join.apply(path, [bucketDir(cache)].concat(
- hashToSegments(hashed)
- ))
-}
-
-module.exports._hashKey = hashKey
-function hashKey (key) {
- return hash(key, 'sha256')
-}
-
-module.exports._hashEntry = hashEntry
-function hashEntry (str) {
- return hash(str, 'sha1')
-}
-
-function hash (str, digest) {
- return crypto
- .createHash(digest)
- .update(str)
- .digest('hex')
-}
-
-function formatEntry (cache, entry) {
- // Treat null digests as deletions. They'll shadow any previous entries.
- if (!entry.integrity) { return null }
- return {
- key: entry.key,
- integrity: entry.integrity,
- path: contentPath(cache, entry.integrity),
- size: entry.size,
- time: entry.time,
- metadata: entry.metadata
- }
-}
-
-function readdirOrEmpty (dir) {
- return readdirAsync(dir)
- .catch({code: 'ENOENT'}, () => [])
- .catch({code: 'ENOTDIR'}, () => [])
-}
-
-function nop () {
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/memoization.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/memoization.js
deleted file mode 100644
index 92179c7ac6..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/memoization.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict'
-
-const LRU = require('lru-cache')
-
-const MAX_SIZE = 50 * 1024 * 1024 // 50MB
-const MAX_AGE = 3 * 60 * 1000
-
-let MEMOIZED = new LRU({
- max: MAX_SIZE,
- maxAge: MAX_AGE,
- length: (entry, key) => {
- if (key.startsWith('key:')) {
- return entry.data.length
- } else if (key.startsWith('digest:')) {
- return entry.length
- }
- }
-})
-
-module.exports.clearMemoized = clearMemoized
-function clearMemoized () {
- const old = {}
- MEMOIZED.forEach((v, k) => {
- old[k] = v
- })
- MEMOIZED.reset()
- return old
-}
-
-module.exports.put = put
-function put (cache, entry, data, opts) {
- pickMem(opts).set(`key:${cache}:${entry.key}`, { entry, data })
- putDigest(cache, entry.integrity, data, opts)
-}
-
-module.exports.put.byDigest = putDigest
-function putDigest (cache, integrity, data, opts) {
- pickMem(opts).set(`digest:${cache}:${integrity}`, data)
-}
-
-module.exports.get = get
-function get (cache, key, opts) {
- return pickMem(opts).get(`key:${cache}:${key}`)
-}
-
-module.exports.get.byDigest = getDigest
-function getDigest (cache, integrity, opts) {
- return pickMem(opts).get(`digest:${cache}:${integrity}`)
-}
-
-class ObjProxy {
- constructor (obj) {
- this.obj = obj
- }
- get (key) { return this.obj[key] }
- set (key, val) { this.obj[key] = val }
-}
-
-function pickMem (opts) {
- if (!opts || !opts.memoize) {
- return MEMOIZED
- } else if (opts.memoize.get && opts.memoize.set) {
- return opts.memoize
- } else if (typeof opts.memoize === 'object') {
- return new ObjProxy(opts.memoize)
- } else {
- return MEMOIZED
- }
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/fix-owner.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/fix-owner.js
deleted file mode 100644
index 7000bff048..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/fix-owner.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const chownr = BB.promisify(require('chownr'))
-const mkdirp = BB.promisify(require('mkdirp'))
-const inflight = require('promise-inflight')
-
-module.exports.chownr = fixOwner
-function fixOwner (filepath, uid, gid) {
- if (!process.getuid) {
- // This platform doesn't need ownership fixing
- return BB.resolve()
- }
- if (typeof uid !== 'number' && typeof gid !== 'number') {
- // There's no permissions override. Nothing to do here.
- return BB.resolve()
- }
- if ((typeof uid === 'number' && process.getuid() === uid) &&
- (typeof gid === 'number' && process.getgid() === gid)) {
- // No need to override if it's already what we used.
- return BB.resolve()
- }
- return inflight(
- 'fixOwner: fixing ownership on ' + filepath,
- () => chownr(
- filepath,
- typeof uid === 'number' ? uid : process.getuid(),
- typeof gid === 'number' ? gid : process.getgid()
- ).catch({code: 'ENOENT'}, () => null)
- )
-}
-
-module.exports.mkdirfix = mkdirfix
-function mkdirfix (p, uid, gid, cb) {
- return mkdirp(p).then(made => {
- if (made) {
- return fixOwner(made, uid, gid).then(() => made)
- }
- }).catch({code: 'EEXIST'}, () => {
- // There's a race in mkdirp!
- return fixOwner(p, uid, gid).then(() => null)
- })
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/hash-to-segments.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/hash-to-segments.js
deleted file mode 100644
index 192be2a6d6..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/hash-to-segments.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict'
-
-module.exports = hashToSegments
-
-function hashToSegments (hash) {
- return [
- hash.slice(0, 2),
- hash.slice(2, 4),
- hash.slice(4)
- ]
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/move-file.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/move-file.js
deleted file mode 100644
index b43744b3da..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/move-file.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const BB = require('bluebird')
-const chmod = BB.promisify(fs.chmod)
-const unlink = BB.promisify(fs.unlink)
-let move
-let pinflight
-
-module.exports = moveFile
-function moveFile (src, dest) {
- // This isn't quite an fs.rename -- the assumption is that
- // if `dest` already exists, and we get certain errors while
- // trying to move it, we should just not bother.
- //
- // In the case of cache corruption, users will receive an
- // EINTEGRITY error elsewhere, and can remove the offending
- // content their own way.
- //
- // Note that, as the name suggests, this strictly only supports file moves.
- return BB.fromNode(cb => {
- fs.link(src, dest, err => {
- if (err) {
- if (err.code === 'EEXIST' || err.code === 'EBUSY') {
- // file already exists, so whatever
- } else if (err.code === 'EPERM' && process.platform === 'win32') {
- // file handle stayed open even past graceful-fs limits
- } else {
- return cb(err)
- }
- }
- return cb()
- })
- }).then(() => {
- // content should never change for any reason, so make it read-only
- return BB.join(unlink(src), process.platform !== 'win32' && chmod(dest, '0444'))
- }).catch(() => {
- if (!pinflight) { pinflight = require('promise-inflight') }
- return pinflight('cacache-move-file:' + dest, () => {
- return BB.promisify(fs.stat)(dest).catch(err => {
- if (err.code !== 'ENOENT') {
- // Something else is wrong here. Bail bail bail
- throw err
- }
- // file doesn't already exist! let's try a rename -> copy fallback
- if (!move) { move = require('move-concurrently') }
- return move(src, dest, { BB, fs })
- })
- })
- })
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/tmp.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/tmp.js
deleted file mode 100644
index 4fc4512cc8..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/tmp.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const fixOwner = require('./fix-owner')
-const path = require('path')
-const rimraf = BB.promisify(require('rimraf'))
-const uniqueFilename = require('unique-filename')
-
-module.exports.mkdir = mktmpdir
-function mktmpdir (cache, opts) {
- opts = opts || {}
- const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix)
- return fixOwner.mkdirfix(tmpTarget, opts.uid, opts.gid).then(() => {
- return tmpTarget
- })
-}
-
-module.exports.withTmp = withTmp
-function withTmp (cache, opts, cb) {
- if (!cb) {
- cb = opts
- opts = null
- }
- opts = opts || {}
- return BB.using(mktmpdir(cache, opts).disposer(rimraf), cb)
-}
-
-module.exports.fix = fixtmpdir
-function fixtmpdir (cache, opts) {
- return fixOwner(path.join(cache, 'tmp'), opts.uid, opts.gid)
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/y.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/y.js
deleted file mode 100644
index d62bedacb3..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/util/y.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict'
-
-const path = require('path')
-const y18n = require('y18n')({
- directory: path.join(__dirname, '../../locales'),
- locale: 'en',
- updateFiles: process.env.CACACHE_UPDATE_LOCALE_FILES === 'true'
-})
-
-module.exports = yTag
-function yTag (parts) {
- let str = ''
- parts.forEach((part, i) => {
- const arg = arguments[i + 1]
- str += part
- if (arg) {
- str += '%s'
- }
- })
- return y18n.__.apply(null, [str].concat([].slice.call(arguments, 1)))
-}
-
-module.exports.setLocale = locale => {
- y18n.setLocale(locale)
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/verify.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/verify.js
deleted file mode 100644
index 6a01004c97..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/lib/verify.js
+++ /dev/null
@@ -1,213 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./content/path')
-const finished = BB.promisify(require('mississippi').finished)
-const fixOwner = require('./util/fix-owner')
-const fs = require('graceful-fs')
-const glob = BB.promisify(require('glob'))
-const index = require('./entry-index')
-const path = require('path')
-const rimraf = BB.promisify(require('rimraf'))
-const ssri = require('ssri')
-
-BB.promisifyAll(fs)
-
-module.exports = verify
-function verify (cache, opts) {
- opts = opts || {}
- opts.log && opts.log.silly('verify', 'verifying cache at', cache)
- return BB.reduce([
- markStartTime,
- fixPerms,
- garbageCollect,
- rebuildIndex,
- cleanTmp,
- writeVerifile,
- markEndTime
- ], (stats, step, i) => {
- const label = step.name || `step #${i}`
- const start = new Date()
- return BB.resolve(step(cache, opts)).then(s => {
- s && Object.keys(s).forEach(k => {
- stats[k] = s[k]
- })
- const end = new Date()
- if (!stats.runTime) { stats.runTime = {} }
- stats.runTime[label] = end - start
- return stats
- })
- }, {}).tap(stats => {
- stats.runTime.total = stats.endTime - stats.startTime
- opts.log && opts.log.silly('verify', 'verification finished for', cache, 'in', `${stats.runTime.total}ms`)
- })
-}
-
-function markStartTime (cache, opts) {
- return { startTime: new Date() }
-}
-
-function markEndTime (cache, opts) {
- return { endTime: new Date() }
-}
-
-function fixPerms (cache, opts) {
- opts.log && opts.log.silly('verify', 'fixing cache permissions')
- return fixOwner.mkdirfix(cache, opts.uid, opts.gid).then(() => {
- // TODO - fix file permissions too
- return fixOwner.chownr(cache, opts.uid, opts.gid)
- }).then(() => null)
-}
-
-// Implements a naive mark-and-sweep tracing garbage collector.
-//
-// The algorithm is basically as follows:
-// 1. Read (and filter) all index entries ("pointers")
-// 2. Mark each integrity value as "live"
-// 3. Read entire filesystem tree in `content-vX/` dir
-// 4. If content is live, verify its checksum and delete it if it fails
-// 5. If content is not marked as live, rimraf it.
-//
-function garbageCollect (cache, opts) {
- opts.log && opts.log.silly('verify', 'garbage collecting content')
- const indexStream = index.lsStream(cache)
- const liveContent = new Set()
- indexStream.on('data', entry => {
- if (opts && opts.filter && !opts.filter(entry)) { return }
- liveContent.add(entry.integrity.toString())
- })
- return finished(indexStream).then(() => {
- const contentDir = contentPath._contentDir(cache)
- return glob(path.join(contentDir, '**'), {
- follow: false,
- nodir: true,
- nosort: true
- }).then(files => {
- return BB.resolve({
- verifiedContent: 0,
- reclaimedCount: 0,
- reclaimedSize: 0,
- badContentCount: 0,
- keptSize: 0
- }).tap((stats) => BB.map(files, (f) => {
- const split = f.split(/[/\\]/)
- const digest = split.slice(split.length - 3).join('')
- const algo = split[split.length - 4]
- const integrity = ssri.fromHex(digest, algo)
- if (liveContent.has(integrity.toString())) {
- return verifyContent(f, integrity).then(info => {
- if (!info.valid) {
- stats.reclaimedCount++
- stats.badContentCount++
- stats.reclaimedSize += info.size
- } else {
- stats.verifiedContent++
- stats.keptSize += info.size
- }
- return stats
- })
- } else {
- // No entries refer to this content. We can delete.
- stats.reclaimedCount++
- return fs.statAsync(f).then(s => {
- return rimraf(f).then(() => {
- stats.reclaimedSize += s.size
- return stats
- })
- })
- }
- }, {concurrency: opts.concurrency || 20}))
- })
- })
-}
-
-function verifyContent (filepath, sri) {
- return fs.statAsync(filepath).then(stat => {
- const contentInfo = {
- size: stat.size,
- valid: true
- }
- return ssri.checkStream(
- fs.createReadStream(filepath),
- sri
- ).catch(err => {
- if (err.code !== 'EINTEGRITY') { throw err }
- return rimraf(filepath).then(() => {
- contentInfo.valid = false
- })
- }).then(() => contentInfo)
- }).catch({code: 'ENOENT'}, () => ({size: 0, valid: false}))
-}
-
-function rebuildIndex (cache, opts) {
- opts.log && opts.log.silly('verify', 'rebuilding index')
- return index.ls(cache).then(entries => {
- const stats = {
- missingContent: 0,
- rejectedEntries: 0,
- totalEntries: 0
- }
- const buckets = {}
- for (let k in entries) {
- if (entries.hasOwnProperty(k)) {
- const hashed = index._hashKey(k)
- const entry = entries[k]
- const excluded = opts && opts.filter && !opts.filter(entry)
- excluded && stats.rejectedEntries++
- if (buckets[hashed] && !excluded) {
- buckets[hashed].push(entry)
- } else if (buckets[hashed] && excluded) {
- // skip
- } else if (excluded) {
- buckets[hashed] = []
- buckets[hashed]._path = index._bucketPath(cache, k)
- } else {
- buckets[hashed] = [entry]
- buckets[hashed]._path = index._bucketPath(cache, k)
- }
- }
- }
- return BB.map(Object.keys(buckets), key => {
- return rebuildBucket(cache, buckets[key], stats, opts)
- }, {concurrency: opts.concurrency || 20}).then(() => stats)
- })
-}
-
-function rebuildBucket (cache, bucket, stats, opts) {
- return fs.truncateAsync(bucket._path).then(() => {
- // This needs to be serialized because cacache explicitly
- // lets very racy bucket conflicts clobber each other.
- return BB.mapSeries(bucket, entry => {
- const content = contentPath(cache, entry.integrity)
- return fs.statAsync(content).then(() => {
- return index.insert(cache, entry.key, entry.integrity, {
- uid: opts.uid,
- gid: opts.gid,
- metadata: entry.metadata
- }).then(() => { stats.totalEntries++ })
- }).catch({code: 'ENOENT'}, () => {
- stats.rejectedEntries++
- stats.missingContent++
- })
- })
- })
-}
-
-function cleanTmp (cache, opts) {
- opts.log && opts.log.silly('verify', 'cleaning tmp directory')
- return rimraf(path.join(cache, 'tmp'))
-}
-
-function writeVerifile (cache, opts) {
- const verifile = path.join(cache, '_lastverified')
- opts.log && opts.log.silly('verify', 'writing verifile to ' + verifile)
- return fs.writeFileAsync(verifile, '' + (+(new Date())))
-}
-
-module.exports.lastRun = lastRun
-function lastRun (cache) {
- return fs.readFileAsync(
- path.join(cache, '_lastverified'), 'utf8'
- ).then(data => new Date(+data))
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/en.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/en.js
deleted file mode 100644
index 22025cf0e8..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/en.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict'
-
-const ls = require('../ls.js')
-const get = require('../get.js')
-const put = require('../put.js')
-const rm = require('../rm.js')
-const verify = require('../verify.js')
-const setLocale = require('../lib/util/y.js').setLocale
-const clearMemoized = require('../lib/memoization.js').clearMemoized
-const tmp = require('../lib/util/tmp.js')
-
-setLocale('en')
-
-const x = module.exports
-
-x.ls = cache => ls(cache)
-x.ls.stream = cache => ls.stream(cache)
-
-x.get = (cache, key, opts) => get(cache, key, opts)
-x.get.byDigest = (cache, hash, opts) => get.byDigest(cache, hash, opts)
-x.get.stream = (cache, key, opts) => get.stream(cache, key, opts)
-x.get.stream.byDigest = (cache, hash, opts) => get.stream.byDigest(cache, hash, opts)
-x.get.copy = (cache, key, dest, opts) => get.copy(cache, key, dest, opts)
-x.get.copy.byDigest = (cache, hash, dest, opts) => get.copy.byDigest(cache, hash, dest, opts)
-x.get.info = (cache, key) => get.info(cache, key)
-x.get.hasContent = (cache, hash) => get.hasContent(cache, hash)
-
-x.put = (cache, key, data, opts) => put(cache, key, data, opts)
-x.put.stream = (cache, key, opts) => put.stream(cache, key, opts)
-
-x.rm = (cache, key) => rm.entry(cache, key)
-x.rm.all = cache => rm.all(cache)
-x.rm.entry = x.rm
-x.rm.content = (cache, hash) => rm.content(cache, hash)
-
-x.setLocale = lang => setLocale(lang)
-x.clearMemoized = () => clearMemoized()
-
-x.tmp = {}
-x.tmp.mkdir = (cache, opts) => tmp.mkdir(cache, opts)
-x.tmp.withTmp = (cache, opts, cb) => tmp.withTmp(cache, opts, cb)
-
-x.verify = (cache, opts) => verify(cache, opts)
-x.verify.lastRun = cache => verify.lastRun(cache)
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/en.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/en.json
deleted file mode 100644
index 82ecb08324..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/en.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "No cache entry for `%s` found in `%s`": "No cache entry for %s found in %s",
- "Integrity verification failed for %s (%s)": "Integrity verification failed for %s (%s)",
- "Bad data size: expected inserted data to be %s bytes, but got %s instead": "Bad data size: expected inserted data to be %s bytes, but got %s instead",
- "Cache input stream was empty": "Cache input stream was empty"
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/es.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/es.js
deleted file mode 100644
index 9a27de6585..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/es.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict'
-
-const ls = require('../ls.js')
-const get = require('../get.js')
-const put = require('../put.js')
-const rm = require('../rm.js')
-const verify = require('../verify.js')
-const setLocale = require('../lib/util/y.js').setLocale
-const clearMemoized = require('../lib/memoization.js').clearMemoized
-const tmp = require('../lib/util/tmp.js')
-
-setLocale('es')
-
-const x = module.exports
-
-x.ls = cache => ls(cache)
-x.ls.flujo = cache => ls.stream(cache)
-
-x.saca = (cache, clave, ops) => get(cache, clave, ops)
-x.saca.porHacheo = (cache, hacheo, ops) => get.byDigest(cache, hacheo, ops)
-x.saca.flujo = (cache, clave, ops) => get.stream(cache, clave, ops)
-x.saca.flujo.porHacheo = (cache, hacheo, ops) => get.stream.byDigest(cache, hacheo, ops)
-x.sava.copia = (cache, clave, destino, opts) => get.copy(cache, clave, destino, opts)
-x.sava.copia.porHacheo = (cache, hacheo, destino, opts) => get.copy.byDigest(cache, hacheo, destino, opts)
-x.saca.info = (cache, clave) => get.info(cache, clave)
-x.saca.tieneDatos = (cache, hacheo) => get.hasContent(cache, hacheo)
-
-x.mete = (cache, clave, datos, ops) => put(cache, clave, datos, ops)
-x.mete.flujo = (cache, clave, ops) => put.stream(cache, clave, ops)
-
-x.rm = (cache, clave) => rm.entry(cache, clave)
-x.rm.todo = cache => rm.all(cache)
-x.rm.entrada = x.rm
-x.rm.datos = (cache, hacheo) => rm.content(cache, hacheo)
-
-x.ponLenguaje = lang => setLocale(lang)
-x.limpiaMemoizado = () => clearMemoized()
-
-x.tmp = {}
-x.tmp.mkdir = (cache, ops) => tmp.mkdir(cache, ops)
-x.tmp.hazdir = x.tmp.mkdir
-x.tmp.conTmp = (cache, ops, cb) => tmp.withTmp(cache, ops, cb)
-
-x.verifica = (cache, ops) => verify(cache, ops)
-x.verifica.ultimaVez = cache => verify.lastRun(cache)
-x.verifica.últimaVez = x.verifica.ultimaVez
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/es.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/es.json
deleted file mode 100644
index a91d76225b..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/locales/es.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "No cache entry for `%s` found in `%s`": "No existe ninguna entrada para «%s» en «%s»",
- "Integrity verification failed for %s (%s)": "Verificación de integridad falló para «%s» (%s)",
- "Bad data size: expected inserted data to be %s bytes, but got %s instead": "Tamaño incorrecto de datos: los datos insertados debieron haber sido %s octetos, pero fueron %s",
- "Cache input stream was empty": "El stream de entrada al caché estaba vacío"
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/ls.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/ls.js
deleted file mode 100644
index 9f49b388ac..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/ls.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict'
-
-var index = require('./lib/entry-index')
-
-module.exports = index.ls
-module.exports.stream = index.lsStream
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/changelog.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/changelog.md
deleted file mode 100644
index 93430828f8..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/changelog.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# 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/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/index.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/index.js
deleted file mode 100644
index d635b29c56..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-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/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/license b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/license
deleted file mode 100644
index e34763968c..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/license
+++ /dev/null
@@ -1,7 +0,0 @@
-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/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/package.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/package.json
deleted file mode 100644
index 0d8c11480d..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "mississippi@^2.0.0",
- "_id": "mississippi@2.0.0",
- "_inBundle": false,
- "_integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==",
- "_location": "/npm-registry-fetch/cacache/mississippi",
- "_phantomChildren": {},
- "_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": [
- "/npm-registry-fetch/cacache"
- ],
- "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz",
- "_shasum": "3442a508fafc28500486feea99409676e4ee5a6f",
- "_spec": "mississippi@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-fetch/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/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/readme.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/readme.md
deleted file mode 100644
index 5fa6d66c89..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi/readme.md
+++ /dev/null
@@ -1,411 +0,0 @@
-# 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/npm-registry-fetch/node_modules/cacache/package.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/package.json
deleted file mode 100644
index 12cfb5aac5..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/package.json
+++ /dev/null
@@ -1,137 +0,0 @@
-{
- "_from": "cacache@^10.0.4",
- "_id": "cacache@10.0.4",
- "_inBundle": false,
- "_integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==",
- "_location": "/npm-registry-fetch/cacache",
- "_phantomChildren": {
- "concat-stream": "1.6.2",
- "duplexify": "3.6.0",
- "end-of-stream": "1.4.1",
- "flush-write-stream": "1.0.3",
- "from2": "2.3.0",
- "parallel-transform": "1.1.0",
- "pump": "2.0.1",
- "pumpify": "1.5.1",
- "stream-each": "1.2.2",
- "through2": "2.0.3"
- },
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "cacache@^10.0.4",
- "name": "cacache",
- "escapedName": "cacache",
- "rawSpec": "^10.0.4",
- "saveSpec": null,
- "fetchSpec": "^10.0.4"
- },
- "_requiredBy": [
- "/npm-registry-fetch/make-fetch-happen"
- ],
- "_resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz",
- "_shasum": "6452367999eff9d4188aefd9a14e9d7c6a263460",
- "_spec": "cacache@^10.0.4",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen",
- "author": {
- "name": "Kat Marchán",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/zkat/cacache/issues"
- },
- "bundleDependencies": false,
- "cache-version": {
- "content": "2",
- "index": "5"
- },
- "config": {
- "nyc": {
- "exclude": [
- "node_modules/**",
- "test/**"
- ]
- }
- },
- "contributors": [
- {
- "name": "Charlotte Spencer",
- "email": "charlottelaspencer@gmail.com"
- },
- {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org"
- }
- ],
- "dependencies": {
- "bluebird": "^3.5.1",
- "chownr": "^1.0.1",
- "glob": "^7.1.2",
- "graceful-fs": "^4.1.11",
- "lru-cache": "^4.1.1",
- "mississippi": "^2.0.0",
- "mkdirp": "^0.5.1",
- "move-concurrently": "^1.0.1",
- "promise-inflight": "^1.0.1",
- "rimraf": "^2.6.2",
- "ssri": "^5.2.4",
- "unique-filename": "^1.1.0",
- "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.3.1",
- "cross-env": "^5.1.3",
- "nyc": "^11.4.1",
- "require-inject": "^1.4.2",
- "safe-buffer": "^5.1.1",
- "standard": "^10.0.3",
- "standard-version": "^4.3.0",
- "tacks": "^1.2.2",
- "tap": "^11.1.0",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
- },
- "files": [
- "*.js",
- "lib",
- "locales"
- ],
- "homepage": "https://github.com/zkat/cacache#readme",
- "keywords": [
- "cache",
- "caching",
- "content-addressable",
- "sri",
- "sri hash",
- "subresource integrity",
- "cache",
- "storage",
- "store",
- "file store",
- "filesystem",
- "disk cache",
- "disk storage"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "cacache",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zkat/cacache.git"
- },
- "scripts": {
- "benchmarks": "node test/benchmarks",
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "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.4"
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/put.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/put.js
deleted file mode 100644
index fe1293e5e7..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/put.js
+++ /dev/null
@@ -1,71 +0,0 @@
-'use strict'
-
-const index = require('./lib/entry-index')
-const memo = require('./lib/memoization')
-const write = require('./lib/content/write')
-const to = require('mississippi').to
-
-module.exports = putData
-function putData (cache, key, data, opts) {
- opts = opts || {}
- return write(cache, data, opts).then(res => {
- // TODO - stop modifying opts
- opts.size = res.size
- return index.insert(cache, key, res.integrity, opts).then(entry => {
- if (opts.memoize) {
- memo.put(cache, entry, data, opts)
- }
- return res.integrity
- })
- })
-}
-
-module.exports.stream = putStream
-function putStream (cache, key, opts) {
- opts = opts || {}
- let integrity
- let size
- const contentStream = write.stream(
- cache, opts
- ).on('integrity', int => {
- integrity = int
- }).on('size', s => {
- size = s
- })
- let memoData
- let memoTotal = 0
- const stream = to((chunk, enc, cb) => {
- contentStream.write(chunk, enc, () => {
- if (opts.memoize) {
- if (!memoData) { memoData = [] }
- memoData.push(chunk)
- memoTotal += chunk.length
- }
- cb()
- })
- }, cb => {
- contentStream.end(() => {
- // TODO - stop modifying `opts`
- opts.size = size
- index.insert(cache, key, integrity, opts).then(entry => {
- if (opts.memoize) {
- memo.put(cache, entry, Buffer.concat(memoData, memoTotal), opts)
- }
- stream.emit('integrity', integrity)
- cb()
- })
- })
- })
- let erred = false
- stream.once('error', err => {
- if (erred) { return }
- erred = true
- contentStream.emit('error', err)
- })
- contentStream.once('error', err => {
- if (erred) { return }
- erred = true
- stream.emit('error', err)
- })
- return stream
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/rm.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/rm.js
deleted file mode 100644
index e71a1d27b4..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/rm.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const index = require('./lib/entry-index')
-const memo = require('./lib/memoization')
-const path = require('path')
-const rimraf = BB.promisify(require('rimraf'))
-const rmContent = require('./lib/content/rm')
-
-module.exports = entry
-module.exports.entry = entry
-function entry (cache, key) {
- memo.clearMemoized()
- return index.delete(cache, key)
-}
-
-module.exports.content = content
-function content (cache, integrity) {
- memo.clearMemoized()
- return rmContent(cache, integrity)
-}
-
-module.exports.all = all
-function all (cache) {
- memo.clearMemoized()
- return rimraf(path.join(cache, '*(content-*|index-*)'))
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/verify.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/verify.js
deleted file mode 100644
index db7763d7af..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/cacache/verify.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./lib/verify')
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/CHANGELOG.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/CHANGELOG.md
deleted file mode 100644
index f70e02d71d..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/CHANGELOG.md
+++ /dev/null
@@ -1,29 +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="2.0.1"></a>
-## [2.0.1](https://github.com/zkat/figgy-pudding/compare/v2.0.0...v2.0.1) (2018-03-16)
-
-
-### Bug Fixes
-
-* **opts:** ignore non-object providers ([7b9c0f8](https://github.com/zkat/figgy-pudding/commit/7b9c0f8))
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/zkat/figgy-pudding/compare/v1.0.0...v2.0.0) (2018-03-16)
-
-
-### Features
-
-* **api:** overhauled API with new opt handling concept ([e6cc929](https://github.com/zkat/figgy-pudding/commit/e6cc929))
-* **license:** relicense to ISC ([87479aa](https://github.com/zkat/figgy-pudding/commit/87479aa))
-
-
-### BREAKING CHANGES
-
-* **license:** the license has been changed from CC0-1.0 to ISC.
-* **api:** this is a completely different approach than previously
-used by this library. See the readme for the new API and an explanation.
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/LICENSE.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/LICENSE.md
deleted file mode 100644
index 8d28acf866..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/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/npm-registry-fetch/node_modules/figgy-pudding/README.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/README.md
deleted file mode 100644
index 3cdec3f81a..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/README.md
+++ /dev/null
@@ -1,121 +0,0 @@
-# figgy-pudding [![npm version](https://img.shields.io/npm/v/figgy-pudding.svg)](https://npm.im/figgy-pudding) [![license](https://img.shields.io/npm/l/figgy-pudding.svg)](https://npm.im/figgy-pudding) [![Travis](https://img.shields.io/travis/zkat/figgy-pudding.svg)](https://travis-ci.org/zkat/figgy-pudding) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/figgy-pudding?svg=true)](https://ci.appveyor.com/project/zkat/figgy-pudding) [![Coverage Status](https://coveralls.io/repos/github/zkat/figgy-pudding/badge.svg?branch=latest)](https://coveralls.io/github/zkat/figgy-pudding?branch=latest)
-
-# Death to the God Object! Now Bring Us Some Figgy Pudding!
-
-[`figgy-pudding`](https://github.com/zkat/figgy-pudding) is a simple JavaScript library for managing and composing cascading options objects -- hiding what needs to be hidden from each layer, without having to do a lot of manual munging and passing of options.
-
-## Install
-
-`$ npm install figgy-pudding`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [API](#api)
- * [`figgyPudding(spec)`](#figgy-pudding)
- * [`Opts(values)`](#opts)
-
-### Example
-
-```javascript
-const puddin = require('figgyPudding')
-
-const RequestOpts = puddin({
- follow: {
- default: true
- },
- streaming: {
- default: false
- },
- log: {
- default: require('npmlog')
- }
-})
-
-const MyAppOpts = puddin({
- log: {
- default: require('npmlog')
- },
- cache: {
- default: './cache'
- }
-})
-
-function start (opts) {
- opts = MyAppOpts(opts)
- initCache(opts.get('cache'))
- opts.get('streaming') // => undefined
- reqStuff('https://npm.im/figgy-pudding', opts)
-}
-
-function reqStuff (uri, opts) {
- opts = RequestOpts(opts)
- require('request').get(uri, opts) // can't see `cache`
-}
-```
-
-### Features
-
-* Hide options from layer that didn't ask for it
-* Shared multi-layer options
-
-### API
-
-#### <a name="figgy-pudding"></a> `> figgyPudding({ key: { default: val } | String }, [opts])`
-
-Defines an Options constructor that can be used to collect only the needed
-options.
-
-An optional `default` property for specs can be used to specify default values
-if nothing was passed in.
-
-If the value for a spec is a string, it will be treated as an alias to that
-other key.
-
-##### Example
-
-```javascript
-const MyAppOpts = figgyPudding({
- lg: 'log',
- log: {
- default: () => require('npmlog')
- },
- cache: {}
-})
-```
-
-#### <a name="opts"></a> `> Opts(...providers)`
-
-Instantiates an options object defined by `figgyPudding()`, which uses
-`providers`, in order, to find requested properties.
-
-Each provider can be either a plain object, a `Map`-like object (that is, one
-with a `.get()` method) or another figgyPudding `Opts` object.
-
-When nesting `Opts` objects, their properties will not become available to the
-new object, but any further nested `Opts` that reference that property _will_ be
-able to read from their grandparent, as long as they define that key. Default
-values for nested `Opts` parents will be used, if found.
-
-##### Example
-
-```javascript
-const ReqOpts = figgyPudding({
- follow: {}
-})
-
-const opts = ReqOpts({
- follow: true,
- log: require('npmlog')
-})
-
-opts.get('follow') // => true
-opts.get('log') // => Error: ReqOpts does not define `log`
-
-const MoreOpts = figgyPudding({
- log: {}
-})
-MoreOpts(opts).log // => npmlog object (passed in from original plain obj)
-MoreOpts(opts).get('follow') // => Error: MoreOpts does not define `follow`
-```
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/index.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/index.js
deleted file mode 100644
index c13d143862..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/index.js
+++ /dev/null
@@ -1,60 +0,0 @@
-'use strict'
-
-class FiggyPudding {
- constructor (specs, opts, providers) {
- this.specs = specs || {}
- this.opts = opts || (() => false)
- this.providers = providers
- this.isFiggyPudding = true
- }
- get (key) {
- return pudGet(this, key, true)
- }
-}
-
-function pudGet (pud, key, validate) {
- let spec = pud.specs[key]
- if (typeof spec === 'string') {
- key = spec
- spec = pud.specs[key]
- }
- if (validate && !spec && (!pud.opts.other || !pud.opts.other(key))) {
- throw new Error(`invalid config key requested: ${key}`)
- } else {
- if (!spec) { spec = {} }
- let ret
- for (let p of pud.providers) {
- if (p.isFiggyPudding) {
- ret = pudGet(p, key, false)
- } else if (typeof p.get === 'function') {
- ret = p.get(key)
- } else {
- ret = p[key]
- }
- if (ret !== undefined) {
- break
- }
- }
- if (ret === undefined && spec.default !== undefined) {
- if (typeof spec.default === 'function') {
- return spec.default()
- } else {
- return spec.default
- }
- } else {
- return ret
- }
- }
-}
-
-module.exports = figgyPudding
-function figgyPudding (specs, opts) {
- function factory () {
- return new FiggyPudding(
- specs,
- opts,
- [].slice.call(arguments).filter(x => x != null && typeof x === 'object')
- )
- }
- return factory
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/package.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/package.json
deleted file mode 100644
index 7e71124643..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "_from": "figgy-pudding@^2.0.1",
- "_id": "figgy-pudding@2.0.1",
- "_inBundle": false,
- "_integrity": "sha512-yIJPhIBi/oFdU/P+GSXjmk/rmGjuZkm7A5LTXZxNrEprXJXRK012FiI1BR1Pga+0d/d6taWWD+B5d2ozqaxHig==",
- "_location": "/npm-registry-fetch/figgy-pudding",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "figgy-pudding@^2.0.1",
- "name": "figgy-pudding",
- "escapedName": "figgy-pudding",
- "rawSpec": "^2.0.1",
- "saveSpec": null,
- "fetchSpec": "^2.0.1"
- },
- "_requiredBy": [
- "/npm-registry-fetch"
- ],
- "_resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-2.0.1.tgz",
- "_shasum": "56c8fc878e06e1090799b9bcc91cbd85c2c92278",
- "_spec": "figgy-pudding@^2.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-fetch",
- "author": {
- "name": "Kat Marchán",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/zkat/figgy-pudding/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Delicious, festive, cascading config/opts definitions",
- "devDependencies": {
- "standard": "^11.0.1",
- "standard-version": "^4.3.0",
- "tap": "^11.1.2",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
- },
- "files": [
- "*.js",
- "lib"
- ],
- "homepage": "https://github.com/zkat/figgy-pudding#readme",
- "keywords": [
- "config",
- "options",
- "yummy"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "figgy-pudding",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zkat/figgy-pudding.git"
- },
- "scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard",
- "release": "standard-version -s",
- "test": "tap -J --coverage test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "2.0.1"
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/CHANGELOG.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/CHANGELOG.md
deleted file mode 100644
index 123133fe61..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/CHANGELOG.md
+++ /dev/null
@@ -1,525 +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="3.0.0"></a>
-# [3.0.0](https://github.com/zkat/make-fetch-happen/compare/v2.6.0...v3.0.0) (2018-03-12)
-
-
-### Bug Fixes
-
-* **license:** switch to ISC ([#49](https://github.com/zkat/make-fetch-happen/issues/49)) ([bf90c6d](https://github.com/zkat/make-fetch-happen/commit/bf90c6d))
-* **standard:** standard@11 update ([ff0aa70](https://github.com/zkat/make-fetch-happen/commit/ff0aa70))
-
-
-### BREAKING CHANGES
-
-* **license:** license changed from CC0 to ISC.
-
-
-
-<a name="2.6.0"></a>
-# [2.6.0](https://github.com/zkat/make-fetch-happen/compare/v2.5.0...v2.6.0) (2017-11-14)
-
-
-### Bug Fixes
-
-* **integrity:** disable node-fetch compress when checking integrity (#42) ([a7cc74c](https://github.com/zkat/make-fetch-happen/commit/a7cc74c))
-
-
-### Features
-
-* **onretry:** Add `options.onRetry` (#48) ([f90ccff](https://github.com/zkat/make-fetch-happen/commit/f90ccff))
-
-
-
-<a name="2.5.0"></a>
-# [2.5.0](https://github.com/zkat/make-fetch-happen/compare/v2.4.13...v2.5.0) (2017-08-24)
-
-
-### Bug Fixes
-
-* **agent:** support timeout durations greater than 30 seconds ([04875ae](https://github.com/zkat/make-fetch-happen/commit/04875ae)), closes [#35](https://github.com/zkat/make-fetch-happen/issues/35)
-
-
-### Features
-
-* **cache:** export cache deletion functionality (#40) ([3da4250](https://github.com/zkat/make-fetch-happen/commit/3da4250))
-
-
-
-<a name="2.4.13"></a>
-## [2.4.13](https://github.com/zkat/make-fetch-happen/compare/v2.4.12...v2.4.13) (2017-06-29)
-
-
-### Bug Fixes
-
-* **deps:** bump other deps for bugfixes ([eab8297](https://github.com/zkat/make-fetch-happen/commit/eab8297))
-* **proxy:** bump proxy deps with bugfixes (#32) ([632f860](https://github.com/zkat/make-fetch-happen/commit/632f860)), closes [#32](https://github.com/zkat/make-fetch-happen/issues/32)
-
-
-
-<a name="2.4.12"></a>
-## [2.4.12](https://github.com/zkat/make-fetch-happen/compare/v2.4.11...v2.4.12) (2017-06-06)
-
-
-### Bug Fixes
-
-* **cache:** encode x-local-cache-etc headers to be header-safe ([dc9fb1b](https://github.com/zkat/make-fetch-happen/commit/dc9fb1b))
-
-
-
-<a name="2.4.11"></a>
-## [2.4.11](https://github.com/zkat/make-fetch-happen/compare/v2.4.10...v2.4.11) (2017-06-05)
-
-
-### Bug Fixes
-
-* **deps:** bump deps with ssri fix ([bef1994](https://github.com/zkat/make-fetch-happen/commit/bef1994))
-
-
-
-<a name="2.4.10"></a>
-## [2.4.10](https://github.com/zkat/make-fetch-happen/compare/v2.4.9...v2.4.10) (2017-05-31)
-
-
-### Bug Fixes
-
-* **deps:** bump dep versions with bugfixes ([0af4003](https://github.com/zkat/make-fetch-happen/commit/0af4003))
-* **proxy:** use auth parameter for proxy authentication (#30) ([c687306](https://github.com/zkat/make-fetch-happen/commit/c687306))
-
-
-
-<a name="2.4.9"></a>
-## [2.4.9](https://github.com/zkat/make-fetch-happen/compare/v2.4.8...v2.4.9) (2017-05-25)
-
-
-### Bug Fixes
-
-* **cache:** use the passed-in promise for resolving cache stuff ([4c46257](https://github.com/zkat/make-fetch-happen/commit/4c46257))
-
-
-
-<a name="2.4.8"></a>
-## [2.4.8](https://github.com/zkat/make-fetch-happen/compare/v2.4.7...v2.4.8) (2017-05-25)
-
-
-### Bug Fixes
-
-* **cache:** pass uid/gid/Promise through to cache ([a847c92](https://github.com/zkat/make-fetch-happen/commit/a847c92))
-
-
-
-<a name="2.4.7"></a>
-## [2.4.7](https://github.com/zkat/make-fetch-happen/compare/v2.4.6...v2.4.7) (2017-05-24)
-
-
-### Bug Fixes
-
-* **deps:** pull in various fixes from deps ([fc2a587](https://github.com/zkat/make-fetch-happen/commit/fc2a587))
-
-
-
-<a name="2.4.6"></a>
-## [2.4.6](https://github.com/zkat/make-fetch-happen/compare/v2.4.5...v2.4.6) (2017-05-24)
-
-
-### Bug Fixes
-
-* **proxy:** choose agent for http(s)-proxy by protocol of destUrl ([ea4832a](https://github.com/zkat/make-fetch-happen/commit/ea4832a))
-* **proxy:** make socks proxy working ([1de810a](https://github.com/zkat/make-fetch-happen/commit/1de810a))
-* **proxy:** revert previous proxy solution ([563b0d8](https://github.com/zkat/make-fetch-happen/commit/563b0d8))
-
-
-
-<a name="2.4.5"></a>
-## [2.4.5](https://github.com/zkat/make-fetch-happen/compare/v2.4.4...v2.4.5) (2017-05-24)
-
-
-### Bug Fixes
-
-* **proxy:** use the destination url when determining agent ([1a714e7](https://github.com/zkat/make-fetch-happen/commit/1a714e7))
-
-
-
-<a name="2.4.4"></a>
-## [2.4.4](https://github.com/zkat/make-fetch-happen/compare/v2.4.3...v2.4.4) (2017-05-23)
-
-
-### Bug Fixes
-
-* **redirect:** handle redirects explicitly (#27) ([4c4af54](https://github.com/zkat/make-fetch-happen/commit/4c4af54))
-
-
-
-<a name="2.4.3"></a>
-## [2.4.3](https://github.com/zkat/make-fetch-happen/compare/v2.4.2...v2.4.3) (2017-05-06)
-
-
-### Bug Fixes
-
-* **redirect:** redirects now delete authorization if hosts fail to match ([c071805](https://github.com/zkat/make-fetch-happen/commit/c071805))
-
-
-
-<a name="2.4.2"></a>
-## [2.4.2](https://github.com/zkat/make-fetch-happen/compare/v2.4.1...v2.4.2) (2017-05-04)
-
-
-### Bug Fixes
-
-* **cache:** reduce race condition window by checking for content ([24544b1](https://github.com/zkat/make-fetch-happen/commit/24544b1))
-* **match:** Rewrite the conditional stream logic (#25) ([66bba4b](https://github.com/zkat/make-fetch-happen/commit/66bba4b))
-
-
-
-<a name="2.4.1"></a>
-## [2.4.1](https://github.com/zkat/make-fetch-happen/compare/v2.4.0...v2.4.1) (2017-04-28)
-
-
-### Bug Fixes
-
-* **memoization:** missed spots + allow passthrough of memo objs ([ac0cd12](https://github.com/zkat/make-fetch-happen/commit/ac0cd12))
-
-
-
-<a name="2.4.0"></a>
-# [2.4.0](https://github.com/zkat/make-fetch-happen/compare/v2.3.0...v2.4.0) (2017-04-28)
-
-
-### Bug Fixes
-
-* **memoize:** cacache had a broken memoizer ([8a9ed4c](https://github.com/zkat/make-fetch-happen/commit/8a9ed4c))
-
-
-### Features
-
-* **memoization:** only slurp stuff into memory if opts.memoize is not false ([0744adc](https://github.com/zkat/make-fetch-happen/commit/0744adc))
-
-
-
-<a name="2.3.0"></a>
-# [2.3.0](https://github.com/zkat/make-fetch-happen/compare/v2.2.6...v2.3.0) (2017-04-27)
-
-
-### Features
-
-* **agent:** added opts.strictSSL and opts.localAddress ([c35015a](https://github.com/zkat/make-fetch-happen/commit/c35015a))
-* **proxy:** Added opts.noProxy and NO_PROXY support ([f45c915](https://github.com/zkat/make-fetch-happen/commit/f45c915))
-
-
-
-<a name="2.2.6"></a>
-## [2.2.6](https://github.com/zkat/make-fetch-happen/compare/v2.2.5...v2.2.6) (2017-04-26)
-
-
-### Bug Fixes
-
-* **agent:** check uppercase & lowercase proxy env (#24) ([acf2326](https://github.com/zkat/make-fetch-happen/commit/acf2326)), closes [#22](https://github.com/zkat/make-fetch-happen/issues/22)
-* **deps:** switch to node-fetch-npm and stop bundling ([3db603b](https://github.com/zkat/make-fetch-happen/commit/3db603b))
-
-
-
-<a name="2.2.5"></a>
-## [2.2.5](https://github.com/zkat/make-fetch-happen/compare/v2.2.4...v2.2.5) (2017-04-23)
-
-
-### Bug Fixes
-
-* **deps:** bump cacache and use its size feature ([926c1d3](https://github.com/zkat/make-fetch-happen/commit/926c1d3))
-
-
-
-<a name="2.2.4"></a>
-## [2.2.4](https://github.com/zkat/make-fetch-happen/compare/v2.2.3...v2.2.4) (2017-04-18)
-
-
-### Bug Fixes
-
-* **integrity:** hash verification issues fixed ([07f9402](https://github.com/zkat/make-fetch-happen/commit/07f9402))
-
-
-
-<a name="2.2.3"></a>
-## [2.2.3](https://github.com/zkat/make-fetch-happen/compare/v2.2.2...v2.2.3) (2017-04-18)
-
-
-### Bug Fixes
-
-* **staleness:** responses older than 8h were never stale :< ([b54dd75](https://github.com/zkat/make-fetch-happen/commit/b54dd75))
-* **warning:** remove spurious warning, make format more spec-compliant ([2e4f6bb](https://github.com/zkat/make-fetch-happen/commit/2e4f6bb))
-
-
-
-<a name="2.2.2"></a>
-## [2.2.2](https://github.com/zkat/make-fetch-happen/compare/v2.2.1...v2.2.2) (2017-04-12)
-
-
-### Bug Fixes
-
-* **retry:** stop retrying 404s ([6fafd53](https://github.com/zkat/make-fetch-happen/commit/6fafd53))
-
-
-
-<a name="2.2.1"></a>
-## [2.2.1](https://github.com/zkat/make-fetch-happen/compare/v2.2.0...v2.2.1) (2017-04-10)
-
-
-### Bug Fixes
-
-* **deps:** move test-only deps to devDeps ([2daaf80](https://github.com/zkat/make-fetch-happen/commit/2daaf80))
-
-
-
-<a name="2.2.0"></a>
-# [2.2.0](https://github.com/zkat/make-fetch-happen/compare/v2.1.0...v2.2.0) (2017-04-09)
-
-
-### Bug Fixes
-
-* **cache:** treat caches as private ([57b7dc2](https://github.com/zkat/make-fetch-happen/commit/57b7dc2))
-
-
-### Features
-
-* **retry:** accept shorthand retry settings ([dfed69d](https://github.com/zkat/make-fetch-happen/commit/dfed69d))
-
-
-
-<a name="2.1.0"></a>
-# [2.1.0](https://github.com/zkat/make-fetch-happen/compare/v2.0.4...v2.1.0) (2017-04-09)
-
-
-### Features
-
-* **cache:** cache now obeys Age and a variety of other things (#13) ([7b9652d](https://github.com/zkat/make-fetch-happen/commit/7b9652d))
-
-
-
-<a name="2.0.4"></a>
-## [2.0.4](https://github.com/zkat/make-fetch-happen/compare/v2.0.3...v2.0.4) (2017-04-09)
-
-
-### Bug Fixes
-
-* **agent:** accept Request as fetch input, not just strings ([b71669a](https://github.com/zkat/make-fetch-happen/commit/b71669a))
-
-
-
-<a name="2.0.3"></a>
-## [2.0.3](https://github.com/zkat/make-fetch-happen/compare/v2.0.2...v2.0.3) (2017-04-09)
-
-
-### Bug Fixes
-
-* **deps:** seriously ([c29e7e7](https://github.com/zkat/make-fetch-happen/commit/c29e7e7))
-
-
-
-<a name="2.0.2"></a>
-## [2.0.2](https://github.com/zkat/make-fetch-happen/compare/v2.0.1...v2.0.2) (2017-04-09)
-
-
-### Bug Fixes
-
-* **deps:** use bundleDeps instead ([c36ebf0](https://github.com/zkat/make-fetch-happen/commit/c36ebf0))
-
-
-
-<a name="2.0.1"></a>
-## [2.0.1](https://github.com/zkat/make-fetch-happen/compare/v2.0.0...v2.0.1) (2017-04-09)
-
-
-### Bug Fixes
-
-* **deps:** make sure node-fetch tarball included in release ([3bf49d1](https://github.com/zkat/make-fetch-happen/commit/3bf49d1))
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/zkat/make-fetch-happen/compare/v1.7.0...v2.0.0) (2017-04-09)
-
-
-### Bug Fixes
-
-* **deps:** manually pull in newer node-fetch to avoid babel prod dep ([66e5e87](https://github.com/zkat/make-fetch-happen/commit/66e5e87))
-* **retry:** be more specific about when we retry ([a47b782](https://github.com/zkat/make-fetch-happen/commit/a47b782))
-
-
-### Features
-
-* **agent:** add ca/cert/key support to auto-agent (#15) ([57585a7](https://github.com/zkat/make-fetch-happen/commit/57585a7))
-
-
-### BREAKING CHANGES
-
-* **agent:** pac proxies are no longer supported.
-* **retry:** Retry logic has changes.
-
-* 404s, 420s, and 429s all retry now.
-* ENOTFOUND no longer retries.
-* Only ECONNRESET, ECONNREFUSED, EADDRINUSE, ETIMEDOUT, and `request-timeout` errors are retried.
-
-
-
-<a name="1.7.0"></a>
-# [1.7.0](https://github.com/zkat/make-fetch-happen/compare/v1.6.0...v1.7.0) (2017-04-08)
-
-
-### Features
-
-* **cache:** add useful headers to inform users about cached data ([9bd7b00](https://github.com/zkat/make-fetch-happen/commit/9bd7b00))
-
-
-
-<a name="1.6.0"></a>
-# [1.6.0](https://github.com/zkat/make-fetch-happen/compare/v1.5.1...v1.6.0) (2017-04-06)
-
-
-### Features
-
-* **agent:** better, keepalive-supporting, default http agents ([16277f6](https://github.com/zkat/make-fetch-happen/commit/16277f6))
-
-
-
-<a name="1.5.1"></a>
-## [1.5.1](https://github.com/zkat/make-fetch-happen/compare/v1.5.0...v1.5.1) (2017-04-05)
-
-
-### Bug Fixes
-
-* **cache:** bump cacache for its fixed error messages ([2f2b916](https://github.com/zkat/make-fetch-happen/commit/2f2b916))
-* **cache:** fix handling of errors in cache reads ([5729222](https://github.com/zkat/make-fetch-happen/commit/5729222))
-
-
-
-<a name="1.5.0"></a>
-# [1.5.0](https://github.com/zkat/make-fetch-happen/compare/v1.4.0...v1.5.0) (2017-04-04)
-
-
-### Features
-
-* **retry:** retry requests on 408 timeouts, too ([8d8b5bd](https://github.com/zkat/make-fetch-happen/commit/8d8b5bd))
-
-
-
-<a name="1.4.0"></a>
-# [1.4.0](https://github.com/zkat/make-fetch-happen/compare/v1.3.1...v1.4.0) (2017-04-04)
-
-
-### Bug Fixes
-
-* **cache:** stop relying on BB.catch ([2b04494](https://github.com/zkat/make-fetch-happen/commit/2b04494))
-
-
-### Features
-
-* **retry:** report retry attempt number as extra header ([fd50927](https://github.com/zkat/make-fetch-happen/commit/fd50927))
-
-
-
-<a name="1.3.1"></a>
-## [1.3.1](https://github.com/zkat/make-fetch-happen/compare/v1.3.0...v1.3.1) (2017-04-04)
-
-
-### Bug Fixes
-
-* **cache:** pretend cache entry is missing on ENOENT ([9c2bb26](https://github.com/zkat/make-fetch-happen/commit/9c2bb26))
-
-
-
-<a name="1.3.0"></a>
-# [1.3.0](https://github.com/zkat/make-fetch-happen/compare/v1.2.1...v1.3.0) (2017-04-04)
-
-
-### Bug Fixes
-
-* **cache:** if metadata is missing for some odd reason, ignore the entry ([a021a6b](https://github.com/zkat/make-fetch-happen/commit/a021a6b))
-
-
-### Features
-
-* **cache:** add special headers when request was loaded straight from cache ([8a7dbd1](https://github.com/zkat/make-fetch-happen/commit/8a7dbd1))
-* **cache:** allow configuring algorithms to be calculated on insertion ([bf4a0f2](https://github.com/zkat/make-fetch-happen/commit/bf4a0f2))
-
-
-
-<a name="1.2.1"></a>
-## [1.2.1](https://github.com/zkat/make-fetch-happen/compare/v1.2.0...v1.2.1) (2017-04-03)
-
-
-### Bug Fixes
-
-* **integrity:** update cacache and ssri and change EBADCHECKSUM -> EINTEGRITY ([b6cf6f6](https://github.com/zkat/make-fetch-happen/commit/b6cf6f6))
-
-
-
-<a name="1.2.0"></a>
-# [1.2.0](https://github.com/zkat/make-fetch-happen/compare/v1.1.0...v1.2.0) (2017-04-03)
-
-
-### Features
-
-* **integrity:** full Subresource Integrity support (#10) ([a590159](https://github.com/zkat/make-fetch-happen/commit/a590159))
-
-
-
-<a name="1.1.0"></a>
-# [1.1.0](https://github.com/zkat/make-fetch-happen/compare/v1.0.1...v1.1.0) (2017-04-01)
-
-
-### Features
-
-* **opts:** fetch.defaults() for default options ([522a65e](https://github.com/zkat/make-fetch-happen/commit/522a65e))
-
-
-
-<a name="1.0.1"></a>
-## [1.0.1](https://github.com/zkat/make-fetch-happen/compare/v1.0.0...v1.0.1) (2017-04-01)
-
-
-
-<a name="1.0.0"></a>
-# 1.0.0 (2017-04-01)
-
-
-### Bug Fixes
-
-* **cache:** default on cache-control header ([b872a2c](https://github.com/zkat/make-fetch-happen/commit/b872a2c))
-* standard stuff and cache matching ([753f2c2](https://github.com/zkat/make-fetch-happen/commit/753f2c2))
-* **agent:** nudge around things with opts.agent ([ed62b57](https://github.com/zkat/make-fetch-happen/commit/ed62b57))
-* **agent:** {agent: false} has special behavior ([b8cc923](https://github.com/zkat/make-fetch-happen/commit/b8cc923))
-* **cache:** invalidation on non-GET ([fe78fac](https://github.com/zkat/make-fetch-happen/commit/fe78fac))
-* **cache:** make force-cache and only-if-cached work as expected ([f50e9df](https://github.com/zkat/make-fetch-happen/commit/f50e9df))
-* **cache:** more spec compliance ([d5a56db](https://github.com/zkat/make-fetch-happen/commit/d5a56db))
-* **cache:** only cache 200 gets ([0abb25a](https://github.com/zkat/make-fetch-happen/commit/0abb25a))
-* **cache:** only load cache code if cache opt is a string ([250fcd5](https://github.com/zkat/make-fetch-happen/commit/250fcd5))
-* **cache:** oops ([e3fa15a](https://github.com/zkat/make-fetch-happen/commit/e3fa15a))
-* **cache:** refactored warning removal into main file ([5b0a9f9](https://github.com/zkat/make-fetch-happen/commit/5b0a9f9))
-* **cache:** req constructor no longer needed in Cache ([5b74cbc](https://github.com/zkat/make-fetch-happen/commit/5b74cbc))
-* **cache:** standard fetch api calls cacheMode "cache" ([6fba805](https://github.com/zkat/make-fetch-happen/commit/6fba805))
-* **cache:** was using wrong method for non-GET/HEAD cache invalidation ([810763a](https://github.com/zkat/make-fetch-happen/commit/810763a))
-* **caching:** a bunch of cache-related fixes ([8ebda1d](https://github.com/zkat/make-fetch-happen/commit/8ebda1d))
-* **deps:** `cacache[@6](https://github.com/6).3.0` - race condition fixes ([9528442](https://github.com/zkat/make-fetch-happen/commit/9528442))
-* **freshness:** fix regex for cacheControl matching ([070db86](https://github.com/zkat/make-fetch-happen/commit/070db86))
-* **freshness:** fixed default freshness heuristic value ([5d29e88](https://github.com/zkat/make-fetch-happen/commit/5d29e88))
-* **logging:** remove console.log calls ([a1d0a47](https://github.com/zkat/make-fetch-happen/commit/a1d0a47))
-* **method:** node-fetch guarantees uppercase ([a1d68d6](https://github.com/zkat/make-fetch-happen/commit/a1d68d6))
-* **opts:** simplified opts handling ([516fd6e](https://github.com/zkat/make-fetch-happen/commit/516fd6e))
-* **proxy:** pass proxy option directly to ProxyAgent ([3398460](https://github.com/zkat/make-fetch-happen/commit/3398460))
-* **retry:** false -> {retries: 0} ([297fbb6](https://github.com/zkat/make-fetch-happen/commit/297fbb6))
-* **retry:** only retry put if body is not a stream ([a24e599](https://github.com/zkat/make-fetch-happen/commit/a24e599))
-* **retry:** skip retries if body is a stream for ANY method ([780c0f8](https://github.com/zkat/make-fetch-happen/commit/780c0f8))
-
-
-### Features
-
-* **api:** initial implementation -- can make and cache requests ([7d55b49](https://github.com/zkat/make-fetch-happen/commit/7d55b49))
-* **fetch:** injectable cache, and retry support ([87b84bf](https://github.com/zkat/make-fetch-happen/commit/87b84bf))
-
-
-### BREAKING CHANGES
-
-* **cache:** opts.cache -> opts.cacheManager; opts.cacheMode -> opts.cache
-* **fetch:** opts.cache accepts a Cache-like obj or a path. Requests are now retried.
-* **api:** actual api implemented
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/LICENSE b/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/LICENSE
deleted file mode 100644
index 8d28acf866..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/LICENSE
+++ /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/npm-registry-fetch/node_modules/make-fetch-happen/README.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/README.md
deleted file mode 100644
index 4d12d8dae7..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/README.md
+++ /dev/null
@@ -1,404 +0,0 @@
-# make-fetch-happen [![npm version](https://img.shields.io/npm/v/make-fetch-happen.svg)](https://npm.im/make-fetch-happen) [![license](https://img.shields.io/npm/l/make-fetch-happen.svg)](https://npm.im/make-fetch-happen) [![Travis](https://img.shields.io/travis/zkat/make-fetch-happen.svg)](https://travis-ci.org/zkat/make-fetch-happen) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/make-fetch-happen?svg=true)](https://ci.appveyor.com/project/zkat/make-fetch-happen) [![Coverage Status](https://coveralls.io/repos/github/zkat/make-fetch-happen/badge.svg?branch=latest)](https://coveralls.io/github/zkat/make-fetch-happen?branch=latest)
-
-
-[`make-fetch-happen`](https://github.com/zkat/make-fetch-happen) is a Node.js
-library that wraps [`node-fetch-npm`](https://github.com/npm/node-fetch-npm) with additional
-features [`node-fetch`](https://github.com/bitinn/node-fetch) doesn't intend to include, including HTTP Cache support, request
-pooling, proxies, retries, [and more](#features)!
-
-## Install
-
-`$ npm install --save make-fetch-happen`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * [`fetch`](#fetch)
- * [`fetch.defaults`](#fetch-defaults)
- * [`node-fetch` options](#node-fetch-options)
- * [`make-fetch-happen` options](#extra-options)
- * [`opts.cacheManager`](#opts-cache-manager)
- * [`opts.cache`](#opts-cache)
- * [`opts.proxy`](#opts-proxy)
- * [`opts.noProxy`](#opts-no-proxy)
- * [`opts.ca, opts.cert, opts.key`](#https-opts)
- * [`opts.maxSockets`](#opts-max-sockets)
- * [`opts.retry`](#opts-retry)
- * [`opts.onRetry`](#opts-onretry)
- * [`opts.integrity`](#opts-integrity)
-* [Message From Our Sponsors](#wow)
-
-### Example
-
-```javascript
-const fetch = require('make-fetch-happen').defaults({
- cacheManager: './my-cache' // path where cache will be written (and read)
-})
-
-fetch('https://registry.npmjs.org/make-fetch-happen').then(res => {
- return res.json() // download the body as JSON
-}).then(body => {
- console.log(`got ${body.name} from web`)
- return fetch('https://registry.npmjs.org/make-fetch-happen', {
- cache: 'no-cache' // forces a conditional request
- })
-}).then(res => {
- console.log(res.status) // 304! cache validated!
- return res.json().then(body => {
- console.log(`got ${body.name} from cache`)
- })
-})
-```
-
-### Features
-
-* Builds around [`node-fetch`](https://npm.im/node-fetch) for the core [`fetch` API](https://fetch.spec.whatwg.org) implementation
-* Request pooling out of the box
-* Quite fast, really
-* Automatic HTTP-semantics-aware request retries
-* Cache-fallback automatic "offline mode"
-* Proxy support (http, https, socks, socks4, socks5)
-* Built-in request caching following full HTTP caching rules (`Cache-Control`, `ETag`, `304`s, cache fallback on error, etc).
-* Customize cache storage with any [Cache API](https://developer.mozilla.org/en-US/docs/Web/API/Cache)-compliant `Cache` instance. Cache to Redis!
-* Node.js Stream support
-* Transparent gzip and deflate support
-* [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) support
-* Literally punches nazis
-* (PENDING) Range request caching and resuming
-
-### Contributing
-
-The make-fetch-happen team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.
-
-All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
-
-Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
-
-Happy hacking!
-
-### API
-
-#### <a name="fetch"></a> `> fetch(uriOrRequest, [opts]) -> Promise<Response>`
-
-This function implements most of the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch): given a `uri` string or a `Request` instance, it will fire off an http request and return a Promise containing the relevant response.
-
-If `opts` is provided, the [`node-fetch`-specific options](#node-fetch-options) will be passed to that library. There are also [additional options](#extra-options) specific to make-fetch-happen that add various features, such as HTTP caching, integrity verification, proxy support, and more.
-
-##### Example
-
-```javascript
-fetch('https://google.com').then(res => res.buffer())
-```
-
-#### <a name="fetch-defaults"></a> `> fetch.defaults([defaultUrl], [defaultOpts])`
-
-Returns a new `fetch` function that will call `make-fetch-happen` using `defaultUrl` and `defaultOpts` as default values to any calls.
-
-A defaulted `fetch` will also have a `.defaults()` method, so they can be chained.
-
-##### Example
-
-```javascript
-const fetch = require('make-fetch-happen').defaults({
- cacheManager: './my-local-cache'
-})
-
-fetch('https://registry.npmjs.org/make-fetch-happen') // will always use the cache
-```
-
-#### <a name="node-fetch-options"></a> `> node-fetch options`
-
-The following options for `node-fetch` are used as-is:
-
-* method
-* body
-* redirect
-* follow
-* timeout
-* compress
-* size
-
-These other options are modified or augmented by make-fetch-happen:
-
-* headers - Default `User-Agent` set to make-fetch happen. `Connection` is set to `keep-alive` or `close` automatically depending on `opts.agent`.
-* agent
- * If agent is null, an http or https Agent will be automatically used. By default, these will be `http.globalAgent` and `https.globalAgent`.
- * If [`opts.proxy`](#opts-proxy) is provided and `opts.agent` is null, the agent will be set to an appropriate proxy-handling agent.
- * If `opts.agent` is an object, it will be used as the request-pooling agent argument for this request.
- * If `opts.agent` is `false`, it will be passed as-is to the underlying request library. This causes a new Agent to be spawned for every request.
-
-For more details, see [the documentation for `node-fetch` itself](https://github.com/bitinn/node-fetch#options).
-
-#### <a name="extra-options"></a> `> make-fetch-happen options`
-
-make-fetch-happen augments the `node-fetch` API with additional features available through extra options. The following extra options are available:
-
-* [`opts.cacheManager`](#opts-cache-manager) - Cache target to read/write
-* [`opts.cache`](#opts-cache) - `fetch` cache mode. Controls cache *behavior*.
-* [`opts.proxy`](#opts-proxy) - Proxy agent
-* [`opts.noProxy`](#opts-no-proxy) - Domain segments to disable proxying for.
-* [`opts.ca, opts.cert, opts.key, opts.strictSSL`](#https-opts)
-* [`opts.localAddress`](#opts-local-address)
-* [`opts.maxSockets`](#opts-max-sockets)
-* [`opts.retry`](#opts-retry) - Request retry settings
-* [`opts.onRetry`](#opts-onretry) - a function called whenever a retry is attempted
-* [`opts.integrity`](#opts-integrity) - [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) metadata.
-
-#### <a name="opts-cache-manager"></a> `> opts.cacheManager`
-
-Either a `String` or a `Cache`. If the former, it will be assumed to be a `Path` to be used as the cache root for [`cacache`](https://npm.im/cacache).
-
-If an object is provided, it will be assumed to be a compliant [`Cache` instance](https://developer.mozilla.org/en-US/docs/Web/API/Cache). Only `Cache.match()`, `Cache.put()`, and `Cache.delete()` are required. Options objects will not be passed in to `match()` or `delete()`.
-
-By implementing this API, you can customize the storage backend for make-fetch-happen itself -- for example, you could implement a cache that uses `redis` for caching, or simply keeps everything in memory. Most of the caching logic exists entirely on the make-fetch-happen side, so the only thing you need to worry about is reading, writing, and deleting, as well as making sure `fetch.Response` objects are what gets returned.
-
-You can refer to `cache.js` in the make-fetch-happen source code for a reference implementation.
-
-**NOTE**: Requests will not be cached unless their response bodies are consumed. You will need to use one of the `res.json()`, `res.buffer()`, etc methods on the response, or drain the `res.body` stream, in order for it to be written.
-
-The default cache manager also adds the following headers to cached responses:
-
-* `X-Local-Cache`: Path to the cache the content was found in
-* `X-Local-Cache-Key`: Unique cache entry key for this response
-* `X-Local-Cache-Hash`: Specific integrity hash for the cached entry
-* `X-Local-Cache-Time`: UTCString of the cache insertion time for the entry
-
-Using [`cacache`](https://npm.im/cacache), a call like this may be used to
-manually fetch the cached entry:
-
-```javascript
-const h = response.headers
-cacache.get(h.get('x-local-cache'), h.get('x-local-cache-key'))
-
-// grab content only, directly:
-cacache.get.byDigest(h.get('x-local-cache'), h.get('x-local-cache-hash'))
-```
-
-##### Example
-
-```javascript
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- cacheManager: './my-local-cache'
-}) // -> 200-level response will be written to disk
-
-fetch('https://npm.im/cacache', {
- cacheManager: new MyCustomRedisCache(process.env.PORT)
-}) // -> 200-level response will be written to redis
-```
-
-A possible (minimal) implementation for `MyCustomRedisCache`:
-
-```javascript
-const bluebird = require('bluebird')
-const redis = require("redis")
-bluebird.promisifyAll(redis.RedisClient.prototype)
-class MyCustomRedisCache {
- constructor (opts) {
- this.redis = redis.createClient(opts)
- }
- match (req) {
- return this.redis.getAsync(req.url).then(res => {
- if (res) {
- const parsed = JSON.parse(res)
- return new fetch.Response(parsed.body, {
- url: req.url,
- headers: parsed.headers,
- status: 200
- })
- }
- })
- }
- put (req, res) {
- return res.buffer().then(body => {
- return this.redis.setAsync(req.url, JSON.stringify({
- body: body,
- headers: res.headers.raw()
- }))
- }).then(() => {
- // return the response itself
- return res
- })
- }
- 'delete' (req) {
- return this.redis.unlinkAsync(req.url)
- }
-}
-```
-
-#### <a name="opts-cache"></a> `> opts.cache`
-
-This option follows the standard `fetch` API cache option. This option will do nothing if [`opts.cacheManager`](#opts-cache-manager) is null. The following values are accepted (as strings):
-
-* `default` - Fetch will inspect the HTTP cache on the way to the network. If there is a fresh response it will be used. If there is a stale response a conditional request will be created, and a normal request otherwise. It then updates the HTTP cache with the response. If the revalidation request fails (for example, on a 500 or if you're offline), the stale response will be returned.
-* `no-store` - Fetch behaves as if there is no HTTP cache at all.
-* `reload` - Fetch behaves as if there is no HTTP cache on the way to the network. Ergo, it creates a normal request and updates the HTTP cache with the response.
-* `no-cache` - Fetch creates a conditional request if there is a response in the HTTP cache and a normal request otherwise. It then updates the HTTP cache with the response.
-* `force-cache` - Fetch uses any response in the HTTP cache matching the request, not paying attention to staleness. If there was no response, it creates a normal request and updates the HTTP cache with the response.
-* `only-if-cached` - Fetch uses any response in the HTTP cache matching the request, not paying attention to staleness. If there was no response, it returns a network error. (Can only be used when request’s mode is "same-origin". Any cached redirects will be followed assuming request’s redirect mode is "follow" and the redirects do not violate request’s mode.)
-
-(Note: option descriptions are taken from https://fetch.spec.whatwg.org/#http-network-or-cache-fetch)
-
-##### Example
-
-```javascript
-const fetch = require('make-fetch-happen').defaults({
- cacheManager: './my-cache'
-})
-
-// Will error with ENOTCACHED if we haven't already cached this url
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- cache: 'only-if-cached'
-})
-
-// Will refresh any local content and cache the new response
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- cache: 'reload'
-})
-
-// Will use any local data, even if stale. Otherwise, will hit network.
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- cache: 'force-cache'
-})
-```
-
-#### <a name="opts-proxy"></a> `> opts.proxy`
-
-A string or `url.parse`-d URI to proxy through. Different Proxy handlers will be
-used depending on the proxy's protocol.
-
-Additionally, `process.env.HTTP_PROXY`, `process.env.HTTPS_PROXY`, and
-`process.env.PROXY` are used if present and no `opts.proxy` value is provided.
-
-(Pending) `process.env.NO_PROXY` may also be configured to skip proxying requests for all, or specific domains.
-
-##### Example
-
-```javascript
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- proxy: 'https://corporate.yourcompany.proxy:4445'
-})
-
-fetch('https://registry.npmjs.org/make-fetch-happen', {
- proxy: {
- protocol: 'https:',
- hostname: 'corporate.yourcompany.proxy',
- port: 4445
- }
-})
-```
-
-#### <a name="opts-no-proxy"></a> `> opts.noProxy`
-
-If present, should be a comma-separated string or an array of domain extensions
-that a proxy should _not_ be used for.
-
-This option may also be provided through `process.env.NO_PROXY`.
-
-#### <a name="https-opts"></a> `> opts.ca, opts.cert, opts.key, opts.strictSSL`
-
-These values are passed in directly to the HTTPS agent and will be used for both
-proxied and unproxied outgoing HTTPS requests. They mostly correspond to the
-same options the `https` module accepts, which will be themselves passed to
-`tls.connect()`. `opts.strictSSL` corresponds to `rejectUnauthorized`.
-
-#### <a name="opts-local-address"></a> `> opts.localAddress`
-
-Passed directly to `http` and `https` request calls. Determines the local
-address to bind to.
-
-#### <a name="opts-max-sockets"></a> `> opts.maxSockets`
-
-Default: 15
-
-Maximum number of active concurrent sockets to use for the underlying
-Http/Https/Proxy agents. This setting applies once per spawned agent.
-
-15 is probably a _pretty good value_ for most use-cases, and balances speed
-with, uh, not knocking out people's routers. 🤓
-
-#### <a name="opts-retry"></a> `> opts.retry`
-
-An object that can be used to tune request retry settings. Retries will only be attempted on the following conditions:
-
-* Request method is NOT `POST` AND
-* Request status is one of: `408`, `420`, `429`, or any status in the 500-range. OR
-* Request errored with `ECONNRESET`, `ECONNREFUSED`, `EADDRINUSE`, `ETIMEDOUT`, or the `fetch` error `request-timeout`.
-
-The following are worth noting as explicitly not retried:
-
-* `getaddrinfo ENOTFOUND` and will be assumed to be either an unreachable domain or the user will be assumed offline. If a response is cached, it will be returned immediately.
-* `ECONNRESET` currently has no support for restarting. It will eventually be supported but requires a bit more juggling due to streaming.
-
-If `opts.retry` is `false`, it is equivalent to `{retries: 0}`
-
-If `opts.retry` is a number, it is equivalent to `{retries: num}`
-
-The following retry options are available if you want more control over it:
-
-* retries
-* factor
-* minTimeout
-* maxTimeout
-* randomize
-
-For details on what each of these do, refer to the [`retry`](https://npm.im/retry) documentation.
-
-##### Example
-
-```javascript
-fetch('https://flaky.site.com', {
- retry: {
- retries: 10,
- randomize: true
- }
-})
-
-fetch('http://reliable.site.com', {
- retry: false
-})
-
-fetch('http://one-more.site.com', {
- retry: 3
-})
-```
-
-#### <a name="opts-onretry"></a> `> opts.onRetry`
-
-A function called whenever a retry is attempted.
-
-##### Example
-
-```javascript
-fetch('https://flaky.site.com', {
- onRetry() {
- console.log('we will retry!')
- }
-})
-```
-
-#### <a name="opts-integrity"></a> `> opts.integrity`
-
-Matches the response body against the given [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) metadata. If verification fails, the request will fail with an `EINTEGRITY` error.
-
-`integrity` may either be a string or an [`ssri`](https://npm.im/ssri) `Integrity`-like.
-
-##### Example
-
-```javascript
-fetch('https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-1.0.0.tgz', {
- integrity: 'sha1-o47j7zAYnedYFn1dF/fR9OV3z8Q='
-}) // -> ok
-
-fetch('https://malicious-registry.org/make-fetch-happen/-/make-fetch-happen-1.0.0.tgz', {
- integrity: 'sha1-o47j7zAYnedYFn1dF/fR9OV3z8Q='
-}) // Error: EINTEGRITY
-```
-
-### <a name="wow"></a> Message From Our Sponsors
-
-![](stop.gif)
-
-![](happening.gif)
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/agent.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/agent.js
deleted file mode 100644
index 55675946ad..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/agent.js
+++ /dev/null
@@ -1,171 +0,0 @@
-'use strict'
-const LRU = require('lru-cache')
-const url = require('url')
-
-let AGENT_CACHE = new LRU({ max: 50 })
-let HttpsAgent
-let HttpAgent
-
-module.exports = getAgent
-
-function getAgent (uri, opts) {
- const parsedUri = url.parse(typeof uri === 'string' ? uri : uri.url)
- const isHttps = parsedUri.protocol === 'https:'
- const pxuri = getProxyUri(uri, opts)
-
- const key = [
- `https:${isHttps}`,
- pxuri
- ? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}`
- : '>no-proxy<',
- `local-address:${opts.localAddress || '>no-local-address<'}`,
- `strict-ssl:${isHttps ? !!opts.strictSSL : '>no-strict-ssl<'}`,
- `ca:${(isHttps && opts.ca) || '>no-ca<'}`,
- `cert:${(isHttps && opts.cert) || '>no-cert<'}`,
- `key:${(isHttps && opts.key) || '>no-key<'}`
- ].join(':')
-
- if (opts.agent != null) { // `agent: false` has special behavior!
- return opts.agent
- }
-
- if (AGENT_CACHE.peek(key)) {
- return AGENT_CACHE.get(key)
- }
-
- if (pxuri) {
- const proxy = getProxy(pxuri, opts, isHttps)
- AGENT_CACHE.set(key, proxy)
- return proxy
- }
-
- if (isHttps && !HttpsAgent) {
- HttpsAgent = require('agentkeepalive').HttpsAgent
- } else if (!isHttps && !HttpAgent) {
- HttpAgent = require('agentkeepalive')
- }
-
- // If opts.timeout is zero, set the agentTimeout to zero as well. A timeout
- // of zero disables the timeout behavior (OS limits still apply). Else, if
- // opts.timeout is a non-zero value, set it to timeout + 1, to ensure that
- // the node-fetch-npm timeout will always fire first, giving us more
- // consistent errors.
- const agentTimeout = opts.timeout === 0 ? 0 : opts.timeout + 1
-
- const agent = isHttps ? new HttpsAgent({
- maxSockets: opts.maxSockets || 15,
- ca: opts.ca,
- cert: opts.cert,
- key: opts.key,
- localAddress: opts.localAddress,
- rejectUnauthorized: opts.strictSSL,
- timeout: agentTimeout
- }) : new HttpAgent({
- maxSockets: opts.maxSockets || 15,
- localAddress: opts.localAddress,
- timeout: agentTimeout
- })
- AGENT_CACHE.set(key, agent)
- return agent
-}
-
-function checkNoProxy (uri, opts) {
- const host = url.parse(uri).hostname.split('.').reverse()
- let noproxy = (opts.noProxy || getProcessEnv('no_proxy'))
- if (typeof noproxy === 'string') {
- noproxy = noproxy.split(/\s*,\s*/g)
- }
- return noproxy && noproxy.some(no => {
- const noParts = no.split('.').filter(x => x).reverse()
- if (!noParts.length) { return false }
- for (let i = 0; i < noParts.length; i++) {
- if (host[i] !== noParts[i]) {
- return false
- }
- }
- return true
- })
-}
-
-module.exports.getProcessEnv = getProcessEnv
-
-function getProcessEnv (env) {
- if (!env) { return }
-
- let value
-
- if (Array.isArray(env)) {
- for (let e of env) {
- value = process.env[e] ||
- process.env[e.toUpperCase()] ||
- process.env[e.toLowerCase()]
- if (typeof value !== 'undefined') { break }
- }
- }
-
- if (typeof env === 'string') {
- value = process.env[env] ||
- process.env[env.toUpperCase()] ||
- process.env[env.toLowerCase()]
- }
-
- return value
-}
-
-function getProxyUri (uri, opts) {
- const protocol = url.parse(uri).protocol
-
- const proxy = opts.proxy || (
- protocol === 'https:' && getProcessEnv('https_proxy')
- ) || (
- protocol === 'http:' && getProcessEnv(['https_proxy', 'http_proxy', 'proxy'])
- )
- if (!proxy) { return null }
-
- const parsedProxy = (typeof proxy === 'string') ? url.parse(proxy) : proxy
-
- return !checkNoProxy(uri, opts) && parsedProxy
-}
-
-let HttpProxyAgent
-let HttpsProxyAgent
-let SocksProxyAgent
-function getProxy (proxyUrl, opts, isHttps) {
- let popts = {
- host: proxyUrl.hostname,
- port: proxyUrl.port,
- protocol: proxyUrl.protocol,
- path: proxyUrl.path,
- auth: proxyUrl.auth,
- ca: opts.ca,
- cert: opts.cert,
- key: opts.key,
- timeout: opts.timeout === 0 ? 0 : opts.timeout + 1,
- localAddress: opts.localAddress,
- maxSockets: opts.maxSockets || 15,
- rejectUnauthorized: opts.strictSSL
- }
-
- if (proxyUrl.protocol === 'http:' || proxyUrl.protocol === 'https:') {
- if (!isHttps) {
- if (!HttpProxyAgent) {
- HttpProxyAgent = require('http-proxy-agent')
- }
-
- return new HttpProxyAgent(popts)
- } else {
- if (!HttpsProxyAgent) {
- HttpsProxyAgent = require('https-proxy-agent')
- }
-
- return new HttpsProxyAgent(popts)
- }
- }
- if (proxyUrl.protocol.startsWith('socks')) {
- if (!SocksProxyAgent) {
- SocksProxyAgent = require('socks-proxy-agent')
- }
-
- return new SocksProxyAgent(popts)
- }
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/cache.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/cache.js
deleted file mode 100644
index edb9b3d036..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/cache.js
+++ /dev/null
@@ -1,257 +0,0 @@
-'use strict'
-
-const cacache = require('cacache')
-const fetch = require('node-fetch-npm')
-const pipe = require('mississippi').pipe
-const ssri = require('ssri')
-const through = require('mississippi').through
-const to = require('mississippi').to
-const url = require('url')
-const stream = require('stream')
-
-const MAX_MEM_SIZE = 5 * 1024 * 1024 // 5MB
-
-function cacheKey (req) {
- const parsed = url.parse(req.url)
- return `make-fetch-happen:request-cache:${
- url.format({
- protocol: parsed.protocol,
- slashes: parsed.slashes,
- host: parsed.host,
- hostname: parsed.hostname,
- pathname: parsed.pathname
- })
- }`
-}
-
-// This is a cacache-based implementation of the Cache standard,
-// using node-fetch.
-// docs: https://developer.mozilla.org/en-US/docs/Web/API/Cache
-//
-module.exports = class Cache {
- constructor (path, opts) {
- this._path = path
- this._uid = opts && opts.uid
- this._gid = opts && opts.gid
- this.Promise = (opts && opts.Promise) || Promise
- }
-
- // Returns a Promise that resolves to the response associated with the first
- // matching request in the Cache object.
- match (req, opts) {
- opts = opts || {}
- const key = cacheKey(req)
- return cacache.get.info(this._path, key).then(info => {
- return info && cacache.get.hasContent(
- this._path, info.integrity, opts
- ).then(exists => exists && info)
- }).then(info => {
- if (info && info.metadata && matchDetails(req, {
- url: info.metadata.url,
- reqHeaders: new fetch.Headers(info.metadata.reqHeaders),
- resHeaders: new fetch.Headers(info.metadata.resHeaders),
- cacheIntegrity: info.integrity,
- integrity: opts && opts.integrity
- })) {
- const resHeaders = new fetch.Headers(info.metadata.resHeaders)
- addCacheHeaders(resHeaders, this._path, key, info.integrity, info.time)
- if (req.method === 'HEAD') {
- return new fetch.Response(null, {
- url: req.url,
- headers: resHeaders,
- status: 200
- })
- }
- let body
- const cachePath = this._path
- // avoid opening cache file handles until a user actually tries to
- // read from it.
- if (opts.memoize !== false && info.size > MAX_MEM_SIZE) {
- body = new stream.PassThrough()
- const realRead = body._read
- body._read = function (size) {
- body._read = realRead
- pipe(
- cacache.get.stream.byDigest(cachePath, info.integrity, {
- memoize: opts.memoize
- }),
- body,
- err => body.emit(err))
- return realRead.call(this, size)
- }
- } else {
- let readOnce = false
- // cacache is much faster at bulk reads
- body = new stream.Readable({
- read () {
- if (readOnce) return this.push(null)
- readOnce = true
- cacache.get.byDigest(cachePath, info.integrity, {
- memoize: opts.memoize
- }).then(data => {
- this.push(data)
- this.push(null)
- }, err => this.emit('error', err))
- }
- })
- }
- return this.Promise.resolve(new fetch.Response(body, {
- url: req.url,
- headers: resHeaders,
- status: 200,
- size: info.size
- }))
- }
- })
- }
-
- // Takes both a request and its response and adds it to the given cache.
- put (req, response, opts) {
- opts = opts || {}
- const size = response.headers.get('content-length')
- const fitInMemory = !!size && opts.memoize !== false && size < MAX_MEM_SIZE
- const ckey = cacheKey(req)
- const cacheOpts = {
- algorithms: opts.algorithms,
- metadata: {
- url: req.url,
- reqHeaders: req.headers.raw(),
- resHeaders: response.headers.raw()
- },
- uid: this._uid,
- gid: this._gid,
- size,
- memoize: fitInMemory && opts.memoize
- }
- if (req.method === 'HEAD' || response.status === 304) {
- // Update metadata without writing
- return cacache.get.info(this._path, ckey).then(info => {
- // Providing these will bypass content write
- cacheOpts.integrity = info.integrity
- addCacheHeaders(
- response.headers, this._path, ckey, info.integrity, info.time
- )
- return new this.Promise((resolve, reject) => {
- pipe(
- cacache.get.stream.byDigest(this._path, info.integrity, cacheOpts),
- cacache.put.stream(this._path, cacheKey(req), cacheOpts),
- err => err ? reject(err) : resolve(response)
- )
- })
- }).then(() => response)
- }
- let buf = []
- let bufSize = 0
- let cacheTargetStream = false
- const cachePath = this._path
- let cacheStream = to((chunk, enc, cb) => {
- if (!cacheTargetStream) {
- if (fitInMemory) {
- cacheTargetStream =
- to({highWaterMark: MAX_MEM_SIZE}, (chunk, enc, cb) => {
- buf.push(chunk)
- bufSize += chunk.length
- cb()
- }, done => {
- cacache.put(
- cachePath,
- cacheKey(req),
- Buffer.concat(buf, bufSize),
- cacheOpts
- ).then(
- () => done(),
- done
- )
- })
- } else {
- cacheTargetStream =
- cacache.put.stream(cachePath, cacheKey(req), cacheOpts)
- }
- }
- cacheTargetStream.write(chunk, enc, cb)
- }, done => {
- cacheTargetStream ? cacheTargetStream.end(done) : done()
- })
- const oldBody = response.body
- const newBody = through({highWaterMark: fitInMemory && MAX_MEM_SIZE})
- response.body = newBody
- oldBody.once('error', err => newBody.emit('error', err))
- newBody.once('error', err => oldBody.emit('error', err))
- cacheStream.once('error', err => newBody.emit('error', err))
- pipe(oldBody, to((chunk, enc, cb) => {
- cacheStream.write(chunk, enc, () => {
- newBody.write(chunk, enc, cb)
- })
- }, done => {
- cacheStream.end(() => {
- newBody.end(() => {
- done()
- })
- })
- }), err => err && newBody.emit('error', err))
- return response
- }
-
- // Finds the Cache entry whose key is the request, and if found, deletes the
- // Cache entry and returns a Promise that resolves to true. If no Cache entry
- // is found, it returns false.
- 'delete' (req, opts) {
- opts = opts || {}
- if (typeof opts.memoize === 'object') {
- if (opts.memoize.reset) {
- opts.memoize.reset()
- } else if (opts.memoize.clear) {
- opts.memoize.clear()
- } else {
- Object.keys(opts.memoize).forEach(k => {
- opts.memoize[k] = null
- })
- }
- }
- return cacache.rm.entry(
- this._path,
- cacheKey(req)
- // TODO - true/false
- ).then(() => false)
- }
-}
-
-function matchDetails (req, cached) {
- const reqUrl = url.parse(req.url)
- const cacheUrl = url.parse(cached.url)
- const vary = cached.resHeaders.get('Vary')
- // https://tools.ietf.org/html/rfc7234#section-4.1
- if (vary) {
- if (vary.match(/\*/)) {
- return false
- } else {
- const fieldsMatch = vary.split(/\s*,\s*/).every(field => {
- return cached.reqHeaders.get(field) === req.headers.get(field)
- })
- if (!fieldsMatch) {
- return false
- }
- }
- }
- if (cached.integrity) {
- const cachedSri = ssri.parse(cached.cacheIntegrity)
- const sri = ssri.parse(cached.integrity)
- const algo = sri.pickAlgorithm()
- if (cachedSri[algo] && !sri[algo].some(hash => {
- // cachedSri always has exactly one item per algorithm
- return cachedSri[algo][0].digest === hash.digest
- })) {
- return false
- }
- }
- reqUrl.hash = null
- cacheUrl.hash = null
- return url.format(reqUrl) === url.format(cacheUrl)
-}
-
-function addCacheHeaders (resHeaders, path, key, hash, time) {
- resHeaders.set('X-Local-Cache', encodeURIComponent(path))
- resHeaders.set('X-Local-Cache-Key', encodeURIComponent(key))
- resHeaders.set('X-Local-Cache-Hash', encodeURIComponent(hash))
- resHeaders.set('X-Local-Cache-Time', new Date(time).toUTCString())
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/index.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/index.js
deleted file mode 100644
index 0f2c164e19..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/index.js
+++ /dev/null
@@ -1,482 +0,0 @@
-'use strict'
-
-let Cache
-const url = require('url')
-const CachePolicy = require('http-cache-semantics')
-const fetch = require('node-fetch-npm')
-const pkg = require('./package.json')
-const retry = require('promise-retry')
-let ssri
-const Stream = require('stream')
-const getAgent = require('./agent')
-const setWarning = require('./warning')
-
-const isURL = /^https?:/
-const USER_AGENT = `${pkg.name}/${pkg.version} (+https://npm.im/${pkg.name})`
-
-const RETRY_ERRORS = [
- 'ECONNRESET', // remote socket closed on us
- 'ECONNREFUSED', // remote host refused to open connection
- 'EADDRINUSE', // failed to bind to a local port (proxy?)
- 'ETIMEDOUT' // someone in the transaction is WAY TOO SLOW
- // Known codes we do NOT retry on:
- // ENOTFOUND (getaddrinfo failure. Either bad hostname, or offline)
-]
-
-const RETRY_TYPES = [
- 'request-timeout'
-]
-
-// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch
-module.exports = cachingFetch
-cachingFetch.defaults = function (_uri, _opts) {
- const fetch = this
- if (typeof _uri === 'object') {
- _opts = _uri
- _uri = null
- }
-
- function defaultedFetch (uri, opts) {
- const finalOpts = Object.assign({}, _opts || {}, opts || {})
- return fetch(uri || _uri, finalOpts)
- }
-
- defaultedFetch.defaults = fetch.defaults
- defaultedFetch.delete = fetch.delete
- return defaultedFetch
-}
-
-cachingFetch.delete = cacheDelete
-function cacheDelete (uri, opts) {
- opts = configureOptions(opts)
- if (opts.cacheManager) {
- const req = new fetch.Request(uri, {
- method: opts.method,
- headers: opts.headers
- })
- return opts.cacheManager.delete(req, opts)
- }
-}
-
-function initializeCache (opts) {
- if (typeof opts.cacheManager === 'string') {
- if (!Cache) {
- // Default cacache-based cache
- Cache = require('./cache')
- }
-
- opts.cacheManager = new Cache(opts.cacheManager, opts)
- }
-
- opts.cache = opts.cache || 'default'
-
- if (opts.cache === 'default' && isHeaderConditional(opts.headers)) {
- // If header list contains `If-Modified-Since`, `If-None-Match`,
- // `If-Unmodified-Since`, `If-Match`, or `If-Range`, fetch will set cache
- // mode to "no-store" if it is "default".
- opts.cache = 'no-store'
- }
-}
-
-function configureOptions (_opts) {
- const opts = Object.assign({}, _opts || {})
- opts.method = (opts.method || 'GET').toUpperCase()
-
- if (opts.retry && typeof opts.retry === 'number') {
- opts.retry = { retries: opts.retry }
- }
-
- if (opts.retry === false) {
- opts.retry = { retries: 0 }
- }
-
- if (opts.cacheManager) {
- initializeCache(opts)
- }
-
- return opts
-}
-
-function initializeSsri () {
- if (!ssri) {
- ssri = require('ssri')
- }
-}
-
-function cachingFetch (uri, _opts) {
- const opts = configureOptions(_opts)
-
- if (opts.integrity) {
- initializeSsri()
- // if verifying integrity, node-fetch must not decompress
- opts.compress = false
- }
-
- const isCachable = (opts.method === 'GET' || opts.method === 'HEAD') &&
- opts.cacheManager &&
- opts.cache !== 'no-store' &&
- opts.cache !== 'reload'
-
- if (isCachable) {
- const req = new fetch.Request(uri, {
- method: opts.method,
- headers: opts.headers
- })
-
- return opts.cacheManager.match(req, opts).then(res => {
- if (res) {
- const warningCode = (res.headers.get('Warning') || '').match(/^\d+/)
- if (warningCode && +warningCode >= 100 && +warningCode < 200) {
- // https://tools.ietf.org/html/rfc7234#section-4.3.4
- //
- // If a stored response is selected for update, the cache MUST:
- //
- // * delete any Warning header fields in the stored response with
- // warn-code 1xx (see Section 5.5);
- //
- // * retain any Warning header fields in the stored response with
- // warn-code 2xx;
- //
- res.headers.delete('Warning')
- }
-
- if (opts.cache === 'default' && !isStale(req, res)) {
- return res
- }
-
- if (opts.cache === 'default' || opts.cache === 'no-cache') {
- return conditionalFetch(req, res, opts)
- }
-
- if (opts.cache === 'force-cache' || opts.cache === 'only-if-cached') {
- // 112 Disconnected operation
- // SHOULD be included if the cache is intentionally disconnected from
- // the rest of the network for a period of time.
- // (https://tools.ietf.org/html/rfc2616#section-14.46)
- setWarning(res, 112, 'Disconnected operation')
- return res
- }
- }
-
- if (!res && opts.cache === 'only-if-cached') {
- const errorMsg = `request to ${
- uri
- } failed: cache mode is 'only-if-cached' but no cached response available.`
-
- const err = new Error(errorMsg)
- err.code = 'ENOTCACHED'
- throw err
- }
-
- // Missing cache entry, or mode is default (if stale), reload, no-store
- return remoteFetch(req.url, opts)
- })
- }
-
- return remoteFetch(uri, opts)
-}
-
-function iterableToObject (iter) {
- const obj = {}
- for (let k of iter.keys()) {
- obj[k] = iter.get(k)
- }
- return obj
-}
-
-function makePolicy (req, res) {
- const _req = {
- url: req.url,
- method: req.method,
- headers: iterableToObject(req.headers)
- }
- const _res = {
- status: res.status,
- headers: iterableToObject(res.headers)
- }
-
- return new CachePolicy(_req, _res, { shared: false })
-}
-
-// https://tools.ietf.org/html/rfc7234#section-4.2
-function isStale (req, res) {
- if (!res) {
- return null
- }
-
- const _req = {
- url: req.url,
- method: req.method,
- headers: iterableToObject(req.headers)
- }
-
- const policy = makePolicy(req, res)
-
- const responseTime = res.headers.get('x-local-cache-time') ||
- res.headers.get('date') ||
- 0
-
- policy._responseTime = new Date(responseTime)
-
- const bool = !policy.satisfiesWithoutRevalidation(_req)
- return bool
-}
-
-function mustRevalidate (res) {
- return (res.headers.get('cache-control') || '').match(/must-revalidate/i)
-}
-
-function conditionalFetch (req, cachedRes, opts) {
- const _req = {
- url: req.url,
- method: req.method,
- headers: Object.assign({}, opts.headers || {})
- }
-
- const policy = makePolicy(req, cachedRes)
- opts.headers = policy.revalidationHeaders(_req)
-
- return remoteFetch(req.url, opts)
- .then(condRes => {
- const revalidatedPolicy = policy.revalidatedPolicy(_req, {
- status: condRes.status,
- headers: iterableToObject(condRes.headers)
- })
-
- if (condRes.status >= 500 && !mustRevalidate(cachedRes)) {
- // 111 Revalidation failed
- // MUST be included if a cache returns a stale response because an
- // attempt to revalidate the response failed, due to an inability to
- // reach the server.
- // (https://tools.ietf.org/html/rfc2616#section-14.46)
- setWarning(cachedRes, 111, 'Revalidation failed')
- return cachedRes
- }
-
- if (condRes.status === 304) { // 304 Not Modified
- condRes.body = cachedRes.body
- return opts.cacheManager.put(req, condRes, opts)
- .then(newRes => {
- newRes.headers = new fetch.Headers(revalidatedPolicy.policy.responseHeaders())
- return newRes
- })
- }
-
- return condRes
- })
- .then(res => res)
- .catch(err => {
- if (mustRevalidate(cachedRes)) {
- throw err
- } else {
- // 111 Revalidation failed
- // MUST be included if a cache returns a stale response because an
- // attempt to revalidate the response failed, due to an inability to
- // reach the server.
- // (https://tools.ietf.org/html/rfc2616#section-14.46)
- setWarning(cachedRes, 111, 'Revalidation failed')
- // 199 Miscellaneous warning
- // The warning text MAY include arbitrary information to be presented to
- // a human user, or logged. A system receiving this warning MUST NOT take
- // any automated action, besides presenting the warning to the user.
- // (https://tools.ietf.org/html/rfc2616#section-14.46)
- setWarning(
- cachedRes,
- 199,
- `Miscellaneous Warning ${err.code}: ${err.message}`
- )
-
- return cachedRes
- }
- })
-}
-
-function remoteFetchHandleIntegrity (res, integrity) {
- const oldBod = res.body
- const newBod = ssri.integrityStream({
- integrity
- })
- oldBod.pipe(newBod)
- res.body = newBod
- oldBod.once('error', err => {
- newBod.emit('error', err)
- })
- newBod.once('error', err => {
- oldBod.emit('error', err)
- })
-}
-
-function remoteFetch (uri, opts) {
- const agent = getAgent(uri, opts)
- const headers = Object.assign({
- 'connection': agent ? 'keep-alive' : 'close',
- 'user-agent': USER_AGENT
- }, opts.headers || {})
-
- const reqOpts = {
- agent,
- body: opts.body,
- compress: opts.compress,
- follow: opts.follow,
- headers: new fetch.Headers(headers),
- method: opts.method,
- redirect: 'manual',
- size: opts.size,
- counter: opts.counter,
- timeout: opts.timeout
- }
-
- return retry(
- (retryHandler, attemptNum) => {
- const req = new fetch.Request(uri, reqOpts)
- return fetch(req)
- .then(res => {
- res.headers.set('x-fetch-attempts', attemptNum)
-
- if (opts.integrity) {
- remoteFetchHandleIntegrity(res, opts.integrity)
- }
-
- const isStream = req.body instanceof Stream
-
- if (opts.cacheManager) {
- const isMethodGetHead = req.method === 'GET' ||
- req.method === 'HEAD'
-
- const isCachable = opts.cache !== 'no-store' &&
- isMethodGetHead &&
- makePolicy(req, res).storable() &&
- res.status === 200 // No other statuses should be stored!
-
- if (isCachable) {
- return opts.cacheManager.put(req, res, opts)
- }
-
- if (!isMethodGetHead) {
- return opts.cacheManager.delete(req).then(() => {
- if (res.status >= 500 && req.method !== 'POST' && !isStream) {
- if (typeof opts.onRetry === 'function') {
- opts.onRetry(res)
- }
-
- return retryHandler(res)
- }
-
- return res
- })
- }
- }
-
- const isRetriable = req.method !== 'POST' &&
- !isStream && (
- res.status === 408 || // Request Timeout
- res.status === 420 || // Enhance Your Calm (usually Twitter rate-limit)
- res.status === 429 || // Too Many Requests ("standard" rate-limiting)
- res.status >= 500 // Assume server errors are momentary hiccups
- )
-
- if (isRetriable) {
- if (typeof opts.onRetry === 'function') {
- opts.onRetry(res)
- }
-
- return retryHandler(res)
- }
-
- if (!fetch.isRedirect(res.status) || opts.redirect === 'manual') {
- return res
- }
-
- // handle redirects - matches behavior of npm-fetch: https://github.com/bitinn/node-fetch
- if (opts.redirect === 'error') {
- const err = new Error(`redirect mode is set to error: ${uri}`)
- err.code = 'ENOREDIRECT'
- throw err
- }
-
- if (!res.headers.get('location')) {
- const err = new Error(`redirect location header missing at: ${uri}`)
- err.code = 'EINVALIDREDIRECT'
- throw err
- }
-
- if (req.counter >= req.follow) {
- const err = new Error(`maximum redirect reached at: ${uri}`)
- err.code = 'EMAXREDIRECT'
- throw err
- }
-
- const resolvedUrl = url.resolve(req.url, res.headers.get('location'))
- let redirectURL = url.parse(resolvedUrl)
-
- if (isURL.test(res.headers.get('location'))) {
- redirectURL = url.parse(res.headers.get('location'))
- }
-
- // Remove authorization if changing hostnames (but not if just
- // changing ports or protocols). This matches the behavior of request:
- // https://github.com/request/request/blob/b12a6245/lib/redirect.js#L134-L138
- if (url.parse(req.url).hostname !== redirectURL.hostname) {
- req.headers.delete('authorization')
- }
-
- // for POST request with 301/302 response, or any request with 303 response,
- // use GET when following redirect
- if (res.status === 303 ||
- ((res.status === 301 || res.status === 302) && req.method === 'POST')) {
- opts.method = 'GET'
- opts.body = null
- req.headers.delete('content-length')
- }
-
- opts.headers = {}
- req.headers.forEach((value, name) => {
- opts.headers[name] = value
- })
-
- opts.counter = ++req.counter
- return cachingFetch(resolvedUrl, opts)
- })
- .catch(err => {
- const code = err.code === 'EPROMISERETRY' ? err.retried.code : err.code
-
- const isRetryError = RETRY_ERRORS.indexOf(code) === -1 &&
- RETRY_TYPES.indexOf(err.type) === -1
-
- if (req.method === 'POST' || isRetryError) {
- throw err
- }
-
- if (typeof opts.onRetry === 'function') {
- opts.onRetry(err)
- }
-
- return retryHandler(err)
- })
- },
- opts.retry
- ).catch(err => {
- if (err.status >= 400) {
- return err
- }
-
- throw err
- })
-}
-
-function isHeaderConditional (headers) {
- if (!headers || typeof headers !== 'object') {
- return false
- }
-
- const modifiers = [
- 'if-modified-since',
- 'if-none-match',
- 'if-unmodified-since',
- 'if-match',
- 'if-range'
- ]
-
- return Object.keys(headers)
- .some(h => modifiers.indexOf(h.toLowerCase()) !== -1)
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/package.json
deleted file mode 100644
index ff28e528a7..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/package.json
+++ /dev/null
@@ -1,95 +0,0 @@
-{
- "_from": "make-fetch-happen@^3.0.0",
- "_id": "make-fetch-happen@3.0.0",
- "_inBundle": false,
- "_integrity": "sha512-FmWY7gC0mL6Z4N86vE14+m719JKE4H0A+pyiOH18B025gF/C113pyfb4gHDDYP5cqnRMHOz06JGdmffC/SES+w==",
- "_location": "/npm-registry-fetch/make-fetch-happen",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "make-fetch-happen@^3.0.0",
- "name": "make-fetch-happen",
- "escapedName": "make-fetch-happen",
- "rawSpec": "^3.0.0",
- "saveSpec": null,
- "fetchSpec": "^3.0.0"
- },
- "_requiredBy": [
- "/npm-registry-fetch"
- ],
- "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-3.0.0.tgz",
- "_shasum": "7b661d2372fc4710ab5cc8e1fa3c290eea69a961",
- "_spec": "make-fetch-happen@^3.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-fetch",
- "author": {
- "name": "Kat Marchán",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/zkat/make-fetch-happen/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "agentkeepalive": "^3.4.1",
- "cacache": "^10.0.4",
- "http-cache-semantics": "^3.8.1",
- "http-proxy-agent": "^2.1.0",
- "https-proxy-agent": "^2.2.0",
- "lru-cache": "^4.1.2",
- "mississippi": "^3.0.0",
- "node-fetch-npm": "^2.0.2",
- "promise-retry": "^1.1.1",
- "socks-proxy-agent": "^3.0.1",
- "ssri": "^5.2.4"
- },
- "deprecated": false,
- "description": "Opinionated, caching, retrying fetch client",
- "devDependencies": {
- "bluebird": "^3.5.1",
- "mkdirp": "^0.5.1",
- "nock": "^9.2.3",
- "npmlog": "^4.1.2",
- "nyc": "^11.4.1",
- "require-inject": "^1.4.2",
- "rimraf": "^2.6.2",
- "safe-buffer": "^5.1.1",
- "standard": "^11.0.0",
- "standard-version": "^4.3.0",
- "tacks": "^1.2.6",
- "tap": "^11.1.2",
- "weallbehave": "^1.0.0",
- "weallcontribute": "^1.0.7"
- },
- "files": [
- "*.js",
- "lib"
- ],
- "homepage": "https://github.com/zkat/make-fetch-happen#readme",
- "keywords": [
- "http",
- "request",
- "fetch",
- "mean girls",
- "caching",
- "cache",
- "subresource integrity"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "make-fetch-happen",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zkat/make-fetch-happen.git"
- },
- "scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard",
- "release": "standard-version -s",
- "test": "nyc --all -- tap --timeout=35 -J test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "3.0.0"
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/warning.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/warning.js
deleted file mode 100644
index b8f13cf831..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen/warning.js
+++ /dev/null
@@ -1,24 +0,0 @@
-const url = require('url')
-
-module.exports = setWarning
-
-function setWarning (reqOrRes, code, message, replace) {
- // Warning = "Warning" ":" 1#warning-value
- // warning-value = warn-code SP warn-agent SP warn-text [SP warn-date]
- // warn-code = 3DIGIT
- // warn-agent = ( host [ ":" port ] ) | pseudonym
- // ; the name or pseudonym of the server adding
- // ; the Warning header, for use in debugging
- // warn-text = quoted-string
- // warn-date = <"> HTTP-date <">
- // (https://tools.ietf.org/html/rfc2616#section-14.46)
- const host = url.parse(reqOrRes.url).host
- const jsonMessage = JSON.stringify(message)
- const jsonDate = JSON.stringify(new Date().toUTCString())
- const header = replace ? 'set' : 'append'
-
- reqOrRes.headers[header](
- 'Warning',
- `${code} ${host} ${jsonMessage} ${jsonDate}`
- )
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/.travis.yml b/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/.travis.yml
deleted file mode 100644
index 17f94330e7..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
-
-script: "npm test"
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/README.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/README.md
deleted file mode 100644
index 5029b27d68..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/README.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# 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/npm-registry-fetch/node_modules/pump/index.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/index.js
deleted file mode 100644
index d9ca0335cb..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/index.js
+++ /dev/null
@@ -1,82 +0,0 @@
-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/npm-registry-fetch/node_modules/pump/package.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/package.json
deleted file mode 100644
index 4a3008e488..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "_from": "pump@^2.0.1",
- "_id": "pump@2.0.1",
- "_inBundle": false,
- "_integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
- "_location": "/npm-registry-fetch/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": [
- "/npm-registry-fetch/cacache/mississippi"
- ],
- "_resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
- "_shasum": "12399add6e4cf7526d973cbc8b5ce2e2908b3909",
- "_spec": "pump@^2.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-fetch/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/npm-registry-fetch/node_modules/pump/test-browser.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/test-browser.js
deleted file mode 100644
index 75ea4a292e..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/test-browser.js
+++ /dev/null
@@ -1,62 +0,0 @@
-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/npm-registry-fetch/node_modules/pump/test-node.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/test-node.js
deleted file mode 100644
index 034a65414d..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/pump/test-node.js
+++ /dev/null
@@ -1,53 +0,0 @@
-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/npm-registry-fetch/node_modules/smart-buffer/.npmignore b/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/.npmignore
deleted file mode 100644
index 6bcbf6f77d..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.git*
-.idea*
-node_modules/
-npm-debug.log
-coverage \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/.travis.yml b/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/.travis.yml
deleted file mode 100644
index 9d67de5878..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: node_js
-node_js:
- - 0.10
- - 0.12
- - 4
- - 6
- - stable
-
-script: "npm run coverage"
-# Send coverage data to Coveralls
-after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/LICENSE b/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/LICENSE
deleted file mode 100644
index b2442a9e71..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Josh Glazebrook
-
-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/npm-registry-fetch/node_modules/smart-buffer/README.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/README.md
deleted file mode 100644
index 178ce8827f..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/README.md
+++ /dev/null
@@ -1,307 +0,0 @@
-smart-buffer [![Build Status](https://travis-ci.org/JoshGlazebrook/smart-buffer.svg?branch=master)](https://travis-ci.org/JoshGlazebrook/smart-buffer) [![Coverage Status](https://coveralls.io/repos/github/JoshGlazebrook/smart-buffer/badge.svg?branch=master)](https://coveralls.io/github/JoshGlazebrook/smart-buffer?branch=master)
-=============
-
-smart-buffer is a light Buffer wrapper that takes away the need to keep track of what position to read and write data to and from the underlying Buffer. It also adds null terminating string operations and **grows** as you add more data.
-
-
-### What it's useful for:
-
-I created smart-buffer because I wanted to simplify the process of using Buffer for building and reading network packets to send over a socket. Rather than having to keep track of which position I need to write a UInt16 to after adding a string of variable length, I simply don't have to.
-
-Key Features:
-* Proxies all of the Buffer write and read functions.
-* Keeps track of read and write positions for you.
-* Grows the internal Buffer as you add data to it.
-* Useful string operations. (Null terminating strings)
-* Allows for inserting values at specific points in the internal Buffer.
-
-#### Note:
-smart-buffer can be used for writing to an underlying buffer as well as reading from it. It however does not function correctly if you're mixing both read and write operations with each other.
-
-## Installing:
-
-`npm install smart-buffer`
-
-## Using smart-buffer
-
-### Example
-
-Say you were building a packet that had to conform to the following protocol:
-
-`[PacketType:2][PacketLength:2][Data:XX]`
-
-To build this packet using the vanilla Buffer class, you would have to count up the length of the data payload beforehand. You would also need to keep track of the current "cursor" position in your Buffer so you write everything in the right places. With smart-buffer you don't have to do either of those things.
-
-```javascript
-function createLoginPacket(username, password, age, country) {
- var packet = new SmartBuffer();
- packet.writeUInt16LE(0x0060); // Login Packet Type/ID
- packet.writeStringNT(username);
- packet.writeStringNT(password);
- packet.writeUInt8(age);
- packet.writeStringNT(country);
- packet.writeUInt16LE(packet.length - 2, 2);
-
- return packet.toBuffer();
-}
-```
-With the above function, you now can do this:
-```javascript
-var login = createLoginPacket("Josh", "secret123", 22, "United States");
-
-// <Buffer 60 00 1e 00 4a 6f 73 68 00 73 65 63 72 65 74 31 32 33 00 16 55 6e 69 74 65 64 20 53 74 61 74 65 73 00>
-```
-Notice that the `[PacketLength:2]` part of the packet was inserted after we had added everything else, and as shown in the Buffer dump above, is in the correct location along with everything else.
-
-Reading back the packet we created above is just as easy:
-```javascript
-
-var reader = new SmartBuffer(login);
-
-var logininfo = {
- packetType: reader.readUInt16LE(),
- packetLength: reader.readUInt16LE(),
- username: reader.readStringNT(),
- password: reader.readStringNT(),
- age: reader.readUInt8(),
- country: reader.readStringNT()
-};
-
-/*
-{
- packetType: 96, (0x0060)
- packetLength: 30,
- username: 'Josh',
- password: 'secret123',
- age: 22,
- country: 'United States'
-};
-*/
-```
-
-# Api Reference:
-
-### Constructing a smart-buffer
-
-smart-buffer has a few different constructor signatures you can use. By default, utf8 encoding is used, and the internal Buffer length will be 4096. When reading from a Buffer, smart-buffer does NOT make a copy of the Buffer. It reads from the Buffer it was given.
-
-```javascript
-var SmartBuffer = require('smart-buffer');
-
-// Reading from an existing Buffer:
-var reader = new SmartBuffer(buffer);
-var reader = new SmartBuffer(buffer, 'ascii');
-
-// Writing to a new Buffer:
-var writer = new SmartBuffer(); // Defaults to utf8, 4096 length internal Buffer.
-var writer = new SmartBuffer(1024); // Defaults to utf8, 1024 length internal Buffer.
-var writer = new SmartBuffer('ascii'); // Sets to ascii encoding, 4096 length internal buffer.
-var writer = new SmartBuffer(1024, 'ascii'); // Sets to ascii encoding, 1024 length internal buffer.
-```
-
-## Reading Data
-
-smart-buffer supports all of the common read functions you will find in the vanilla Buffer class. The only difference is, you do not need to specify which location to start reading from. This is possible because as you read data out of a smart-buffer, it automatically progresses an internal read offset/position to know where to pick up from on the next read.
-
-## Reading Numeric Values
-
-When numeric values, you simply need to call the function you want, and the data is returned.
-
-Supported Operations:
-* readInt8
-* readInt16BE
-* readInt16LE
-* readInt32BE
-* readInt32LE
-* readUInt8
-* readUInt16BE
-* readUInt16LE
-* readUInt32BE
-* readUInt32LE
-* readFloatBE
-* readFloatLE
-* readDoubleBE
-* readDoubleLE
-
-```javascript
-var reader = new SmartBuffer(somebuffer);
-var num = reader.readInt8();
-```
-
-## Reading String Values
-
-When reading String values, you can either choose to read a null terminated string, or a string of a specified length.
-
-### SmartBuffer.readStringNT( [encoding] )
-> `String` **String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
-
-returns `String`
-
-> Note: When readStringNT is called and there is no null character found, smart-buffer will read to the end of the internal Buffer.
-
-### SmartBuffer.readString( [length], [encoding] )
-### SmartBuffer.readString( [length] )
-### SmartBuffer.readString( [encoding] )
-> `Number` **Length of the string to read**
-
-> `String` **String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
-
-returns `String`
-
-> Note: When readString is called without a specified length, smart-buffer will read to the end of the internal Buffer.
-
-
-
-## Reading Buffer Values
-
-### SmartBuffer.readBuffer( length )
-> `Number` **Length of data to read into a Buffer**
-
-returns `Buffer`
-
-> Note: This function uses `slice` to retrieve the Buffer.
-
-
-### SmartBuffer.readBufferNT()
-
-returns `Buffer`
-
-> Note: This reads the next sequence of bytes in the buffer until a null (0x00) value is found. (Null terminated buffer)
-> Note: This function uses `slice` to retrieve the Buffer.
-
-
-## Writing Data
-
-smart-buffer supports all of the common write functions you will find in the vanilla Buffer class. The only difference is, you do not need to specify which location to write to in your Buffer by default. You do however have the option of **inserting** a piece of data into your smart-buffer at a given location.
-
-
-## Writing Numeric Values
-
-
-For numeric values, you simply need to call the function you want, and the data is written at the end of the internal Buffer's current write position. You can specify a offset/position to **insert** the given value at, but keep in mind this does not override data at the given position. This feature also does not work properly when inserting a value beyond the current internal length of the smart-buffer (length being the .length property of the smart-buffer instance you're writing to)
-
-Supported Operations:
-* writeInt8
-* writeInt16BE
-* writeInt16LE
-* writeInt32BE
-* writeInt32LE
-* writeUInt8
-* writeUInt16BE
-* writeUInt16LE
-* writeUInt32BE
-* writeUInt32LE
-* writeFloatBE
-* writeFloatLE
-* writeDoubleBE
-* writeDoubleLE
-
-The following signature is the same for all the above functions:
-
-### SmartBuffer.writeInt8( value, [offset] )
-> `Number` **A valid Int8 number**
-
-> `Number` **The position to insert this value at**
-
-returns this
-
-> Note: All write operations return `this` to allow for chaining.
-
-## Writing String Values
-
-When reading String values, you can either choose to write a null terminated string, or a non null terminated string.
-
-### SmartBuffer.writeStringNT( value, [offset], [encoding] )
-### SmartBuffer.writeStringNT( value, [offset] )
-### SmartBuffer.writeStringNT( value, [encoding] )
-> `String` **String value to write**
-
-> `Number` **The position to insert this String at**
-
-> `String` **The String encoding to use.** - Defaults to the encoding set in the constructor, or utf8.
-
-returns this
-
-### SmartBuffer.writeString( value, [offset], [encoding] )
-### SmartBuffer.writeString( value, [offset] )
-### SmartBuffer.writeString( value, [encoding] )
-> `String` **String value to write**
-
-> `Number` **The position to insert this String at**
-
-> `String` **The String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
-
-returns this
-
-
-## Writing Buffer Values
-
-### SmartBuffer.writeBuffer( value, [offset] )
-> `Buffer` **Buffer value to write**
-
-> `Number` **The position to insert this Buffer's content at**
-
-returns this
-
-### SmartBuffer.writeBufferNT( value, [offset] )
-> `Buffer` **Buffer value to write**
-
-> `Number` **The position to insert this Buffer's content at**
-
-returns this
-
-
-## Utility Functions
-
-### SmartBuffer.clear()
-Resets the SmartBuffer to its default state where it can be reused for reading or writing.
-
-### SmartBuffer.remaining()
-
-returns `Number` The amount of data left to read based on the current read Position.
-
-### SmartBuffer.skip( value )
-> `Number` **The amount of bytes to skip ahead**
-
-Skips the read position ahead by the given value.
-
-returns this
-
-### SmartBuffer.rewind( value )
-> `Number` **The amount of bytes to reward backwards**
-
-Rewinds the read position backwards by the given value.
-
-returns this
-
-### SmartBuffer.skipTo( position )
-> `Number` **The point to skip the read position to**
-
-Moves the read position to the given point.
-returns this
-
-### SmartBuffer.toBuffer()
-
-returns `Buffer` A Buffer containing the contents of the internal Buffer.
-
-> Note: This uses the slice function.
-
-### SmartBuffer.toString( [encoding] )
-> `String` **The String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
-
-returns `String` The internal Buffer in String representation.
-
-### SmartBuffer.destroy()
-Attempts to destroy the smart-buffer.
-
-returns this
-
-## Properties
-
-### SmartBuffer.length
-
-returns `Number` **The length of the data that is being tracked in the internal Buffer** - Does NOT return the absolute length of the internal Buffer being written to.
-
-## License
-
-This work is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License). \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/build/smartbuffer.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/build/smartbuffer.js
deleted file mode 100644
index ef53b9fd4d..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/build/smartbuffer.js
+++ /dev/null
@@ -1,726 +0,0 @@
-"use strict";
-// The default Buffer size if one is not provided.
-const DEFAULT_SMARTBUFFER_SIZE = 4096;
-// The default string encoding to use for reading/writing strings.
-const DEFAULT_SMARTBUFFER_ENCODING = 'utf8';
-class SmartBuffer {
- /**
- * Creates a new SmartBuffer instance.
- *
- * @param arg1 { Number | BufferEncoding | Buffer | SmartBufferOptions }
- * @param arg2 { BufferEncoding }
- */
- constructor(arg1, arg2) {
- this.length = 0;
- this.encoding = DEFAULT_SMARTBUFFER_ENCODING;
- this.writeOffset = 0;
- this.readOffset = 0;
- // Initial buffer size provided
- if (typeof arg1 === 'number') {
- if (Number.isFinite(arg1) && Number.isInteger(arg1) && arg1 > 0) {
- this.buff = Buffer.allocUnsafe(arg1);
- }
- else {
- throw new Error('Invalid size provided. Size must be a valid integer greater than zero.');
- }
- }
- else if (typeof arg1 === 'string') {
- if (Buffer.isEncoding(arg1)) {
- this.buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE);
- this.encoding = arg1;
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- else if (arg1 instanceof Buffer) {
- this.buff = arg1;
- this.length = arg1.length;
- }
- else if (SmartBuffer.isSmartBufferOptions(arg1)) {
- // Checks for encoding
- if (arg1.encoding) {
- if (Buffer.isEncoding(arg1.encoding)) {
- this.encoding = arg1.encoding;
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- // Checks for initial size length
- if (arg1.size) {
- if (Number.isFinite(arg1.size) && Number.isInteger(arg1.size) && arg1.size > 0) {
- this.buff = Buffer.allocUnsafe(arg1.size);
- }
- else {
- throw new Error('Invalid size provided. Size must be a valid integer greater than zero.');
- }
- }
- else if (arg1.buff) {
- if (arg1.buff instanceof Buffer) {
- this.buff = arg1.buff;
- this.length = arg1.buff.length;
- }
- else {
- throw new Error('Invalid buffer provided in SmartBufferOptions.');
- }
- }
- else {
- this.buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE);
- }
- }
- else if (typeof arg1 === 'object') {
- throw new Error('Invalid object supplied to SmartBuffer constructor.');
- }
- else {
- this.buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE);
- }
- // Check for encoding (Buffer, Encoding) constructor.
- if (typeof arg2 === 'string') {
- if (Buffer.isEncoding(arg2)) {
- this.encoding = arg2;
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- }
- /**
- * Creates a new SmartBuffer instance with the provided internal Buffer size and optional encoding.
- *
- * @param size { Number } The size of the internal Buffer.
- * @param encoding { String } The BufferEncoding to use for strings.
- *
- * @return { SmartBuffer }
- */
- static fromSize(size, encoding) {
- return new this({
- size: size,
- encoding: encoding
- });
- }
- /**
- * Creates a new SmartBuffer instance with the provided Buffer and optional encoding.
- *
- * @param buffer { Buffer } The Buffer to use as the internal Buffer value.
- * @param encoding { String } The BufferEncoding to use for strings.
- *
- * @return { SmartBuffer }
- */
- static fromBuffer(buff, encoding) {
- return new this({
- buff: buff,
- encoding: encoding
- });
- }
- /**
- * Creates a new SmartBuffer instance with the provided SmartBufferOptions options.
- *
- * @param options { SmartBufferOptions } The options to use when creating the SmartBuffer instance.
- */
- static fromOptions(options) {
- return new this(options);
- }
- /**
- * Ensures that the internal Buffer is large enough to write data.
- *
- * @param minLength { Number } The minimum length of the data that needs to be written.
- * @param offset { Number } The offset of the data to be written.
- */
- ensureWriteable(minLength, offset) {
- const offsetVal = typeof offset === 'number' ? offset : 0;
- // Ensure there is enough internal Buffer capacity.
- this.ensureCapacity(this.length + minLength + offsetVal);
- // If offset is provided, copy data into appropriate location in regards to the offset.
- if (typeof offset === 'number') {
- this.buff.copy(this.buff, offsetVal + minLength, offsetVal, this.buff.length);
- }
- // Adjust instance length.
- this.length = Math.max(this.length + minLength, offsetVal + minLength);
- }
- /**
- * Ensures that the internal Buffer is large enough to write at least the given amount of data.
- *
- * @param minLength { Number } The minimum length of the data needs to be written.
- */
- ensureCapacity(minLength) {
- const oldLength = this.buff.length;
- if (minLength > oldLength) {
- let data = this.buff;
- let newLength = (oldLength * 3) / 2 + 1;
- if (newLength < minLength) {
- newLength = minLength;
- }
- this.buff = Buffer.allocUnsafe(newLength);
- data.copy(this.buff, 0, 0, oldLength);
- }
- }
- /**
- * Reads a numeric number value using the provided function.
- *
- * @param func { Function(offset: number) => number } The function to read data on the internal Buffer with.
- * @param byteSize { Number } The number of bytes read.
- *
- * @param { Number }
- */
- readNumberValue(func, byteSize) {
- // Call Buffer.readXXXX();
- const value = func.call(this.buff, this.readOffset);
- // Adjust internal read offset
- this.readOffset += byteSize;
- return value;
- }
- /**
- * Writes a numeric number value using the provided function.
- *
- * @param func { Function(offset: number, offset?) => number} The function to write data on the internal Buffer with.
- * @param byteSize { Number } The number of bytes written.
- * @param value { Number } The number value to write.
- * @param offset { Number } the offset to write the number at.
- *
- */
- writeNumberValue(func, byteSize, value, offset) {
- const offsetVal = typeof offset === 'number' ? offset : this.writeOffset;
- // Ensure there is enough internal Buffer capacity. (raw offset is passed)
- this.ensureWriteable(byteSize, offset);
- // Call buffer.writeXXXX();
- func.call(this.buff, value, offsetVal);
- // Adjusts internal write offset
- this.writeOffset += byteSize;
- }
- // Signed integers
- /**
- * Reads an Int8 value from the current read position.
- *
- * @return { Number }
- */
- readInt8() {
- return this.readNumberValue(Buffer.prototype.readUInt8, 1);
- }
- /**
- * Reads an Int16BE value from the current read position.
- *
- * @return { Number }
- */
- readInt16BE() {
- return this.readNumberValue(Buffer.prototype.readUInt16BE, 2);
- }
- /**
- * Reads an Int16LE value from the current read position.
- *
- * @return { Number }
- */
- readInt16LE() {
- return this.readNumberValue(Buffer.prototype.readUInt16LE, 2);
- }
- /**
- * Reads an Int32BE value from the current read position.
- *
- * @return { Number }
- */
- readInt32BE() {
- return this.readNumberValue(Buffer.prototype.readUInt32BE, 4);
- }
- /**
- * Reads an Int32LE value from the current read position.
- *
- * @return { Number }
- */
- readInt32LE() {
- return this.readNumberValue(Buffer.prototype.readUInt32LE, 4);
- }
- /**
- * Writes an Int8 value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeInt8(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeInt8, 1, value, offset);
- return this;
- }
- /**
- * Writes an Int16BE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeInt16BE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset);
- return this;
- }
- /**
- * Writes an Int16LE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeInt16LE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset);
- return this;
- }
- /**
- * Writes an Int32BE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeInt32BE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset);
- return this;
- }
- /**
- * Writes an Int32LE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeInt32LE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset);
- return this;
- }
- // Unsigned Integers
- /**
- * Reads an UInt8 value from the current read position.
- *
- * @return { Number }
- */
- readUInt8() {
- return this.readNumberValue(Buffer.prototype.readUInt8, 1);
- }
- /**
- * Reads an UInt16BE value from the current read position.
- *
- * @return { Number }
- */
- readUInt16BE() {
- return this.readNumberValue(Buffer.prototype.readUInt16BE, 2);
- }
- /**
- * Reads an UInt16LE value from the current read position.
- *
- * @return { Number }
- */
- readUInt16LE() {
- return this.readNumberValue(Buffer.prototype.readUInt16LE, 2);
- }
- /**
- * Reads an UInt32BE value from the current read position.
- *
- * @return { Number }
- */
- readUInt32BE() {
- return this.readNumberValue(Buffer.prototype.readUInt32BE, 4);
- }
- /**
- * Reads an UInt32LE value from the current read position.
- *
- * @return { Number }
- */
- readUInt32LE() {
- return this.readNumberValue(Buffer.prototype.readUInt32LE, 4);
- }
- /**
- * Writes an UInt8 value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeUInt8(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeUInt8, 1, value, offset);
- return this;
- }
- /**
- * Writes an UInt16BE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeUInt16BE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset);
- return this;
- }
- /**
- * Writes an UInt16LE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeUInt16LE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset);
- return this;
- }
- /**
- * Writes an UInt32BE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeUInt32BE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset);
- return this;
- }
- /**
- * Writes an UInt32LE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeUInt32LE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset);
- return this;
- }
- // Floating Point
- /**
- * Reads an FloatBE value from the current read position.
- *
- * @return { Number }
- */
- readFloatBE() {
- return this.readNumberValue(Buffer.prototype.readFloatBE, 4);
- }
- /**
- * Reads an FloatLE value from the current read position.
- *
- * @return { Number }
- */
- readFloatLE() {
- return this.readNumberValue(Buffer.prototype.readFloatLE, 4);
- }
- /**
- * Writes a FloatBE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeFloatBE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset);
- return this;
- }
- /**
- * Writes a FloatLE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeFloatLE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset);
- return this;
- }
- // Double Floating Point
- /**
- * Reads an DoublEBE value from the current read position.
- *
- * @return { Number }
- */
- readDoubleBE() {
- return this.readNumberValue(Buffer.prototype.readDoubleBE, 8);
- }
- /**
- * Reads an DoubleLE value from the current read position.
- *
- * @return { Number }
- */
- readDoubleLE() {
- return this.readNumberValue(Buffer.prototype.readDoubleLE, 8);
- }
- /**
- * Writes a DoubleBE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeDoubleBE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset);
- return this;
- }
- /**
- * Writes a DoubleLE value to the current write position (or at optional offset).
- *
- * @param value { Number } The value to write.
- * @param offset { Number } The offset to write the value at.
- *
- * @return this
- */
- writeDoubleLE(value, offset) {
- this.writeNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset);
- return this;
- }
- // Strings
- /**
- * Reads a String from the current read position.
- *
- * @param length { Number } The number of bytes to read as a String.
- * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding).
- *
- * @return { String }
- */
- readString(length, encoding) {
- const lengthVal = Math.min(length, this.length - this.readOffset) || this.length - this.readOffset;
- const value = this.buff.slice(this.readOffset, this.readOffset + lengthVal).toString(encoding || this.encoding);
- this.readOffset += lengthVal;
- return value;
- }
- /**
- * Writes a String to the current write position.
- *
- * @param value { String } The String value to write.
- * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use.
- * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding).
- */
- writeString(value, arg2, encoding) {
- let offsetVal = this.writeOffset;
- let encodingVal = this.encoding;
- // Check for offset
- if (typeof arg2 === 'number') {
- offsetVal = arg2;
- }
- else if (typeof arg2 === 'string') {
- if (Buffer.isEncoding(arg2)) {
- encodingVal = arg2;
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- // Check for encoding (third param)
- if (typeof encoding === 'string') {
- if (Buffer.isEncoding(encoding)) {
- encodingVal = encoding;
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- // Calculate bytelength of string.
- const byteLength = Buffer.byteLength(value, encodingVal);
- // Ensure there is enough internal Buffer capacity.
- this.ensureWriteable(byteLength, offsetVal);
- // Write value
- this.buff.write(value, offsetVal, byteLength, encodingVal);
- // Increment internal Buffer write offset;
- this.writeOffset += byteLength;
- return this;
- }
- /**
- * Reads a null-terminated String from the current read position.
- *
- * @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding).
- *
- * @return { String }
- */
- readStringNT(encoding) {
- // Set null character position to the end SmartBuffer instance.
- let nullPos = this.length;
- // Find next null character (if one is not found, default from above is used)
- for (let i = this.readOffset; i < this.length; i++) {
- if (this.buff[i] === 0x00) {
- nullPos = i;
- break;
- }
- }
- // Read string value
- const value = this.buff.slice(this.readOffset, nullPos);
- // Increment internal Buffer read offset
- this.readOffset = nullPos + 1;
- return value.toString(encoding || this.encoding);
- }
- /**
- * Writes a null-terminated String to the current write position.
- *
- * @param value { String } The String value to write.
- * @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use.
- * @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding).
- */
- writeStringNT(value, offset, encoding) {
- // Write Values
- this.writeString(value, offset, encoding);
- this.writeUInt8(0x00, (typeof offset === 'number' ? offset + value.length : this.writeOffset));
- }
- // Buffers
- /**
- * Reads a Buffer from the internal read position.
- *
- * @param length { Number } The length of data to read as a Buffer.
- *
- * @return { Buffer }
- */
- readBuffer(length) {
- const lengthVal = typeof length === 'number' ? length : this.length;
- const endPoint = Math.min(this.length, this.readOffset + lengthVal);
- // Read buffer value
- const value = this.buff.slice(this.readOffset, endPoint);
- // Increment internal Buffer read offset
- this.readOffset = endPoint;
- return value;
- }
- /**
- * Writes a Buffer to the current write position.
- *
- * @param value { Buffer } The Buffer to write.
- * @param offset { Number } The offset to write the Buffer to.
- */
- writeBuffer(value, offset) {
- const offsetVal = typeof offset === 'number' ? offset : this.writeOffset;
- // Ensure there is enough internal Buffer capacity.
- this.ensureWriteable(value.length, offsetVal);
- // Write buffer value
- value.copy(this.buff, offsetVal);
- // Increment internal Buffer write offset
- this.writeOffset += value.length;
- return this;
- }
- /**
- * Reads a null-terminated Buffer from the current read poisiton.
- *
- * @return { Buffer }
- */
- readBufferNT() {
- // Set null character position to the end SmartBuffer instance.
- let nullPos = this.length;
- // Find next null character (if one is not found, default from above is used)
- for (let i = this.readOffset; i < this.length; i++) {
- if (this.buff[i] === 0x00) {
- nullPos = i;
- break;
- }
- }
- // Read value
- const value = this.buff.slice(this.readOffset, nullPos);
- // Increment internal Buffer read offset
- this.readOffset = nullPos + 1;
- return value;
- }
- /**
- * Writes a null-terminated Buffer to the current write position.
- *
- * @param value { Buffer } The Buffer to write.
- * @param offset { Number } The offset to write the Buffer to.
- */
- writeBufferNT(value, offset) {
- // Write Values
- this.writeBuffer(value, offset);
- this.writeUInt8(0, (typeof offset === 'number' ? offset + value.length : this.writeOffset));
- return this;
- }
- /**
- * Clears the SmartBuffer instance to its original empty state.
- */
- clear() {
- this.writeOffset = 0;
- this.readOffset = 0;
- this.length = 0;
- }
- /**
- * Gets the remaining data left to be read from the SmartBuffer instance.
- *
- * @return { Number }
- */
- remaining() {
- return this.length - this.readOffset;
- }
- /**
- * Moves the read offset forward.
- *
- * @param amount { Number } The amount to move the read offset forward by.
- */
- skip(amount) {
- if (this.readOffset + amount > this.length) {
- throw new Error('Target position is beyond the bounds of the SmartBuffer size.');
- }
- this.readOffset += amount;
- }
- /**
- * Moves the read offset backwards.
- *
- * @param amount { Number } The amount to move the read offset backwards by.
- */
- rewind(amount) {
- if (this.readOffset - amount < 0) {
- throw new Error('Target position is beyond the bounds of the SmartBuffer size.');
- }
- this.readOffset -= amount;
- }
- /**
- * Moves the read offset to a specific position.
- *
- * @param position { Number } The position to move the read offset to.
- */
- skipTo(position) {
- this.moveTo(position);
- }
- /**
- * Moves the read offset to a specific position.
- *
- * @param position { Number } The position to move the read offset to.
- */
- moveTo(position) {
- if (position > this.length) {
- throw new Error('Target position is beyond the bounds of the SmartBuffer size.');
- }
- this.readOffset = position;
- }
- /**
- * Gets the value of the internal managed Buffer
- *
- * @param { Buffer }
- */
- toBuffer() {
- return this.buff.slice(0, this.length);
- }
- /**
- * Gets the String value of the internal managed Buffer
- *
- * @param encoding { String } The BufferEncoding to display the Buffer as (defaults to instance level encoding).
- */
- toString(encoding) {
- const encodingVal = typeof encoding === 'string' ? encoding : this.encoding;
- if (Buffer.isEncoding(encodingVal)) {
- return this.buff.toString(encodingVal, 0, this.length);
- }
- else {
- throw new Error('Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.');
- }
- }
- /**
- * Destroys the SmartBuffer instance.
- */
- destroy() {
- this.clear();
- }
- /**
- * Type checking function that determines if an object is a SmartBufferOptions object.
- */
- static isSmartBufferOptions(options) {
- const castOptions = options;
- return castOptions && (castOptions.encoding !== undefined || castOptions.size !== undefined || castOptions.buff !== undefined);
- }
-}
-module.exports = SmartBuffer;
-//# sourceMappingURL=smartbuffer.js.map \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/build/smartbuffer.js.map b/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/build/smartbuffer.js.map
deleted file mode 100644
index 60af067a2c..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/build/smartbuffer.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"smartbuffer.js","sourceRoot":"","sources":["../src/smartbuffer.ts"],"names":[],"mappings":";AAaA,kDAAkD;AAClD,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAEtC,mEAAmE;AACnE,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAE5C;IASI;;;;;OAKG;IACH,YAAY,IAA4D,EAAE,IAAqB;QAbxF,WAAM,GAAW,CAAC,CAAC;QACnB,aAAQ,GAAmB,4BAA4B,CAAC;QAEvD,gBAAW,GAAW,CAAC,CAAC;QACxB,eAAU,GAAW,CAAC,CAAC;QAW3B,+BAA+B;QAC/B,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAE3B,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC9D,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;YAC9F,CAAC;QAEL,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;gBACzD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACzB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;YACxH,CAAC;QAEL,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,YAAY,MAAM,CAAC,CAAC,CAAC;YAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC9B,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAEhD,sBAAsB;YACtB,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAChB,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oBACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;gBAClC,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,IAAK,KAAK,CAAC,kGAAkG,CAAC,CAAC;gBACzH,CAAC;YACL,CAAC;YAED,iCAAiC;YACjC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACZ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC7E,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC9C,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;gBAC9F,CAAC;YAEL,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACnB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,MAAM,CAAC,CAAC,CAAC;oBAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;oBACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;gBACnC,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;gBACtE,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;YAC7D,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QAC3E,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;QAC7D,CAAC;QAED,qDAAqD;QACrD,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC3B,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACzB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;YACxH,CAAC;QACL,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,QAAyB;QAC1D,MAAM,CAAC,IAAI,IAAI,CAAC;YACZ,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;SACrB,CAAC,CAAC;IACP,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU,CAAC,IAAY,EAAE,QAAyB;QAC5D,MAAM,CAAC,IAAI,IAAI,CAAC;YACZ,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;SACrB,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAC,OAA2B;QACjD,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACK,eAAe,CAAC,SAAiB,EAAE,MAAe;QACtD,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,CAAC,CAAC;QAE1D,mDAAmD;QACnD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;QAEzD,uFAAuF;QACvF,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClF,CAAC;QAED,0BAA0B;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;IAC3E,CAAC;IAGD;;;;OAIG;IACK,cAAc,CAAC,SAAiB;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAEnC,EAAE,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;YACxB,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YACrB,IAAI,SAAS,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACxC,EAAE,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;gBACxB,SAAS,GAAG,SAAS,CAAC;YAC1B,CAAC;YACD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;YAE1C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;QAC1C,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACK,eAAe,CAAC,IAAgC,EAAE,QAAgB;QACtE,0BAA0B;QAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAEpD,8BAA8B;QAC9B,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC;QAE5B,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAED;;;;;;;;OAQG;IACK,gBAAgB,CAAC,IAAgD,EAAE,QAAgB,EAAE,KAAa,EAAE,MAAe;QACvH,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;QAEzE,0EAA0E;QAC1E,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAEvC,2BAA2B;QAC3B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAEvC,gCAAgC;QAChC,IAAI,CAAC,WAAW,IAAI,QAAQ,CAAC;IACjC,CAAC;IAGD,kBAAkB;IAElB;;;;OAIG;IACH,QAAQ;QACJ,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,KAAa,EAAE,MAAe;QACpC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACpE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,oBAAoB;IAEpB;;;;OAIG;IACH,SAAS;QACL,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CAAC,KAAa,EAAE,MAAe;QACrC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACrE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,iBAAiB;IAGjB;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,KAAa,EAAE,MAAe;QACvC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAGD,wBAAwB;IAExB;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAGD,UAAU;IAEV;;;;;;;OAOG;IACH,UAAU,CAAC,MAAe,EAAE,QAAyB;QACjD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;QACnG,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEhH,IAAI,CAAC,UAAU,IAAI,SAAS,CAAC;QAC7B,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACH,WAAW,CAAC,KAAa,EAAE,IAA8B,EAAE,QAAyB;QAChF,IAAI,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC;QACjC,IAAI,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC;QAEhC,mBAAmB;QACnB,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC3B,SAAS,GAAG,IAAI,CAAC;QAErB,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,WAAW,GAAG,IAAI,CAAC;YACvB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;YACxH,CAAC;QACL,CAAC;QAED,mCAAmC;QACnC,EAAE,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC/B,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC9B,WAAW,GAAG,QAAQ,CAAC;YAC3B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;YACxH,CAAC;QACL,CAAC;QAED,kCAAkC;QAClC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAEzD,mDAAmD;QACnD,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAE5C,cAAc;QACd,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QAE3D,0CAA0C;QAC1C,IAAI,CAAC,WAAW,IAAI,UAAU,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CAAC,QAAyB;QAElC,+DAA+D;QAC/D,IAAI,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAE1B,6EAA6E;QAC7E,GAAG,CAAA,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;gBACxB,OAAO,GAAG,CAAC,CAAC;gBACZ,KAAK,CAAC;YACV,CAAC;QACL,CAAC;QAED,oBAAoB;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAExD,wCAAwC;QACxC,IAAI,CAAC,UAAU,GAAG,OAAO,GAAG,CAAC,CAAC;QAE9B,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CAAC,KAAa,EAAE,MAAgC,EAAE,QAAyB;QACpF,eAAe;QACf,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACnG,CAAC;IAED,UAAU;IAEV;;;;;;OAMG;IACH,UAAU,CAAC,MAAe;QACtB,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACpE,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;QAEpE,oBAAoB;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAEzD,wCAAwC;QACxC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;QAC3B,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,KAAa,EAAE,MAAe;QACtC,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;QAEzE,mDAAmD;QACnD,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAE9C,qBAAqB;QACrB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAEjC,yCAAyC;QACzC,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC;QACjC,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,+DAA+D;QAC/D,IAAI,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAE1B,6EAA6E;QAC7E,GAAG,CAAA,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;gBACxB,OAAO,GAAG,CAAC,CAAC;gBACZ,KAAK,CAAC;YACV,CAAC;QACL,CAAC;QAED,aAAa;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAExD,wCAAwC;QACxC,IAAI,CAAC,UAAU,GAAG,OAAO,GAAG,CAAC,CAAC;QAC9B,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,KAAa,EAAE,MAAe;QACxC,eAAe;QACf,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAE5F,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,KAAK;QACD,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,SAAS;QACL,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,MAAc;QACf,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACrF,CAAC;QAED,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAc;QACjB,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACrF,CAAC;QAED,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,QAAgB;QACnB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,QAAgB;QACnB,EAAE,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACrF,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,QAAQ;QACJ,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,QAAyB;QAC9B,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAE5E,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3D,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;QACxH,CAAC;IACL,CAAC;IAED;;OAEG;IACH,OAAO;QACH,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,OAA2B;QACnD,MAAM,WAAW,GAAwB,OAAQ,CAAC;QAElD,MAAM,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,QAAQ,KAAK,SAAS,IAAI,WAAW,CAAC,IAAI,KAAK,SAAS,IAAI,WAAW,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;IACnI,CAAC;CACJ;AAGD,iBAAS,WAAW,CAAC"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/lib/smart-buffer.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/lib/smart-buffer.js
deleted file mode 100644
index ea69cfc09a..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/lib/smart-buffer.js
+++ /dev/null
@@ -1,371 +0,0 @@
-var SmartBuffer = (function () {
-
- /**
- * Constructor for SmartBuffer.
- * @param arg1 {Buffer || Number || String} Buffer to read from, or expected size to write to, or encoding to use.
- * @param arg2 {String} Encoding to use for writing and reading strings. Defaults to utf8. If encoding is given in arg1, this is ignored.
- * @constructor
- *
- * There are a few ways to construct a SmartBuffer:
- *
- * SmartBuffer() - Defaults to utf8, 4096 pre-set internal Buffer length.
- * SmartBuffer(size) - Defaults to utf8, sets internal Buffer length to the size given.
- * SmartBuffer(encoding) - Sets the given encoding, defaults to 4096 pre-set internal Buffer length.
- * SmartBuffer(Buffer) - Defaults to utf8, sets the internal Buffer to the given buffer (same memory).
- * SmartBuffer(Buffer, encoding) - Sets the given encoding, sets the internal Buffer to the given buffer (same memory).
- *
- */
- function SmartBuffer(arg1, arg2) {
- var type;
- switch (type = typeof arg1) {
- case 'number':
- if (isFinite(arg1) && arg1 > 0) {
- this.buff = new Buffer(Math.ceil(arg1));
- this.length = 0;
- } else {
- throw new Error('When specifying a size, it must be a valid number above zero.');
- }
- break;
-
- case 'string':
- if (Buffer.isEncoding(arg1)) {
- this.buff = new Buffer(4096);
- this.length = 0;
- this.encoding = arg1;
- } else {
- throw new Error('Invalid Encoding');
- }
- break;
-
- case 'object':
- if (Buffer.isBuffer(arg1)) {
- this.buff = arg1;
- this.length = arg1.length;
- } else {
- throw new TypeError('First argument must be a Buffer, Number representing the size, or a String representing the encoding.');
- }
- break;
-
- default:
- this.buff = new Buffer(4096);
- this.length = 0;
- break;
- }
-
- if (typeof this.encoding === 'undefined') {
- if (typeof arg2 === 'string') {
- if (Buffer.isEncoding(arg2)) {
- this.encoding = arg2;
- } else {
- throw new Error('Invalid Encoding');
- }
- }
- }
-
- this._readOffset = 0;
- this._writeOffset = 0;
- }
-
-
- SmartBuffer.prototype._ensureWritable = function (len, offset) {
- this._ensureCapacity(this.length + len + (typeof offset === 'number' ? offset : 0));
-
- if (typeof offset === 'number') {
- this.buff.copy(this.buff, offset + len, offset, this.buff.length);
- }
- this.length = Math.max(this.length + len, (typeof offset === 'number' ? offset : 0) + len);
- };
-
- SmartBuffer.prototype._ensureCapacity = function (minlen) {
- var oldlen = this.buff.length;
-
- if (minlen > oldlen) {
- var data = this.buff;
- var newlen = (oldlen * 3) / 2 + 1;
- if (newlen < minlen)
- newlen = minlen;
- this.buff = new Buffer(newlen);
- data.copy(this.buff, 0, 0, oldlen);
- }
- };
-
-
- var makeReader = function (func, size) {
- return function () {
- var ret = func.call(this.buff, this._readOffset);
- this._readOffset += size;
- return ret;
- }
- };
-
- var makeWriter = function (func, size) {
- return function (value, offset) {
- this._ensureWritable(size, offset);
- func.call(this.buff, value, typeof offset === 'number' ? offset : this._writeOffset);
- this._writeOffset += size;
- return this;
- }
- };
-
-
- /*
- Read Operations
- */
-
- SmartBuffer.prototype.readInt8 = makeReader(Buffer.prototype.readInt8, 1);
- SmartBuffer.prototype.readInt16BE = makeReader(Buffer.prototype.readInt16BE, 2);
- SmartBuffer.prototype.readInt16LE = makeReader(Buffer.prototype.readInt16LE, 2);
- SmartBuffer.prototype.readInt32BE = makeReader(Buffer.prototype.readInt32BE, 4);
- SmartBuffer.prototype.readInt32LE = makeReader(Buffer.prototype.readInt32LE, 4);
-
- SmartBuffer.prototype.readUInt8 = makeReader(Buffer.prototype.readUInt8, 1);
- SmartBuffer.prototype.readUInt16BE = makeReader(Buffer.prototype.readUInt16BE, 2);
- SmartBuffer.prototype.readUInt16LE = makeReader(Buffer.prototype.readUInt16LE, 2);
- SmartBuffer.prototype.readUInt32BE = makeReader(Buffer.prototype.readUInt32BE, 4);
- SmartBuffer.prototype.readUInt32LE = makeReader(Buffer.prototype.readUInt32LE, 4);
-
- SmartBuffer.prototype.readFloatBE = makeReader(Buffer.prototype.readFloatBE, 4);
- SmartBuffer.prototype.readFloatLE = makeReader(Buffer.prototype.readFloatLE, 4);
-
- SmartBuffer.prototype.readDoubleBE = makeReader(Buffer.prototype.readDoubleBE, 8);
- SmartBuffer.prototype.readDoubleLE = makeReader(Buffer.prototype.readDoubleLE, 8);
-
-
- /**
- * Reads a string of the given length.
- * @param length {Number} The length of the string to read. (Defaults to the length of the remaining data)
- * @param encoding {String} The encoding to use. (Defaults to encoding set in constructor, or utf8)
- * @returns {string} The string.
- */
- SmartBuffer.prototype.readString = function (length, encoding) {
- var len = Math.min(length, this.length - this._readOffset) || (this.length - this._readOffset);
- var ret = this.buff.slice(this._readOffset, this._readOffset + len).toString(encoding || this.encoding);
- this._readOffset += len;
- return ret;
- };
-
- /**
- * Reads a null terminated string from the underlying buffer.
- * @param encoding {String} Encoding to use. Defaults to encoding set in constructor, or utf8.
- * @returns {string}
- */
- SmartBuffer.prototype.readStringNT = function (encoding) {
- var nullpos = this.length;
- for (var i = this._readOffset; i < this.length; i++) {
- if (this.buff[i] == 0x00) {
- nullpos = i;
- break;
- }
- }
-
- var result = this.buff.slice(this._readOffset, nullpos);
- this._readOffset = nullpos + 1;
-
- return result.toString(encoding || this.encoding);
- };
-
-
- /**
- * Reads a specified number of bytes.
- * @param len {Number} Numbers of bytes to read. (Defaults to the remaining data length)
- * @returns {Buffer} Buffer containing the read bytes.
- */
- SmartBuffer.prototype.readBuffer = function (len) {
- var endpoint = Math.min(this.length, this._readOffset + (typeof len === 'number' ? len : this.length));
- var ret = this.buff.slice(this._readOffset, endpoint);
- this._readOffset = endpoint;
- return ret;
- };
-
- /**
- * Reads a null terminated sequence of bytes from the underlying buffer.
- * @returns {Buffer} Buffer containing the read bytes.
- */
- SmartBuffer.prototype.readBufferNT = function () {
- var nullpos = this.length;
- for (var i = this._readOffset; i < this.length; i++) {
- if (this.buff[i] == 0x00) {
- nullpos = i;
- break;
- }
- }
-
- var ret = this.buff.slice(this._readOffset, nullpos);
- this._readOffset = nullpos + 1;
-
- return ret;
- };
-
-
- /*
- Write Operations
- */
-
-
- SmartBuffer.prototype.writeInt8 = makeWriter(Buffer.prototype.writeInt8, 1);
- SmartBuffer.prototype.writeInt16BE = makeWriter(Buffer.prototype.writeInt16BE, 2);
- SmartBuffer.prototype.writeInt16LE = makeWriter(Buffer.prototype.writeInt16LE, 2);
- SmartBuffer.prototype.writeInt32BE = makeWriter(Buffer.prototype.writeInt32BE, 4);
- SmartBuffer.prototype.writeInt32LE = makeWriter(Buffer.prototype.writeInt32LE, 4);
-
- SmartBuffer.prototype.writeUInt8 = makeWriter(Buffer.prototype.writeUInt8, 1);
- SmartBuffer.prototype.writeUInt16BE = makeWriter(Buffer.prototype.writeUInt16BE, 2);
- SmartBuffer.prototype.writeUInt16LE = makeWriter(Buffer.prototype.writeUInt16LE, 2);
- SmartBuffer.prototype.writeUInt32BE = makeWriter(Buffer.prototype.writeUInt32BE, 4);
- SmartBuffer.prototype.writeUInt32LE = makeWriter(Buffer.prototype.writeUInt32LE, 4);
-
- SmartBuffer.prototype.writeFloatBE = makeWriter(Buffer.prototype.writeFloatBE, 4);
- SmartBuffer.prototype.writeFloatLE = makeWriter(Buffer.prototype.writeFloatLE, 4);
-
- SmartBuffer.prototype.writeDoubleBE = makeWriter(Buffer.prototype.writeDoubleBE, 8);
- SmartBuffer.prototype.writeDoubleLE = makeWriter(Buffer.prototype.writeDoubleLE, 8);
-
-
- /**
- * Writes a string to the underlying buffer.
- * @param value {String} The string to write.
- * @param offset {Number} The offset to write the string to. (Encoding can also be set here in place of offset)
- * @param encoding {String} The encoding to use. (Defaults to encoding set in constructor, or to utf8)
- * @returns {*}
- */
- SmartBuffer.prototype.writeString = function (value, offset, encoding) {
- var len, _offset, type = typeof offset;
-
- if (type === 'number') {
- _offset = offset;
- } else if (type === 'string') {
- encoding = offset;
- offset = this._writeOffset;
- } else {
- encoding = undefined;
- offset = this._writeOffset;
- }
-
- len = Buffer.byteLength(value, encoding || this.encoding);
- this._ensureWritable(len, _offset);
-
- this.buff.write(value, offset, len, encoding || this.encoding);
- this._writeOffset += len;
- return this;
- };
-
- /**
- * Writes a null terminated string to the underlying buffer.
- * @param value {String} The string to write.
- * @param offset {Number} The offset to write the string to. (Encoding can also be set here in place of offset)
- * @param encoding {String} The encoding to use. (Defaults to encoding set in constructor, or to utf8)
- * @returns {*}
- */
- SmartBuffer.prototype.writeStringNT = function (value, offset, encoding) {
- this.writeString(value, offset, encoding);
- this.writeUInt8(0x00, (typeof offset === 'number' ? offset + value.length : this._writeOffset));
- return this;
- };
-
- /**
- * Writes a Buffer to the underlying buffer.
- * @param value {Buffer} The buffer to write.
- * @param offset {Number} The offset to write the Buffer to.
- * @returns {*}
- */
- SmartBuffer.prototype.writeBuffer = function (value, offset) {
- var len = value.length;
- this._ensureWritable(len, offset);
- value.copy(this.buff, typeof offset === 'number' ? offset : this._writeOffset);
- this._writeOffset += len;
- return this;
- };
-
- /**
- * Writes a null terminated Buffer to the underlying buffer.
- * @param value {Buffer} The buffer to write.
- * @param offset {Number} The offset to write the Buffer to.
- * @returns {*}
- */
- SmartBuffer.prototype.writeBufferNT = function (value, offset) {
- this.writeBuffer(value, offset);
- this.writeUInt8(0x00, (typeof offset === 'number' ? offset + value.length : this._writeOffset));
-
- return this;
- };
-
-
- /**
- * Resets the Endless Buffer.
- */
- SmartBuffer.prototype.clear = function () {
- this._writeOffset = 0;
- this._readOffset = 0;
- this.length = 0;
- };
-
- /**
- * Gets the remaining number of bytes to be read from the existing Buffer.
- * @returns {number} The number of bytes remaining.
- */
- SmartBuffer.prototype.remaining = function () {
- return this.length - this._readOffset;
- };
-
- /**
- * Skips the read position forward by the amount of given.
- * @param amount {Number} The amount of bytes to skip forward.
- */
- SmartBuffer.prototype.skip = function (amount) {
- if (this._readOffset + amount > this.length)
- throw new Error('Target position is beyond the bounds of the data.');
-
- this._readOffset += amount;
- };
-
- /**
- * Rewinds the read position backward by the amount given.
- * @param amount {Number} The amount of bytes to reverse backward.
- */
- SmartBuffer.prototype.rewind = function (amount) {
- if (this._readOffset - amount < 0)
- throw new Error('Target position is beyond the bounds of the data.');
-
- this._readOffset -= amount;
- };
-
- /**
- * Skips the read position to the given position.
- * @param position {Number} The position to skip to.
- */
- SmartBuffer.prototype.skipTo = function (position) {
- if (position < 0 || position > this.length)
- throw new Error('Target position is beyond the bounds of the data.');
-
- this._readOffset = position;
- };
-
- /**
- * Gets the underlying Buffer.
- * @returns {*}
- */
- SmartBuffer.prototype.toBuffer = function () {
- return this.buff.slice(0, this.length);
- };
-
- /**
- * Gets a string representation of the underlying Buffer.
- * @param encoding {String} Encoding to use. (Defaults to encoding set in constructor, or utf8.)
- * @returns {*}
- */
- SmartBuffer.prototype.toString = function (encoding) {
- return this.buff.toString(encoding || this.encoding, 0, this.length);
- };
-
- /**
- * Destroys the underlying Buffer, and resets the SmartBuffer.
- */
- SmartBuffer.prototype.destroy = function () {
- delete this.buff;
- this.clear();
- };
-
- return SmartBuffer;
-})();
-
-module.exports = SmartBuffer; \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/package.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/package.json
deleted file mode 100644
index f6e183c589..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "_from": "smart-buffer@^1.0.13",
- "_id": "smart-buffer@1.1.15",
- "_inBundle": false,
- "_integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=",
- "_location": "/npm-registry-fetch/smart-buffer",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "smart-buffer@^1.0.13",
- "name": "smart-buffer",
- "escapedName": "smart-buffer",
- "rawSpec": "^1.0.13",
- "saveSpec": null,
- "fetchSpec": "^1.0.13"
- },
- "_requiredBy": [
- "/npm-registry-fetch/socks"
- ],
- "_resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz",
- "_shasum": "7f114b5b65fab3e2a35aa775bb12f0d1c649bf16",
- "_spec": "smart-buffer@^1.0.13",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-fetch/node_modules/socks",
- "author": {
- "name": "Josh Glazebrook"
- },
- "bugs": {
- "url": "https://github.com/JoshGlazebrook/smart-buffer/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "A smarter Buffer that keeps track of its own read and write positions while growing endlessly.",
- "devDependencies": {
- "chai": "^3.5.0",
- "coveralls": "^2.11.15",
- "istanbul": "^0.4.3",
- "mocha": "^3.2.0",
- "mocha-lcov-reporter": "^1.2.0"
- },
- "engines": {
- "node": ">= 0.10.15",
- "npm": ">= 1.3.5"
- },
- "homepage": "https://github.com/JoshGlazebrook/smart-buffer/",
- "keywords": [
- "buffer",
- "smart",
- "serialize",
- "packet",
- "network",
- "cursor",
- "simple"
- ],
- "license": "MIT",
- "main": "lib/smart-buffer.js",
- "name": "smart-buffer",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/JoshGlazebrook/smart-buffer.git"
- },
- "scripts": {
- "coverage": "istanbul cover node_modules/mocha/bin/_mocha recursive test",
- "fullcoverage": "istanbul -include-all-sources cover node_modules/mocha/bin/_mocha recursive test",
- "test": "mocha test/smart-buffer.test.js"
- },
- "typings": "typings/index",
- "version": "1.1.15"
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/test/smart-buffer.test.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/test/smart-buffer.test.js
deleted file mode 100644
index 0897d54c2f..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/test/smart-buffer.test.js
+++ /dev/null
@@ -1,410 +0,0 @@
-var SmartBuffer = require('../lib/smart-buffer.js');
-var assert = require('chai').assert;
-
-
-describe('Constructing a SmartBuffer', function () {
- describe('Constructing with an existing Buffer', function () {
- var buff = new Buffer([0xAA, 0xBB, 0xCC, 0xDD, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99]);
- var reader = new SmartBuffer(buff);
-
- it('should have the exact same internal Buffer when constructed with a Buffer', function () {
- assert.strictEqual(reader.buff, buff);
- });
-
- it('should return a buffer with the same content', function () {
- assert.deepEqual(reader.toBuffer(), buff);
- });
- });
-
- describe('Constructing with an existing Buffer and setting the encoding', function () {
- var buff = new Buffer([0xAA, 0xBB, 0xCC, 0xDD, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99]);
- var reader = new SmartBuffer(buff, 'ascii');
-
- it('should have the exact same internal Buffer', function () {
- assert.strictEqual(reader.buff, buff);
- });
-
- it('should have the same encoding that was set', function () {
- assert.strictEqual(reader.encoding, 'ascii');
- });
- });
-
- describe('Constructing with a specified size', function () {
- var size = 128;
- var reader = new SmartBuffer(size);
-
- it('should have an internal Buffer with the same length as the size defined in the constructor', function () {
- assert.strictEqual(reader.buff.length, size);
- });
- });
-
- describe('Constructing with a specified encoding', function () {
- var encoding = 'utf8';
-
- it('should have an internal encoding with the encoding given to the constructor (1st argument)', function () {
- var reader = new SmartBuffer(encoding);
- assert.strictEqual(reader.encoding, encoding);
- });
-
- it('should have an internal encoding with the encoding given to the constructor (2nd argument)', function () {
- var reader = new SmartBuffer(1024, encoding);
- assert.strictEqual(reader.encoding, encoding);
- });
-
- });
-
- describe('Constructing with invalid parameters', function () {
- it('should throw an exception when given an invalid number size', function () {
- assert.throws(function () {
- var reader = new SmartBuffer(-100);
- }, Error);
- });
-
- it('should throw an exception when give a invalid encoding', function () {
- assert.throws(function () {
- var reader = new SmartBuffer('invalid');
- }, Error);
-
- assert.throws(function () {
- var reader = new SmartBuffer(1024, 'invalid');
- }, Error);
- });
-
- it('should throw and exception when given an object that is not a Buffer', function () {
- assert.throws(function () {
- var reader = new SmartBuffer(null);
- }, TypeError);
- });
- });
-});
-
-
-describe('Reading/Writing To/From SmartBuffer', function () {
- /**
- * Technically, if one of these works, they all should. But they're all here anyways.
- */
-
- describe('Numeric Values', function () {
- var reader = new SmartBuffer();
- reader.writeInt8(0x44);
- reader.writeUInt8(0xFF);
- reader.writeInt16BE(0x6699);
- reader.writeInt16LE(0x6699);
- reader.writeUInt16BE(0xFFDD);
- reader.writeUInt16LE(0xFFDD);
- reader.writeInt32BE(0x77889900);
- reader.writeInt32LE(0x77889900);
- reader.writeUInt32BE(0xFFDDCCBB);
- reader.writeUInt32LE(0xFFDDCCBB);
- reader.writeFloatBE(1.234);
- reader.writeFloatLE(1.234);
- reader.writeDoubleBE(1.234567890);
- reader.writeDoubleLE(1.234567890);
-
- it('should equal the correct values that were written above', function () {
- assert.strictEqual(reader.readInt8(), 0x44);
- assert.strictEqual(reader.readUInt8(), 0xFF);
- assert.strictEqual(reader.readInt16BE(), 0x6699);
- assert.strictEqual(reader.readInt16LE(), 0x6699);
- assert.strictEqual(reader.readUInt16BE(), 0xFFDD);
- assert.strictEqual(reader.readUInt16LE(), 0xFFDD);
- assert.strictEqual(reader.readInt32BE(), 0x77889900);
- assert.strictEqual(reader.readInt32LE(), 0x77889900);
- assert.strictEqual(reader.readUInt32BE(), 0xFFDDCCBB);
- assert.strictEqual(reader.readUInt32LE(), 0xFFDDCCBB);
- assert.closeTo(reader.readFloatBE(), 1.234, 0.001);
- assert.closeTo(reader.readFloatLE(), 1.234, 0.001);
- assert.closeTo(reader.readDoubleBE(), 1.234567890, 0.001);
- assert.closeTo(reader.readDoubleLE(), 1.234567890, 0.001);
- });
-
- });
-
- describe('Basic String Values', function () {
- var reader = new SmartBuffer();
- reader.writeStringNT('hello');
- reader.writeString('world');
- reader.writeStringNT('✎✏✎✏✎✏');
-
- it('should equal the correct strings that were written above', function () {
- assert.strictEqual(reader.readStringNT(), 'hello');
- assert.strictEqual(reader.readString(5), 'world');
- assert.strictEqual(reader.readStringNT(), '✎✏✎✏✎✏');
- });
- });
-
- describe('Mixed Encoding Strings', function () {
- var reader = new SmartBuffer('ascii');
- reader.writeStringNT('some ascii text');
- reader.writeStringNT('ѕσмє υтƒ8 тєχт', 'utf8');
-
- it('should equal the correct strings that were written above', function () {
- assert.strictEqual(reader.readStringNT(), 'some ascii text');
- assert.strictEqual(reader.readStringNT('utf8'), 'ѕσмє υтƒ8 тєχт');
- });
- });
-
- describe('Null/non-null terminating strings', function () {
- var reader = new SmartBuffer();
- reader.writeString('hello\0test\0bleh');
-
- it('should equal hello', function () {
- assert.strictEqual(reader.readStringNT(), 'hello');
- });
-
- it('should equal: test', function () {
- assert.strictEqual(reader.readString(4), 'test');
- });
-
- it('should have a length of zero', function () {
- assert.strictEqual(reader.readStringNT().length, 0);
- });
-
- it('should equal: bleh', function () {
- assert.strictEqual(reader.readStringNT(), 'bleh');
- });
-
-
- });
-
- describe('Reading string without specifying length', function () {
- var str = 'hello123';
- var writer = new SmartBuffer();
- writer.writeString(str);
-
- var reader = new SmartBuffer(writer.toBuffer());
-
- assert.strictEqual(reader.readString(), str);
- });
-
- describe('Write string as specific position', function () {
- var str = 'hello123';
- var writer = new SmartBuffer();
- writer.writeString(str, 10);
-
- var reader = new SmartBuffer(writer.toBuffer());
-
- reader.skipTo(10);
- it('Should read the correct string from the original position it was written to.', function () {
- assert.strictEqual(reader.readString(), str);
- });
-
-
- });
-
- describe('Buffer Values', function () {
- describe('Writing buffer to position 0', function () {
- var buff = new SmartBuffer();
- var frontBuff = new Buffer([1, 2, 3, 4, 5, 6]);
- buff.writeStringNT('hello');
- buff.writeBuffer(frontBuff, 0);
-
- it('should write the buffer to the front of the smart buffer instance', function () {
- var readBuff = buff.readBuffer(frontBuff.length);
- assert.deepEqual(readBuff, frontBuff);
- });
- });
-
- describe('Writing null terminated buffer to position 0', function () {
- var buff = new SmartBuffer();
- var frontBuff = new Buffer([1, 2, 3, 4, 5, 6]);
- buff.writeStringNT('hello');
- buff.writeBufferNT(frontBuff, 0);
-
- console.log(buff);
-
- it('should write the buffer to the front of the smart buffer instance', function () {
- var readBuff = buff.readBufferNT();
- console.log(readBuff);
- assert.deepEqual(readBuff, frontBuff);
- });
- });
-
- describe('Explicit lengths', function () {
- var buff = new Buffer([0x01, 0x02, 0x04, 0x08, 0x16, 0x32, 0x64]);
- var reader = new SmartBuffer();
- reader.writeBuffer(buff);
-
- it('should equal the buffer that was written above.', function () {
- assert.deepEqual(reader.readBuffer(7), buff);
- });
- });
-
- describe('Implicit lengths', function () {
- var buff = new Buffer([0x01, 0x02, 0x04, 0x08, 0x16, 0x32, 0x64]);
- var reader = new SmartBuffer();
- reader.writeBuffer(buff);
-
- it('should equal the buffer that was written above.', function () {
- assert.deepEqual(reader.readBuffer(), buff);
- });
- });
-
- describe('Null Terminated Buffer Reading', function () {
- var buff = new SmartBuffer();
- buff.writeBuffer(new Buffer([0x01, 0x02, 0x03, 0x04, 0x00, 0x01, 0x02, 0x03]));
-
- var read1 = buff.readBufferNT();
- var read2 = buff.readBufferNT();
-
- it('Should return a length of 4 for the four bytes before the first null in the buffer.', function () {
- assert.equal(read1.length, 4);
- });
-
- it('Should return a length of 3 for the three bytes after the first null in the buffer after reading to end.', function () {
- assert.equal(read2.length, 3);
- });
- });
-
- describe('Null Terminated Buffer Writing', function () {
- var buff = new SmartBuffer();
- buff.writeBufferNT(new Buffer([0x01, 0x02, 0x03, 0x04]));
-
- var read1 = buff.readBufferNT();
-
- it('Should read the correct null terminated buffer data.', function () {
- assert.equal(read1.length, 4);
- });
-
- })
-
- });
-
- describe('Inserting values into specific positions', function () {
- var reader = new SmartBuffer();
-
- reader.writeUInt16LE(0x0060);
- reader.writeStringNT('something');
- reader.writeUInt32LE(8485934);
- reader.writeUInt16LE(6699);
- reader.writeStringNT('else');
- reader.writeUInt16LE(reader.length - 2, 2);
-
-
- it('should equal the size of the remaining data in the buffer', function () {
- reader.readUInt16LE();
- var size = reader.readUInt16LE();
- assert.strictEqual(reader.remaining(), size);
- });
- });
-
- describe('Adding more data to the buffer than the internal buffer currently allows.', function () {
- it('Should automatically adjust internal buffer size when needed', function () {
- var writer = new SmartBuffer();
- var largeBuff = new Buffer(10000);
-
- writer.writeBuffer(largeBuff);
-
- assert.strictEqual(writer.length, largeBuff.length);
- });
- });
-
-});
-
-describe('Skipping around data', function () {
- var writer = new SmartBuffer();
- writer.writeStringNT('hello');
- writer.writeUInt16LE(6699);
- writer.writeStringNT('world!');
-
- it('Should equal the UInt16 that was written above', function () {
- var reader = new SmartBuffer(writer.toBuffer());
- reader.skip(6);
- assert.strictEqual(reader.readUInt16LE(), 6699);
- reader.skipTo(0);
- assert.strictEqual(reader.readStringNT(), 'hello');
- reader.rewind(6);
- assert.strictEqual(reader.readStringNT(), 'hello');
- });
-
- it('Should throw an error when attempting to skip more bytes than actually exist.', function () {
- var reader = new SmartBuffer(writer.toBuffer());
-
- assert.throws(function () {
- reader.skip(10000);
- });
- });
-
- it('Should throw an error when attempting to skip to a position that does not exist.', function () {
- var reader = new SmartBuffer(writer.toBuffer());
-
- assert.throws(function () {
- reader.skipTo(10000);
- });
- });
-
- it('Should throw an error when attempting to rewind past the start of the buffer.', function () {
- var buff = new SmartBuffer();
- assert.throws(function () {
- buff.rewind(10000);
- });
- });
-});
-
-describe('Automatic internal buffer resizing', function () {
- var writer;
-
- it('Should not throw an error when adding data that is larger than current buffer size (internal resize algo fails)', function () {
- var str = 'String larger than one byte';
- writer = new SmartBuffer(1);
- writer.writeString(str);
-
- assert.strictEqual(writer.buff.length, str.length);
-
- });
-
- it('Should not throw an error when adding data that is larger than current buffer size (internal resize algo succeeds)', function () {
- writer = new SmartBuffer(100);
- var buff = new Buffer(105);
-
- writer.writeBuffer(buff);
-
- // Test internal array growth algo.
- assert.strictEqual(writer.buff.length, (100 * 3 / 2 + 1));
- });
-});
-
-describe('Clearing the buffer', function () {
- var writer = new SmartBuffer();
- writer.writeString('somedata');
-
- it('Should contain some data.', function () {
- assert.notStrictEqual(writer.length, 0);
- });
-
- it('Should contain zero data after being cleared.', function () {
- writer.clear();
- assert.strictEqual(writer.length, 0);
- });
-});
-
-describe('Displaying the buffer as a string', function () {
- var buff = new Buffer([1, 2, 3, 4]);
- var sbuff = new SmartBuffer(buff);
-
- var str = buff.toString();
- var str64 = buff.toString('base64');
-
- it('Should return a valid string representing the internal buffer', function () {
- assert.strictEqual(str, sbuff.toString());
- });
-
- it('Should return a valid base64 string representing the internal buffer', function () {
- assert.strictEqual(str64, sbuff.toString('base64'));
- });
-});
-
-describe('Destroying the buffer', function () {
- var writer = new SmartBuffer();
- writer.writeString('hello123');
-
- writer.destroy();
-
- it('Should have a length of zero when buffer is destroyed', function () {
- assert.strictEqual(0, writer.length);
- });
-
- it('Should have no internal buff property when buffer is destroyed', function () {
- assert.notProperty(writer, 'buff');
- });
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/typings/index.d.ts b/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/typings/index.d.ts
deleted file mode 100644
index b567f1e97c..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer/typings/index.d.ts
+++ /dev/null
@@ -1,383 +0,0 @@
-// Type definitions for smart-buffer
-// Project: https://github.com/JoshGlazebrook/smart-buffer
-// Definitions by: Josh Glazebrook <https://github.com/JoshGlazebrook>
-
-
-
-declare class SmartBuffer {
- /**
- * Creates a new SmartBuffer instance (defaults to utf8 encoding)
- */
- constructor();
-
- /**
- * Creates a new SmartBuffer instance
- *
- * @param arg1 { Number } The size the underlying buffer instance should be instantiated to (defaults to 4096)
- * @param arg2 { String } The string encoding to use for reading/writing strings (defaults to utf8)
- */
- constructor(size: number, encoding?: string);
-
- /**
- * Creates a new SmartBuffer instance
- *
- * @param arg1 { String } The string encoding to use for reading/writing strings (defaults to utf8)
- */
- constructor(encoding?: string);
-
- /**
- * Creates a new SmartBuffer instance
- *
- * @param arg1 { Buffer } An existing buffer instance to copy to this smart buffer instance
- * @param arg2 { String } The string encoding to use for reading/writing strings (defaults to utf8)
- */
- constructor(buffer: Buffer, encoding?: string)
-
-
-
- // Signed number readers
-
- /**
- * Reads a 8-bit signed integer
- */
- readInt8(): number;
-
- /**
- * Reads a 16-bit signed integer (big endian)
- */
- readInt16BE(): number;
-
- /**
- * Reads a 16-bit signed integer (little endian)
- */
- readInt16LE(): number;
-
- /**
- * Reads a 32-bit signed integer (big endian)
- */
- readInt32BE(): number;
-
- /**
- * Reads a 32-bit signed integer (little endian)
- */
- readInt32LE(): number;
-
- // Unsigned number readers
-
- /**
- * Reads a 8-bit unsigned integer
- */
- readUInt8(): number;
-
- /**
- * Reads a 16-bit unsigned integer (big endian)
- */
- readUInt16BE(): number;
-
- /**
- * Reads a 16-bit unsigned integer (little endian)
- */
- readUInt16LE(): number;
-
- /**
- * Reads a 32-bit unsigned integer (big endian)
- */
- readUInt32BE(): number;
-
- /**
- * Reads a 32-bit unsigned integer (little endian)
- */
- readUInt32LE(): number;
-
- // Floating point readers
-
- /**
- * Reads a float (big endian)
- */
- readFloatBE(): number;
-
- /**
- * Reads a float (little endian)
- */
- readFloatLE(): number;
-
- /**
- * Reads a double (big endian)
- */
- readDoubleBE(): number;
-
- /**
- * Reads a double (little endian)
- */
- readDoubleLE(): number;
-
- // String readers
-
- /**
- * Reads a string
- *
- * @param length { Number } The length of the string to read
- * @param encoding { Number} The encoding to use (defaults to instance level encoding)
- */
- readString(length?: number, encoding?: string): string;
-
- /**
- * Reads a null terminated string
- *
- * @param encoding The encoding to use (defaults to instance level encoding)
- */
- readStringNT(encoding?: string): string;
-
- // Buffer readers
-
- /**
- * Reads binary data into a Buffer
- *
- * @param len { Number } The amount of data to read
- */
- readBuffer(len?: number): Buffer;
-
- /**
- * Reads null terminated binary data into a Buffer
- */
- readBufferNT(): Buffer;
-
-
- // Signed number writers
-
- /**
- * Writes a 8-bit signed integer value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeInt8(value: number, offset?: number): this;
-
- /**
- * Writes a 16-bit signed integer (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeInt16BE(value: number, offset?: number): this;
-
- /**
- * Writes a 16-bit signed integer (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeInt16LE(value: number, offset?: number): this;
-
- /**
- * Writes a 32-bit signed integer (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeInt32BE(value: number, offset?: number): this;
-
- /**
- * Writes a 32-bit signed integer (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeInt32LE(value: number, offset?: number): this;
-
- // Unsigned number writers
-
- /**
- * Writes a 8-bit unsigned integer value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeUInt8(value: number, offset?: number): this;
-
- /**
- * Writes a 16-bit unsigned integer (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeUInt16BE(value: number, offset?: number): this;
-
- /**
- * Writes a 16-bit unsigned integer (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeUInt16LE(value: number, offset?: number): this;
-
- /**
- * Writes a 32-bit unsigned integer (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeUInt32BE(value: number, offset?: number): this;
-
- /**
- * Writes a 32-bit unsigned integer (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeUInt32LE(value: number, offset?: number): this;
-
- // Floating point writers
-
- /**
- * Writes a float (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeFloatBE(value: number, offset?: number): this;
-
- /**
- * Writes a float (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeFloatLE(value: number, offset?: number): this;
-
- /**
- * Writes a double (big endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeDoubleBE(value: number, offset?: number): this;
-
- /**
- * Writes a double (little endian) value
- *
- * @param value { Number } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeDoubleLE(value: number, offset?: number): this;
-
- // String writers
-
- /**
- * Writes a string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- /**
- * Writes a string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { String } The encoding to use when writing the string (defaults to instance level encoding)
- */
- /**
- * Writes a string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- * @param encoding { String } The encoding to use when writing the string (defaults to instance level encoding)
- */
- writeString(value: string, offset?: number | string, encoding?: string): this;
-
- /**
- * Writes a null terminated string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- */
- /**
- * Writes a null terminated string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { String } The encoding to use when writing the string (defaults to instance level encoding)
- */
- /**
- * Writes a null terminated string
- *
- * @param value { String } The value to write to the buffer
- * @param offset { Number } The offset position to write the value to
- * @param encoding { String } The encoding to use when writing the string (defaults to instance level encoding)
- */
- writeStringNT(value: string, offset?: number | string, encoding?: string): this;
-
- // Buffer writers
-
- /**
- * Writes a Buffer
- *
- * @param value { Buffer } The Buffer to write to the smart buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeBuffer(value: Buffer, offset?: number): this;
-
- /**
- * Writes a Buffer with null termination
- *
- * @param value { Buffer } The buffer to write to the smart buffer
- * @param offset { Number } The offset position to write the value to
- */
- writeBufferNT(value: Buffer, offset?: number): this;
-
-
- // Misc Functions
-
- /**
- * Clears the smart buffer
- */
- clear();
-
- /**
- * Gets the number of bytes that remain to be read
- */
- remaining(): number;
-
- /**
- * Increases the read offset position
- *
- * @param amount { Number } The amount to increase the read offset position by
- */
- skip(amount: number);
-
- /**
- * Changes the read offset position
- *
- * @param position { Number } The position to change the read offset to
- */
- skipTo(position: number);
-
- /**
- * Decreases the read offset position
- *
- * @param amount { Number } The amount to decrease the read offset position by
- */
- rewind(amount: number);
-
- /**
- * Gets the underlying Buffer instance
- */
- toBuffer(): Buffer;
-
- /**
- * Gets the string representation of the underlying Buffer
- *
- * @param encoding { String } The encoding to use (defaults to instance level encoding)
- */
- toString(encoding?: string): string;
-
- /**
- * Destroys the smart buffer instance
- */
- destroy();
-
- /**
- * Gets the current length of the smart buffer instance
- */
- length: number;
-}
-
-export = SmartBuffer; \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/.npmignore b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/.npmignore
deleted file mode 100644
index 07e6e472cc..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-/node_modules
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/.travis.yml b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/.travis.yml
deleted file mode 100644
index 805d3d50d2..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-sudo: false
-
-language: node_js
-
-node_js:
- - "4"
- - "5"
- - "6"
- - "7"
- - "8"
-
-install:
- - PATH="`npm bin`:`npm bin -g`:$PATH"
- # Install dependencies and build
- - npm install
-
-script:
- # Output useful info for debugging
- - node --version
- - npm --version
- # Run tests
- - npm test
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/History.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/History.md
deleted file mode 100644
index b0266b5e35..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/History.md
+++ /dev/null
@@ -1,96 +0,0 @@
-
-3.0.1 / 2017-09-18
-==================
-
- * update "agent-base" to v4.1.0
-
-3.0.0 / 2017-06-13
-==================
-
- * [BREAKING] drop support for Node < 4
- * update deps, remove `extend` dependency
- * rename `socks-proxy-agent.js` to `index.js`
-
-2.1.1 / 2017-06-13
-==================
-
- * fix a bug where `close` would emit before `end`
- * use "raw-body" module for tests
- * prettier
-
-2.1.0 / 2017-05-24
-==================
-
- * DRY post-lookup logic
- * Fix an error in readme (#13, @599316527)
- * travis: test node v5
- * travis: test iojs v1, 2, 3 and node.js v4
- * test: use ssl-cert-snakeoil cert files
- * Authentication support (#9, @baryshev)
-
-2.0.0 / 2015-07-10
-==================
-
- * API CHANGE! Removed `secure` boolean second argument in constructor
- * upgrade to "agent-base" v2 API
- * package: update "extend" to v3
-
-1.0.2 / 2015-07-01
-==================
-
- * remove "v4a" from description
- * socks-proxy-agent: cast `port` to a Number
- * travis: attempt to make node v0.8 work
- * travis: test node v0.12, don't test v0.11
- * test: pass `rejectUnauthorized` as a proxy opt
- * test: catch http.ClientRequest errors
- * test: add self-signed SSL server cert files
- * test: refactor to use local SOCKS, HTTP and HTTPS servers
- * README: use SVG for Travis-CI badge
-
-1.0.1 / 2015-03-01
-==================
-
- * switched from using "socks-client" to "socks" (#5, @JoshGlazebrook)
-
-1.0.0 / 2015-02-11
-==================
-
- * add client-side DNS lookup logic for 4 and 5 version socks proxies
- * remove dead `onproxyconnect()` code function
- * use a switch statement to decide the socks `version`
- * refactor to use "socks-client" instead of "rainbowsocks"
- * package: remove "rainbowsocks" dependency
- * package: allow any "mocha" v2
-
-0.1.2 / 2014-06-11
-==================
-
- * package: update "rainbowsocks" to v0.1.2
- * travis: don't test node v0.9
-
-0.1.1 / 2014-04-09
-==================
-
- * package: update outdated dependencies
- * socks-proxy-agent: pass `secure` flag when no `new`
- * socks-proxy-agent: small code cleanup
-
-0.1.0 / 2013-11-19
-==================
-
- * add .travis.yml file
- * socks-proxy-agent: properly mix in the proxy options
- * socks-proxy-agent: coerce the `secureEndpoint` into a Boolean
- * socks-proxy-agent: use "extend" module
- * socks-proxy-agent: update to "agent-base" v1 API
-
-0.0.2 / 2013-07-24
-==================
-
- * socks-proxy-agent: properly set the `defaultPort` property
-
-0.0.1 / 2013-07-11
-==================
-
- * Initial release
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/README.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/README.md
deleted file mode 100644
index 30d33500af..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/README.md
+++ /dev/null
@@ -1,134 +0,0 @@
-socks-proxy-agent
-================
-### A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
-[![Build Status](https://travis-ci.org/TooTallNate/node-socks-proxy-agent.svg?branch=master)](https://travis-ci.org/TooTallNate/node-socks-proxy-agent)
-
-This module provides an `http.Agent` implementation that connects to a
-specified SOCKS proxy server, and can be used with the built-in `http`
-or `https` modules.
-
-It can also be used in conjunction with the `ws` module to establish a WebSocket
-connection over a SOCKS proxy. See the "Examples" section below.
-
-Installation
-------------
-
-Install with `npm`:
-
-``` bash
-$ npm install socks-proxy-agent
-```
-
-
-Examples
---------
-
-#### `http` module example
-
-``` js
-var url = require('url');
-var http = require('http');
-var SocksProxyAgent = require('socks-proxy-agent');
-
-// SOCKS proxy to connect to
-var proxy = process.env.socks_proxy || 'socks://127.0.0.1:9050';
-console.log('using proxy server %j', proxy);
-
-// HTTP endpoint for the proxy to connect to
-var endpoint = process.argv[2] || 'http://nodejs.org/api/';
-console.log('attempting to GET %j', endpoint);
-var opts = url.parse(endpoint);
-
-// create an instance of the `SocksProxyAgent` class with the proxy server information
-var agent = new SocksProxyAgent(proxy);
-opts.agent = agent;
-
-http.get(opts, function (res) {
- console.log('"response" event!', res.headers);
- res.pipe(process.stdout);
-});
-```
-
-#### `https` module example
-
-``` js
-var url = require('url');
-var https = require('https');
-var SocksProxyAgent = require('socks-proxy-agent');
-
-// SOCKS proxy to connect to
-var proxy = process.env.socks_proxy || 'socks://127.0.0.1:9050';
-console.log('using proxy server %j', proxy);
-
-// HTTP endpoint for the proxy to connect to
-var endpoint = process.argv[2] || 'https://encrypted.google.com/';
-console.log('attempting to GET %j', endpoint);
-var opts = url.parse(endpoint);
-
-// create an instance of the `SocksProxyAgent` class with the proxy server information
-// NOTE: the `true` second argument! Means to use TLS encryption on the socket
-var agent = new SocksProxyAgent(proxy, true);
-opts.agent = agent;
-
-https.get(opts, function (res) {
- console.log('"response" event!', res.headers);
- res.pipe(process.stdout);
-});
-```
-
-#### `ws` WebSocket connection example
-
-``` js
-var WebSocket = require('ws');
-var SocksProxyAgent = require('socks-proxy-agent');
-
-// SOCKS proxy to connect to
-var proxy = process.env.socks_proxy || 'socks://127.0.0.1:9050';
-console.log('using proxy server %j', proxy);
-
-// WebSocket endpoint for the proxy to connect to
-var endpoint = process.argv[2] || 'ws://echo.websocket.org';
-console.log('attempting to connect to WebSocket %j', endpoint);
-
-// create an instance of the `SocksProxyAgent` class with the proxy server information
-var agent = new SocksProxyAgent(proxy);
-
-// initiate the WebSocket connection
-var socket = new WebSocket(endpoint, { agent: agent });
-
-socket.on('open', function () {
- console.log('"open" event!');
- socket.send('hello world');
-});
-
-socket.on('message', function (data, flags) {
- console.log('"message" event! %j %j', data, flags);
- socket.close();
-});
-```
-
-License
--------
-
-(The MIT License)
-
-Copyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
-
-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/npm-registry-fetch/node_modules/socks-proxy-agent/index.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/index.js
deleted file mode 100644
index 3dac18d564..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/index.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * Module dependencies.
- */
-
-var tls; // lazy-loaded...
-var url = require('url');
-var dns = require('dns');
-var Agent = require('agent-base');
-var SocksClient = require('socks');
-var inherits = require('util').inherits;
-
-/**
- * Module exports.
- */
-
-module.exports = SocksProxyAgent;
-
-/**
- * The `SocksProxyAgent`.
- *
- * @api public
- */
-
-function SocksProxyAgent(opts) {
- if (!(this instanceof SocksProxyAgent)) return new SocksProxyAgent(opts);
- if ('string' == typeof opts) opts = url.parse(opts);
- if (!opts)
- throw new Error(
- 'a SOCKS proxy server `host` and `port` must be specified!'
- );
- Agent.call(this, opts);
-
- var proxy = Object.assign({}, opts);
-
- // prefer `hostname` over `host`, because of `url.parse()`
- proxy.host = proxy.hostname || proxy.host;
-
- // SOCKS doesn't *technically* have a default port, but this is
- // the same default that `curl(1)` uses
- proxy.port = +proxy.port || 1080;
-
- if (proxy.host && proxy.path) {
- // if both a `host` and `path` are specified then it's most likely the
- // result of a `url.parse()` call... we need to remove the `path` portion so
- // that `net.connect()` doesn't attempt to open that as a unix socket file.
- delete proxy.path;
- delete proxy.pathname;
- }
-
- // figure out if we want socks v4 or v5, based on the "protocol" used.
- // Defaults to 5.
- proxy.lookup = false;
- switch (proxy.protocol) {
- case 'socks4:':
- proxy.lookup = true;
- // pass through
- case 'socks4a:':
- proxy.version = 4;
- break;
- case 'socks5:':
- proxy.lookup = true;
- // pass through
- case 'socks:': // no version specified, default to 5h
- case 'socks5h:':
- proxy.version = 5;
- break;
- default:
- throw new TypeError(
- 'A "socks" protocol must be specified! Got: ' + proxy.protocol
- );
- }
-
- if (proxy.auth) {
- var auth = proxy.auth.split(':');
- proxy.authentication = { username: auth[0], password: auth[1] };
- proxy.userid = auth[0];
- }
- this.proxy = proxy;
-}
-inherits(SocksProxyAgent, Agent);
-
-/**
- * Initiates a SOCKS connection to the specified SOCKS proxy server,
- * which in turn connects to the specified remote host and port.
- *
- * @api public
- */
-
-SocksProxyAgent.prototype.callback = function connect(req, opts, fn) {
- var proxy = this.proxy;
-
- // called once the SOCKS proxy has connected to the specified remote endpoint
- function onhostconnect(err, socket) {
- if (err) return fn(err);
- var s = socket;
- if (opts.secureEndpoint) {
- // since the proxy is connecting to an SSL server, we have
- // to upgrade this socket connection to an SSL connection
- if (!tls) tls = require('tls');
- opts.socket = socket;
- opts.servername = opts.host;
- opts.host = null;
- opts.hostname = null;
- opts.port = null;
- s = tls.connect(opts);
- }
- socket.resume();
- fn(null, s);
- }
-
- // called for the `dns.lookup()` callback
- function onlookup(err, ip) {
- if (err) return fn(err);
- options.target.host = ip;
- SocksClient.createConnection(options, onhostconnect);
- }
-
- var options = {
- proxy: {
- ipaddress: proxy.host,
- port: +proxy.port,
- type: proxy.version
- },
- target: {
- port: +opts.port
- },
- command: 'connect'
- };
- if (proxy.authentication) {
- options.proxy.authentication = proxy.authentication;
- options.proxy.userid = proxy.userid;
- }
-
- if (proxy.lookup) {
- // client-side DNS resolution for "4" and "5" socks proxy versions
- dns.lookup(opts.host, onlookup);
- } else {
- // proxy hostname DNS resolution for "4a" and "5h" socks proxy servers
- onlookup(null, opts.host);
- }
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/package.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/package.json
deleted file mode 100644
index 011f4a61f7..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "_from": "socks-proxy-agent@^3.0.1",
- "_id": "socks-proxy-agent@3.0.1",
- "_inBundle": false,
- "_integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==",
- "_location": "/npm-registry-fetch/socks-proxy-agent",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "socks-proxy-agent@^3.0.1",
- "name": "socks-proxy-agent",
- "escapedName": "socks-proxy-agent",
- "rawSpec": "^3.0.1",
- "saveSpec": null,
- "fetchSpec": "^3.0.1"
- },
- "_requiredBy": [
- "/npm-registry-fetch/make-fetch-happen"
- ],
- "_resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz",
- "_shasum": "2eae7cf8e2a82d34565761539a7f9718c5617659",
- "_spec": "socks-proxy-agent@^3.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen",
- "author": {
- "name": "Nathan Rajlich",
- "email": "nathan@tootallnate.net",
- "url": "http://n8.io/"
- },
- "bugs": {
- "url": "https://github.com/TooTallNate/node-socks-proxy-agent/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "agent-base": "^4.1.0",
- "socks": "^1.1.10"
- },
- "deprecated": false,
- "description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS",
- "devDependencies": {
- "mocha": "^3.4.2",
- "raw-body": "^2.2.0",
- "socksv5": "0.0.6"
- },
- "homepage": "https://github.com/TooTallNate/node-socks-proxy-agent#readme",
- "keywords": [
- "socks",
- "socks4",
- "socks4a",
- "proxy",
- "http",
- "https",
- "agent"
- ],
- "license": "MIT",
- "main": "./index.js",
- "name": "socks-proxy-agent",
- "repository": {
- "type": "git",
- "url": "git://github.com/TooTallNate/node-socks-proxy-agent.git"
- },
- "scripts": {
- "test": "mocha --reporter spec"
- },
- "version": "3.0.1"
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key
deleted file mode 100644
index fd12501220..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr
-bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y
-b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB
-AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd
-Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x
-1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ
-5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW
-T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX
-uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N
-Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw
-h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J
-bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ
-ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg==
------END RSA PRIVATE KEY-----
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem
deleted file mode 100644
index b115a5e914..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3
-NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0
-NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3
-NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
-ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay
-OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn
-g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN
-AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4
-1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J
-QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI=
------END CERTIFICATE-----
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/test.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/test.js
deleted file mode 100644
index 968ef650fb..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent/test/test.js
+++ /dev/null
@@ -1,144 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-var fs = require('fs');
-var url = require('url');
-var http = require('http');
-var https = require('https');
-var assert = require('assert');
-var socks = require('socksv5');
-var getRawBody = require('raw-body');
-var SocksProxyAgent = require('../');
-
-describe('SocksProxyAgent', function () {
- var httpServer, httpPort;
- var httpsServer, httpsPort;
- var socksServer, socksPort;
-
- before(function (done) {
- // setup SOCKS proxy server
- socksServer = socks.createServer(function(info, accept, deny) {
- accept();
- });
- socksServer.listen(0, '127.0.0.1', function() {
- socksPort = socksServer.address().port;
- //console.log('SOCKS server listening on port %d', socksPort);
- done();
- });
- socksServer.useAuth(socks.auth.None());
- //socksServer.useAuth(socks.auth.UserPassword(function(user, password, cb) {
- // cb(user === 'nodejs' && password === 'rules!');
- //}));
- });
-
- before(function (done) {
- // setup target HTTP server
- httpServer = http.createServer();
- httpServer.listen(function () {
- httpPort = httpServer.address().port;
- done();
- });
- });
-
- before(function (done) {
- // setup target SSL HTTPS server
- var options = {
- key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
- cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
- };
- httpsServer = https.createServer(options);
- httpsServer.listen(function () {
- httpsPort = httpsServer.address().port;
- done();
- });
- });
-
- after(function (done) {
- socksServer.once('close', function () { done(); });
- socksServer.close();
- });
-
- after(function (done) {
- httpServer.once('close', function () { done(); });
- httpServer.close();
- });
-
- after(function (done) {
- httpsServer.once('close', function () { done(); });
- httpsServer.close();
- });
-
- describe('constructor', function () {
- it('should throw an Error if no "proxy" argument is given', function () {
- assert.throws(function () {
- new SocksProxyAgent();
- });
- });
- it('should accept a "string" proxy argument', function () {
- var agent = new SocksProxyAgent('socks://127.0.0.1:' + socksPort);
- assert.equal('127.0.0.1', agent.proxy.host);
- assert.equal(socksPort, agent.proxy.port);
- });
- it('should accept a `url.parse()` result object argument', function () {
- var opts = url.parse('socks://127.0.0.1:' + socksPort);
- var agent = new SocksProxyAgent(opts);
- assert.equal('127.0.0.1', agent.proxy.host);
- assert.equal(socksPort, agent.proxy.port);
- });
- });
-
- describe('"http" module', function () {
- it('should work against an HTTP endpoint', function (done) {
- httpServer.once('request', function (req, res) {
- assert.equal('/foo', req.url);
- res.statusCode = 404;
- res.end(JSON.stringify(req.headers));
- });
-
- var agent = new SocksProxyAgent('socks://127.0.0.1:' + socksPort);
- var opts = url.parse('http://127.0.0.1:' + httpPort + '/foo');
- opts.agent = agent;
- opts.headers = { foo: 'bar' };
- var req = http.get(opts, function (res) {
- assert.equal(404, res.statusCode);
- getRawBody(res, 'utf8', function (err, buf) {
- if (err) return done(err);
- var data = JSON.parse(buf);
- assert.equal('bar', data.foo);
- done();
- });
- });
- req.once('error', done);
- });
- });
-
- describe('"https" module', function () {
- it('should work against an HTTPS endpoint', function (done) {
- httpsServer.once('request', function (req, res) {
- assert.equal('/foo', req.url);
- res.statusCode = 404;
- res.end(JSON.stringify(req.headers));
- });
-
- var agent = new SocksProxyAgent('socks://127.0.0.1:' + socksPort);
- var opts = url.parse('https://127.0.0.1:' + httpsPort + '/foo');
- opts.agent = agent;
- opts.rejectUnauthorized = false;
-
- opts.headers = { foo: 'bar' };
- var req = https.get(opts, function (res) {
- assert.equal(404, res.statusCode);
- getRawBody(res, 'utf8', function (err, buf) {
- if (err) return done(err);
- var data = JSON.parse(buf);
- assert.equal('bar', data.foo);
- done();
- });
- });
- req.once('error', done);
- });
- });
-
-});
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/.npmignore b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/.npmignore
deleted file mode 100644
index 7deddced8b..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules
-.git*
-.idea
-npm-debug.log \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/LICENSE b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/LICENSE
deleted file mode 100644
index b2442a9e71..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Josh Glazebrook
-
-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/npm-registry-fetch/node_modules/socks/README.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/README.md
deleted file mode 100644
index 890b7deb6a..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/README.md
+++ /dev/null
@@ -1,339 +0,0 @@
-socks
-=============
-
-socks is a full client implementation of the SOCKS 4, 4a, and 5 protocols in an easy to use node.js module.
-
-### Notice
-As of February 26th, 2015, socks is the new home of the socks-client package.
-
-### Why socks?
-
-There is not any other SOCKS proxy client library on npm that supports all three variants of the SOCKS protocol. Nor are there any that support the BIND and associate features that some versions of the SOCKS protocol supports.
-
-Key Features:
-* Supports SOCKS 4, 4a, and 5 protocols
-* Supports the connect method (simple tcp connections of SOCKS) (Client -> SOCKS Server -> Target Server)
-* Supports the BIND method (4, 4a, 5)
-* Supports the associate (UDP forwarding) method (5)
-* Simple and easy to use (one function call to make any type of SOCKS connection)
-
-## Installing:
-
-`npm install socks`
-
-### Getting Started Example
-
-For this example, say you wanted to grab the html of google's home page.
-
-```javascript
-var Socks = require('socks');
-
-var options = {
- proxy: {
- ipaddress: "202.101.228.108", // Random public proxy
- port: 1080,
- type: 5 // type is REQUIRED. Valid types: [4, 5] (note 4 also works for 4a)
- },
- target: {
- host: "google.com", // can be an ip address or domain (4a and 5 only)
- port: 80
- },
- command: 'connect' // This defaults to connect, so it's optional if you're not using BIND or Associate.
-};
-
-Socks.createConnection(options, function(err, socket, info) {
- if (err)
- console.log(err);
- else {
- // Connection has been established, we can start sending data now:
- socket.write("GET / HTTP/1.1\nHost: google.com\n\n");
- socket.on('data', function(data) {
- console.log(data.length);
- console.log(data);
- });
-
- // PLEASE NOTE: sockets need to be resumed before any data will come in or out as they are paused right before this callback is fired.
- socket.resume();
-
- // 569
- // <Buffer 48 54 54 50 2f 31 2e 31 20 33 30 31 20 4d 6f 76 65 64 20 50 65...
- }
-});
-```
-
-### BIND Example:
-
-When sending the BIND command to a SOCKS proxy server, this will cause the proxy server to open up a new tcp port. Once this port is open, you, another client, application, etc, can then connect to the SOCKS proxy on that tcp port and communications will be forwarded to each connection through the proxy itself.
-
-```javascript
-var options = {
- proxy: {
- ipaddress: "202.101.228.108",
- port: 1080,
- type: 4,
- command: "bind" // Since we are using bind, we must specify it here.
- },
- target: {
- host: "1.2.3.4", // When using bind, it's best to give an estimation of the ip that will be connecting to the newly opened tcp port on the proxy server.
- port: 1080
- }
-};
-
-Socks.createConnection(options, function(err, socket, info) {
- if (err)
- console.log(err);
- else {
- // BIND request has completed.
- // info object contains the remote ip and newly opened tcp port to connect to.
- console.log(info);
-
- // { port: 1494, host: '202.101.228.108' }
-
- socket.on('data', function(data) {
- console.log(data.length);
- console.log(data);
- });
-
- // Remember to resume the socket stream.
- socket.resume();
- }
-});
-
-```
-At this point, your original connection to the proxy server remains open, and no data will be received until a tcp connection is made to the given endpoint in the info object.
-
-For an example, I am going to connect to the endpoint with telnet:
-
-```
-Joshs-MacBook-Pro:~ Josh$ telnet 202.101.228.108 1494
- Trying 202.101.228.108...
- Connected to 202.101.228.108.
- Escape character is '^]'.
- hello
- aaaaaaaaa
-```
-
-Note that this connection to the newly bound port does not need to go through the SOCKS handshake.
-
-Back at our original connection we see that we have received some new data:
-
-```
-8
-<Buffer 00 5a ca 61 43 a8 09 01> // This first piece of information can be ignored.
-
-7
-<Buffer 68 65 6c 6c 6f 0d 0a> // Hello <\r\n (enter key)>
-
-11
-<Buffer 61 61 61 61 61 61 61 61 61 0d 0a> // aaaaaaaaa <\r\n (enter key)>
-```
-
-As you can see the data entered in the telnet terminal is routed through the SOCKS proxy and back to the original connection that was made to the proxy.
-
-**Note** Please pay close attention to the first piece of data that was received.
-
-```
-<Buffer 00 5a ca 61 43 a8 09 01>
-
- [005a] [PORT:2} [IP:4]
-```
-
-This piece of data is technically part of the SOCKS BIND specifications, but because of my design decisions that were made in an effort to keep this library simple to use, you will need to make sure to ignore and/or deal with this initial packet that is received when a connection is made to the newly opened port.
-
-### Associate Example:
-The associate command sets up a UDP relay for the remote SOCKS proxy server to relay UDP packets to the remote host of your choice.
-
-```javascript
-var options = {
- proxy: {
- ipaddress: "202.101.228.108",
- port: 1080,
- type: 5,
- command: "associate" // Since we are using associate, we must specify it here.
- },
- target: {
- // When using associate, either set the ip and port to 0.0.0.0:0 or the expected source of incoming udp packets.
- // Note: Some SOCKS servers MAY block associate requests with 0.0.0.0:0 endpoints.
- // Note: ipv4, ipv6, and hostnames are supported here.
- host: "0.0.0.0",
- port: 0
- }
-};
-
-
-Socks.createConnection(options, function(err, socket, info) {
- if (err)
- console.log(err);
- else {
- // Associate request has completed.
- // info object contains the remote ip and udp port to send UDP packets to.
- console.log(info);
- // { port: 42803, host: '202.101.228.108' }
-
- var udp = new dgram.Socket('udp4');
-
- // In this example we are going to send "Hello" to 1.2.3.4:2323 through the SOCKS proxy.
-
- var pack = Socks.createUDPFrame({ host: "1.2.3.4", port: 2323}, new Buffer("hello"));
-
- // Send Packet to Proxy UDP endpoint given in the info object.
- udp.send(pack, 0, pack.length, info.port, info.host);
- }
-});
-
-```
-Now assuming that the associate request went through correctly. Anything that is typed in the stdin will first be sent to the SOCKS proxy on the endpoint that was provided in the info object. Once the SOCKS proxy receives it, it will then forward on the actual UDP packet to the host you you wanted.
-
-
-1.2.3.4:2323 should now receive our relayed UDP packet from 202.101.228.108 (SOCKS proxy)
-```
-// <Buffer 68 65 6c 6c 6f>
-```
-
-## Using socks as an HTTP Agent
-
-You can use socks as a http agent which will relay all your http
-connections through the socks server.
-
-The object that `Socks.Agent` accepts is the same as `Socks.createConnection`, you don't need to set a target since you have to define it in `http.request` or `http.get` methods.
-
-The second argument is a boolean which indicates whether the remote endpoint requires TLS.
-
-```javascript
-var socksAgent = new Socks.Agent({
- proxy: {
- ipaddress: "202.101.228.108",
- port: 1080,
- type: 5,
- }},
- true, // we are connecting to a HTTPS server, false for HTTP server
- false // rejectUnauthorized option passed to tls.connect(). Only when secure is set to true
-);
-
-http.get({ hostname: 'google.com', port: '443', agent: socksAgent}, function (res) {
- // Connection header by default is keep-alive, we have to manually end the socket
- socksAgent.encryptedSocket.end();
-});
-```
-
-# Api Reference:
-
-There are only three exported functions that you will ever need to use.
-
-### Socks.createConnection( options, callback(err, socket, info) )
-> `Object` **Object containing options to use when creating this connection**
-
-> `function` **Callback that is called when connection completes or errors**
-
-Options:
-
-```javascript
-var options = {
-
- // Information about proxy server
- proxy: {
- // IP Address of Proxy (Required)
- ipaddress: "1.2.3.4",
-
- // TCP Port of Proxy (Required)
- port: 1080,
-
- // Proxy Type [4, 5] (Required)
- // Note: 4 works for both 4 and 4a.
- type: 4,
-
- // SOCKS Connection Type (Optional)
- // - defaults to 'connect'
-
- // 'connect' - establishes a regular SOCKS connection to the target host.
- // 'bind' - establishes an open tcp port on the SOCKS for another client to connect to.
- // 'associate' - establishes a udp association relay on the SOCKS server.
- command: "connect",
-
-
- // SOCKS 4 Specific:
-
- // UserId used when making a SOCKS 4/4a request. (Optional)
- userid: "someuserid",
-
- // SOCKS 5 Specific:
-
- // Authentication used for SOCKS 5 (when it's required) (Optional)
- authentication: {
- username: "Josh",
- password: "somepassword"
- }
- },
-
- // Information about target host and/or expected client of a bind association. (Required)
- target: {
- // When using 'connect': IP Address or hostname (4a and 5 only) of a target to connect to.
- // When using 'bind': IP Address of the expected client that will connect to the newly open tcp port.
- // When using 'associate': IP Address and Port of the expected client that will send UDP packets to this UDP association relay.
-
- // Note:
- // When using SOCKS 4, only an ipv4 address can be used.
- // When using SOCKS 4a, an ipv4 address OR a hostname can be used.
- // When using SOCKS 5, ipv4, ipv6, or a hostname can be used.
- host: "1.2.3.4",
-
- // TCP port of target to connect to.
- port: 1080
- },
-
- // Amount of time to wait for a connection to be established. (Optional)
- // - defaults to 10000ms (10 seconds)
- timeout: 10000
-};
-```
-Callback:
-
-```javascript
-
-// err: If an error occurs, err will be an Error object, otherwise null.
-// socket: Socket with established connection to your target host.
-// info: If using BIND or associate, this will be the remote endpoint to use.
-
-function(err, socket, info) {
- // Hopefully no errors :-)
-}
-```
-
-### Socks.createUDPFrame( target, data, [frame] )
-> `Object` **Target host object containing destination for UDP packet**
-
-> `Buffer` **Data Buffer to send in the UDP packet**
-
-> `Number` **Frame number in UDP packet. (defaults to 0)**
-
-Creates a UDP packet frame for using with UDP association relays.
-
-returns `Buffer` The completed UDP packet container to be sent to the proxy for forwarding.
-
-target:
-```javascript
-
-// Target host information for where the UDP packet should be sent.
-var target =
- {
- // ipv4, ipv6, or hostname for where to have the proxy send the UDP packet.
- host: "1.2.3.4",
-
- // udpport for where to send the UDP packet.
- port: 2323
- }
-
-```
-
-### Socks.Agent( options, tls) )
-> `Object` **Object containing options to use when creating this connection (see above in createConnection)**
-
-> `boolean` **Boolean indicating if we upgrade the connection to TLS on the socks server**
-
-
-# Further Reading:
-Please read the SOCKS 5 specifications for more information on how to use BIND and Associate.
-http://www.ietf.org/rfc/rfc1928.txt
-
-# License
-This work is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/associate.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/associate.js
deleted file mode 100644
index 82d6afa97b..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/associate.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var Socks = require('../index.js');
-var dgram = require('dgram');
-
-var options = {
- proxy: {
- ipaddress: "202.101.228.108",
- port: 1080,
- type: 5,
- command: 'associate'
- },
-
- target: {
- host: "0.0.0.0",
- port: 0
- }
-};
-
-Socks.createConnection(options, function(err, socket, info) {
- if (err)
- console.log(err);
- else {
- console.log("Connected");
-
- // Associate request completed.
- // Now we can send properly formed UDP packet frames to this endpoint for forwarding:
- console.log(info);
- // { port: 4381, host: '202.101.228.108' }
-
- var udp = new dgram.Socket('udp4');
- var packet = SocksClient.createUDPFrame({ host: "1.2.3.4", port: 5454}, new Buffer("Hello"));
- udp.send(packet, 0, packet.length, info.port, info.host);
- }
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/bind.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/bind.js
deleted file mode 100644
index 4410dd1def..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/bind.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var Socks = require('../index.js');
-
-var options = {
- proxy: {
- ipaddress: "202.101.228.108",
- port: 1080,
- type: 5,
- command: 'bind'
- },
-
- target: {
- host: "0.0.0.0",
- port: 0
- }
-};
-
-Socks.createConnection(options, function(err, socket, info) {
- if (err)
- console.log(err);
- else {
- console.log("Connected");
-
- // BIND request completed, now a tcp client should connect to this endpoint:
- console.log(info);
- // { port: 3334, host: '202.101.228.108' }
-
- // Resume! You need to!
- socket.resume();
- }
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/connect.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/connect.js
deleted file mode 100644
index 528ad4d416..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/connect.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var Socks = require('../index.js');
-
-var options = {
- proxy: {
- ipaddress: "31.193.133.9",
- port: 1081,
- type: 5 // (4 or 5)
- },
-
- target: {
- host: "173.194.33.103", // (google.com)
- port: 80
- }
-};
-
-Socks.createConnection(options, function (err, socket, info) {
- if (err)
- console.log(err);
- else {
- console.log("Connected");
-
- socket.on('data', function (data) {
- // do something with incoming data
- });
-
- // Please remember that sockets need to be resumed before any data will come in.
- socket.resume();
-
- // We can do whatever we want with the socket now.
- }
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/index.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/index.js
deleted file mode 100644
index 29331d4a1c..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var SocksClient = require('./lib/socks-client.js');
-var SocksAgent = require('./lib/socks-agent.js');
-
-exports.createConnection = SocksClient.createConnection;
-exports.createUDPFrame = SocksClient.createUDPFrame;
-exports.Agent = SocksAgent.Agent;
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/lib/socks-agent.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/lib/socks-agent.js
deleted file mode 100644
index db1c301ec9..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/lib/socks-agent.js
+++ /dev/null
@@ -1,108 +0,0 @@
-var tls = require('tls');
-var inherits = require('util').inherits;
-var EventEmitter = require('events').EventEmitter;
-var SocksClient = require('./socks-client.js');
-
-function SocksAgent(options, secure, rejectUnauthorized) {
- this.options = options;
- this.secure = secure || false;
- this.rejectUnauthorized = rejectUnauthorized;
-
- if (this.rejectUnauthorized === undefined) {
- this.rejectUnauthorized = true;
- }
-}
-
-inherits(SocksAgent, EventEmitter);
-
-SocksAgent.prototype.createConnection = function(req, opts, fn) {
- var handler = fn, host, self = this;
-
- this.options.target = this.options.target || {};
-
- if (!this.options.target.host) {
- this.options.target.host = opts.host;
- }
-
- if (!this.options.target.port) {
- this.options.target.port = opts.port;
- }
-
- host = this.options.target.host;
-
- if (this.secure) {
- handler = function(err, socket, info) {
- var options, cleartext;
-
- if (err) {
- return fn(err);
- }
-
- // save encrypted socket
- self.encryptedSocket = socket;
-
- options = {
- socket: socket,
- servername: host,
- rejectUnauthorized: self.rejectUnauthorized
- };
-
- cleartext = tls.connect(options, function (err) {
- return fn(err, this);
- });
- cleartext.on('error', fn);
-
- socket.resume();
- }
- }
-
- SocksClient.createConnection(this.options, handler);
-};
-
-/**
- * @see https://www.npmjs.com/package/agent-base
- */
-SocksAgent.prototype.addRequest = function(req, host, port, localAddress) {
- var opts;
- if ('object' === typeof host) {
- // >= v0.11.x API
- opts = host;
- if (opts.host && opts.path) {
- // if both a `host` and `path` are specified then it's most likely the
- // result of a `url.parse()` call... we need to remove the `path` portion so
- // that `net.connect()` doesn't attempt to open that as a unix socket file.
- delete opts.path;
- }
- } else {
- // <= v0.10.x API
- opts = { host: host, port: port };
- if (null !== localAddress) {
- opts.localAddress = localAddress;
- }
- }
-
- var sync = true;
-
- this.createConnection(req, opts, function (err, socket) {
- function emitErr () {
- req.emit('error', err);
- }
- if (err) {
- if (sync) {
- // need to defer the "error" event, when sync, because by now the `req`
- // instance hasn't event been passed back to the user yet...
- process.nextTick(emitErr);
- } else {
- emitErr();
- }
- } else {
- req.onSocket(socket);
- //have to resume this socket when node 12
- socket.resume();
- }
- });
-
- sync = false;
-};
-
-exports.Agent = SocksAgent;
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/lib/socks-client.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/lib/socks-client.js
deleted file mode 100644
index 4a31f62c32..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/lib/socks-client.js
+++ /dev/null
@@ -1,306 +0,0 @@
-var net = require('net');
-var ip = require('ip');
-var SmartBuffer = require('smart-buffer');
-
-(function () {
-
- var COMMAND = {
- Connect: 0x01,
- Bind: 0x02,
- Associate: 0x03
- };
-
- var SOCKS4_RESPONSE = {
- Granted: 0x5A,
- Failed: 0x5B,
- Rejected: 0x5C,
- RejectedIdent: 0x5D
- };
-
- var SOCKS5_AUTH = {
- NoAuth: 0x00,
- GSSApi: 0x01,
- UserPass: 0x02
- };
-
- var SOCKS5_RESPONSE = {
- Granted: 0x00,
- Failure: 0x01,
- NotAllowed: 0x02,
- NetworkUnreachable: 0x03,
- HostUnreachable: 0x04,
- ConnectionRefused: 0x05,
- TTLExpired: 0x06,
- CommandNotSupported: 0x07,
- AddressNotSupported: 0x08
- };
-
-
- exports.createConnection = function (options, callback) {
- var socket = new net.Socket(), finished = false, buff = new SmartBuffer();
-
- // Defaults
- options.timeout = options.timeout || 10000;
- options.proxy.command = commandFromString(options.proxy.command);
- options.proxy.userid = options.proxy.userid || "";
-
- var auth = options.proxy.authentication || {};
- auth.username = auth.username || "";
- auth.password = auth.password || "";
-
- options.proxy.authentication = auth;
-
- // Connect & negotiation timeout
- function onTimeout() {
- finish(new Error("Connection Timed Out"), socket, null, callback);
- }
- socket.setTimeout(options.timeout, onTimeout);
-
- // Socket events
- socket.once('close', function () {
- finish(new Error("Socket Closed"), socket, null, callback);
- });
-
- socket.once('error', function (err) {
- });
-
- socket.once('connect', function () {
- if (options.proxy.type === 4) {
- negotiateSocks4(options, socket, callback);
- } else if (options.proxy.type === 5) {
- negotiateSocks5(options, socket, callback);
- } else {
- throw new Error("Please specify a proxy type in options.proxy.type");
- }
- });
-
- socket.connect(options.proxy.port, options.proxy.ipaddress);
-
-
- // 4/4a (connect, bind) - Supports domains & ipaddress
- function negotiateSocks4(options, socket, callback) {
- buff.writeUInt8(0x04);
- buff.writeUInt8(options.proxy.command);
- buff.writeUInt16BE(options.target.port);
-
- // ipv4 or domain?
- if (net.isIPv4(options.target.host)) {
- buff.writeBuffer(ip.toBuffer(options.target.host));
- buff.writeStringNT(options.proxy.userid);
- } else {
- buff.writeUInt8(0x00);
- buff.writeUInt8(0x00);
- buff.writeUInt8(0x00);
- buff.writeUInt8(0x01);
- buff.writeStringNT(options.proxy.userid);
- buff.writeStringNT(options.target.host);
- }
-
- socket.once('data', receivedResponse);
- socket.write(buff.toBuffer());
-
- function receivedResponse(data) {
- socket.pause();
- if (data.length === 8 && data[1] === SOCKS4_RESPONSE.Granted) {
-
- if (options.proxy.command === COMMAND.Bind) {
- buff.clear();
- buff.writeBuffer(data);
- buff.skip(2);
-
- var info = {
- port: buff.readUInt16BE(),
- host: buff.readUInt32BE()
- };
-
- if (info.host === 0) {
- info.host = options.proxy.ipaddress;
- } else {
- info.host = ip.fromLong(info.host);
- }
-
- finish(null, socket, info, callback);
- } else {
- finish(null, socket, null, callback);
- }
-
- } else {
- finish(new Error("Rejected (" + data[1] + ")"), socket, null, callback);
- }
- }
- }
-
- // Socks 5 (connect, bind, associate) - Supports domains and ipv4, ipv6.
- function negotiateSocks5(options, socket, callback) {
- buff.writeUInt8(0x05);
- buff.writeUInt8(2);
- buff.writeUInt8(SOCKS5_AUTH.NoAuth);
- buff.writeUInt8(SOCKS5_AUTH.UserPass);
-
- socket.once('data', handshake);
- socket.write(buff.toBuffer());
-
- function handshake(data) {
- if (data.length !== 2) {
- finish(new Error("Negotiation Error"), socket, null, callback);
- } else if (data[0] !== 0x05) {
- finish(new Error("Negotiation Error (invalid version)"), socket, null, callback);
- } else if (data[1] === 0xFF) {
- finish(new Error("Negotiation Error (unacceptable authentication)"), socket, null, callback);
- } else {
- if (data[1] === SOCKS5_AUTH.NoAuth) {
- sendRequest();
- } else if (data[1] === SOCKS5_AUTH.UserPass) {
- sendAuthentication(options.proxy.authentication);
- } else {
- finish(new Error("Negotiation Error (unknown authentication type)"), socket, null, callback);
- }
- }
- }
-
- function sendAuthentication(authinfo) {
- buff.clear();
- buff.writeUInt8(0x01);
- buff.writeUInt8(Buffer.byteLength(authinfo.username));
- buff.writeString(authinfo.username);
- buff.writeUInt8(Buffer.byteLength(authinfo.password));
- buff.writeString(authinfo.password);
-
- socket.once('data', authenticationResponse);
- socket.write(buff.toBuffer());
-
- function authenticationResponse(data) {
- if (data.length === 2 && data[1] === 0x00) {
- sendRequest();
- } else {
- finish(new Error("Negotiation Error (authentication failed)"), socket, null, callback);
- }
- }
- }
-
- function sendRequest() {
- buff.clear();
- buff.writeUInt8(0x05);
- buff.writeUInt8(options.proxy.command);
- buff.writeUInt8(0x00);
-
- // ipv4, ipv6, domain?
- if (net.isIPv4(options.target.host)) {
- buff.writeUInt8(0x01);
- buff.writeBuffer(ip.toBuffer(options.target.host));
- } else if (net.isIPv6(options.target.host)) {
- buff.writeUInt8(0x04);
- buff.writeBuffer(ip.toBuffer(options.target.host));
- } else {
- buff.writeUInt8(0x03);
- buff.writeUInt8(options.target.host.length);
- buff.writeString(options.target.host);
- }
- buff.writeUInt16BE(options.target.port);
-
- socket.once('data', receivedResponse);
- socket.write(buff.toBuffer());
- }
-
- function receivedResponse(data) {
- socket.pause();
- if (data.length < 4) {
- finish(new Error("Negotiation Error"), socket, null, callback);
- } else if (data[0] === 0x05 && data[1] === SOCKS5_RESPONSE.Granted) {
- if (options.proxy.command === COMMAND.Connect) {
- finish(null, socket, null, callback);
- } else if (options.proxy.command === COMMAND.Bind || options.proxy.command === COMMAND.Associate) {
- buff.clear();
- buff.writeBuffer(data);
- buff.skip(3);
-
- var info = {};
- var addrtype = buff.readUInt8();
-
- try {
-
- if (addrtype === 0x01) {
- info.host = buff.readUInt32BE();
- if (info.host === 0)
- info.host = options.proxy.ipaddress;
- else
- info.host = ip.fromLong(info.host);
- } else if (addrtype === 0x03) {
- var len = buff.readUInt8();
- info.host = buff.readString(len);
- } else if (addrtype === 0x04) {
- info.host = buff.readBuffer(16);
- } else {
- finish(new Error("Negotiation Error (invalid host address)"), socket, null, callback);
- }
- info.port = buff.readUInt16BE();
-
- finish(null, socket, info, callback);
- } catch (ex) {
- finish(new Error("Negotiation Error (missing data)"), socket, null, callback);
- }
- }
- } else {
- finish(new Error("Negotiation Error (" + data[1] + ")"), socket, null, callback);
- }
- }
- }
-
- function finish(err, socket, info, callback) {
- socket.setTimeout(0, onTimeout);
- if (!finished) {
- finished = true;
-
- if (buff instanceof SmartBuffer)
- buff.destroy();
-
- if (err && socket instanceof net.Socket) {
- socket.removeAllListeners('close');
- socket.removeAllListeners('timeout');
- socket.removeAllListeners('data');
- socket.destroy();
- socket = null;
- }
-
- callback(err, socket, info);
- }
- }
-
- function commandFromString(str) {
- var result = COMMAND.Connect;
-
- if (str === "connect") {
- result = COMMAND.Connect;
- } else if (str === 'associate') {
- result = COMMAND.Associate;
- } else if (str === 'bind') {
- result = COMMAND.Bind;
- }
-
- return result;
- }
- };
-
-
- exports.createUDPFrame = function (target, data, frame) {
- var buff = new SmartBuffer();
- buff.writeUInt16BE(0);
- buff.writeUInt8(frame || 0x00);
-
- if (net.isIPv4(target.host)) {
- buff.writeUInt8(0x01);
- buff.writeUInt32BE(ip.toLong(target.host));
- } else if (net.isIPv6(target.host)) {
- buff.writeUInt8(0x04);
- buff.writeBuffer(ip.toBuffer(target.host));
- } else {
- buff.writeUInt8(0x03);
- buff.writeUInt8(Buffer.byteLength(target.host));
- buff.writeString(target.host);
- }
-
- buff.writeUInt16BE(target.port);
- buff.writeBuffer(data);
- return buff.toBuffer();
- };
-})();
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/package.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/package.json
deleted file mode 100644
index e4884cd472..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/package.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "_from": "socks@^1.1.10",
- "_id": "socks@1.1.10",
- "_inBundle": false,
- "_integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=",
- "_location": "/npm-registry-fetch/socks",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "socks@^1.1.10",
- "name": "socks",
- "escapedName": "socks",
- "rawSpec": "^1.1.10",
- "saveSpec": null,
- "fetchSpec": "^1.1.10"
- },
- "_requiredBy": [
- "/npm-registry-fetch/socks-proxy-agent"
- ],
- "_resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz",
- "_shasum": "5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a",
- "_spec": "socks@^1.1.10",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent",
- "author": {
- "name": "Josh Glazebrook"
- },
- "bugs": {
- "url": "https://github.com/JoshGlazebrook/socks/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Samuel Gordalina"
- }
- ],
- "dependencies": {
- "ip": "^1.1.4",
- "smart-buffer": "^1.0.13"
- },
- "deprecated": false,
- "description": "A SOCKS proxy client supporting SOCKS 4, 4a, and 5. (also supports BIND/Associate)",
- "engines": {
- "node": ">= 0.10.0",
- "npm": ">= 1.3.5"
- },
- "homepage": "https://github.com/JoshGlazebrook/socks",
- "keywords": [
- "socks",
- "proxy",
- "client",
- "tor",
- "bind",
- "associate",
- "socks 4",
- "socks 4a",
- "socks 5",
- "agent"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "socks",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/JoshGlazebrook/socks.git"
- },
- "version": "1.1.10"
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/CHANGELOG.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/CHANGELOG.md
deleted file mode 100644
index 5c06894881..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/CHANGELOG.md
+++ /dev/null
@@ -1,256 +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.3.0"></a>
-# [5.3.0](https://github.com/zkat/ssri/compare/v5.2.4...v5.3.0) (2018-03-13)
-
-
-### Features
-
-* **checkData:** optionally throw when checkData fails ([bf26b84](https://github.com/zkat/ssri/commit/bf26b84))
-
-
-
-<a name="5.2.4"></a>
-## [5.2.4](https://github.com/zkat/ssri/compare/v5.2.3...v5.2.4) (2018-02-16)
-
-
-
-<a name="5.2.3"></a>
-## [5.2.3](https://github.com/zkat/ssri/compare/v5.2.2...v5.2.3) (2018-02-16)
-
-
-### Bug Fixes
-
-* **hashes:** filter hash priority list by available hashes ([2fa30b8](https://github.com/zkat/ssri/commit/2fa30b8))
-* **integrityStream:** dedupe algorithms to generate ([d56c654](https://github.com/zkat/ssri/commit/d56c654))
-
-
-
-<a name="5.2.2"></a>
-## [5.2.2](https://github.com/zkat/ssri/compare/v5.2.1...v5.2.2) (2018-02-14)
-
-
-### Bug Fixes
-
-* **security:** tweak strict SRI regex ([#10](https://github.com/zkat/ssri/issues/10)) ([d0ebcdc](https://github.com/zkat/ssri/commit/d0ebcdc))
-
-
-
-<a name="5.2.1"></a>
-## [5.2.1](https://github.com/zkat/ssri/compare/v5.2.0...v5.2.1) (2018-02-06)
-
-
-
-<a name="5.2.0"></a>
-# [5.2.0](https://github.com/zkat/ssri/compare/v5.1.0...v5.2.0) (2018-02-06)
-
-
-### Features
-
-* **match:** add integrity.match() ([3c49cc4](https://github.com/zkat/ssri/commit/3c49cc4))
-
-
-
-<a name="5.1.0"></a>
-# [5.1.0](https://github.com/zkat/ssri/compare/v5.0.0...v5.1.0) (2018-01-18)
-
-
-### Bug Fixes
-
-* **checkStream:** integrityStream now takes opts.integrity algos into account ([d262910](https://github.com/zkat/ssri/commit/d262910))
-
-
-### Features
-
-* **sha3:** do some guesswork about upcoming sha3 ([7fdd9df](https://github.com/zkat/ssri/commit/7fdd9df))
-
-
-
-<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/npm-registry-fetch/node_modules/ssri/LICENSE.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/LICENSE.md
deleted file mode 100644
index 8d28acf866..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/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/npm-registry-fetch/node_modules/ssri/README.md b/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/README.md
deleted file mode 100644
index a6c07e7409..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/README.md
+++ /dev/null
@@ -1,488 +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#match`](#integrity-match)
- * [`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-match"></a> `> Integrity#match(sri, [opts]) -> Hash | false`
-
-Returns the matching (truthy) hash if `Integrity` matches the argument passed as
-`sri`, which can be anything that [`parse`](#parse) will accept. `opts` will be
-passed through to `parse` and [`pickAlgorithm()`](#integrity-pick-algorithm).
-
-##### Example
-
-```javascript
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A=='
-
-ssri.parse(integrity).match(integrity)
-// Hash {
-// digest: '9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A=='
-// algorithm: 'sha512'
-// }
-
-ssri.parse(integrity).match('sha1-deadbeef')
-// false
-```
-
-#### <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.
-
-If `opts.error` is true, and verification fails, `checkData` will throw either
-an `EBADSIZE` or an `EINTEGRITY` error, instead of just returning false.
-
-##### 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
-ssri.checkData(data, 'sha1-BaDDigEST', {error: true}) // -> Error! EINTEGRITY
-```
-
-#### <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([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.integrityStream({integrity}))
-```
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/index.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/index.js
deleted file mode 100644
index ff7881f7cb..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/index.js
+++ /dev/null
@@ -1,379 +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+/=]{44,88})(\?[\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()
- }
- match (integrity, opts) {
- const other = parse(integrity, opts)
- const algo = other.pickAlgorithm(opts)
- return (
- this[algo] &&
- other[algo] &&
- this[algo].find(hash =>
- other[algo].find(otherhash =>
- hash.digest === otherhash.digest
- )
- )
- ) || false
- }
- 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) {
- if (opts.error) {
- throw Object.assign(
- new Error('No valid integrity hashes to check against'), {
- code: 'EINTEGRITY'
- }
- )
- } else {
- return false
- }
- }
- const algorithm = sri.pickAlgorithm(opts)
- const digest = crypto.createHash(algorithm).update(data).digest('base64')
- const newSri = parse({algorithm, digest})
- const match = newSri.match(sri, opts)
- if (match || !opts.error) {
- return match
- } else if (typeof opts.size === 'number' && (data.length !== opts.size)) {
- const err = new Error(`data size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${data.length}`)
- err.code = 'EBADSIZE'
- err.found = data.length
- err.expected = opts.size
- err.sri = sri
- throw err
- } else {
- const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`)
- err.code = 'EINTEGRITY'
- err.found = newSri
- err.expected = sri
- err.algorithm = algorithm
- err.sri = sri
- throw err
- }
-}
-
-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 = Array.from(
- new Set(
- (opts.algorithms || ['sha512'])
- .concat(algorithm ? [algorithm] : [])
- )
- )
- 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)
- // Integrity verification mode
- const match = goodSri && newSri.match(sri, opts)
- 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
- }
- }
-}
-
-const NODE_HASHES = new Set(crypto.getHashes())
-
-// This is a Best Effort™ at a reasonable priority for hash algos
-const DEFAULT_PRIORITY = [
- 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512',
- // TODO - it's unclear _which_ of these Node will actually use as its name
- // for the algorithm, so we guesswork it based on the OpenSSL names.
- 'sha3',
- 'sha3-256', 'sha3-384', 'sha3-512',
- 'sha3_256', 'sha3_384', 'sha3_512'
-].filter(algo => NODE_HASHES.has(algo))
-
-function getPrioritizedHash (algo1, algo2) {
- return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase())
- ? algo1
- : algo2
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/package.json b/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/package.json
deleted file mode 100644
index ff219e9d49..0000000000
--- a/deps/npm/node_modules/npm-registry-fetch/node_modules/ssri/package.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "_from": "ssri@^5.2.4",
- "_id": "ssri@5.3.0",
- "_inBundle": false,
- "_integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==",
- "_location": "/npm-registry-fetch/ssri",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ssri@^5.2.4",
- "name": "ssri",
- "escapedName": "ssri",
- "rawSpec": "^5.2.4",
- "saveSpec": null,
- "fetchSpec": "^5.2.4"
- },
- "_requiredBy": [
- "/npm-registry-fetch/cacache",
- "/npm-registry-fetch/make-fetch-happen"
- ],
- "_resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz",
- "_shasum": "ba3872c9c6d33a0704a7d71ff045e5ec48999d06",
- "_spec": "ssri@^5.2.4",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen",
- "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.1"
- },
- "deprecated": false,
- "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",
- "devDependencies": {
- "nyc": "^11.4.1",
- "standard": "^10.0.3",
- "standard-version": "^4.3.0",
- "tap": "^11.1.0",
- "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.3.0"
-}
diff --git a/deps/npm/node_modules/npm-registry-fetch/package.json b/deps/npm/node_modules/npm-registry-fetch/package.json
index 2844ea89a2..81a00978e2 100644
--- a/deps/npm/node_modules/npm-registry-fetch/package.json
+++ b/deps/npm/node_modules/npm-registry-fetch/package.json
@@ -1,64 +1,31 @@
{
- "_args": [
- [
- "npm-registry-fetch@1.1.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "npm-registry-fetch@1.1.0",
- "_id": "npm-registry-fetch@1.1.0",
+ "_from": "npm-registry-fetch@latest",
+ "_id": "npm-registry-fetch@3.8.0",
"_inBundle": false,
- "_integrity": "sha512-XJPIBfMtgaooRtZmuA42xCeLf3tkxdIX0xqRsGWwNrcVvJ9UYFccD7Ho7QWCzvkM3i/QrkUC37Hu0a+vDBmt5g==",
+ "_integrity": "sha512-hrw8UMD+Nob3Kl3h8Z/YjmKamb1gf7D1ZZch2otrIXM3uFLB5vjEY6DhMlq80z/zZet6eETLbOXcuQudCB3Zpw==",
"_location": "/npm-registry-fetch",
- "_phantomChildren": {
- "agent-base": "4.2.0",
- "agentkeepalive": "3.4.1",
- "bluebird": "3.5.1",
- "chownr": "1.0.1",
- "concat-stream": "1.6.2",
- "duplexify": "3.6.0",
- "end-of-stream": "1.4.1",
- "flush-write-stream": "1.0.3",
- "from2": "2.3.0",
- "glob": "7.1.2",
- "graceful-fs": "4.1.11",
- "http-cache-semantics": "3.8.1",
- "http-proxy-agent": "2.1.0",
- "https-proxy-agent": "2.2.1",
- "ip": "1.1.5",
- "lru-cache": "4.1.3",
- "mississippi": "3.0.0",
- "mkdirp": "0.5.1",
- "move-concurrently": "1.0.1",
- "node-fetch-npm": "2.0.2",
- "once": "1.4.0",
- "parallel-transform": "1.1.0",
- "promise-inflight": "1.0.1",
- "promise-retry": "1.1.1",
- "pumpify": "1.5.1",
- "rimraf": "2.6.2",
- "safe-buffer": "5.1.2",
- "stream-each": "1.2.2",
- "through2": "2.0.3",
- "unique-filename": "1.1.0",
- "y18n": "4.0.0"
- },
+ "_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "npm-registry-fetch@1.1.0",
+ "raw": "npm-registry-fetch@latest",
"name": "npm-registry-fetch",
"escapedName": "npm-registry-fetch",
- "rawSpec": "1.1.0",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "1.1.0"
+ "fetchSpec": "latest"
},
"_requiredBy": [
- "/"
+ "#USER",
+ "/",
+ "/libnpmaccess",
+ "/libnpmhook",
+ "/pacote"
],
- "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-1.1.0.tgz",
- "_spec": "1.1.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.8.0.tgz",
+ "_shasum": "aa7d9a7c92aff94f48dba0984bdef4bd131c88cc",
+ "_spec": "npm-registry-fetch@latest",
+ "_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -66,6 +33,7 @@
"bugs": {
"url": "https://github.com/npm/registry-fetch/issues"
},
+ "bundleDependencies": false,
"config": {
"nyc": {
"exclude": [
@@ -75,24 +43,26 @@
}
},
"dependencies": {
+ "JSONStream": "^1.3.4",
"bluebird": "^3.5.1",
- "figgy-pudding": "^2.0.1",
- "lru-cache": "^4.1.2",
- "make-fetch-happen": "^3.0.0",
- "npm-package-arg": "^6.0.0",
- "safe-buffer": "^5.1.1"
+ "figgy-pudding": "^3.4.1",
+ "lru-cache": "^4.1.3",
+ "make-fetch-happen": "^4.0.1",
+ "npm-package-arg": "^6.1.0"
},
+ "deprecated": false,
"description": "Fetch-based http client for use with npm registry APIs",
"devDependencies": {
- "cacache": "^10.0.4",
+ "cacache": "^11.0.2",
+ "get-stream": "^4.0.0",
"mkdirp": "^0.5.1",
- "nock": "^9.2.3",
+ "nock": "^9.4.3",
"npmlog": "^4.1.2",
"rimraf": "^2.6.2",
- "ssri": "^5.3.0",
+ "ssri": "^6.0.0",
"standard": "^11.0.1",
- "standard-version": "^4.2.0",
- "tap": "^11.1.2",
+ "standard-version": "^4.4.0",
+ "tap": "^12.0.1",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
@@ -122,5 +92,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "1.1.0"
+ "version": "3.8.0"
}
diff --git a/deps/npm/node_modules/pacote/CHANGELOG.md b/deps/npm/node_modules/pacote/CHANGELOG.md
index 703f566c45..50a0dbde40 100644
--- a/deps/npm/node_modules/pacote/CHANGELOG.md
+++ b/deps/npm/node_modules/pacote/CHANGELOG.md
@@ -2,6 +2,112 @@
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="9.4.0"></a>
+# [9.4.0](https://github.com/zkat/pacote/compare/v9.3.0...v9.4.0) (2019-01-14)
+
+
+### Features
+
+* **registry:** fall back to fullfat if something might be wrong with corgis ([0e71d6b](https://github.com/zkat/pacote/commit/0e71d6b))
+
+
+
+<a name="9.3.0"></a>
+# [9.3.0](https://github.com/zkat/pacote/compare/v9.2.3...v9.3.0) (2018-12-21)
+
+
+### Bug Fixes
+
+* **git, file:** properly catch otherwise unhandled errors ([89d4897](https://github.com/zkat/pacote/commit/89d4897))
+* **test:** set umask opt to fix extract-stream 'accepts dmode/fmode/umask opts' ([e51de83](https://github.com/zkat/pacote/commit/e51de83))
+
+
+### Features
+
+* **git:** accept git path option ([#164](https://github.com/zkat/pacote/issues/164)) ([f06c8c5](https://github.com/zkat/pacote/commit/f06c8c5))
+
+
+
+<a name="9.2.3"></a>
+## [9.2.3](https://github.com/zkat/pacote/compare/v9.2.2...v9.2.3) (2018-10-31)
+
+
+
+<a name="9.2.2"></a>
+## [9.2.2](https://github.com/zkat/pacote/compare/v9.2.1...v9.2.2) (2018-10-31)
+
+
+
+<a name="9.2.1"></a>
+## [9.2.1](https://github.com/zkat/pacote/compare/v9.2.0...v9.2.1) (2018-10-31)
+
+
+
+<a name="9.2.0"></a>
+# [9.2.0](https://github.com/zkat/pacote/compare/v9.1.1...v9.2.0) (2018-10-30)
+
+
+### Features
+
+* **enjoyBy:** add opts.enjoy-by option ([7df399c](https://github.com/zkat/pacote/commit/7df399c))
+
+
+
+<a name="9.1.1"></a>
+## [9.1.1](https://github.com/zkat/pacote/compare/v9.1.0...v9.1.1) (2018-10-26)
+
+
+### Bug Fixes
+
+* **deps:** bump protoduck to remove CC0-1.0 license in dep ([3d9d9a6](https://github.com/zkat/pacote/commit/3d9d9a6))
+* **git:** Fix temp directory permissions for git fetcher ([#159](https://github.com/zkat/pacote/issues/159)) ([97c3aeb](https://github.com/zkat/pacote/commit/97c3aeb))
+* **packument:** group together all registry specs in silly log ([2333a17](https://github.com/zkat/pacote/commit/2333a17))
+* **standard:** standard --fix ([0ecb188](https://github.com/zkat/pacote/commit/0ecb188))
+
+
+
+<a name="9.1.0"></a>
+# [9.1.0](https://github.com/zkat/pacote/compare/v9.0.0...v9.1.0) (2018-08-15)
+
+
+### Bug Fixes
+
+* **docs:** tweaking ToC ([1eeb8a0](https://github.com/zkat/pacote/commit/1eeb8a0))
+* **packument:** take accept header into account when memoizing ([3c637e8](https://github.com/zkat/pacote/commit/3c637e8))
+
+
+### Features
+
+* **aliases:** add support for registry alias specs ([b173f26](https://github.com/zkat/pacote/commit/b173f26))
+* **packument:** add packument api ([97888d9](https://github.com/zkat/pacote/commit/97888d9))
+
+
+
+<a name="9.0.0"></a>
+# [9.0.0](https://github.com/zkat/pacote/compare/v8.1.6...v9.0.0) (2018-07-31)
+
+
+### Bug Fixes
+
+* **travis:** idk why travis was failing ([ab593c9](https://github.com/zkat/pacote/commit/ab593c9))
+
+
+### Features
+
+* **config:** convert to use figgy-pudding ([0b5bb82](https://github.com/zkat/pacote/commit/0b5bb82))
+* **log:** use process.emit-style logging by default ([29ff8b3](https://github.com/zkat/pacote/commit/29ff8b3))
+* **registry:** switch to npm-registry-fetch ([c43d6b0](https://github.com/zkat/pacote/commit/c43d6b0))
+
+
+### BREAKING CHANGES
+
+* **log:** pacote will start emitting events on the process object by default now, instead of doing silent logging
+* **registry:** config has changed significantly, especially
+for auth and registry-related configs. Refer to README.md
+for available options.
+
+
+
<a name="8.1.6"></a>
## [8.1.6](https://github.com/zkat/pacote/compare/v8.1.5...v8.1.6) (2018-05-24)
diff --git a/deps/npm/node_modules/pacote/README.md b/deps/npm/node_modules/pacote/README.md
index 5c9985549d..8d160b7cb7 100644
--- a/deps/npm/node_modules/pacote/README.md
+++ b/deps/npm/node_modules/pacote/README.md
@@ -16,13 +16,14 @@ needed to reduce excess operations, using [`cacache`](https://npm.im/cacache).
* [Contributing](#contributing)
* [API](#api)
* [`manifest`](#manifest)
+ * [`packument`](#packument)
* [`extract`](#extract)
* [`tarball`](#tarball)
* [`tarball.stream`](#tarball-stream)
* [`tarball.toFile`](#tarball-to-file)
- * [`prefetch`](#prefetch)
- * [`options`](#options)
+ * ~~[`prefetch`](#prefetch)~~ (deprecated)
* [`clearMemoized`](#clearMemoized)
+ * [`options`](#options)
### Example
@@ -88,6 +89,43 @@ pacote.manifest('pacote@1.0.0').then(pkgJson => {
})
```
+#### <a name="packument"></a> `> pacote.packument(spec, [opts])`
+
+Fetches the *packument* for a package. Packument objects are general metadata
+about a project corresponding to registry metadata, and include version and
+`dist-tag` information about a package's available versions, rather than a
+specific version. It may include additional metadata not usually available
+through the individual package metadata objects.
+
+It generally looks something like this:
+
+```javascript
+{
+ "name": PkgName,
+ "dist-tags": {
+ 'latest': VersionString,
+ [TagName]: VersionString,
+ ...
+ },
+ "versions": {
+ [VersionString]: Manifest,
+ ...
+ }
+}
+```
+
+Note that depending on the spec type, some additional fields might be present.
+For example, packages from `registry.npmjs.org` have additional metadata
+appended by the registry.
+
+##### Example
+
+```javascript
+pacote.packument('pacote').then(pkgJson => {
+ // fetched package versions metadata from the registry
+})
+```
+
#### <a name="extract"></a> `> pacote.extract(spec, destination, [opts])`
Extracts package data identified by `<spec>` into a directory named
@@ -176,26 +214,75 @@ pacote.manifest(...).then(() => pacote.clearMemoized)
#### <a name="options"></a> `> options`
-##### `opts.integrity`
+`pacote` accepts [the options for
+`npm-registry-fetch`](https://npm.im/npm-registry-fetch#fetch-options) as-is,
+with a couple of additional `pacote-specific` ones:
+
+##### <a name="dirPacker"></a> `opts.dirPacker`
+
+* Type: Function
+* Default: Uses [`npm-packlist`](https://npm.im/npm-packlist) and [`tar`](https://npm.im/tar) to make a tarball.
+
+Expects a function that takes a single argument, `dir`, and returns a
+`ReadableStream` that outputs packaged tarball data. Used when creating tarballs
+for package specs that are not already packaged, such as git and directory
+dependencies. The default `opts.dirPacker` does not execute `prepare` scripts,
+even though npm itself does.
+
+##### <a name="opts-enjoy-by"></a> `opts.enjoy-by`
+
+* Alias: `opts.enjoyBy`
+* Type: Date-able
+* Default: undefined
+
+If passed in, will be used while resolving to filter the versions for **registry
+dependencies** such that versions published **after** `opts.enjoy-by` are not
+considered -- as if they'd never been published.
+
+##### <a name="opts-include-deprecated"></a> `opts.include-deprecated`
+
+* Alias: `opts.includeDeprecated`
+* Type: Boolean
+* Default: false
+
+If false, deprecated versions will be skipped when selecting from registry range
+specifiers. If true, deprecations do not affect version selection.
+
+##### <a name="opts-full-metadata"></a> `opts.full-metadata`
+
+* Type: Boolean
+* Default: false
+
+If `true`, the full packument will be fetched when doing metadata requests. By
+defaul, `pacote` only fetches the summarized packuments, also called "corgis".
+
+##### <a name="opts-tag"></a> `opts.tag`
+
+* Alias: `opts.defaultTag`
+* Type: String
+* Default: `'latest'`
+
+Package version resolution tag. When processing registry spec ranges, this
+option is used to determine what dist-tag to treat as "latest". For more details
+about how `pacote` selects versions and how `tag` is involved, see [the
+documentation for `npm-pick-manifest`](https://npm.im/npm-pick-manifest).
+
+##### <a name="opts-resolved"></a> `opts.resolved`
-If provided, pacote will confirm that the relevant integrity hash for each
-operation's results matches the given digest. The call will return `EINTEGRITY`
-if the check fails.
+* Type: String
+* Default: null
-Additionally, `pacote.extract` will use this integrity string check the cache
-directly for matching contents before performing any other operations.
+When fetching tarballs, this option can be passed in to skip registry metadata
+lookups when downloading tarballs. If the string is a `file:` URL, pacote will
+try to read the referenced local file before attempting to do any further
+lookups. This option does not bypass integrity checks when `opts.integrity` is
+passed in.
-##### `opts.cache`
-##### `opts.cacheUid`/`opts.cacheGid`
-##### `opts.uid`/`opts.gid`
-##### `opts.scope`
-##### `opts.registry`
-##### `opts.@somescope:registry`
-##### `opts.auth`
-##### `opts.log`
-##### `opts.maxSockets`
+##### <a name="opts-where"></a> `opts.where`
-Default: `silentNpmLog`
+* Type: String
+* Default: null
-An [`npmlog`](https://npm.im/npmlog)-compatible logger. Will be used to log
-various events at the levels specified by `npmlog`.
+Passed as an argument to [`npm-package-arg`](https://npm.im/npm-package-arg)
+when resolving `spec` arguments. Used to determine what path to resolve local
+path specs relatively from.
diff --git a/deps/npm/node_modules/pacote/index.js b/deps/npm/node_modules/pacote/index.js
index 7889a5edf2..a0ed987597 100644
--- a/deps/npm/node_modules/pacote/index.js
+++ b/deps/npm/node_modules/pacote/index.js
@@ -3,6 +3,7 @@
module.exports = {
extract: require('./extract'),
manifest: require('./manifest'),
+ packument: require('./packument'),
prefetch: require('./prefetch'),
tarball: require('./tarball'),
clearMemoized: require('./lib/fetch').clearMemoized
diff --git a/deps/npm/node_modules/pacote/lib/extract-stream.js b/deps/npm/node_modules/pacote/lib/extract-stream.js
index d7e8fd5a18..d967b9f897 100644
--- a/deps/npm/node_modules/pacote/lib/extract-stream.js
+++ b/deps/npm/node_modules/pacote/lib/extract-stream.js
@@ -57,6 +57,7 @@ function extractStream (spec, dest, opts) {
onwarn: msg => opts.log && opts.log.warn('tar', msg),
uid: opts.uid,
gid: opts.gid,
+ umask: opts.umask,
transform: opts.resolved && pkgJsonTransform(spec, opts),
onentry (entry) {
if (entry.type.toLowerCase() === 'file') {
diff --git a/deps/npm/node_modules/pacote/lib/fetch.js b/deps/npm/node_modules/pacote/lib/fetch.js
index 5c45fa21df..36fb6b6d3d 100644
--- a/deps/npm/node_modules/pacote/lib/fetch.js
+++ b/deps/npm/node_modules/pacote/lib/fetch.js
@@ -3,13 +3,20 @@
const duck = require('protoduck')
const Fetcher = duck.define(['spec', 'opts', 'manifest'], {
+ packument: ['spec', 'opts'],
manifest: ['spec', 'opts'],
tarball: ['spec', 'opts'],
fromManifest: ['manifest', 'spec', 'opts'],
clearMemoized () {}
-}, {name: 'Fetcher'})
+}, { name: 'Fetcher' })
module.exports = Fetcher
+module.exports.packument = packument
+function packument (spec, opts) {
+ const fetcher = getFetcher(spec.type)
+ return fetcher.packument(spec, opts)
+}
+
module.exports.manifest = manifest
function manifest (spec, opts) {
const fetcher = getFetcher(spec.type)
@@ -40,6 +47,9 @@ function getFetcher (type) {
// This is spelled out both to prevent sketchy stuff and to make life
// easier for bundlers/preprocessors.
switch (type) {
+ case 'alias':
+ fetchers[type] = require('./fetchers/alias')
+ break
case 'directory':
fetchers[type] = require('./fetchers/directory')
break
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/alias.js b/deps/npm/node_modules/pacote/lib/fetchers/alias.js
new file mode 100644
index 0000000000..f22cbb1d7c
--- /dev/null
+++ b/deps/npm/node_modules/pacote/lib/fetchers/alias.js
@@ -0,0 +1,24 @@
+'use strict'
+
+const Fetcher = require('../fetch')
+const fetchRegistry = require('./registry')
+
+const fetchRemote = module.exports = Object.create(null)
+
+Fetcher.impl(fetchRemote, {
+ packument (spec, opts) {
+ return fetchRegistry.packument(spec.subSpec, opts)
+ },
+
+ manifest (spec, opts) {
+ return fetchRegistry.manifest(spec.subSpec, opts)
+ },
+
+ tarball (spec, opts) {
+ return fetchRegistry.tarball(spec.subSpec, opts)
+ },
+
+ fromManifest (manifest, spec, opts) {
+ return fetchRegistry.fromManifest(manifest, spec.subSpec, opts)
+ }
+})
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/directory.js b/deps/npm/node_modules/pacote/lib/fetchers/directory.js
index f6e680f660..83f3d7d558 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/directory.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/directory.js
@@ -14,16 +14,31 @@ const readFileAsync = BB.promisify(require('fs').readFile)
const fetchDirectory = module.exports = Object.create(null)
Fetcher.impl(fetchDirectory, {
+ packument (spec, opts) {
+ return this.manifest(spec, opts).then(manifest => {
+ return Object.assign({}, manifest, {
+ 'dist-tags': {
+ 'latest': manifest.version
+ },
+ time: {
+ [manifest.version]: (new Date()).toISOString()
+ },
+ versions: {
+ [manifest.version]: manifest
+ }
+ })
+ })
+ },
// `directory` manifests come from the actual manifest/lockfile data.
manifest (spec, opts) {
const pkgPath = path.join(spec.fetchSpec, 'package.json')
const srPath = path.join(spec.fetchSpec, 'npm-shrinkwrap.json')
return BB.join(
- readFileAsync(pkgPath).then(JSON.parse).catch({code: 'ENOENT'}, err => {
+ readFileAsync(pkgPath).then(JSON.parse).catch({ code: 'ENOENT' }, err => {
err.code = 'ENOPACKAGEJSON'
throw err
}),
- readFileAsync(srPath).then(JSON.parse).catch({code: 'ENOENT'}, () => null),
+ readFileAsync(srPath).then(JSON.parse).catch({ code: 'ENOENT' }, () => null),
(pkg, sr) => {
pkg._shrinkwrap = sr
pkg._hasShrinkwrap = !!sr
@@ -35,7 +50,7 @@ Fetcher.impl(fetchDirectory, {
).then(pkg => {
if (!pkg.bin && pkg.directories && pkg.directories.bin) {
const dirBin = pkg.directories.bin
- return glob(path.join(spec.fetchSpec, dirBin, '/**'), {nodir: true}).then(matches => {
+ return glob(path.join(spec.fetchSpec, dirBin, '/**'), { nodir: true }).then(matches => {
matches.forEach(filePath => {
const relative = path.relative(spec.fetchSpec, filePath)
if (relative && relative[0] !== '.') {
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/file.js b/deps/npm/node_modules/pacote/lib/fetchers/file.js
index 5688cd1bdd..a58e329130 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/file.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/file.js
@@ -17,6 +17,10 @@ const MAX_BULK_SIZE = 2 * 1024 * 1024 // 2MB
const fetchFile = module.exports = Object.create(null)
Fetcher.impl(fetchFile, {
+ packument (spec, opts) {
+ return BB.reject(new Error('Not implemented yet'))
+ },
+
manifest (spec, opts) {
// We can't do much here. `finalizeManifest` will take care of
// calling `tarball` to fill out all the necessary details.
@@ -39,9 +43,9 @@ Fetcher.impl(fetchFile, {
opts.cache, `pacote:tarball:file:${src}`, data, {
integrity: opts.integrity
}
- ).then(integrity => ({data, integrity}))
+ ).then(integrity => ({ data, integrity }))
} else {
- return {data}
+ return { data }
}
}).then(info => {
if (info.integrity) { stream.emit('integrity', info.integrity) }
@@ -64,7 +68,7 @@ Fetcher.impl(fetchFile, {
return pipe(fs.createReadStream(src), stream)
})
}
- }, err => stream.emit('error', err))
+ }).catch(err => stream.emit('error', err))
return stream
},
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/git.js b/deps/npm/node_modules/pacote/lib/fetchers/git.js
index 66a2093ee3..7db4a79de3 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/git.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/git.js
@@ -21,6 +21,10 @@ const uniqueFilename = require('unique-filename')
const fetchGit = module.exports = Object.create(null)
Fetcher.impl(fetchGit, {
+ packument (spec, opts) {
+ return BB.reject(new Error('Not implemented yet.'))
+ },
+
manifest (spec, opts) {
opts = optCheck(opts)
if (spec.hosted && spec.hosted.getDefaultRepresentation() === 'shortcut') {
@@ -41,7 +45,7 @@ Fetcher.impl(fetchGit, {
manifest, spec, opts
).on('integrity', i => stream.emit('integrity', i)), stream
)
- }, err => stream.emit('error', err))
+ }).catch(err => stream.emit('error', err))
return stream
},
@@ -153,7 +157,7 @@ function resolve (url, spec, name, opts) {
function withTmp (opts, cb) {
if (opts.cache) {
// cacache has a special facility for working in a tmp dir
- return cacache.tmp.withTmp(opts.cache, {tmpPrefix: 'git-clone'}, cb)
+ return cacache.tmp.withTmp(opts.cache, { tmpPrefix: 'git-clone', uid: opts.uid, gid: opts.gid }, cb)
} else {
const tmpDir = path.join(osenv.tmpdir(), 'pacote-git-tmp')
const tmpName = uniqueFilename(tmpDir, 'git-clone')
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js
deleted file mode 100644
index b17a233d43..0000000000
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict'
-
-const LRU = require('lru-cache')
-
-const WARNING_REGEXP = /^\s*(\d{3})\s+(\S+)\s+"(.*)"\s+"([^"]+)"/
-const BAD_HOSTS = new LRU({ max: 50 })
-
-module.exports = checkWarnings
-function checkWarnings (res, registry, opts) {
- if (res.headers.has('warning') && !BAD_HOSTS.has(registry)) {
- const warnings = {}
- res.headers.raw()['warning'].forEach(w => {
- const match = w.match(WARNING_REGEXP)
- if (match) {
- warnings[match[1]] = {
- code: match[1],
- host: match[2],
- message: match[3],
- date: new Date(match[4])
- }
- }
- })
- BAD_HOSTS.set(registry, true)
- if (warnings['199']) {
- if (warnings['199'].message.match(/ENOTFOUND/)) {
- opts.log.warn('registry', `Using stale data from ${registry} because the host is inaccessible -- are you offline?`)
- } else {
- opts.log.warn('registry', `Unexpected warning for ${registry}: ${warnings['199'].message}`)
- }
- }
- if (warnings['111']) {
- // 111 Revalidation failed -- we're using stale data
- opts.log.warn(
- 'registry',
- `Using stale package data from ${registry} due to a request error during revalidation.`
- )
- }
- }
-}
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js
deleted file mode 100644
index 3a2a4a5a77..0000000000
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js
+++ /dev/null
@@ -1,109 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-const Buffer = require('safe-buffer').Buffer
-
-const checkWarnings = require('./check-warning-header')
-const fetch = require('make-fetch-happen')
-const registryKey = require('./registry-key')
-const url = require('url')
-
-module.exports = regFetch
-function regFetch (uri, registry, opts) {
- const startTime = Date.now()
- return fetch(uri, {
- agent: opts.agent,
- algorithms: opts.algorithms,
- cache: getCacheMode(opts),
- cacheManager: opts.cache,
- ca: opts.ca,
- cert: opts.cert,
- headers: getHeaders(uri, registry, opts),
- integrity: opts.integrity,
- key: opts.key,
- localAddress: opts.localAddress,
- maxSockets: opts.maxSockets,
- memoize: opts.memoize,
- noProxy: opts.noProxy,
- Promise: BB,
- proxy: opts.proxy,
- referer: opts.refer,
- retry: opts.retry,
- strictSSL: !!opts.strictSSL,
- timeout: opts.timeout,
- uid: opts.uid,
- gid: opts.gid
- }).then(res => {
- if (res.headers.has('npm-notice') && !res.headers.has('x-local-cache')) {
- opts.log.warn('notice', res.headers.get('npm-notice'))
- }
- checkWarnings(res, registry, opts)
- if (res.status >= 400) {
- const err = new Error(`${res.status} ${res.statusText}: ${
- opts.spec ? opts.spec : uri
- }`)
- err.code = `E${res.status}`
- err.uri = uri
- err.response = res
- err.spec = opts.spec
- logRequest(uri, res, startTime, opts)
- throw err
- } else {
- res.body.on('end', () => logRequest(uri, res, startTime, opts))
- return res
- }
- })
-}
-
-function logRequest (uri, res, startTime, opts) {
- const elapsedTime = Date.now() - startTime
- const attempt = res.headers.get('x-fetch-attempts')
- const attemptStr = attempt && attempt > 1 ? ` attempt #${attempt}` : ''
- const cacheStr = res.headers.get('x-local-cache') ? ' (from cache)' : ''
- opts.log.http(
- 'fetch',
- `GET ${res.status} ${uri} ${elapsedTime}ms${attemptStr}${cacheStr}`
- )
-}
-
-function getCacheMode (opts) {
- return opts.offline
- ? 'only-if-cached'
- : opts.preferOffline
- ? 'force-cache'
- : opts.preferOnline
- ? 'no-cache'
- : 'default'
-}
-
-function getHeaders (uri, registry, opts) {
- const headers = Object.assign({
- 'npm-in-ci': opts.isFromCI,
- 'npm-scope': opts.projectScope,
- 'npm-session': opts.npmSession,
- 'user-agent': opts.userAgent,
- 'referer': opts.refer
- }, opts.headers)
- // check for auth settings specific to this registry
- let auth = (
- opts.auth &&
- opts.auth[registryKey(registry)]
- ) || opts.auth
- // If a tarball is hosted on a different place than the manifest, only send
- // credentials on `alwaysAuth`
- const shouldAuth = auth && (
- auth.alwaysAuth ||
- url.parse(uri).host === url.parse(registry).host
- )
- if (shouldAuth && auth.token) {
- headers.authorization = `Bearer ${auth.token}`
- } else if (shouldAuth && auth.username && auth.password) {
- const encoded = Buffer.from(
- `${auth.username}:${auth.password}`, 'utf8'
- ).toString('base64')
- headers.authorization = `Basic ${encoded}`
- } else if (shouldAuth && auth._auth) {
- headers.authorization = `Basic ${auth._auth}`
- }
- return headers
-}
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/index.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/index.js
index 78bdc23426..2cca7040bd 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/index.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/index.js
@@ -3,11 +3,16 @@
const cacache = require('cacache')
const Fetcher = require('../../fetch')
const regManifest = require('./manifest')
+const regPackument = require('./packument')
const regTarball = require('./tarball')
const fetchRegistry = module.exports = Object.create(null)
Fetcher.impl(fetchRegistry, {
+ packument (spec, opts) {
+ return regPackument(spec, opts)
+ },
+
manifest (spec, opts) {
return regManifest(spec, opts)
},
@@ -22,6 +27,6 @@ Fetcher.impl(fetchRegistry, {
clearMemoized () {
cacache.clearMemoized()
- regManifest.clearMemoized()
+ regPackument.clearMemoized()
}
})
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/manifest.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/manifest.js
index 4e5a8010e2..d29ec71c33 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/manifest.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/manifest.js
@@ -1,56 +1,48 @@
'use strict'
-const BB = require('bluebird')
-
-const fetch = require('./fetch')
-const LRU = require('lru-cache')
+const fetch = require('npm-registry-fetch')
+const fetchPackument = require('./packument')
const optCheck = require('../../util/opt-check')
const pickManifest = require('npm-pick-manifest')
-const pickRegistry = require('./pick-registry')
const ssri = require('ssri')
-const url = require('url')
-
-// Corgis are cute. 🐕🐶
-const CORGI_DOC = 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*'
-const JSON_DOC = 'application/json'
module.exports = manifest
function manifest (spec, opts) {
opts = optCheck(opts)
- const registry = pickRegistry(spec, opts)
- const uri = metadataUrl(registry, spec.escapedName)
-
- return getManifest(uri, registry, spec, opts).then(manifest => {
- return annotateManifest(uri, registry, manifest)
+ return getManifest(spec, opts).then(manifest => {
+ return annotateManifest(spec, manifest, opts)
})
}
-function metadataUrl (registry, name) {
- const normalized = registry.slice(-1) !== '/'
- ? registry + '/'
- : registry
- return url.resolve(normalized, name)
-}
-
-function getManifest (uri, registry, spec, opts) {
- return fetchPackument(uri, spec, registry, opts).then(packument => {
+function getManifest (spec, opts) {
+ opts = opts.concat({
+ fullMetadata: opts.enjoyBy ? true : opts.fullMetadata
+ })
+ return fetchPackument(spec, opts).then(packument => {
try {
return pickManifest(packument, spec.fetchSpec, {
defaultTag: opts.defaultTag,
+ enjoyBy: opts.enjoyBy,
includeDeprecated: opts.includeDeprecated
})
} catch (err) {
if (err.code === 'ETARGET' && packument._cached && !opts.offline) {
opts.log.silly(
'registry:manifest',
- `no matching version for ${spec.name}@${spec.fetchSpec} in the cache. Forcing revalidation`
+ `no matching version for ${spec.name}@${spec.fetchSpec} in the cache. Forcing revalidation.`
)
- opts.preferOffline = false
- opts.preferOnline = true
- return fetchPackument(uri, spec, registry, opts).then(packument => {
+ opts = opts.concat({
+ preferOffline: false,
+ preferOnline: true
+ })
+ return fetchPackument(spec, opts.concat({
+ // Fetch full metadata in case ETARGET was due to corgi delay
+ fullMetadata: true
+ })).then(packument => {
return pickManifest(packument, spec.fetchSpec, {
- defaultTag: opts.defaultTag
+ defaultTag: opts.defaultTag,
+ enjoyBy: opts.enjoyBy
})
})
} else {
@@ -60,69 +52,7 @@ function getManifest (uri, registry, spec, opts) {
})
}
-// TODO - make this an opt
-const MEMO = new LRU({
- length: m => m._contentLength,
- max: 200 * 1024 * 1024, // 200MB
- maxAge: 30 * 1000 // 30s
-})
-
-module.exports.clearMemoized = clearMemoized
-function clearMemoized () {
- MEMO.reset()
-}
-
-function fetchPackument (uri, spec, registry, opts) {
- const mem = pickMem(opts)
- if (mem && !opts.preferOnline && mem.has(uri)) {
- return BB.resolve(mem.get(uri))
- }
-
- return fetch(uri, registry, Object.assign({
- headers: {
- 'pacote-req-type': 'packument',
- 'pacote-pkg-id': `registry:${manifest.name}`,
- accept: opts.fullMetadata ? JSON_DOC : CORGI_DOC
- },
- spec
- }, opts, {
- // Force integrity to null: we never check integrity hashes for manifests
- integrity: null
- })).then(res => res.json().then(packument => {
- packument._cached = decodeURIComponent(res.headers.has('x-local-cache'))
- packument._contentLength = +res.headers.get('content-length')
- // NOTE - we need to call pickMem again because proxy
- // objects get reused!
- const mem = pickMem(opts)
- if (mem) {
- mem.set(uri, packument)
- }
- return packument
- }))
-}
-
-class ObjProxy {
- get (key) { return this.obj[key] }
- set (key, val) { this.obj[key] = val }
-}
-
-// This object is used synchronously and immediately, so
-// we can safely reuse it instead of consing up new ones
-const PROX = new ObjProxy()
-function pickMem (opts) {
- if (!opts || !opts.memoize) {
- return MEMO
- } else if (opts.memoize.get && opts.memoize.set) {
- return opts.memoize
- } else if (typeof opts.memoize === 'object') {
- PROX.obj = opts.memoize
- return PROX
- } else {
- return null
- }
-}
-
-function annotateManifest (uri, registry, manifest) {
+function annotateManifest (spec, manifest, opts) {
const shasum = manifest.dist && manifest.dist.shasum
manifest._integrity = manifest.dist && manifest.dist.integrity
manifest._shasum = shasum
@@ -134,6 +64,9 @@ function annotateManifest (uri, registry, manifest) {
manifest.dist && manifest.dist.tarball
)
if (!manifest._resolved) {
+ const registry = fetch.pickRegistry(spec, opts)
+ const uri = registry.replace(/\/?$/, '/') + spec.escapedName
+
const err = new Error(
`Manifest for ${manifest.name}@${manifest.version} from ${uri} is missing a tarball url (pkg.dist.tarball). Guessing a default.`
)
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/packument.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/packument.js
new file mode 100644
index 0000000000..f5286c8037
--- /dev/null
+++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/packument.js
@@ -0,0 +1,92 @@
+'use strict'
+
+const BB = require('bluebird')
+
+const fetch = require('npm-registry-fetch')
+const LRU = require('lru-cache')
+const optCheck = require('../../util/opt-check')
+
+// Corgis are cute. 🐕🐶
+const CORGI_DOC = 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*'
+const JSON_DOC = 'application/json'
+
+module.exports = packument
+function packument (spec, opts) {
+ opts = optCheck(opts)
+
+ const registry = fetch.pickRegistry(spec, opts)
+ const uri = registry.replace(/\/?$/, '/') + spec.escapedName
+
+ return fetchPackument(uri, registry, spec, opts)
+}
+
+const MEMO = new LRU({
+ length: m => m._contentLength,
+ max: 200 * 1024 * 1024, // 200MB
+ maxAge: 30 * 1000 // 30s
+})
+
+module.exports.clearMemoized = clearMemoized
+function clearMemoized () {
+ MEMO.reset()
+}
+
+function fetchPackument (uri, registry, spec, opts) {
+ const mem = pickMem(opts)
+ const accept = opts.fullMetadata ? JSON_DOC : CORGI_DOC
+ const memoKey = `${uri}~(${accept})`
+ if (mem && !opts.preferOnline && mem.has(memoKey)) {
+ return BB.resolve(mem.get(memoKey))
+ }
+
+ return fetch(uri, opts.concat({
+ headers: {
+ 'pacote-req-type': 'packument',
+ 'pacote-pkg-id': `registry:${spec.name}`,
+ accept
+ },
+ spec
+ }, opts, {
+ // Force integrity to null: we never check integrity hashes for manifests
+ integrity: null
+ })).then(res => res.json().then(packument => {
+ packument._cached = res.headers.has('x-local-cache')
+ packument._contentLength = +res.headers.get('content-length')
+ // NOTE - we need to call pickMem again because proxy
+ // objects get reused!
+ const mem = pickMem(opts)
+ if (mem) {
+ mem.set(memoKey, packument)
+ }
+ return packument
+ })).catch(err => {
+ if (err.code === 'E404' && !opts.fullMetadata) {
+ return fetchPackument(uri, registry, spec, opts.concat({
+ fullMetadata: true
+ }))
+ } else {
+ throw err
+ }
+ })
+}
+
+class ObjProxy {
+ get (key) { return this.obj[key] }
+ set (key, val) { this.obj[key] = val }
+}
+
+// This object is used synchronously and immediately, so
+// we can safely reuse it instead of consing up new ones
+const PROX = new ObjProxy()
+function pickMem (opts) {
+ if (!opts || !opts.memoize) {
+ return MEMO
+ } else if (opts.memoize.get && opts.memoize.set) {
+ return opts.memoize
+ } else if (typeof opts.memoize === 'object') {
+ PROX.obj = opts.memoize
+ return PROX
+ } else {
+ return null
+ }
+}
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/pick-registry.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/pick-registry.js
deleted file mode 100644
index f326950da4..0000000000
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/pick-registry.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict'
-
-module.exports = pickRegistry
-function pickRegistry (spec, opts) {
- let registry = spec.scope && opts.scopeTargets[spec.scope]
-
- if (!registry && opts.scope) {
- const prefix = opts.scope[0] === '@' ? '' : '@'
- registry = opts.scopeTargets[prefix + opts.scope]
- }
-
- if (!registry) {
- registry = opts.registry
- }
-
- return registry
-}
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/registry-key.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/registry-key.js
deleted file mode 100644
index f53e9a9b48..0000000000
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/registry-key.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict'
-
-const url = require('url')
-
-// Called a nerf dart in the main codebase. Used as a "safe"
-// key when fetching registry info from config.
-module.exports = registryKey
-function registryKey (registry) {
- const parsed = url.parse(registry)
- const formatted = url.format({
- host: parsed.host,
- pathname: parsed.pathname,
- slashes: parsed.slashes
- })
- return url.resolve(formatted, '.')
-}
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js
index 7239981279..134153280e 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js
@@ -2,18 +2,17 @@
const BB = require('bluebird')
-const fetch = require('./fetch')
+const fetch = require('npm-registry-fetch')
const manifest = require('./manifest')
const optCheck = require('../../util/opt-check')
const PassThrough = require('stream').PassThrough
-const pickRegistry = require('./pick-registry')
const ssri = require('ssri')
const url = require('url')
module.exports = tarball
function tarball (spec, opts) {
opts = optCheck(opts)
- const registry = pickRegistry(spec, opts)
+ const registry = fetch.pickRegistry(spec, opts)
const stream = new PassThrough()
let mani
if (
@@ -49,11 +48,11 @@ function tarball (spec, opts) {
module.exports.fromManifest = fromManifest
function fromManifest (manifest, spec, opts) {
opts = optCheck(opts)
- opts.scope = spec.scope || opts.scope
+ if (spec.scope) { opts = opts.concat({ scope: spec.scope }) }
const stream = new PassThrough()
- const registry = pickRegistry(spec, opts)
+ const registry = fetch.pickRegistry(spec, opts)
const uri = getTarballUrl(spec, registry, manifest, opts)
- fetch(uri, registry, Object.assign({
+ fetch(uri, opts.concat({
headers: {
'pacote-req-type': 'tarball',
'pacote-pkg-id': `registry:${manifest.name}@${uri}`
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/remote.js b/deps/npm/node_modules/pacote/lib/fetchers/remote.js
index a1e95a2e64..8941f99381 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/remote.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/remote.js
@@ -8,6 +8,10 @@ const fetchRegistry = require('./registry')
const fetchRemote = module.exports = Object.create(null)
Fetcher.impl(fetchRemote, {
+ packument (spec, opts) {
+ return BB.reject(new Error('Not implemented yet'))
+ },
+
manifest (spec, opts) {
// We can't get the manifest for a remote tarball until
// we extract the tarball itself.
diff --git a/deps/npm/node_modules/pacote/lib/finalize-manifest.js b/deps/npm/node_modules/pacote/lib/finalize-manifest.js
index 0f309ed6da..80b379898f 100644
--- a/deps/npm/node_modules/pacote/lib/finalize-manifest.js
+++ b/deps/npm/node_modules/pacote/lib/finalize-manifest.js
@@ -37,12 +37,12 @@ function finalizeManifest (pkg, spec, opts) {
const key = finalKey(pkg, spec)
opts = optCheck(opts)
- const cachedManifest = (opts.cache && key && !opts.preferOnline && !opts.fullMetadata)
+ const cachedManifest = (opts.cache && key && !opts.preferOnline && !opts.fullMetadata && !opts.enjoyBy)
? cacache.get.info(opts.cache, key, opts)
: BB.resolve(null)
return cachedManifest.then(cached => {
- if (cached && cached.metadata.manifest) {
+ if (cached && cached.metadata && cached.metadata.manifest) {
return new Manifest(cached.metadata.manifest)
} else {
return tarballedProps(pkg, spec, opts).then(props => {
@@ -54,13 +54,14 @@ function finalizeManifest (pkg, spec, opts) {
if (!opts.cache || !cacheKey) {
return manifest
} else {
- opts.metadata = {
- id: manifest._id,
- manifest,
- type: 'finalized-manifest'
- }
return cacache.put(
- opts.cache, cacheKey, '.', opts
+ opts.cache, cacheKey, '.', {
+ metadata: {
+ id: manifest._id,
+ manifest,
+ type: 'finalized-manifest'
+ }
+ }
).then(() => manifest)
}
})
@@ -155,7 +156,7 @@ function tarballedProps (pkg, spec, opts) {
needsShrinkwrap && jsonFromStream('npm-shrinkwrap.json', extracted),
needsManifest && jsonFromStream('package.json', extracted),
needsBin && getPaths(extracted),
- needsHash && ssri.fromStream(tarStream, {algorithms: ['sha1', 'sha512']}),
+ needsHash && ssri.fromStream(tarStream, { algorithms: ['sha1', 'sha512'] }),
needsExtract && pipe(tarStream, extracted),
(sr, mani, paths, hash) => {
if (needsManifest && !mani) {
diff --git a/deps/npm/node_modules/pacote/lib/util/git.js b/deps/npm/node_modules/pacote/lib/util/git.js
index 9196212278..997404dd23 100644
--- a/deps/npm/node_modules/pacote/lib/util/git.js
+++ b/deps/npm/node_modules/pacote/lib/util/git.js
@@ -74,10 +74,10 @@ function fullClone (repo, committish, target, opts) {
if (process.platform === 'win32') {
gitArgs.push('--config', 'core.longpaths=true')
}
- return execGit(gitArgs, {cwd: target}).then(() => {
- return execGit(['init'], {cwd: target})
+ return execGit(gitArgs, { cwd: target }, opts).then(() => {
+ return execGit(['init'], { cwd: target }, opts)
}).then(() => {
- return execGit(['checkout', committish || 'HEAD'], {cwd: target})
+ return execGit(['checkout', committish || 'HEAD'], { cwd: target }, opts)
}).then(() => {
return updateSubmodules(target, opts)
}).then(() => headSha(target, opts))
@@ -110,7 +110,7 @@ function updateSubmodules (localRepo, opts) {
function headSha (repo, opts) {
opts = optCheck(opts)
- return execGit(['rev-parse', '--revs-only', 'HEAD'], {cwd: repo}, opts).spread(stdout => {
+ return execGit(['rev-parse', '--revs-only', 'HEAD'], { cwd: repo }, opts).spread(stdout => {
return stdout.trim()
})
}
@@ -139,7 +139,7 @@ function revs (repo, opts) {
if (!ref) { return revs } // ???
if (ref.endsWith(CARET_BRACES)) { return revs } // refs/tags/x^{} crap
const type = refType(line)
- const doc = {sha, ref, type}
+ const doc = { sha, ref, type }
revs.refs[ref] = doc
// We can check out shallow clones on specific SHAs if we have a ref
@@ -157,7 +157,7 @@ function revs (repo, opts) {
}
return revs
- }, {versions: {}, 'dist-tags': {}, refs: {}, shas: {}})
+ }, { versions: {}, 'dist-tags': {}, refs: {}, shas: {} })
}, err => {
err.message = `Error while executing:\n${GITPATH} ls-remote -h -t ${repo}\n\n${err.stderr}\n${err.message}`
throw err
@@ -182,7 +182,7 @@ function revs (repo, opts) {
module.exports._exec = execGit
function execGit (gitArgs, gitOpts, opts) {
opts = optCheck(opts)
- return checkGit().then(gitPath => {
+ return checkGit(opts).then(gitPath => {
return promiseRetry((retry, number) => {
if (number !== 1) {
opts.log.silly('pacote', 'Retrying git command: ' + gitArgs.join(' ') + ' attempt # ' + number)
@@ -194,14 +194,19 @@ function execGit (gitArgs, gitOpts, opts) {
throw err
}
})
- }, opts.retry)
+ }, opts.retry != null ? opts.retry : {
+ retries: opts['fetch-retries'],
+ factor: opts['fetch-retry-factor'],
+ maxTimeout: opts['fetch-retry-maxtimeout'],
+ minTimeout: opts['fetch-retry-mintimeout']
+ })
})
}
module.exports._spawn = spawnGit
function spawnGit (gitArgs, gitOpts, opts) {
opts = optCheck(opts)
- return checkGit().then(gitPath => {
+ return checkGit(opts).then(gitPath => {
return promiseRetry((retry, number) => {
if (number !== 1) {
opts.log.silly('pacote', 'Retrying git command: ' + gitArgs.join(' ') + ' attempt # ' + number)
@@ -241,8 +246,10 @@ function mkOpts (_gitOpts, opts) {
return gitOpts
}
-function checkGit () {
- if (!GITPATH) {
+function checkGit (opts) {
+ if (opts.git) {
+ return BB.resolve(opts.git)
+ } else if (!GITPATH) {
const err = new Error('No git binary found in $PATH')
err.code = 'ENOGIT'
return BB.reject(err)
diff --git a/deps/npm/node_modules/pacote/lib/util/opt-check.js b/deps/npm/node_modules/pacote/lib/util/opt-check.js
index d13a69e4dc..e6afc21c84 100644
--- a/deps/npm/node_modules/pacote/lib/util/opt-check.js
+++ b/deps/npm/node_modules/pacote/lib/util/opt-check.js
@@ -1,64 +1,47 @@
'use strict'
-const pkg = require('../../package.json')
-const silentlog = require('./silentlog')
+const figgyPudding = require('figgy-pudding')
+const logger = require('./proclog.js')
-function PacoteOptions (opts) {
- opts = opts || {}
- this._isPacoteOptions = true
- this.agent = opts.agent
- this.annotate = opts.annotate
- this.auth = opts.auth
- this.scopeTargets = opts.scopeTargets || {}
- this.defaultTag = opts.defaultTag || 'latest'
- this.cache = opts.cache
- this.ca = opts.ca
- this.cert = opts.cert
- this.integrity = opts.integrity
- this.key = opts.key
- this.localAddress = opts.localAddress
- this.log = opts.log || silentlog
- this.memoize = opts.memoize
- this.maxSockets = opts.maxSockets || 10
- this.offline = opts.offline
- this.preferOffline = opts.preferOffline
- this.proxy = opts.proxy
- this.noProxy = opts.noProxy
- this.registry = opts.registry || 'https://registry.npmjs.org'
- this.resolved = opts.resolved
- this.retry = opts.retry // for npm-registry-client
- this.scope = opts.scope
- this.userAgent = opts.userAgent || `${pkg.name}@${pkg.version}/node@${process.version}+${process.arch} (${process.platform})`
- this.where = opts.where
- this.preferOnline = opts.preferOnline
- this.strictSSL = !!opts.strictSSL
- this.isFromCI = !!(
- opts.isFromCI ||
- process.env['CI'] === 'true' ||
- process.env['TDDIUM'] ||
- process.env['JENKINS_URL'] ||
- process.env['bamboo.buildKey']
- )
- this.npmSession = opts.npmSession
- this.refer = opts.referer || opts.refer
- this.projectScope = opts.projectScope
- this.fullMetadata = opts.fullMetadata
- this.alwaysAuth = opts.alwaysAuth
- this.includeDeprecated = opts.includeDeprecated == null
- ? true
- : opts.includeDeprecated
-
- this.dirPacker = opts.dirPacker || null
-
- this.uid = opts.uid
- this.gid = opts.gid
-
- this.dmode = opts.dmode
- this.fmode = opts.fmode
- this.umask = opts.umask
-}
-
-module.exports = optCheck
-function optCheck (opts) {
- return new PacoteOptions(opts)
-}
+const AUTH_REGEX = /^(?:.*:)?(token|_authToken|username|_password|password|email|always-auth|_auth|otp)$/
+const SCOPE_REGISTRY_REGEX = /@.*:registry$/gi
+module.exports = figgyPudding({
+ annotate: {},
+ cache: {},
+ defaultTag: 'tag',
+ dirPacker: {},
+ dmode: {},
+ 'enjoy-by': 'enjoyBy',
+ enjoyBy: {},
+ fmode: {},
+ 'fetch-retries': { default: 2 },
+ 'fetch-retry-factor': { default: 10 },
+ 'fetch-retry-maxtimeout': { default: 60000 },
+ 'fetch-retry-mintimeout': { default: 10000 },
+ fullMetadata: 'full-metadata',
+ 'full-metadata': { default: false },
+ gid: {},
+ git: {},
+ includeDeprecated: { default: true },
+ 'include-deprecated': 'includeDeprecated',
+ integrity: {},
+ log: { default: logger },
+ memoize: {},
+ offline: {},
+ preferOffline: 'prefer-offline',
+ 'prefer-offline': {},
+ preferOnline: 'prefer-online',
+ 'prefer-online': {},
+ registry: { default: 'https://registry.npmjs.org/' },
+ resolved: {},
+ retry: {},
+ scope: {},
+ tag: { default: 'latest' },
+ uid: {},
+ umask: {},
+ where: {}
+}, {
+ other (key) {
+ return key.match(AUTH_REGEX) || key.match(SCOPE_REGISTRY_REGEX)
+ }
+})
diff --git a/deps/npm/node_modules/pacote/lib/util/pack-dir.js b/deps/npm/node_modules/pacote/lib/util/pack-dir.js
index 62776692e1..157a9a82f8 100644
--- a/deps/npm/node_modules/pacote/lib/util/pack-dir.js
+++ b/deps/npm/node_modules/pacote/lib/util/pack-dir.js
@@ -33,7 +33,7 @@ function packDir (manifest, label, dir, target, opts) {
}
function mkPacker (dir) {
- return packlist({path: dir}).then(files => {
+ return packlist({ path: dir }).then(files => {
return tar.c({
cwd: dir,
gzip: true,
diff --git a/deps/npm/node_modules/pacote/lib/util/proclog.js b/deps/npm/node_modules/pacote/lib/util/proclog.js
new file mode 100644
index 0000000000..e4a2bf8acf
--- /dev/null
+++ b/deps/npm/node_modules/pacote/lib/util/proclog.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const LEVELS = [
+ 'notice',
+ 'error',
+ 'warn',
+ 'info',
+ 'verbose',
+ 'http',
+ 'silly',
+ 'pause',
+ 'resume'
+]
+
+const logger = {}
+for (const level of LEVELS) {
+ logger[level] = log(level)
+}
+module.exports = logger
+
+function log (level) {
+ return (category, ...args) => process.emit('log', level, category, ...args)
+}
diff --git a/deps/npm/node_modules/pacote/lib/util/silentlog.js b/deps/npm/node_modules/pacote/lib/util/silentlog.js
deleted file mode 100644
index 4c9d6c57e8..0000000000
--- a/deps/npm/node_modules/pacote/lib/util/silentlog.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict'
-
-const noop = Function.prototype
-module.exports = {
- error: noop,
- warn: noop,
- info: noop,
- verbose: noop,
- silly: noop,
- http: noop,
- pause: noop,
- resume: noop
-}
diff --git a/deps/npm/node_modules/pacote/lib/with-tarball-stream.js b/deps/npm/node_modules/pacote/lib/with-tarball-stream.js
index 653a4a688a..abeba738a1 100644
--- a/deps/npm/node_modules/pacote/lib/with-tarball-stream.js
+++ b/deps/npm/node_modules/pacote/lib/with-tarball-stream.js
@@ -36,7 +36,7 @@ function withTarballStream (spec, opts, streamHandler) {
const file = path.resolve(opts.where || '.', opts.resolved.substr(5))
return statAsync(file)
.then(() => {
- const verifier = ssri.integrityStream({integrity: opts.integrity})
+ const verifier = ssri.integrityStream({ integrity: opts.integrity })
const stream = fs.createReadStream(file)
.on('error', err => verifier.emit('error', err))
.pipe(verifier)
@@ -50,7 +50,7 @@ function withTarballStream (spec, opts, streamHandler) {
throw err
})
})
- : BB.reject(Object.assign(new Error('no file!'), {code: 'ENOENT'}))
+ : BB.reject(Object.assign(new Error('no file!'), { code: 'ENOENT' }))
const tryDigest = tryFile
.catch(err => {
@@ -96,10 +96,10 @@ function withTarballStream (spec, opts, streamHandler) {
const tardata = fetch.tarball(spec, opts)
if (!opts.resolved) {
tardata.on('manifest', m => {
- opts.resolved = m._resolved
+ opts = opts.concat({ resolved: m._resolved })
})
tardata.on('integrity', i => {
- opts.integrity = i
+ opts = opts.concat({ integrity: i })
})
}
return BB.try(() => streamHandler(tardata))
@@ -117,7 +117,7 @@ function withTarballStream (spec, opts, streamHandler) {
throw err
}
})
- }, {retries: 1}))
+ }, { retries: 1 }))
}
})
diff --git a/deps/npm/node_modules/pacote/node_modules/lru-cache/LICENSE b/deps/npm/node_modules/pacote/node_modules/lru-cache/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/lru-cache/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/lru-cache/README.md b/deps/npm/node_modules/pacote/node_modules/lru-cache/README.md
new file mode 100644
index 0000000000..435dfebb7e
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/lru-cache/README.md
@@ -0,0 +1,166 @@
+# lru cache
+
+A cache object that deletes the least-recently-used items.
+
+[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache)
+
+## Installation:
+
+```javascript
+npm install lru-cache --save
+```
+
+## Usage:
+
+```javascript
+var LRU = require("lru-cache")
+ , options = { max: 500
+ , length: function (n, key) { return n * 2 + key.length }
+ , dispose: function (key, n) { n.close() }
+ , maxAge: 1000 * 60 * 60 }
+ , cache = new LRU(options)
+ , otherCache = new LRU(50) // sets just the max size
+
+cache.set("key", "value")
+cache.get("key") // "value"
+
+// non-string keys ARE fully supported
+// but note that it must be THE SAME object, not
+// just a JSON-equivalent object.
+var someObject = { a: 1 }
+cache.set(someObject, 'a value')
+// Object keys are not toString()-ed
+cache.set('[object Object]', 'a different value')
+assert.equal(cache.get(someObject), 'a value')
+// A similar object with same keys/values won't work,
+// because it's a different object identity
+assert.equal(cache.get({ a: 1 }), undefined)
+
+cache.reset() // empty the cache
+```
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
+## Options
+
+* `max` The maximum size of the cache, checked by applying the length
+ function to all values in the cache. Not setting this is kind of
+ silly, since that's the whole purpose of this lib, but it defaults
+ to `Infinity`. Setting it to a non-number or negative number will
+ throw a `TypeError`. Setting it to 0 makes it be `Infinity`.
+* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
+ as they age, but if you try to get an item that is too old, it'll
+ drop it and return undefined instead of giving it to you.
+ Setting this to a negative value will make everything seem old!
+ Setting it to a non-number will throw a `TypeError`.
+* `length` Function that is used to calculate the length of stored
+ items. If you're storing strings or buffers, then you probably want
+ to do something like `function(n, key){return n.length}`. The default is
+ `function(){return 1}`, which is fine if you want to store `max`
+ like-sized things. The item is passed as the first argument, and
+ the key is passed as the second argumnet.
+* `dispose` Function that is called on items when they are dropped
+ from the cache. This can be handy if you want to close file
+ descriptors or do other cleanup tasks when items are no longer
+ accessible. Called with `key, value`. It's called *before*
+ actually removing the item from the internal cache, so if you want
+ to immediately put it back in, you'll have to do that in a
+ `nextTick` or `setTimeout` callback or it won't do anything.
+* `stale` By default, if you set a `maxAge`, it'll only actually pull
+ stale items out of the cache when you `get(key)`. (That is, it's
+ not pre-emptively doing a `setTimeout` or anything.) If you set
+ `stale:true`, it'll return the stale value before deleting it. If
+ you don't set this, then it'll return `undefined` when you try to
+ get a stale entry, as if it had already been deleted.
+* `noDisposeOnSet` By default, if you set a `dispose()` method, then
+ it'll be called whenever a `set()` operation overwrites an existing
+ key. If you set this option, `dispose()` will only be called when a
+ key falls out of the cache, not when it is overwritten.
+* `updateAgeOnGet` When using time-expiring entries with `maxAge`,
+ setting this to `true` will make each item's effective time update
+ to the current time whenever it is retrieved from cache, causing it
+ to not expire. (It can still fall out of cache based on recency of
+ use, of course.)
+
+## API
+
+* `set(key, value, maxAge)`
+* `get(key) => value`
+
+ Both of these will update the "recently used"-ness of the key.
+ They do what you think. `maxAge` is optional and overrides the
+ cache `maxAge` option if provided.
+
+ If the key is not found, `get()` will return `undefined`.
+
+ The key and val can be any value.
+
+* `peek(key)`
+
+ Returns the key value (or `undefined` if not found) without
+ updating the "recently used"-ness of the key.
+
+ (If you find yourself using this a lot, you *might* be using the
+ wrong sort of data structure, but there are some use cases where
+ it's handy.)
+
+* `del(key)`
+
+ Deletes a key out of the cache.
+
+* `reset()`
+
+ Clear the cache entirely, throwing away all values.
+
+* `has(key)`
+
+ Check if a key is in the cache, without updating the recent-ness
+ or deleting it for being stale.
+
+* `forEach(function(value,key,cache), [thisp])`
+
+ Just like `Array.prototype.forEach`. Iterates over all the keys
+ in the cache, in order of recent-ness. (Ie, more recently used
+ items are iterated over first.)
+
+* `rforEach(function(value,key,cache), [thisp])`
+
+ The same as `cache.forEach(...)` but items are iterated over in
+ reverse order. (ie, less recently used items are iterated over
+ first.)
+
+* `keys()`
+
+ Return an array of the keys in the cache.
+
+* `values()`
+
+ Return an array of the values in the cache.
+
+* `length`
+
+ Return total length of objects in cache taking into account
+ `length` options function.
+
+* `itemCount`
+
+ Return total quantity of objects currently in cache. Note, that
+ `stale` (see options) items are returned as part of this item
+ count.
+
+* `dump()`
+
+ Return an array of the cache entries ready for serialization and usage
+ with 'destinationCache.load(arr)`.
+
+* `load(cacheEntriesArray)`
+
+ Loads another cache entries array, obtained with `sourceCache.dump()`,
+ into the cache. The destination cache is reset before loading new entries
+
+* `prune()`
+
+ Manually iterates over the entire cache proactively pruning old entries
diff --git a/deps/npm/node_modules/pacote/node_modules/lru-cache/index.js b/deps/npm/node_modules/pacote/node_modules/lru-cache/index.js
new file mode 100644
index 0000000000..573b6b85b9
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/lru-cache/index.js
@@ -0,0 +1,334 @@
+'use strict'
+
+// A linked list to keep track of recently-used-ness
+const Yallist = require('yallist')
+
+const MAX = Symbol('max')
+const LENGTH = Symbol('length')
+const LENGTH_CALCULATOR = Symbol('lengthCalculator')
+const ALLOW_STALE = Symbol('allowStale')
+const MAX_AGE = Symbol('maxAge')
+const DISPOSE = Symbol('dispose')
+const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')
+const LRU_LIST = Symbol('lruList')
+const CACHE = Symbol('cache')
+const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')
+
+const naiveLength = () => 1
+
+// lruList is a yallist where the head is the youngest
+// item, and the tail is the oldest. the list contains the Hit
+// objects as the entries.
+// Each Hit object has a reference to its Yallist.Node. This
+// never changes.
+//
+// cache is a Map (or PseudoMap) that matches the keys to
+// the Yallist.Node object.
+class LRUCache {
+ constructor (options) {
+ if (typeof options === 'number')
+ options = { max: options }
+
+ if (!options)
+ options = {}
+
+ if (options.max && (typeof options.max !== 'number' || options.max < 0))
+ throw new TypeError('max must be a non-negative number')
+ // Kind of weird to have a default max of Infinity, but oh well.
+ const max = this[MAX] = options.max || Infinity
+
+ const lc = options.length || naiveLength
+ this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc
+ this[ALLOW_STALE] = options.stale || false
+ if (options.maxAge && typeof options.maxAge !== 'number')
+ throw new TypeError('maxAge must be a number')
+ this[MAX_AGE] = options.maxAge || 0
+ this[DISPOSE] = options.dispose
+ this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
+ this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false
+ this.reset()
+ }
+
+ // resize the cache when the max changes.
+ set max (mL) {
+ if (typeof mL !== 'number' || mL < 0)
+ throw new TypeError('max must be a non-negative number')
+
+ this[MAX] = mL || Infinity
+ trim(this)
+ }
+ get max () {
+ return this[MAX]
+ }
+
+ set allowStale (allowStale) {
+ this[ALLOW_STALE] = !!allowStale
+ }
+ get allowStale () {
+ return this[ALLOW_STALE]
+ }
+
+ set maxAge (mA) {
+ if (typeof mA !== 'number')
+ throw new TypeError('maxAge must be a non-negative number')
+
+ this[MAX_AGE] = mA
+ trim(this)
+ }
+ get maxAge () {
+ return this[MAX_AGE]
+ }
+
+ // resize the cache when the lengthCalculator changes.
+ set lengthCalculator (lC) {
+ if (typeof lC !== 'function')
+ lC = naiveLength
+
+ if (lC !== this[LENGTH_CALCULATOR]) {
+ this[LENGTH_CALCULATOR] = lC
+ this[LENGTH] = 0
+ this[LRU_LIST].forEach(hit => {
+ hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
+ this[LENGTH] += hit.length
+ })
+ }
+ trim(this)
+ }
+ get lengthCalculator () { return this[LENGTH_CALCULATOR] }
+
+ get length () { return this[LENGTH] }
+ get itemCount () { return this[LRU_LIST].length }
+
+ rforEach (fn, thisp) {
+ thisp = thisp || this
+ for (let walker = this[LRU_LIST].tail; walker !== null;) {
+ const prev = walker.prev
+ forEachStep(this, fn, walker, thisp)
+ walker = prev
+ }
+ }
+
+ forEach (fn, thisp) {
+ thisp = thisp || this
+ for (let walker = this[LRU_LIST].head; walker !== null;) {
+ const next = walker.next
+ forEachStep(this, fn, walker, thisp)
+ walker = next
+ }
+ }
+
+ keys () {
+ return this[LRU_LIST].toArray().map(k => k.key)
+ }
+
+ values () {
+ return this[LRU_LIST].toArray().map(k => k.value)
+ }
+
+ reset () {
+ if (this[DISPOSE] &&
+ this[LRU_LIST] &&
+ this[LRU_LIST].length) {
+ this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))
+ }
+
+ this[CACHE] = new Map() // hash of items by key
+ this[LRU_LIST] = new Yallist() // list of items in order of use recency
+ this[LENGTH] = 0 // length of items in the list
+ }
+
+ dump () {
+ return this[LRU_LIST].map(hit =>
+ isStale(this, hit) ? false : {
+ k: hit.key,
+ v: hit.value,
+ e: hit.now + (hit.maxAge || 0)
+ }).toArray().filter(h => h)
+ }
+
+ dumpLru () {
+ return this[LRU_LIST]
+ }
+
+ set (key, value, maxAge) {
+ maxAge = maxAge || this[MAX_AGE]
+
+ if (maxAge && typeof maxAge !== 'number')
+ throw new TypeError('maxAge must be a number')
+
+ const now = maxAge ? Date.now() : 0
+ const len = this[LENGTH_CALCULATOR](value, key)
+
+ if (this[CACHE].has(key)) {
+ if (len > this[MAX]) {
+ del(this, this[CACHE].get(key))
+ return false
+ }
+
+ const node = this[CACHE].get(key)
+ const item = node.value
+
+ // dispose of the old one before overwriting
+ // split out into 2 ifs for better coverage tracking
+ if (this[DISPOSE]) {
+ if (!this[NO_DISPOSE_ON_SET])
+ this[DISPOSE](key, item.value)
+ }
+
+ item.now = now
+ item.maxAge = maxAge
+ item.value = value
+ this[LENGTH] += len - item.length
+ item.length = len
+ this.get(key)
+ trim(this)
+ return true
+ }
+
+ const hit = new Entry(key, value, len, now, maxAge)
+
+ // oversized objects fall out of cache automatically.
+ if (hit.length > this[MAX]) {
+ if (this[DISPOSE])
+ this[DISPOSE](key, value)
+
+ return false
+ }
+
+ this[LENGTH] += hit.length
+ this[LRU_LIST].unshift(hit)
+ this[CACHE].set(key, this[LRU_LIST].head)
+ trim(this)
+ return true
+ }
+
+ has (key) {
+ if (!this[CACHE].has(key)) return false
+ const hit = this[CACHE].get(key).value
+ return !isStale(this, hit)
+ }
+
+ get (key) {
+ return get(this, key, true)
+ }
+
+ peek (key) {
+ return get(this, key, false)
+ }
+
+ pop () {
+ const node = this[LRU_LIST].tail
+ if (!node)
+ return null
+
+ del(this, node)
+ return node.value
+ }
+
+ del (key) {
+ del(this, this[CACHE].get(key))
+ }
+
+ load (arr) {
+ // reset the cache
+ this.reset()
+
+ const now = Date.now()
+ // A previous serialized cache has the most recent items first
+ for (let l = arr.length - 1; l >= 0; l--) {
+ const hit = arr[l]
+ const expiresAt = hit.e || 0
+ if (expiresAt === 0)
+ // the item was created without expiration in a non aged cache
+ this.set(hit.k, hit.v)
+ else {
+ const maxAge = expiresAt - now
+ // dont add already expired items
+ if (maxAge > 0) {
+ this.set(hit.k, hit.v, maxAge)
+ }
+ }
+ }
+ }
+
+ prune () {
+ this[CACHE].forEach((value, key) => get(this, key, false))
+ }
+}
+
+const get = (self, key, doUse) => {
+ const node = self[CACHE].get(key)
+ if (node) {
+ const hit = node.value
+ if (isStale(self, hit)) {
+ del(self, node)
+ if (!self[ALLOW_STALE])
+ return undefined
+ } else {
+ if (doUse) {
+ if (self[UPDATE_AGE_ON_GET])
+ node.value.now = Date.now()
+ self[LRU_LIST].unshiftNode(node)
+ }
+ }
+ return hit.value
+ }
+}
+
+const isStale = (self, hit) => {
+ if (!hit || (!hit.maxAge && !self[MAX_AGE]))
+ return false
+
+ const diff = Date.now() - hit.now
+ return hit.maxAge ? diff > hit.maxAge
+ : self[MAX_AGE] && (diff > self[MAX_AGE])
+}
+
+const trim = self => {
+ if (self[LENGTH] > self[MAX]) {
+ for (let walker = self[LRU_LIST].tail;
+ self[LENGTH] > self[MAX] && walker !== null;) {
+ // We know that we're about to delete this one, and also
+ // what the next least recently used key will be, so just
+ // go ahead and set it now.
+ const prev = walker.prev
+ del(self, walker)
+ walker = prev
+ }
+ }
+}
+
+const del = (self, node) => {
+ if (node) {
+ const hit = node.value
+ if (self[DISPOSE])
+ self[DISPOSE](hit.key, hit.value)
+
+ self[LENGTH] -= hit.length
+ self[CACHE].delete(hit.key)
+ self[LRU_LIST].removeNode(node)
+ }
+}
+
+class Entry {
+ constructor (key, value, length, now, maxAge) {
+ this.key = key
+ this.value = value
+ this.length = length
+ this.now = now
+ this.maxAge = maxAge || 0
+ }
+}
+
+const forEachStep = (self, fn, node, thisp) => {
+ let hit = node.value
+ if (isStale(self, hit)) {
+ del(self, node)
+ if (!self[ALLOW_STALE])
+ hit = undefined
+ }
+ if (hit)
+ fn.call(thisp, hit.value, hit.key, self)
+}
+
+module.exports = LRUCache
diff --git a/deps/npm/node_modules/pacote/node_modules/lru-cache/package.json b/deps/npm/node_modules/pacote/node_modules/lru-cache/package.json
new file mode 100644
index 0000000000..a7fbba4b55
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/lru-cache/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "lru-cache@^5.1.1",
+ "_id": "lru-cache@5.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "_location": "/pacote/lru-cache",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "lru-cache@^5.1.1",
+ "name": "lru-cache",
+ "escapedName": "lru-cache",
+ "rawSpec": "^5.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^5.1.1"
+ },
+ "_requiredBy": [
+ "/pacote"
+ ],
+ "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "_shasum": "1da27e6710271947695daf6848e847f01d84b920",
+ "_spec": "lru-cache@^5.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/pacote",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/node-lru-cache/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "yallist": "^3.0.2"
+ },
+ "deprecated": false,
+ "description": "A cache object that deletes the least-recently-used items.",
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "tap": "^12.1.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/isaacs/node-lru-cache#readme",
+ "keywords": [
+ "mru",
+ "lru",
+ "cache"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "lru-cache",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-lru-cache.git"
+ },
+ "scripts": {
+ "coveragerport": "tap --coverage-report=html",
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "snap": "TAP_SNAPSHOT=1 tap test/*.js -J",
+ "test": "tap test/*.js --100 -J"
+ },
+ "version": "5.1.1"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/minipass/LICENSE b/deps/npm/node_modules/pacote/node_modules/minipass/LICENSE
new file mode 100644
index 0000000000..20a4762540
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/minipass/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) npm, Inc. and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/minipass/README.md b/deps/npm/node_modules/pacote/node_modules/minipass/README.md
new file mode 100644
index 0000000000..7a83c59ffd
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/minipass/README.md
@@ -0,0 +1,124 @@
+# minipass
+
+A _very_ minimal implementation of a [PassThrough
+stream](https://nodejs.org/api/stream.html#stream_class_stream_passthrough)
+
+[It's very
+fast](https://docs.google.com/spreadsheets/d/1oObKSrVwLX_7Ut4Z6g3fZW-AX1j1-k6w-cDsrkaSbHM/edit#gid=0)
+for objects, strings, and buffers.
+
+Supports pipe()ing (including multi-pipe() and backpressure
+transmission), buffering data until either a `data` event handler or
+`pipe()` is added (so you don't lose the first chunk), and most other
+cases where PassThrough is a good idea.
+
+There is a `read()` method, but it's much more efficient to consume
+data from this stream via `'data'` events or by calling `pipe()` into
+some other stream. Calling `read()` requires the buffer to be
+flattened in some cases, which requires copying memory.
+
+There is also no `unpipe()` method. Once you start piping, there is
+no stopping it!
+
+If you set `objectMode: true` in the options, then whatever is written
+will be emitted. Otherwise, it'll do a minimal amount of Buffer
+copying to ensure proper Streams semantics when `read(n)` is called.
+
+This is not a `through` or `through2` stream. It doesn't transform
+the data, it just passes it right through. If you want to transform
+the data, extend the class, and override the `write()` method. Once
+you're done transforming the data however you want, call
+`super.write()` with the transform output.
+
+For an example of a stream that extends MiniPass to provide transform
+capabilities, check out [minizlib](http://npm.im/minizlib).
+
+## USAGE
+
+```js
+const MiniPass = require('minipass')
+const mp = new MiniPass(options) // optional: { encoding }
+mp.write('foo')
+mp.pipe(someOtherStream)
+mp.end('bar')
+```
+
+### collecting
+
+```js
+mp.collect().then(all => {
+ // all is an array of all the data emitted
+ // encoding is supported in this case, so
+ // so the result will be a collection of strings if
+ // an encoding is specified, or buffers/objects if not.
+ //
+ // In an async function, you may do
+ // const data = await stream.collect()
+})
+```
+
+### iteration
+
+You can iterate over streams synchronously or asynchronously in
+platforms that support it.
+
+Synchronous iteration will end when the currently available data is
+consumed, even if the `end` event has not been reached. In string and
+buffer mode, the data is concatenated, so unless multiple writes are
+occurring in the same tick as the `read()`, sync iteration loops will
+generally only have a single iteration.
+
+To consume chunks in this way exactly as they have been written, with
+no flattening, create the stream with the `{ objectMode: true }`
+option.
+
+```js
+const mp = new Minipass({ objectMode: true })
+mp.write('a')
+mp.write('b')
+for (let letter of mp) {
+ console.log(letter) // a, b
+}
+mp.write('c')
+mp.write('d')
+for (let letter of mp) {
+ console.log(letter) // c, d
+}
+mp.write('e')
+mp.end()
+for (let letter of mp) {
+ console.log(letter) // e
+}
+for (let letter of mp) {
+ console.log(letter) // nothing
+}
+```
+
+Asynchronous iteration will continue until the end event is reached,
+consuming all of the data.
+
+```js
+const mp = new Minipass({ encoding: 'utf8' })
+
+// some source of some data
+let i = 5
+const inter = setInterval(() => {
+ if (i --> 0)
+ mp.write(Buffer.from('foo\n', 'utf8'))
+ else {
+ mp.end()
+ clearInterval(inter)
+ }
+}, 100)
+
+// consume the data with asynchronous iteration
+async function consume () {
+ for await (let chunk of mp) {
+ console.log(chunk)
+ }
+ return 'ok'
+}
+
+consume().then(res => console.log(res))
+// logs `foo\n` 5 times, and then `ok`
+```
diff --git a/deps/npm/node_modules/pacote/node_modules/minipass/index.js b/deps/npm/node_modules/pacote/node_modules/minipass/index.js
new file mode 100644
index 0000000000..de472c36e7
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/minipass/index.js
@@ -0,0 +1,375 @@
+'use strict'
+const EE = require('events')
+const Yallist = require('yallist')
+const EOF = Symbol('EOF')
+const MAYBE_EMIT_END = Symbol('maybeEmitEnd')
+const EMITTED_END = Symbol('emittedEnd')
+const CLOSED = Symbol('closed')
+const READ = Symbol('read')
+const FLUSH = Symbol('flush')
+const doIter = process.env._MP_NO_ITERATOR_SYMBOLS_ !== '1'
+const ASYNCITERATOR = doIter && Symbol.asyncIterator || Symbol('asyncIterator not implemented')
+const ITERATOR = doIter && Symbol.iterator || Symbol('iterator not implemented')
+const FLUSHCHUNK = Symbol('flushChunk')
+const SD = require('string_decoder').StringDecoder
+const ENCODING = Symbol('encoding')
+const DECODER = Symbol('decoder')
+const FLOWING = Symbol('flowing')
+const RESUME = Symbol('resume')
+const BUFFERLENGTH = Symbol('bufferLength')
+const BUFFERPUSH = Symbol('bufferPush')
+const BUFFERSHIFT = Symbol('bufferShift')
+const OBJECTMODE = Symbol('objectMode')
+
+// Buffer in node 4.x < 4.5.0 doesn't have working Buffer.from
+// or Buffer.alloc, and Buffer in node 10 deprecated the ctor.
+// .M, this is fine .\^/M..
+let B = Buffer
+/* istanbul ignore next */
+if (!B.alloc) {
+ B = require('safe-buffer').Buffer
+}
+
+module.exports = class MiniPass extends EE {
+ constructor (options) {
+ super()
+ this[FLOWING] = false
+ this.pipes = new Yallist()
+ this.buffer = new Yallist()
+ this[OBJECTMODE] = options && options.objectMode || false
+ if (this[OBJECTMODE])
+ this[ENCODING] = null
+ else
+ this[ENCODING] = options && options.encoding || null
+ if (this[ENCODING] === 'buffer')
+ this[ENCODING] = null
+ this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null
+ this[EOF] = false
+ this[EMITTED_END] = false
+ this[CLOSED] = false
+ this.writable = true
+ this.readable = true
+ this[BUFFERLENGTH] = 0
+ }
+
+ get bufferLength () { return this[BUFFERLENGTH] }
+
+ get encoding () { return this[ENCODING] }
+ set encoding (enc) {
+ if (this[OBJECTMODE])
+ throw new Error('cannot set encoding in objectMode')
+
+ if (this[ENCODING] && enc !== this[ENCODING] &&
+ (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH]))
+ throw new Error('cannot change encoding')
+
+ if (this[ENCODING] !== enc) {
+ this[DECODER] = enc ? new SD(enc) : null
+ if (this.buffer.length)
+ this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk))
+ }
+
+ this[ENCODING] = enc
+ }
+
+ setEncoding (enc) {
+ this.encoding = enc
+ }
+
+ write (chunk, encoding, cb) {
+ if (this[EOF])
+ throw new Error('write after end')
+
+ if (typeof encoding === 'function')
+ cb = encoding, encoding = 'utf8'
+
+ if (!encoding)
+ encoding = 'utf8'
+
+ // fast-path writing strings of same encoding to a stream with
+ // an empty buffer, skipping the buffer/decoder dance
+ if (typeof chunk === 'string' && !this[OBJECTMODE] &&
+ // unless it is a string already ready for us to use
+ !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
+ chunk = B.from(chunk, encoding)
+ }
+
+ if (B.isBuffer(chunk) && this[ENCODING])
+ chunk = this[DECODER].write(chunk)
+
+ try {
+ return this.flowing
+ ? (this.emit('data', chunk), this.flowing)
+ : (this[BUFFERPUSH](chunk), false)
+ } finally {
+ this.emit('readable')
+ if (cb)
+ cb()
+ }
+ }
+
+ read (n) {
+ try {
+ if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH])
+ return null
+
+ if (this[OBJECTMODE])
+ n = null
+
+ if (this.buffer.length > 1 && !this[OBJECTMODE]) {
+ if (this.encoding)
+ this.buffer = new Yallist([
+ Array.from(this.buffer).join('')
+ ])
+ else
+ this.buffer = new Yallist([
+ B.concat(Array.from(this.buffer), this[BUFFERLENGTH])
+ ])
+ }
+
+ return this[READ](n || null, this.buffer.head.value)
+ } finally {
+ this[MAYBE_EMIT_END]()
+ }
+ }
+
+ [READ] (n, chunk) {
+ if (n === chunk.length || n === null)
+ this[BUFFERSHIFT]()
+ else {
+ this.buffer.head.value = chunk.slice(n)
+ chunk = chunk.slice(0, n)
+ this[BUFFERLENGTH] -= n
+ }
+
+ this.emit('data', chunk)
+
+ if (!this.buffer.length && !this[EOF])
+ this.emit('drain')
+
+ return chunk
+ }
+
+ end (chunk, encoding, cb) {
+ if (typeof chunk === 'function')
+ cb = chunk, chunk = null
+ if (typeof encoding === 'function')
+ cb = encoding, encoding = 'utf8'
+ if (chunk)
+ this.write(chunk, encoding)
+ if (cb)
+ this.once('end', cb)
+ this[EOF] = true
+ this.writable = false
+ if (this.flowing)
+ this[MAYBE_EMIT_END]()
+ }
+
+ // don't let the internal resume be overwritten
+ [RESUME] () {
+ this[FLOWING] = true
+ this.emit('resume')
+ if (this.buffer.length)
+ this[FLUSH]()
+ else if (this[EOF])
+ this[MAYBE_EMIT_END]()
+ else
+ this.emit('drain')
+ }
+
+ resume () {
+ return this[RESUME]()
+ }
+
+ pause () {
+ this[FLOWING] = false
+ }
+
+ get flowing () {
+ return this[FLOWING]
+ }
+
+ [BUFFERPUSH] (chunk) {
+ if (this[OBJECTMODE])
+ this[BUFFERLENGTH] += 1
+ else
+ this[BUFFERLENGTH] += chunk.length
+ return this.buffer.push(chunk)
+ }
+
+ [BUFFERSHIFT] () {
+ if (this.buffer.length) {
+ if (this[OBJECTMODE])
+ this[BUFFERLENGTH] -= 1
+ else
+ this[BUFFERLENGTH] -= this.buffer.head.value.length
+ }
+ return this.buffer.shift()
+ }
+
+ [FLUSH] () {
+ do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()))
+
+ if (!this.buffer.length && !this[EOF])
+ this.emit('drain')
+ }
+
+ [FLUSHCHUNK] (chunk) {
+ return chunk ? (this.emit('data', chunk), this.flowing) : false
+ }
+
+ pipe (dest, opts) {
+ if (dest === process.stdout || dest === process.stderr)
+ (opts = opts || {}).end = false
+ const p = { dest: dest, opts: opts, ondrain: _ => this[RESUME]() }
+ this.pipes.push(p)
+
+ dest.on('drain', p.ondrain)
+ this[RESUME]()
+ return dest
+ }
+
+ addListener (ev, fn) {
+ return this.on(ev, fn)
+ }
+
+ on (ev, fn) {
+ try {
+ return super.on(ev, fn)
+ } finally {
+ if (ev === 'data' && !this.pipes.length && !this.flowing)
+ this[RESUME]()
+ else if (ev === 'end' && this[EMITTED_END]) {
+ super.emit('end')
+ this.removeAllListeners('end')
+ }
+ }
+ }
+
+ get emittedEnd () {
+ return this[EMITTED_END]
+ }
+
+ [MAYBE_EMIT_END] () {
+ if (!this[EMITTED_END] && this.buffer.length === 0 && this[EOF]) {
+ this.emit('end')
+ this.emit('prefinish')
+ this.emit('finish')
+ if (this[CLOSED])
+ this.emit('close')
+ }
+ }
+
+ emit (ev, data) {
+ if (ev === 'data') {
+ if (!data)
+ return
+
+ if (this.pipes.length)
+ this.pipes.forEach(p => p.dest.write(data) || this.pause())
+ } else if (ev === 'end') {
+ if (this[EMITTED_END] === true)
+ return
+
+ this[EMITTED_END] = true
+ this.readable = false
+
+ if (this[DECODER]) {
+ data = this[DECODER].end()
+ if (data) {
+ this.pipes.forEach(p => p.dest.write(data))
+ super.emit('data', data)
+ }
+ }
+
+ this.pipes.forEach(p => {
+ p.dest.removeListener('drain', p.ondrain)
+ if (!p.opts || p.opts.end !== false)
+ p.dest.end()
+ })
+ } else if (ev === 'close') {
+ this[CLOSED] = true
+ // don't emit close before 'end' and 'finish'
+ if (!this[EMITTED_END])
+ return
+ }
+
+ const args = new Array(arguments.length)
+ args[0] = ev
+ args[1] = data
+ if (arguments.length > 2) {
+ for (let i = 2; i < arguments.length; i++) {
+ args[i] = arguments[i]
+ }
+ }
+
+ try {
+ return super.emit.apply(this, args)
+ } finally {
+ if (ev !== 'end')
+ this[MAYBE_EMIT_END]()
+ else
+ this.removeAllListeners('end')
+ }
+ }
+
+ // const all = await stream.collect()
+ collect () {
+ return new Promise((resolve, reject) => {
+ const buf = []
+ this.on('data', c => buf.push(c))
+ this.on('end', () => resolve(buf))
+ this.on('error', reject)
+ })
+ }
+
+ // for await (let chunk of stream)
+ [ASYNCITERATOR] () {
+ const next = () => {
+ const res = this.read()
+ if (res !== null)
+ return Promise.resolve({ done: false, value: res })
+
+ if (this[EOF])
+ return Promise.resolve({ done: true })
+
+ let resolve = null
+ let reject = null
+ const onerr = er => {
+ this.removeListener('data', ondata)
+ this.removeListener('end', onend)
+ reject(er)
+ }
+ const ondata = value => {
+ this.removeListener('error', onerr)
+ this.removeListener('end', onend)
+ this.pause()
+ resolve({ value: value, done: !!this[EOF] })
+ }
+ const onend = () => {
+ this.removeListener('error', onerr)
+ this.removeListener('data', ondata)
+ resolve({ done: true })
+ }
+ return new Promise((res, rej) => {
+ reject = rej
+ resolve = res
+ this.once('error', onerr)
+ this.once('end', onend)
+ this.once('data', ondata)
+ })
+ }
+
+ return { next }
+ }
+
+ // for (let chunk of stream)
+ [ITERATOR] () {
+ const next = () => {
+ const value = this.read()
+ const done = value === null
+ return { value, done }
+ }
+ return { next }
+ }
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/minipass/package.json b/deps/npm/node_modules/pacote/node_modules/minipass/package.json
new file mode 100644
index 0000000000..d2adc87994
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/minipass/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "minipass@^2.3.5",
+ "_id": "minipass@2.3.5",
+ "_inBundle": false,
+ "_integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
+ "_location": "/pacote/minipass",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "minipass@^2.3.5",
+ "name": "minipass",
+ "escapedName": "minipass",
+ "rawSpec": "^2.3.5",
+ "saveSpec": null,
+ "fetchSpec": "^2.3.5"
+ },
+ "_requiredBy": [
+ "/pacote"
+ ],
+ "_resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
+ "_shasum": "cacebe492022497f656b0f0f51e2682a9ed2d848",
+ "_spec": "minipass@^2.3.5",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/minipass/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "^5.1.2",
+ "yallist": "^3.0.0"
+ },
+ "deprecated": false,
+ "description": "minimal implementation of a PassThrough stream",
+ "devDependencies": {
+ "end-of-stream": "^1.4.0",
+ "tap": "^12.0.1",
+ "through2": "^2.0.3"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/isaacs/minipass#readme",
+ "keywords": [
+ "passthrough",
+ "stream"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "minipass",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/minipass.git"
+ },
+ "scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --100"
+ },
+ "version": "2.3.5"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/yallist/LICENSE b/deps/npm/node_modules/pacote/node_modules/yallist/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/yallist/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/yallist/README.md b/deps/npm/node_modules/pacote/node_modules/yallist/README.md
new file mode 100644
index 0000000000..f586101869
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/yallist/README.md
@@ -0,0 +1,204 @@
+# yallist
+
+Yet Another Linked List
+
+There are many doubly-linked list implementations like it, but this
+one is mine.
+
+For when an array would be too big, and a Map can't be iterated in
+reverse order.
+
+
+[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist)
+
+## basic usage
+
+```javascript
+var yallist = require('yallist')
+var myList = yallist.create([1, 2, 3])
+myList.push('foo')
+myList.unshift('bar')
+// of course pop() and shift() are there, too
+console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
+myList.forEach(function (k) {
+ // walk the list head to tail
+})
+myList.forEachReverse(function (k, index, list) {
+ // walk the list tail to head
+})
+var myDoubledList = myList.map(function (k) {
+ return k + k
+})
+// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
+// mapReverse is also a thing
+var myDoubledListReverse = myList.mapReverse(function (k) {
+ return k + k
+}) // ['foofoo', 6, 4, 2, 'barbar']
+
+var reduced = myList.reduce(function (set, entry) {
+ set += entry
+ return set
+}, 'start')
+console.log(reduced) // 'startfoo123bar'
+```
+
+## api
+
+The whole API is considered "public".
+
+Functions with the same name as an Array method work more or less the
+same way.
+
+There's reverse versions of most things because that's the point.
+
+### Yallist
+
+Default export, the class that holds and manages a list.
+
+Call it with either a forEach-able (like an array) or a set of
+arguments, to initialize the list.
+
+The Array-ish methods all act like you'd expect. No magic length,
+though, so if you change that it won't automatically prune or add
+empty spots.
+
+### Yallist.create(..)
+
+Alias for Yallist function. Some people like factories.
+
+#### yallist.head
+
+The first node in the list
+
+#### yallist.tail
+
+The last node in the list
+
+#### yallist.length
+
+The number of nodes in the list. (Change this at your peril. It is
+not magic like Array length.)
+
+#### yallist.toArray()
+
+Convert the list to an array.
+
+#### yallist.forEach(fn, [thisp])
+
+Call a function on each item in the list.
+
+#### yallist.forEachReverse(fn, [thisp])
+
+Call a function on each item in the list, in reverse order.
+
+#### yallist.get(n)
+
+Get the data at position `n` in the list. If you use this a lot,
+probably better off just using an Array.
+
+#### yallist.getReverse(n)
+
+Get the data at position `n`, counting from the tail.
+
+#### yallist.map(fn, thisp)
+
+Create a new Yallist with the result of calling the function on each
+item.
+
+#### yallist.mapReverse(fn, thisp)
+
+Same as `map`, but in reverse.
+
+#### yallist.pop()
+
+Get the data from the list tail, and remove the tail from the list.
+
+#### yallist.push(item, ...)
+
+Insert one or more items to the tail of the list.
+
+#### yallist.reduce(fn, initialValue)
+
+Like Array.reduce.
+
+#### yallist.reduceReverse
+
+Like Array.reduce, but in reverse.
+
+#### yallist.reverse
+
+Reverse the list in place.
+
+#### yallist.shift()
+
+Get the data from the list head, and remove the head from the list.
+
+#### yallist.slice([from], [to])
+
+Just like Array.slice, but returns a new Yallist.
+
+#### yallist.sliceReverse([from], [to])
+
+Just like yallist.slice, but the result is returned in reverse.
+
+#### yallist.toArray()
+
+Create an array representation of the list.
+
+#### yallist.toArrayReverse()
+
+Create a reversed array representation of the list.
+
+#### yallist.unshift(item, ...)
+
+Insert one or more items to the head of the list.
+
+#### yallist.unshiftNode(node)
+
+Move a Node object to the front of the list. (That is, pull it out of
+wherever it lives, and make it the new head.)
+
+If the node belongs to a different list, then that list will remove it
+first.
+
+#### yallist.pushNode(node)
+
+Move a Node object to the end of the list. (That is, pull it out of
+wherever it lives, and make it the new tail.)
+
+If the node belongs to a list already, then that list will remove it
+first.
+
+#### yallist.removeNode(node)
+
+Remove a node from the list, preserving referential integrity of head
+and tail and other nodes.
+
+Will throw an error if you try to have a list remove a node that
+doesn't belong to it.
+
+### Yallist.Node
+
+The class that holds the data and is actually the list.
+
+Call with `var n = new Node(value, previousNode, nextNode)`
+
+Note that if you do direct operations on Nodes themselves, it's very
+easy to get into weird states where the list is broken. Be careful :)
+
+#### node.next
+
+The next node in the list.
+
+#### node.prev
+
+The previous node in the list.
+
+#### node.value
+
+The data the node contains.
+
+#### node.list
+
+The list to which this node belongs. (Null if it does not belong to
+any list.)
diff --git a/deps/npm/node_modules/pacote/node_modules/yallist/iterator.js b/deps/npm/node_modules/pacote/node_modules/yallist/iterator.js
new file mode 100644
index 0000000000..d41c97a19f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/yallist/iterator.js
@@ -0,0 +1,8 @@
+'use strict'
+module.exports = function (Yallist) {
+ Yallist.prototype[Symbol.iterator] = function* () {
+ for (let walker = this.head; walker; walker = walker.next) {
+ yield walker.value
+ }
+ }
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/yallist/package.json b/deps/npm/node_modules/pacote/node_modules/yallist/package.json
new file mode 100644
index 0000000000..9dd5bf96b0
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/yallist/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "yallist@^3.0.0",
+ "_id": "yallist@3.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
+ "_location": "/pacote/yallist",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "yallist@^3.0.0",
+ "name": "yallist",
+ "escapedName": "yallist",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/pacote/minipass"
+ ],
+ "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
+ "_shasum": "b4b049e314be545e3ce802236d6cd22cd91c3de9",
+ "_spec": "yallist@^3.0.0",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote/node_modules/minipass",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/yallist/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Yet Another Linked List",
+ "devDependencies": {
+ "tap": "^12.1.0"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "yallist.js",
+ "iterator.js"
+ ],
+ "homepage": "https://github.com/isaacs/yallist#readme",
+ "license": "ISC",
+ "main": "yallist.js",
+ "name": "yallist",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/yallist.git"
+ },
+ "scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --100"
+ },
+ "version": "3.0.3"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/yallist/yallist.js b/deps/npm/node_modules/pacote/node_modules/yallist/yallist.js
new file mode 100644
index 0000000000..b0ab36cf31
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/yallist/yallist.js
@@ -0,0 +1,376 @@
+'use strict'
+module.exports = Yallist
+
+Yallist.Node = Node
+Yallist.create = Yallist
+
+function Yallist (list) {
+ var self = this
+ if (!(self instanceof Yallist)) {
+ self = new Yallist()
+ }
+
+ self.tail = null
+ self.head = null
+ self.length = 0
+
+ if (list && typeof list.forEach === 'function') {
+ list.forEach(function (item) {
+ self.push(item)
+ })
+ } else if (arguments.length > 0) {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ self.push(arguments[i])
+ }
+ }
+
+ return self
+}
+
+Yallist.prototype.removeNode = function (node) {
+ if (node.list !== this) {
+ throw new Error('removing node which does not belong to this list')
+ }
+
+ var next = node.next
+ var prev = node.prev
+
+ if (next) {
+ next.prev = prev
+ }
+
+ if (prev) {
+ prev.next = next
+ }
+
+ if (node === this.head) {
+ this.head = next
+ }
+ if (node === this.tail) {
+ this.tail = prev
+ }
+
+ node.list.length--
+ node.next = null
+ node.prev = null
+ node.list = null
+}
+
+Yallist.prototype.unshiftNode = function (node) {
+ if (node === this.head) {
+ return
+ }
+
+ if (node.list) {
+ node.list.removeNode(node)
+ }
+
+ var head = this.head
+ node.list = this
+ node.next = head
+ if (head) {
+ head.prev = node
+ }
+
+ this.head = node
+ if (!this.tail) {
+ this.tail = node
+ }
+ this.length++
+}
+
+Yallist.prototype.pushNode = function (node) {
+ if (node === this.tail) {
+ return
+ }
+
+ if (node.list) {
+ node.list.removeNode(node)
+ }
+
+ var tail = this.tail
+ node.list = this
+ node.prev = tail
+ if (tail) {
+ tail.next = node
+ }
+
+ this.tail = node
+ if (!this.head) {
+ this.head = node
+ }
+ this.length++
+}
+
+Yallist.prototype.push = function () {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ push(this, arguments[i])
+ }
+ return this.length
+}
+
+Yallist.prototype.unshift = function () {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ unshift(this, arguments[i])
+ }
+ return this.length
+}
+
+Yallist.prototype.pop = function () {
+ if (!this.tail) {
+ return undefined
+ }
+
+ var res = this.tail.value
+ this.tail = this.tail.prev
+ if (this.tail) {
+ this.tail.next = null
+ } else {
+ this.head = null
+ }
+ this.length--
+ return res
+}
+
+Yallist.prototype.shift = function () {
+ if (!this.head) {
+ return undefined
+ }
+
+ var res = this.head.value
+ this.head = this.head.next
+ if (this.head) {
+ this.head.prev = null
+ } else {
+ this.tail = null
+ }
+ this.length--
+ return res
+}
+
+Yallist.prototype.forEach = function (fn, thisp) {
+ thisp = thisp || this
+ for (var walker = this.head, i = 0; walker !== null; i++) {
+ fn.call(thisp, walker.value, i, this)
+ walker = walker.next
+ }
+}
+
+Yallist.prototype.forEachReverse = function (fn, thisp) {
+ thisp = thisp || this
+ for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
+ fn.call(thisp, walker.value, i, this)
+ walker = walker.prev
+ }
+}
+
+Yallist.prototype.get = function (n) {
+ for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
+ // abort out of the list early if we hit a cycle
+ walker = walker.next
+ }
+ if (i === n && walker !== null) {
+ return walker.value
+ }
+}
+
+Yallist.prototype.getReverse = function (n) {
+ for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
+ // abort out of the list early if we hit a cycle
+ walker = walker.prev
+ }
+ if (i === n && walker !== null) {
+ return walker.value
+ }
+}
+
+Yallist.prototype.map = function (fn, thisp) {
+ thisp = thisp || this
+ var res = new Yallist()
+ for (var walker = this.head; walker !== null;) {
+ res.push(fn.call(thisp, walker.value, this))
+ walker = walker.next
+ }
+ return res
+}
+
+Yallist.prototype.mapReverse = function (fn, thisp) {
+ thisp = thisp || this
+ var res = new Yallist()
+ for (var walker = this.tail; walker !== null;) {
+ res.push(fn.call(thisp, walker.value, this))
+ walker = walker.prev
+ }
+ return res
+}
+
+Yallist.prototype.reduce = function (fn, initial) {
+ var acc
+ var walker = this.head
+ if (arguments.length > 1) {
+ acc = initial
+ } else if (this.head) {
+ walker = this.head.next
+ acc = this.head.value
+ } else {
+ throw new TypeError('Reduce of empty list with no initial value')
+ }
+
+ for (var i = 0; walker !== null; i++) {
+ acc = fn(acc, walker.value, i)
+ walker = walker.next
+ }
+
+ return acc
+}
+
+Yallist.prototype.reduceReverse = function (fn, initial) {
+ var acc
+ var walker = this.tail
+ if (arguments.length > 1) {
+ acc = initial
+ } else if (this.tail) {
+ walker = this.tail.prev
+ acc = this.tail.value
+ } else {
+ throw new TypeError('Reduce of empty list with no initial value')
+ }
+
+ for (var i = this.length - 1; walker !== null; i--) {
+ acc = fn(acc, walker.value, i)
+ walker = walker.prev
+ }
+
+ return acc
+}
+
+Yallist.prototype.toArray = function () {
+ var arr = new Array(this.length)
+ for (var i = 0, walker = this.head; walker !== null; i++) {
+ arr[i] = walker.value
+ walker = walker.next
+ }
+ return arr
+}
+
+Yallist.prototype.toArrayReverse = function () {
+ var arr = new Array(this.length)
+ for (var i = 0, walker = this.tail; walker !== null; i++) {
+ arr[i] = walker.value
+ walker = walker.prev
+ }
+ return arr
+}
+
+Yallist.prototype.slice = function (from, to) {
+ to = to || this.length
+ if (to < 0) {
+ to += this.length
+ }
+ from = from || 0
+ if (from < 0) {
+ from += this.length
+ }
+ var ret = new Yallist()
+ if (to < from || to < 0) {
+ return ret
+ }
+ if (from < 0) {
+ from = 0
+ }
+ if (to > this.length) {
+ to = this.length
+ }
+ for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
+ walker = walker.next
+ }
+ for (; walker !== null && i < to; i++, walker = walker.next) {
+ ret.push(walker.value)
+ }
+ return ret
+}
+
+Yallist.prototype.sliceReverse = function (from, to) {
+ to = to || this.length
+ if (to < 0) {
+ to += this.length
+ }
+ from = from || 0
+ if (from < 0) {
+ from += this.length
+ }
+ var ret = new Yallist()
+ if (to < from || to < 0) {
+ return ret
+ }
+ if (from < 0) {
+ from = 0
+ }
+ if (to > this.length) {
+ to = this.length
+ }
+ for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
+ walker = walker.prev
+ }
+ for (; walker !== null && i > from; i--, walker = walker.prev) {
+ ret.push(walker.value)
+ }
+ return ret
+}
+
+Yallist.prototype.reverse = function () {
+ var head = this.head
+ var tail = this.tail
+ for (var walker = head; walker !== null; walker = walker.prev) {
+ var p = walker.prev
+ walker.prev = walker.next
+ walker.next = p
+ }
+ this.head = tail
+ this.tail = head
+ return this
+}
+
+function push (self, item) {
+ self.tail = new Node(item, self.tail, null, self)
+ if (!self.head) {
+ self.head = self.tail
+ }
+ self.length++
+}
+
+function unshift (self, item) {
+ self.head = new Node(item, null, self.head, self)
+ if (!self.tail) {
+ self.tail = self.head
+ }
+ self.length++
+}
+
+function Node (value, prev, next, list) {
+ if (!(this instanceof Node)) {
+ return new Node(value, prev, next, list)
+ }
+
+ this.list = list
+ this.value = value
+
+ if (prev) {
+ prev.next = this
+ this.prev = prev
+ } else {
+ this.prev = null
+ }
+
+ if (next) {
+ next.prev = this
+ this.next = next
+ } else {
+ this.next = null
+ }
+}
+
+try {
+ // add if support for Symbol.iterator is present
+ require('./iterator.js')(Yallist)
+} catch (er) {}
diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json
index 6287584c9c..32e8a07b09 100644
--- a/deps/npm/node_modules/pacote/package.json
+++ b/deps/npm/node_modules/pacote/package.json
@@ -1,33 +1,32 @@
{
- "_args": [
- [
- "pacote@8.1.6",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "pacote@8.1.6",
- "_id": "pacote@8.1.6",
+ "_from": "pacote@9.4.0",
+ "_id": "pacote@9.4.0",
"_inBundle": false,
- "_integrity": "sha512-wTOOfpaAQNEQNtPEx92x9Y9kRWVu45v583XT8x2oEV2xRB74+xdqMZIeGW4uFvAyZdmSBtye+wKdyyLaT8pcmw==",
+ "_integrity": "sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==",
"_location": "/pacote",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "safe-buffer": "5.1.2"
+ },
"_requested": {
"type": "version",
"registry": true,
- "raw": "pacote@8.1.6",
+ "raw": "pacote@9.4.0",
"name": "pacote",
"escapedName": "pacote",
- "rawSpec": "8.1.6",
+ "rawSpec": "9.4.0",
"saveSpec": null,
- "fetchSpec": "8.1.6"
+ "fetchSpec": "9.4.0"
},
"_requiredBy": [
+ "#USER",
"/",
- "/libcipm"
+ "/libcipm",
+ "/libnpm"
],
- "_resolved": "https://registry.npmjs.org/pacote/-/pacote-8.1.6.tgz",
- "_spec": "8.1.6",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.4.0.tgz",
+ "_shasum": "af979abdeb175cd347c3e33be3241af1ed254807",
+ "_spec": "pacote@9.4.0",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -35,6 +34,7 @@
"bugs": {
"url": "https://github.com/zkat/pacote/issues"
},
+ "bundleDependencies": false,
"contributors": [
{
"name": "Charlotte Spencer",
@@ -46,43 +46,46 @@
}
],
"dependencies": {
- "bluebird": "^3.5.1",
- "cacache": "^11.0.2",
- "get-stream": "^3.0.0",
- "glob": "^7.1.2",
- "lru-cache": "^4.1.3",
+ "bluebird": "^3.5.3",
+ "cacache": "^11.3.2",
+ "figgy-pudding": "^3.5.1",
+ "get-stream": "^4.1.0",
+ "glob": "^7.1.3",
+ "lru-cache": "^5.1.1",
"make-fetch-happen": "^4.0.1",
"minimatch": "^3.0.4",
- "minipass": "^2.3.3",
+ "minipass": "^2.3.5",
"mississippi": "^3.0.0",
"mkdirp": "^0.5.1",
"normalize-package-data": "^2.4.0",
"npm-package-arg": "^6.1.0",
- "npm-packlist": "^1.1.10",
- "npm-pick-manifest": "^2.1.0",
+ "npm-packlist": "^1.1.12",
+ "npm-pick-manifest": "^2.2.3",
+ "npm-registry-fetch": "^3.8.0",
"osenv": "^0.1.5",
"promise-inflight": "^1.0.1",
"promise-retry": "^1.1.1",
- "protoduck": "^5.0.0",
+ "protoduck": "^5.0.1",
"rimraf": "^2.6.2",
"safe-buffer": "^5.1.2",
- "semver": "^5.5.0",
- "ssri": "^6.0.0",
- "tar": "^4.4.3",
- "unique-filename": "^1.1.0",
- "which": "^1.3.0"
+ "semver": "^5.6.0",
+ "ssri": "^6.0.1",
+ "tar": "^4.4.8",
+ "unique-filename": "^1.1.1",
+ "which": "^1.3.1"
},
+ "deprecated": false,
"description": "JavaScript package downloader",
"devDependencies": {
- "nock": "^9.2.6",
+ "nock": "^10.0.3",
"npmlog": "^4.1.2",
- "nyc": "^11.8.0",
+ "nyc": "^13.1.0",
"require-inject": "^1.4.3",
- "standard": "^11.0.1",
+ "standard": "^12.0.1",
"standard-version": "^4.4.0",
- "tacks": "^1.2.6",
- "tap": "^12.0.1",
- "tar-stream": "^1.6.1",
+ "tacks": "^1.2.7",
+ "tap": "^12.1.0",
+ "tar-stream": "^1.6.2",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.7"
},
@@ -113,5 +116,5 @@
"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": "8.1.6"
+ "version": "9.4.0"
}
diff --git a/deps/npm/node_modules/pacote/packument.js b/deps/npm/node_modules/pacote/packument.js
new file mode 100644
index 0000000000..0606b266f9
--- /dev/null
+++ b/deps/npm/node_modules/pacote/packument.js
@@ -0,0 +1,29 @@
+'use strict'
+
+const fetchPackument = require('./lib/fetch').packument
+const optCheck = require('./lib/util/opt-check')
+const pinflight = require('promise-inflight')
+const npa = require('npm-package-arg')
+
+module.exports = packument
+function packument (spec, opts) {
+ opts = optCheck(opts)
+ spec = npa(spec, opts.where)
+
+ const label = [
+ spec.name,
+ spec.saveSpec || spec.fetchSpec,
+ spec.type,
+ opts.cache,
+ opts.registry,
+ opts.scope
+ ].join(':')
+ const startTime = Date.now()
+ return pinflight(label, () => {
+ return fetchPackument(spec, opts)
+ }).then(p => {
+ const elapsedTime = Date.now() - startTime
+ opts.log.silly('pacote', `${spec.registry ? 'registry' : spec.type} packument for ${spec.name}@${spec.saveSpec || spec.fetchSpec} fetched in ${elapsedTime}ms`)
+ return p
+ })
+}
diff --git a/deps/npm/node_modules/pacote/prefetch.js b/deps/npm/node_modules/pacote/prefetch.js
index d17725993f..9e6b5af12d 100644
--- a/deps/npm/node_modules/pacote/prefetch.js
+++ b/deps/npm/node_modules/pacote/prefetch.js
@@ -15,7 +15,7 @@ function prefetch (spec, opts) {
const startTime = Date.now()
if (!opts.cache) {
opts.log.info('prefetch', 'skipping prefetch: no cache provided')
- return BB.resolve({spec})
+ return BB.resolve({ spec })
}
if (opts.integrity && !opts.preferOnline) {
opts.log.silly('prefetch', 'checking if', opts.integrity, 'is already cached')
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000000..40992555bf
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,55 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000000..f478d58dca
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/parallel-transform/node_modules/readable-stream/README.md b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..23fe3f3e30
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000000..c141a99c26
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,58 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000000..f8b2db83db
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..46924cbfdf
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..a1ca813e5a
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..bf34ac65e1
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..5d1f8b876d
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..b3f4e85a2f
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000000..aefc68bd90
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,79 @@
+'use strict';
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+var util = require('util');
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..5a0a0d88ce
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/package.json b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..5429283d78
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "readable-stream@^2.1.5",
+ "_id": "readable-stream@2.3.6",
+ "_inBundle": false,
+ "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_location": "/parallel-transform/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@^2.1.5",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "^2.1.5",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.5"
+ },
+ "_requiredBy": [
+ "/parallel-transform"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
+ "_spec": "readable-stream@^2.1.5",
+ "_where": "/Users/aeschright/code/cli/node_modules/parallel-transform",
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ },
+ "version": "2.3.6"
+}
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..ffd791d7ff
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/readable.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/transform.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..b1baba26da
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000000..ebdde6a85d
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/writable.js b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..3211a6f80d
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/readable-stream/writable.js
@@ -0,0 +1,8 @@
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+} else {
+ module.exports = Writable
+}
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/.travis.yml
new file mode 100644
index 0000000000..3347a72546
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/parallel-transform/node_modules/string_decoder/README.md b/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..5fd58315ed
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..2e89e63f79
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/package.json b/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..8c4d6e4748
--- /dev/null
+++ b/deps/npm/node_modules/parallel-transform/node_modules/string_decoder/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "string_decoder@~1.1.1",
+ "_id": "string_decoder@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_location": "/parallel-transform/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.1.1",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.1"
+ },
+ "_requiredBy": [
+ "/parallel-transform/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
+ "_spec": "string_decoder@~1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/parallel-transform/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/protoduck/CHANGELOG.md b/deps/npm/node_modules/protoduck/CHANGELOG.md
index dd7669aa13..f4902ab2d0 100644
--- a/deps/npm/node_modules/protoduck/CHANGELOG.md
+++ b/deps/npm/node_modules/protoduck/CHANGELOG.md
@@ -2,6 +2,17 @@
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.1"></a>
+## [5.0.1](https://github.com/zkat/protoduck/compare/v5.0.0...v5.0.1) (2018-10-26)
+
+
+### Bug Fixes
+
+* **security:** npm audit fix ([55a2007](https://github.com/zkat/protoduck/commit/55a2007))
+* **standard:** standard --fix ([2dedbb8](https://github.com/zkat/protoduck/commit/2dedbb8))
+
+
+
<a name="5.0.0"></a>
# [5.0.0](https://github.com/zkat/protoduck/compare/v4.0.0...v5.0.0) (2017-12-12)
diff --git a/deps/npm/node_modules/protoduck/index.js b/deps/npm/node_modules/protoduck/index.js
index 3596bb3299..b6a83e1f79 100644
--- a/deps/npm/node_modules/protoduck/index.js
+++ b/deps/npm/node_modules/protoduck/index.js
@@ -52,8 +52,8 @@ class Duck extends Function {
gf = arg[fns[i]]
if (!gf ||
(gf.hasMethod
- ? !gf.hasMethod.apply(gf, args)
- : typeof gf === 'function')) {
+ ? !gf.hasMethod.apply(gf, args)
+ : typeof gf === 'function')) {
return false
}
}
@@ -81,7 +81,7 @@ Duck.prototype.isProtocol = true
const Protoduck = module.exports = define(['duck'], {
createGenfun: ['duck', _metaCreateGenfun],
addMethod: ['duck', _metaAddMethod]
-}, {name: 'Protoduck'})
+}, { name: 'Protoduck' })
const noImplFound = module.exports.noImplFound = genfun.noApplicableMethod
@@ -168,22 +168,22 @@ function defineMethod (duck, name, target, types, impls) {
if (!Object.prototype.hasOwnProperty.call(target, name)) {
// Make a genfun if there's nothing there
const gf = useMetaobject
- ? duck._metaobject.createGenfun(duck, target, name, null)
- : _metaCreateGenfun(duck, target, name, null)
+ ? duck._metaobject.createGenfun(duck, target, name, null)
+ : _metaCreateGenfun(duck, target, name, null)
target[name] = gf
} else if (typeof target[name] === 'function' && !target[name].isGenfun) {
// Turn non-gf functions into genfuns
const gf = useMetaobject
- ? duck._metaobject.createGenfun(duck, target, name, target[name])
- : _metaCreateGenfun(duck, target, name, target[name])
+ ? duck._metaobject.createGenfun(duck, target, name, target[name])
+ : _metaCreateGenfun(duck, target, name, target[name])
target[name] = gf
}
const fn = impls[name] || duck._defaultImpls[name]
if (fn) { // checkImpls made sure this is safe
useMetaobject
- ? duck._metaobject.addMethod(duck, target, name, methodTypes, fn)
- : _metaAddMethod(duck, target, name, methodTypes, fn)
+ ? duck._metaobject.addMethod(duck, target, name, methodTypes, fn)
+ : _metaAddMethod(duck, target, name, methodTypes, fn)
}
}
@@ -256,8 +256,8 @@ function installMethodErrorMessage (proto, gf, target, name) {
proto.name ? `${proto.name}#` : ''
}${name}(${[].map.call(args, typeName).join(', ')}). You must implement ${
proto.name
- ? formatMethod(proto, name, true)
- : `the protocol ${formatMethod(proto, name)} belongs to`
+ ? formatMethod(proto, name, true)
+ : `the protocol ${formatMethod(proto, name)} belongs to`
} in order to call ${typeName(thisArg)}#${name}(${
[].map.call(args, typeName).join(', ')
}).`
@@ -330,8 +330,8 @@ class Constraint {
const thisType = (
this.thisIdx === 'this' || this.thisIdx == null
)
- ? target
- : types[this.thisIdx]
+ ? target
+ : types[this.thisIdx]
const parentTypes = this.indices.map(idx => {
if (idx === 'this') {
return target
diff --git a/deps/npm/node_modules/protoduck/package.json b/deps/npm/node_modules/protoduck/package.json
index 2211df2086..3ee47ac6ad 100644
--- a/deps/npm/node_modules/protoduck/package.json
+++ b/deps/npm/node_modules/protoduck/package.json
@@ -1,28 +1,27 @@
{
- "_from": "protoduck@^5.0.0",
- "_id": "protoduck@5.0.0",
+ "_from": "protoduck@^5.0.1",
+ "_id": "protoduck@5.0.1",
"_inBundle": false,
- "_integrity": "sha512-agsGWD8/RZrS4ga6v82Fxb0RHIS2RZnbsSue6A9/MBRhB/jcqOANAMNrqM9900b8duj+Gx+T/JMy5IowDoO/hQ==",
+ "_integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==",
"_location": "/protoduck",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "protoduck@^5.0.0",
+ "raw": "protoduck@^5.0.1",
"name": "protoduck",
"escapedName": "protoduck",
- "rawSpec": "^5.0.0",
+ "rawSpec": "^5.0.1",
"saveSpec": null,
- "fetchSpec": "^5.0.0"
+ "fetchSpec": "^5.0.1"
},
"_requiredBy": [
- "/libcipm",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.0.tgz",
- "_shasum": "752145e6be0ad834cb25716f670a713c860dce70",
- "_spec": "protoduck@^5.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/libcipm",
+ "_resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz",
+ "_shasum": "03c3659ca18007b69a50fd82a7ebcc516261151f",
+ "_spec": "protoduck@^5.0.1",
+ "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -32,16 +31,16 @@
},
"bundleDependencies": false,
"dependencies": {
- "genfun": "^4.0.1"
+ "genfun": "^5.0.0"
},
"deprecated": false,
"description": "Fancy duck typing for the most serious of ducks.",
"devDependencies": {
- "mocha": "^3.2.0",
- "nyc": "^10.2.0",
- "standard": "^10.0.2",
+ "mocha": "^5.2.0",
+ "nyc": "^13.1.0",
+ "standard": "^12.0.1",
"standard-version": "^4.0.0",
- "tap": "^10.3.2",
+ "tap": "^12.0.1",
"weallbehave": "^1.0.3",
"weallcontribute": "^1.0.8"
},
@@ -85,5 +84,5 @@
"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"
+ "version": "5.0.1"
}
diff --git a/deps/npm/node_modules/query-string/index.js b/deps/npm/node_modules/query-string/index.js
index 523c87fdfb..6a1b3c2a30 100644
--- a/deps/npm/node_modules/query-string/index.js
+++ b/deps/npm/node_modules/query-string/index.js
@@ -123,6 +123,7 @@ function extract(input) {
if (queryStart === -1) {
return '';
}
+
return input.slice(queryStart + 1);
}
@@ -171,21 +172,24 @@ exports.extract = extract;
exports.parse = parse;
exports.stringify = (obj, options) => {
- const defaults = {
+ if (!obj) {
+ return '';
+ }
+
+ options = Object.assign({
encode: true,
strict: true,
arrayFormat: 'none'
- };
+ }, options);
- options = Object.assign(defaults, options);
+ const formatter = encoderForArrayFormat(options);
+ const keys = Object.keys(obj);
- if (options.sort === false) {
- options.sort = () => {};
+ if (options.sort !== false) {
+ keys.sort(options.sort);
}
- const formatter = encoderForArrayFormat(options);
-
- return obj ? Object.keys(obj).sort(options.sort).map(key => {
+ return keys.map(key => {
const value = obj[key];
if (value === undefined) {
@@ -211,10 +215,15 @@ exports.stringify = (obj, options) => {
}
return encode(key, options) + '=' + encode(value, options);
- }).filter(x => x.length > 0).join('&') : '';
+ }).filter(x => x.length > 0).join('&');
};
exports.parseUrl = (input, options) => {
+ const hashStart = input.indexOf('#');
+ if (hashStart !== -1) {
+ input = input.slice(0, hashStart);
+ }
+
return {
url: input.split('?')[0] || '',
query: parse(extract(input), options)
diff --git a/deps/npm/node_modules/query-string/package.json b/deps/npm/node_modules/query-string/package.json
index d29777ef1c..8f9b91b4fb 100644
--- a/deps/npm/node_modules/query-string/package.json
+++ b/deps/npm/node_modules/query-string/package.json
@@ -1,32 +1,28 @@
{
- "_args": [
- [
- "query-string@6.1.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "query-string@6.1.0",
- "_id": "query-string@6.1.0",
+ "_from": "query-string@6.2.0",
+ "_id": "query-string@6.2.0",
"_inBundle": false,
- "_integrity": "sha512-pNB/Gr8SA8ff8KpUFM36o/WFAlthgaThka5bV19AD9PNTH20Pwq5Zxodif2YyHwrctp6SkL4GqlOot0qR/wGaw==",
+ "_integrity": "sha512-5wupExkIt8RYL4h/FE+WTg3JHk62e6fFPWtAZA9J5IWK1PfTfKkMS93HBUHcFpeYi9KsY5pFbh+ldvEyaz5MyA==",
"_location": "/query-string",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "query-string@6.1.0",
+ "raw": "query-string@6.2.0",
"name": "query-string",
"escapedName": "query-string",
- "rawSpec": "6.1.0",
+ "rawSpec": "6.2.0",
"saveSpec": null,
- "fetchSpec": "6.1.0"
+ "fetchSpec": "6.2.0"
},
"_requiredBy": [
+ "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.1.0.tgz",
- "_spec": "6.1.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.2.0.tgz",
+ "_shasum": "468edeb542b7e0538f9f9b1aeb26f034f19c86e1",
+ "_spec": "query-string@6.2.0",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -35,16 +31,18 @@
"bugs": {
"url": "https://github.com/sindresorhus/query-string/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"decode-uri-component": "^0.2.0",
"strict-uri-encode": "^2.0.0"
},
+ "deprecated": false,
"description": "Parse and stringify URL query strings",
"devDependencies": {
- "ava": "*",
+ "ava": "^0.25.0",
"deep-equal": "^1.0.1",
- "fast-check": "^1.0.1",
- "xo": "*"
+ "fast-check": "^1.5.0",
+ "xo": "^0.23.0"
},
"engines": {
"node": ">=6"
@@ -77,5 +75,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "6.1.0"
+ "version": "6.2.0"
}
diff --git a/deps/npm/node_modules/query-string/readme.md b/deps/npm/node_modules/query-string/readme.md
index f81bd6aea2..5fa1cfbde4 100644
--- a/deps/npm/node_modules/query-string/readme.md
+++ b/deps/npm/node_modules/query-string/readme.md
@@ -15,7 +15,7 @@
$ npm install query-string
```
-This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers, use version 5: `npm install query-string@5`.
+This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers, or, [if your project is using create-react-app](https://github.com/sindresorhus/query-string/pull/148#issuecomment-399656020), use version 5: `npm install query-string@5`.
<a href="https://www.patreon.com/sindresorhus">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
diff --git a/deps/npm/node_modules/readable-stream/README.md b/deps/npm/node_modules/readable-stream/README.md
index 23fe3f3e30..791576af68 100644
--- a/deps/npm/node_modules/readable-stream/README.md
+++ b/deps/npm/node_modules/readable-stream/README.md
@@ -1,30 +1,86 @@
# readable-stream
-***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+***Node.js core streams for userland*** [![Build Status](https://travis-ci.com/nodejs/readable-stream.svg?branch=master)](https://travis-ci.com/nodejs/readable-stream)
[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
-[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readabe-stream.svg)](https://saucelabs.com/u/readabe-stream)
```bash
npm install --save readable-stream
```
-***Node-core streams for userland***
+This package is a mirror of the streams implementations in Node.js.
-This package is a mirror of the Streams2 and Streams3 implementations in
-Node-core.
-
-Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.14.2/docs/api/stream.html).
If you want to guarantee a stable streams base, regardless of what version of
Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
As of version 2.0.0 **readable-stream** uses semantic versioning.
+## Version 3.x.x
+
+v3.x.x of `readable-stream` supports Node 6, 8, and 10, as well as
+evergreen browsers, IE 11 and latest Safari. The breaking changes
+introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/)
+and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows:
+
+1. Error codes: https://github.com/nodejs/node/pull/13310,
+ https://github.com/nodejs/node/pull/13291,
+ https://github.com/nodejs/node/pull/16589,
+ https://github.com/nodejs/node/pull/15042,
+ https://github.com/nodejs/node/pull/15665,
+ https://github.com/nodejs/readable-stream/pull/344
+2. 'readable' have precedence over flowing
+ https://github.com/nodejs/node/pull/18994
+3. make virtual methods errors consistent
+ https://github.com/nodejs/node/pull/18813
+4. updated streams error handling
+ https://github.com/nodejs/node/pull/18438
+5. writable.end should return this.
+ https://github.com/nodejs/node/pull/18780
+6. readable continues to read when push('')
+ https://github.com/nodejs/node/pull/18211
+7. add custom inspect to BufferList
+ https://github.com/nodejs/node/pull/17907
+8. always defer 'readable' with nextTick
+ https://github.com/nodejs/node/pull/17979
+
+## Version 2.x.x
+
+v2.x.x of `readable-stream` supports all Node.js version from 0.8, as well as
+evergreen browsers and IE 10 & 11.
+
+### Big Thanks
+
+Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce]
+
+# Usage
+
+You can swap your `require('stream')` with `require('readable-stream')`
+without any changes, if you are just using one of the main classes and
+functions.
+
+```js
+const {
+ Readable,
+ Writable,
+ Transform,
+ Duplex,
+ pipeline,
+ finished
+} = require('readable-stream')
+````
+
+Note that `require('stream')` will return `Stream`, while
+`require('readable-stream')` will return `Readable`. We discourage using
+whatever is exported directly, but rather use one of the properties as
+shown in the example above.
+
# Streams Working Group
`readable-stream` is maintained by the Streams Working Group, which
@@ -44,15 +100,12 @@ Node.js. The responsibilities of the Streams Working Group include:
<a name="members"></a>
## Team Members
-* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
- - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
- Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
-* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
- - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
-* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
-* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
- Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
+* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) &lt;yoshuawuyts@gmail.com&gt;
+
+[sauce]: https://saucelabs.com
diff --git a/deps/npm/node_modules/readable-stream/errors-browser.js b/deps/npm/node_modules/readable-stream/errors-browser.js
new file mode 100644
index 0000000000..fb8e73e189
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/errors-browser.js
@@ -0,0 +1,127 @@
+'use strict';
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
+
+var codes = {};
+
+function createErrorType(code, message, Base) {
+ if (!Base) {
+ Base = Error;
+ }
+
+ function getMessage(arg1, arg2, arg3) {
+ if (typeof message === 'string') {
+ return message;
+ } else {
+ return message(arg1, arg2, arg3);
+ }
+ }
+
+ var NodeError =
+ /*#__PURE__*/
+ function (_Base) {
+ _inheritsLoose(NodeError, _Base);
+
+ function NodeError(arg1, arg2, arg3) {
+ return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;
+ }
+
+ return NodeError;
+ }(Base);
+
+ NodeError.prototype.name = Base.name;
+ NodeError.prototype.code = code;
+ codes[code] = NodeError;
+} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
+
+
+function oneOf(expected, thing) {
+ if (Array.isArray(expected)) {
+ var len = expected.length;
+ expected = expected.map(function (i) {
+ return String(i);
+ });
+
+ if (len > 2) {
+ return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1];
+ } else if (len === 2) {
+ return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
+ } else {
+ return "of ".concat(thing, " ").concat(expected[0]);
+ }
+ } else {
+ return "of ".concat(thing, " ").concat(String(expected));
+ }
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
+
+
+function startsWith(str, search, pos) {
+ return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
+
+
+function endsWith(str, search, this_len) {
+ if (this_len === undefined || this_len > str.length) {
+ this_len = str.length;
+ }
+
+ return str.substring(this_len - search.length, this_len) === search;
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
+
+
+function includes(str, search, start) {
+ if (typeof start !== 'number') {
+ start = 0;
+ }
+
+ if (start + search.length > str.length) {
+ return false;
+ } else {
+ return str.indexOf(search, start) !== -1;
+ }
+}
+
+createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
+ return 'The value "' + value + '" is invalid for option "' + name + '"';
+}, TypeError);
+createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
+ // determiner: 'must be' or 'must not be'
+ var determiner;
+
+ if (typeof expected === 'string' && startsWith(expected, 'not ')) {
+ determiner = 'must not be';
+ expected = expected.replace(/^not /, '');
+ } else {
+ determiner = 'must be';
+ }
+
+ var msg;
+
+ if (endsWith(name, ' argument')) {
+ // For cases like 'first argument'
+ msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
+ } else {
+ var type = includes(name, '.') ? 'property' : 'argument';
+ msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
+ }
+
+ msg += ". Received type ".concat(typeof actual);
+ return msg;
+}, TypeError);
+createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
+createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
+ return 'The ' + name + ' method is not implemented';
+});
+createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
+createErrorType('ERR_STREAM_DESTROYED', function (name) {
+ return 'Cannot call ' + name + ' after a stream was destroyed';
+});
+createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
+createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
+createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
+createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
+createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
+ return 'Unknown encoding: ' + arg;
+}, TypeError);
+createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
+module.exports.codes = codes;
diff --git a/deps/npm/node_modules/readable-stream/errors.js b/deps/npm/node_modules/readable-stream/errors.js
new file mode 100644
index 0000000000..8471526d6e
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/errors.js
@@ -0,0 +1,116 @@
+'use strict';
+
+const codes = {};
+
+function createErrorType(code, message, Base) {
+ if (!Base) {
+ Base = Error
+ }
+
+ function getMessage (arg1, arg2, arg3) {
+ if (typeof message === 'string') {
+ return message
+ } else {
+ return message(arg1, arg2, arg3)
+ }
+ }
+
+ class NodeError extends Base {
+ constructor (arg1, arg2, arg3) {
+ super(getMessage(arg1, arg2, arg3));
+ }
+ }
+
+ NodeError.prototype.name = Base.name;
+ NodeError.prototype.code = code;
+
+ codes[code] = NodeError;
+}
+
+// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
+function oneOf(expected, thing) {
+ if (Array.isArray(expected)) {
+ const len = expected.length;
+ expected = expected.map((i) => String(i));
+ if (len > 2) {
+ return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` +
+ expected[len - 1];
+ } else if (len === 2) {
+ return `one of ${thing} ${expected[0]} or ${expected[1]}`;
+ } else {
+ return `of ${thing} ${expected[0]}`;
+ }
+ } else {
+ return `of ${thing} ${String(expected)}`;
+ }
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
+function startsWith(str, search, pos) {
+ return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
+function endsWith(str, search, this_len) {
+ if (this_len === undefined || this_len > str.length) {
+ this_len = str.length;
+ }
+ return str.substring(this_len - search.length, this_len) === search;
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
+function includes(str, search, start) {
+ if (typeof start !== 'number') {
+ start = 0;
+ }
+
+ if (start + search.length > str.length) {
+ return false;
+ } else {
+ return str.indexOf(search, start) !== -1;
+ }
+}
+
+createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
+ return 'The value "' + value + '" is invalid for option "' + name + '"'
+}, TypeError);
+createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
+ // determiner: 'must be' or 'must not be'
+ let determiner;
+ if (typeof expected === 'string' && startsWith(expected, 'not ')) {
+ determiner = 'must not be';
+ expected = expected.replace(/^not /, '');
+ } else {
+ determiner = 'must be';
+ }
+
+ let msg;
+ if (endsWith(name, ' argument')) {
+ // For cases like 'first argument'
+ msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`;
+ } else {
+ const type = includes(name, '.') ? 'property' : 'argument';
+ msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`;
+ }
+
+ msg += `. Received type ${typeof actual}`;
+ return msg;
+}, TypeError);
+createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
+createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
+ return 'The ' + name + ' method is not implemented'
+});
+createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
+createErrorType('ERR_STREAM_DESTROYED', function (name) {
+ return 'Cannot call ' + name + ' after a stream was destroyed';
+});
+createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
+createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
+createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
+createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
+createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
+ return 'Unknown encoding: ' + arg
+}, TypeError);
+createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
+
+module.exports.codes = codes;
diff --git a/deps/npm/node_modules/readable-stream/experimentalWarning.js b/deps/npm/node_modules/readable-stream/experimentalWarning.js
new file mode 100644
index 0000000000..78e841495b
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/experimentalWarning.js
@@ -0,0 +1,17 @@
+'use strict'
+
+var experimentalWarnings = new Set();
+
+function emitExperimentalWarning(feature) {
+ if (experimentalWarnings.has(feature)) return;
+ var msg = feature + ' is an experimental feature. This feature could ' +
+ 'change at any time';
+ experimentalWarnings.add(feature);
+ process.emitWarning(msg, 'ExperimentalWarning');
+}
+
+function noop() {}
+
+module.exports.emitExperimentalWarning = process.emitWarning
+ ? emitExperimentalWarning
+ : noop;
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js
index a1ca813e5a..6752519225 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js
@@ -18,43 +18,37 @@
// 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.
-
// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.
-
'use strict';
-
/*<replacement>*/
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
-/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
var keys = [];
+
for (var key in obj) {
keys.push(key);
- }return keys;
+ }
+
+ return keys;
};
/*</replacement>*/
-module.exports = Duplex;
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
+module.exports = Duplex;
var Readable = require('./_stream_readable');
+
var Writable = require('./_stream_writable');
-util.inherits(Duplex, Readable);
+require('inherits')(Duplex, Readable);
{
- // avoid scope creep, the keys array can then be collected
+ // Allow the keys array to be GC'ed.
var keys = objectKeys(Writable.prototype);
+
for (var v = 0; v < keys.length; v++) {
var method = keys[v];
if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
@@ -63,18 +57,19 @@ util.inherits(Duplex, Readable);
function Duplex(options) {
if (!(this instanceof Duplex)) return new Duplex(options);
-
Readable.call(this, options);
Writable.call(this, options);
-
- if (options && options.readable === false) this.readable = false;
-
- if (options && options.writable === false) this.writable = false;
-
this.allowHalfOpen = true;
- if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
- this.once('end', onend);
+ if (options) {
+ if (options.readable === false) this.readable = false;
+ if (options.writable === false) this.writable = false;
+
+ if (options.allowHalfOpen === false) {
+ this.allowHalfOpen = false;
+ this.once('end', onend);
+ }
+ }
}
Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
@@ -82,20 +77,35 @@ Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,
- get: function () {
+ get: function get() {
return this._writableState.highWaterMark;
}
});
+Object.defineProperty(Duplex.prototype, 'writableBuffer', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState && this._writableState.getBuffer();
+ }
+});
+Object.defineProperty(Duplex.prototype, 'writableLength', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState.length;
+ }
+}); // the no-half-open enforcer
-// the no-half-open enforcer
function onend() {
- // if we allow half-open state, or if the writable side ended,
- // then we're ok.
- if (this.allowHalfOpen || this._writableState.ended) return;
-
- // no more data can be written.
+ // If the writable side ended, then we're ok.
+ if (this._writableState.ended) return; // no more data can be written.
// But allow more writes to happen in this tick.
- pna.nextTick(onEndNT, this);
+
+ process.nextTick(onEndNT, this);
}
function onEndNT(self) {
@@ -103,29 +113,27 @@ function onEndNT(self) {
}
Object.defineProperty(Duplex.prototype, 'destroyed', {
- get: function () {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
if (this._readableState === undefined || this._writableState === undefined) {
return false;
}
+
return this._readableState.destroyed && this._writableState.destroyed;
},
- set: function (value) {
+ set: function set(value) {
// we ignore the value if the stream
// has not been initialized yet
if (this._readableState === undefined || this._writableState === undefined) {
return;
- }
-
- // backward compatibility, the user is explicitly
+ } // backward compatibility, the user is explicitly
// managing destroyed
+
+
this._readableState.destroyed = value;
this._writableState.destroyed = value;
}
-});
-
-Duplex.prototype._destroy = function (err, cb) {
- this.push(null);
- this.end();
-
- pna.nextTick(cb, err);
-}; \ No newline at end of file
+}); \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js
index a9c8358848..32e7414c5a 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -18,27 +18,19 @@
// 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.
-
// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.
-
'use strict';
module.exports = PassThrough;
var Transform = require('./_stream_transform');
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(PassThrough, Transform);
+require('inherits')(PassThrough, Transform);
function PassThrough(options) {
if (!(this instanceof PassThrough)) return new PassThrough(options);
-
Transform.call(this, options);
}
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
index bf34ac65e1..b9b1b742cc 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
@@ -18,118 +18,111 @@
// 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.
-
'use strict';
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
module.exports = Readable;
-
/*<replacement>*/
-var isArray = require('isarray');
-/*</replacement>*/
-/*<replacement>*/
var Duplex;
/*</replacement>*/
Readable.ReadableState = ReadableState;
-
/*<replacement>*/
+
var EE = require('events').EventEmitter;
-var EElistenerCount = function (emitter, type) {
+var EElistenerCount = function EElistenerCount(emitter, type) {
return emitter.listeners(type).length;
};
/*</replacement>*/
/*<replacement>*/
+
+
var Stream = require('./internal/streams/stream');
/*</replacement>*/
-/*<replacement>*/
-var Buffer = require('safe-buffer').Buffer;
+var Buffer = require('buffer').Buffer;
+
var OurUint8Array = global.Uint8Array || function () {};
+
function _uint8ArrayToBuffer(chunk) {
return Buffer.from(chunk);
}
+
function _isUint8Array(obj) {
return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}
-
-/*</replacement>*/
-
/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-/*<replacement>*/
+
var debugUtil = require('util');
-var debug = void 0;
+
+var debug;
+
if (debugUtil && debugUtil.debuglog) {
debug = debugUtil.debuglog('stream');
} else {
- debug = function () {};
+ debug = function debug() {};
}
/*</replacement>*/
-var BufferList = require('./internal/streams/BufferList');
+
+var BufferList = require('./internal/streams/buffer_list');
+
var destroyImpl = require('./internal/streams/destroy');
+
+var _require = require('./internal/streams/state'),
+ getHighWaterMark = _require.getHighWaterMark;
+
+var _require$codes = require('../errors').codes,
+ ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
+ ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,
+ ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+ ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
+
+var _require2 = require('../experimentalWarning'),
+ emitExperimentalWarning = _require2.emitExperimentalWarning; // Lazy loaded to improve the startup performance.
+
+
var StringDecoder;
+var createReadableStreamAsyncIterator;
-util.inherits(Readable, Stream);
+require('inherits')(Readable, Stream);
var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
function prependListener(emitter, event, fn) {
// Sadly this is not cacheable as some libraries bundle their own
// event emitter implementation with them.
- if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
-
- // This is a hack to make sure that our error handler is attached before any
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any
// userland ones. NEVER DO THIS. This is here only because this code needs
// to continue to work with older versions of Node.js that do not include
// the prependListener() method. The goal is to eventually remove this hack.
- if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
}
-function ReadableState(options, stream) {
+function ReadableState(options, stream, isDuplex) {
Duplex = Duplex || require('./_stream_duplex');
-
- options = options || {};
-
- // Duplex streams are both readable and writable, but share
+ options = options || {}; // Duplex streams are both readable and writable, but share
// the same options object.
// However, some cases require setting options to different
// values for the readable and the writable sides of the duplex stream.
// These options can be provided separately as readableXXX and writableXXX.
- var isDuplex = stream instanceof Duplex;
- // object stream flag. Used to make read(n) ignore n and to
+ if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to
// make all the buffer merging and length checks go away
- this.objectMode = !!options.objectMode;
-
- if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
- // the point at which it stops calling _read() to fill the buffer
+ this.objectMode = !!options.objectMode;
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer
// Note: 0 is a valid value, means "don't call _read preemptively ever"
- var hwm = options.highWaterMark;
- var readableHwm = options.readableHighWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
-
- if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
-
- // cast to ints.
- this.highWaterMark = Math.floor(this.highWaterMark);
- // A linked list is used to store data chunks instead of an array because the
+ this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the
// linked list can remove elements from the beginning faster than
// array.shift()
+
this.buffer = new BufferList();
this.length = 0;
this.pipes = null;
@@ -137,37 +130,33 @@ function ReadableState(options, stream) {
this.flowing = null;
this.ended = false;
this.endEmitted = false;
- this.reading = false;
-
- // a flag to be able to tell if the event 'readable'/'data' is emitted
+ this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted
// immediately, or on a later tick. We set this to true at first, because
// any actions that shouldn't happen until "later" should generally also
// not happen before the first read call.
- this.sync = true;
- // whenever we return null, then we set a flag to say
+ this.sync = true; // whenever we return null, then we set a flag to say
// that we're awaiting a 'readable' event emission.
+
this.needReadable = false;
this.emittedReadable = false;
this.readableListening = false;
- this.resumeScheduled = false;
+ this.resumeScheduled = false; // Should close be emitted on destroy. Defaults to true.
- // has it been destroyed
- this.destroyed = false;
+ this.emitClose = options.emitClose !== false; // has it been destroyed
- // Crypto is kind of old and crusty. Historically, its default string
+ this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string
// encoding is 'binary' so we have to make this configurable.
// Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
- // the number of writers that are awaiting a drain event in .pipe()s
- this.awaitDrain = 0;
+ this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s
- // if true, a maybeReadMore has been scheduled
- this.readingMore = false;
+ this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
this.decoder = null;
this.encoding = null;
+
if (options.encoding) {
if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
this.decoder = new StringDecoder(options.encoding);
@@ -177,17 +166,16 @@ function ReadableState(options, stream) {
function Readable(options) {
Duplex = Duplex || require('./_stream_duplex');
+ if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside
+ // the ReadableState constructor, at least with V8 6.5
- if (!(this instanceof Readable)) return new Readable(options);
+ var isDuplex = this instanceof Duplex;
+ this._readableState = new ReadableState(options, this, isDuplex); // legacy
- this._readableState = new ReadableState(options, this);
-
- // legacy
this.readable = true;
if (options) {
if (typeof options.read === 'function') this._read = options.read;
-
if (typeof options.destroy === 'function') this._destroy = options.destroy;
}
@@ -195,36 +183,40 @@ function Readable(options) {
}
Object.defineProperty(Readable.prototype, 'destroyed', {
- get: function () {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
if (this._readableState === undefined) {
return false;
}
+
return this._readableState.destroyed;
},
- set: function (value) {
+ set: function set(value) {
// we ignore the value if the stream
// has not been initialized yet
if (!this._readableState) {
return;
- }
-
- // backward compatibility, the user is explicitly
+ } // backward compatibility, the user is explicitly
// managing destroyed
+
+
this._readableState.destroyed = value;
}
});
-
Readable.prototype.destroy = destroyImpl.destroy;
Readable.prototype._undestroy = destroyImpl.undestroy;
+
Readable.prototype._destroy = function (err, cb) {
- this.push(null);
cb(err);
-};
-
-// Manually shove something into the read() buffer.
+}; // Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
+
+
Readable.prototype.push = function (chunk, encoding) {
var state = this._readableState;
var skipChunkCheck;
@@ -232,10 +224,12 @@ Readable.prototype.push = function (chunk, encoding) {
if (!state.objectMode) {
if (typeof chunk === 'string') {
encoding = encoding || state.defaultEncoding;
+
if (encoding !== state.encoding) {
chunk = Buffer.from(chunk, encoding);
encoding = '';
}
+
skipChunkCheck = true;
}
} else {
@@ -243,21 +237,24 @@ Readable.prototype.push = function (chunk, encoding) {
}
return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
-};
+}; // Unshift should *always* be something directly out of read()
+
-// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function (chunk) {
return readableAddChunk(this, chunk, null, true, false);
};
function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ debug('readableAddChunk', chunk);
var state = stream._readableState;
+
if (chunk === null) {
state.reading = false;
onEofChunk(stream, state);
} else {
var er;
if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+
if (er) {
stream.emit('error', er);
} else if (state.objectMode || chunk && chunk.length > 0) {
@@ -266,11 +263,14 @@ function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
}
if (addToFront) {
- if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ if (state.endEmitted) stream.emit('error', new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);
} else if (state.ended) {
- stream.emit('error', new Error('stream.push() after EOF'));
+ stream.emit('error', new ERR_STREAM_PUSH_AFTER_EOF());
+ } else if (state.destroyed) {
+ return false;
} else {
state.reading = false;
+
if (state.decoder && !encoding) {
chunk = state.decoder.write(chunk);
if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
@@ -280,59 +280,56 @@ function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
}
} else if (!addToFront) {
state.reading = false;
+ maybeReadMore(stream, state);
}
- }
+ } // We can push more data if we are below the highWaterMark.
+ // Also, if we have no data yet, we can stand some more bytes.
+ // This is to work around cases where hwm=0, such as the repl.
- return needMoreData(state);
+
+ return !state.ended && (state.length < state.highWaterMark || state.length === 0);
}
function addChunk(stream, state, chunk, addToFront) {
if (state.flowing && state.length === 0 && !state.sync) {
+ state.awaitDrain = 0;
stream.emit('data', chunk);
- stream.read(0);
} else {
// update the buffer info.
state.length += state.objectMode ? 1 : chunk.length;
if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
-
if (state.needReadable) emitReadable(stream);
}
+
maybeReadMore(stream, state);
}
function chunkInvalid(state, chunk) {
var er;
+
if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
+ er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);
}
- return er;
-}
-// if it's past the high water mark, we can push in some more.
-// Also, if we have no data yet, we can stand some
-// more bytes. This is to work around cases where hwm=0,
-// such as the repl. Also, if the push() triggered a
-// readable event, and the user called read(largeNumber) such that
-// needReadable was set, then we ought to push more, so that another
-// 'readable' event will be triggered.
-function needMoreData(state) {
- return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+ return er;
}
Readable.prototype.isPaused = function () {
return this._readableState.flowing === false;
-};
+}; // backwards compatibility.
+
-// backwards compatibility.
Readable.prototype.setEncoding = function (enc) {
if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
- this._readableState.decoder = new StringDecoder(enc);
- this._readableState.encoding = enc;
+ this._readableState.decoder = new StringDecoder(enc); // if setEncoding(null), decoder.encoding equals utf8
+
+ this._readableState.encoding = this._readableState.decoder.encoding;
return this;
-};
+}; // Don't raise the hwm > 8MB
+
-// Don't raise the hwm > 8MB
var MAX_HWM = 0x800000;
+
function computeNewHighWaterMark(n) {
if (n >= MAX_HWM) {
n = MAX_HWM;
@@ -347,56 +344,55 @@ function computeNewHighWaterMark(n) {
n |= n >>> 16;
n++;
}
- return n;
-}
-// This function is designed to be inlinable, so please take care when making
+ return n;
+} // This function is designed to be inlinable, so please take care when making
// changes to the function body.
+
+
function howMuchToRead(n, state) {
if (n <= 0 || state.length === 0 && state.ended) return 0;
if (state.objectMode) return 1;
+
if (n !== n) {
// Only flow one buffer at a time
if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
- }
- // If we're asking for more than the current hwm, then raise the hwm.
+ } // If we're asking for more than the current hwm, then raise the hwm.
+
+
if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
- if (n <= state.length) return n;
- // Don't have enough
+ if (n <= state.length) return n; // Don't have enough
+
if (!state.ended) {
state.needReadable = true;
return 0;
}
+
return state.length;
-}
+} // you can override either this method, or the async _read(n) below.
+
-// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function (n) {
debug('read', n);
n = parseInt(n, 10);
var state = this._readableState;
var nOrig = n;
-
- if (n !== 0) state.emittedReadable = false;
-
- // if we're doing read(0) to trigger a readable event, but we
+ if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we
// already have a bunch of data in the buffer, then just trigger
// the 'readable' event and move on.
- if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+
+ if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {
debug('read: emitReadable', state.length, state.ended);
if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
return null;
}
- n = howMuchToRead(n, state);
+ n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.
- // if we've ended, and we're now clear, then finish it up.
if (n === 0 && state.ended) {
if (state.length === 0) endReadable(this);
return null;
- }
-
- // All the actual chunk generation logic needs to be
+ } // All the actual chunk generation logic needs to be
// *below* the call to _read. The reason is that in certain
// synthetic stream cases, such as passthrough streams, _read
// may be a completely synchronous operation which may change
@@ -417,33 +413,34 @@ Readable.prototype.read = function (n) {
// 'readable' etc.
//
// 3. Actually pull the requested chunks out of the buffer and return.
-
// if we need a readable event, then we need to do some reading.
+
+
var doRead = state.needReadable;
- debug('need readable', doRead);
+ debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some
- // if we currently have less than the highWaterMark, then also read some
if (state.length === 0 || state.length - n < state.highWaterMark) {
doRead = true;
debug('length less than watermark', doRead);
- }
-
- // however, if we've ended, then there's no point, and if we're already
+ } // however, if we've ended, then there's no point, and if we're already
// reading, then it's unnecessary.
+
+
if (state.ended || state.reading) {
doRead = false;
debug('reading or ended', doRead);
} else if (doRead) {
debug('do read');
state.reading = true;
- state.sync = true;
- // if the length is currently zero, then we *need* a readable event.
- if (state.length === 0) state.needReadable = true;
- // call internal read method
+ state.sync = true; // if the length is currently zero, then we *need* a readable event.
+
+ if (state.length === 0) state.needReadable = true; // call internal read method
+
this._read(state.highWaterMark);
- state.sync = false;
- // If _read pushed data synchronously, then `reading` will be false,
+
+ state.sync = false; // If _read pushed data synchronously, then `reading` will be false,
// and we need to re-evaluate how much data we can return to the user.
+
if (!state.reading) n = howMuchToRead(nOrig, state);
}
@@ -455,87 +452,115 @@ Readable.prototype.read = function (n) {
n = 0;
} else {
state.length -= n;
+ state.awaitDrain = 0;
}
if (state.length === 0) {
// If we have nothing in the buffer, then we want to know
// as soon as we *do* get something into the buffer.
- if (!state.ended) state.needReadable = true;
+ if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.
- // If we tried to read() past the EOF, then emit end on the next tick.
if (nOrig !== n && state.ended) endReadable(this);
}
if (ret !== null) this.emit('data', ret);
-
return ret;
};
function onEofChunk(stream, state) {
if (state.ended) return;
+
if (state.decoder) {
var chunk = state.decoder.end();
+
if (chunk && chunk.length) {
state.buffer.push(chunk);
state.length += state.objectMode ? 1 : chunk.length;
}
}
+
state.ended = true;
- // emit 'readable' now to make sure it gets picked up.
- emitReadable(stream);
-}
+ if (state.sync) {
+ // if we are sync, wait until next tick to emit the data.
+ // Otherwise we risk emitting data in the flow()
+ // the readable code triggers during a read() call
+ emitReadable(stream);
+ } else {
+ // emit 'readable' now to make sure it gets picked up.
+ state.needReadable = false;
-// Don't emit readable right away in sync mode, because this can trigger
+ if (!state.emittedReadable) {
+ state.emittedReadable = true;
+ emitReadable_(stream);
+ }
+ }
+} // Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow. This way, it might trigger
// a nextTick recursion warning, but that's not so bad.
+
+
function emitReadable(stream) {
var state = stream._readableState;
state.needReadable = false;
+
if (!state.emittedReadable) {
debug('emitReadable', state.flowing);
state.emittedReadable = true;
- if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ process.nextTick(emitReadable_, stream);
}
}
function emitReadable_(stream) {
- debug('emit readable');
- stream.emit('readable');
- flow(stream);
-}
+ var state = stream._readableState;
+ debug('emitReadable_', state.destroyed, state.length, state.ended);
+
+ if (!state.destroyed && (state.length || state.ended)) {
+ stream.emit('readable');
+ } // The stream needs another readable event if
+ // 1. It is not flowing, as the flow mechanism will take
+ // care of it.
+ // 2. It is not ended.
+ // 3. It is below the highWaterMark, so we can schedule
+ // another readable later.
+
-// at this point, the user has presumably seen the 'readable' event,
+ state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;
+ flow(stream);
+} // at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data. that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.
+
+
function maybeReadMore(stream, state) {
if (!state.readingMore) {
state.readingMore = true;
- pna.nextTick(maybeReadMore_, stream, state);
+ process.nextTick(maybeReadMore_, stream, state);
}
}
function maybeReadMore_(stream, state) {
var len = state.length;
- while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+
+ while (!state.reading && !state.ended && state.length < state.highWaterMark) {
debug('maybeReadMore read 0');
stream.read(0);
- if (len === state.length)
- // didn't get any data, stop spinning.
+ if (len === state.length) // didn't get any data, stop spinning.
break;else len = state.length;
}
- state.readingMore = false;
-}
-// abstract method. to be overridden in specific implementation classes.
+ state.readingMore = false;
+} // abstract method. to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
+
+
Readable.prototype._read = function (n) {
- this.emit('error', new Error('_read() is not implemented'));
+ this.emit('error', new ERR_METHOD_NOT_IMPLEMENTED('_read()'));
};
Readable.prototype.pipe = function (dest, pipeOpts) {
@@ -546,24 +571,26 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
case 0:
state.pipes = dest;
break;
+
case 1:
state.pipes = [state.pipes, dest];
break;
+
default:
state.pipes.push(dest);
break;
}
+
state.pipesCount += 1;
debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
-
var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
-
var endFn = doEnd ? onend : unpipe;
- if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
-
+ if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);
dest.on('unpipe', onunpipe);
+
function onunpipe(readable, unpipeInfo) {
debug('onunpipe');
+
if (readable === src) {
if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
unpipeInfo.hasUnpiped = true;
@@ -575,19 +602,19 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
function onend() {
debug('onend');
dest.end();
- }
-
- // when the dest drains, it reduces the awaitDrain counter
+ } // when the dest drains, it reduces the awaitDrain counter
// on the source. This would be more elegant with a .once()
// handler in flow(), but adding and removing repeatedly is
// too slow.
+
+
var ondrain = pipeOnDrain(src);
dest.on('drain', ondrain);
-
var cleanedUp = false;
+
function cleanup() {
- debug('cleanup');
- // cleanup event handlers once the pipe is broken
+ debug('cleanup'); // cleanup event handlers once the pipe is broken
+
dest.removeListener('close', onclose);
dest.removeListener('finish', onfinish);
dest.removeListener('drain', ondrain);
@@ -596,75 +623,71 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
src.removeListener('end', onend);
src.removeListener('end', unpipe);
src.removeListener('data', ondata);
-
- cleanedUp = true;
-
- // if the reader is waiting for a drain event from this
+ cleanedUp = true; // if the reader is waiting for a drain event from this
// specific writer, then it would cause it to never start
// flowing again.
// So, if this is awaiting a drain, then we just call it now.
// If we don't know, then assume that we are waiting for one.
+
if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
}
- // If the user pushes more data while we're writing to dest then we'll end up
- // in ondata again. However, we only want to increase awaitDrain once because
- // dest will only emit one 'drain' event for the multiple writes.
- // => Introduce a guard on increasing awaitDrain.
- var increasedAwaitDrain = false;
src.on('data', ondata);
+
function ondata(chunk) {
debug('ondata');
- increasedAwaitDrain = false;
var ret = dest.write(chunk);
- if (false === ret && !increasedAwaitDrain) {
+ debug('dest.write', ret);
+
+ if (ret === false) {
// If the user unpiped during `dest.write()`, it is possible
// to get stuck in a permanently paused state if that write
// also returned false.
// => Check whether `dest` is still a piping destination.
if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
- debug('false write response, pause', src._readableState.awaitDrain);
- src._readableState.awaitDrain++;
- increasedAwaitDrain = true;
+ debug('false write response, pause', state.awaitDrain);
+ state.awaitDrain++;
}
+
src.pause();
}
- }
-
- // if the dest has an error, then stop piping into it.
+ } // if the dest has an error, then stop piping into it.
// however, don't suppress the throwing behavior for this.
+
+
function onerror(er) {
debug('onerror', er);
unpipe();
dest.removeListener('error', onerror);
if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
- }
+ } // Make sure our error handler is attached before userland ones.
+
- // Make sure our error handler is attached before userland ones.
- prependListener(dest, 'error', onerror);
+ prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.
- // Both close and finish should trigger unpipe, but only once.
function onclose() {
dest.removeListener('finish', onfinish);
unpipe();
}
+
dest.once('close', onclose);
+
function onfinish() {
debug('onfinish');
dest.removeListener('close', onclose);
unpipe();
}
+
dest.once('finish', onfinish);
function unpipe() {
debug('unpipe');
src.unpipe(dest);
- }
+ } // tell the dest that it's being piped to
+
- // tell the dest that it's being piped to
- dest.emit('pipe', src);
+ dest.emit('pipe', src); // start the flow if it hasn't been started already.
- // start the flow if it hasn't been started already.
if (!state.flowing) {
debug('pipe resume');
src.resume();
@@ -674,10 +697,11 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
};
function pipeOnDrain(src) {
- return function () {
+ return function pipeOnDrainFunctionResult() {
var state = src._readableState;
debug('pipeOnDrain', state.awaitDrain);
if (state.awaitDrain) state.awaitDrain--;
+
if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
state.flowing = true;
flow(src);
@@ -687,27 +711,24 @@ function pipeOnDrain(src) {
Readable.prototype.unpipe = function (dest) {
var state = this._readableState;
- var unpipeInfo = { hasUnpiped: false };
+ var unpipeInfo = {
+ hasUnpiped: false
+ }; // if we're not piping anywhere, then do nothing.
- // if we're not piping anywhere, then do nothing.
- if (state.pipesCount === 0) return this;
+ if (state.pipesCount === 0) return this; // just one destination. most common case.
- // just one destination. most common case.
if (state.pipesCount === 1) {
// passed in one, but it's not the right one.
if (dest && dest !== state.pipes) return this;
+ if (!dest) dest = state.pipes; // got a match.
- if (!dest) dest = state.pipes;
-
- // got a match.
state.pipes = null;
state.pipesCount = 0;
state.flowing = false;
if (dest) dest.emit('unpipe', this, unpipeInfo);
return this;
- }
+ } // slow case. multiple pipe destinations.
- // slow case. multiple pipe destinations.
if (!dest) {
// remove all.
@@ -718,80 +739,133 @@ Readable.prototype.unpipe = function (dest) {
state.flowing = false;
for (var i = 0; i < len; i++) {
- dests[i].emit('unpipe', this, unpipeInfo);
- }return this;
- }
+ dests[i].emit('unpipe', this, {
+ hasUnpiped: false
+ });
+ }
+
+ return this;
+ } // try to find the right one.
+
- // try to find the right one.
var index = indexOf(state.pipes, dest);
if (index === -1) return this;
-
state.pipes.splice(index, 1);
state.pipesCount -= 1;
if (state.pipesCount === 1) state.pipes = state.pipes[0];
-
dest.emit('unpipe', this, unpipeInfo);
-
return this;
-};
-
-// set up data events if they are asked for
+}; // set up data events if they are asked for
// Ensure readable listeners eventually get something
+
+
Readable.prototype.on = function (ev, fn) {
var res = Stream.prototype.on.call(this, ev, fn);
+ var state = this._readableState;
if (ev === 'data') {
- // Start flowing on next tick if stream isn't explicitly paused
- if (this._readableState.flowing !== false) this.resume();
+ // update readableListening so that resume() may be a no-op
+ // a few lines down. This is needed to support once('readable').
+ state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused
+
+ if (state.flowing !== false) this.resume();
} else if (ev === 'readable') {
- var state = this._readableState;
if (!state.endEmitted && !state.readableListening) {
state.readableListening = state.needReadable = true;
+ state.flowing = false;
state.emittedReadable = false;
- if (!state.reading) {
- pna.nextTick(nReadingNextTick, this);
- } else if (state.length) {
+ debug('on readable', state.length, state.reading);
+
+ if (state.length) {
emitReadable(this);
+ } else if (!state.reading) {
+ process.nextTick(nReadingNextTick, this);
}
}
}
return res;
};
+
Readable.prototype.addListener = Readable.prototype.on;
+Readable.prototype.removeListener = function (ev, fn) {
+ var res = Stream.prototype.removeListener.call(this, ev, fn);
+
+ if (ev === 'readable') {
+ // We need to check if there is someone still listening to
+ // readable and reset the state. However this needs to happen
+ // after readable has been emitted but before I/O (nextTick) to
+ // support once('readable', fn) cycles. This means that calling
+ // resume within the same tick will have no
+ // effect.
+ process.nextTick(updateReadableListening, this);
+ }
+
+ return res;
+};
+
+Readable.prototype.removeAllListeners = function (ev) {
+ var res = Stream.prototype.removeAllListeners.apply(this, arguments);
+
+ if (ev === 'readable' || ev === undefined) {
+ // We need to check if there is someone still listening to
+ // readable and reset the state. However this needs to happen
+ // after readable has been emitted but before I/O (nextTick) to
+ // support once('readable', fn) cycles. This means that calling
+ // resume within the same tick will have no
+ // effect.
+ process.nextTick(updateReadableListening, this);
+ }
+
+ return res;
+};
+
+function updateReadableListening(self) {
+ self._readableState.readableListening = self.listenerCount('readable') > 0; // crude way to check if we should resume
+
+ if (self.listenerCount('data') > 0) {
+ self.resume();
+ }
+}
+
function nReadingNextTick(self) {
debug('readable nexttick read 0');
self.read(0);
-}
-
-// pause() and resume() are remnants of the legacy readable stream API
+} // pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
+
+
Readable.prototype.resume = function () {
var state = this._readableState;
+
if (!state.flowing) {
- debug('resume');
- state.flowing = true;
+ debug('resume'); // we flow only if there is no one listening
+ // for readable, but we still have to call
+ // resume()
+
+ state.flowing = !state.readableListening;
resume(this, state);
}
+
return this;
};
function resume(stream, state) {
if (!state.resumeScheduled) {
state.resumeScheduled = true;
- pna.nextTick(resume_, stream, state);
+ process.nextTick(resume_, stream, state);
}
}
function resume_(stream, state) {
+ debug('resume', state.reading);
+
if (!state.reading) {
- debug('resume read 0');
stream.read(0);
}
state.resumeScheduled = false;
- state.awaitDrain = 0;
stream.emit('resume');
flow(stream);
if (state.flowing && !state.reading) stream.read(0);
@@ -799,31 +873,36 @@ function resume_(stream, state) {
Readable.prototype.pause = function () {
debug('call pause flowing=%j', this._readableState.flowing);
- if (false !== this._readableState.flowing) {
+
+ if (this._readableState.flowing !== false) {
debug('pause');
this._readableState.flowing = false;
this.emit('pause');
}
+
return this;
};
function flow(stream) {
var state = stream._readableState;
debug('flow', state.flowing);
- while (state.flowing && stream.read() !== null) {}
-}
-// wrap an old-style stream as the async data source.
+ while (state.flowing && stream.read() !== null) {
+ ;
+ }
+} // wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
+
+
Readable.prototype.wrap = function (stream) {
var _this = this;
var state = this._readableState;
var paused = false;
-
stream.on('end', function () {
debug('wrapped end');
+
if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length) _this.push(chunk);
@@ -831,42 +910,41 @@ Readable.prototype.wrap = function (stream) {
_this.push(null);
});
-
stream.on('data', function (chunk) {
debug('wrapped data');
- if (state.decoder) chunk = state.decoder.write(chunk);
+ if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode
- // don't skip over falsy values in objectMode
if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
var ret = _this.push(chunk);
+
if (!ret) {
paused = true;
stream.pause();
}
- });
-
- // proxy all the other methods.
+ }); // proxy all the other methods.
// important when wrapping filters and duplexes.
+
for (var i in stream) {
if (this[i] === undefined && typeof stream[i] === 'function') {
- this[i] = function (method) {
- return function () {
+ this[i] = function methodWrap(method) {
+ return function methodWrapReturnFunction() {
return stream[method].apply(stream, arguments);
};
}(i);
}
- }
+ } // proxy certain important events.
+
- // proxy certain important events.
for (var n = 0; n < kProxyEvents.length; n++) {
stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
- }
-
- // when we try to consume some more bytes, simply unpause the
+ } // when we try to consume some more bytes, simply unpause the
// underlying stream.
+
+
this._read = function (n) {
debug('wrapped _read', n);
+
if (paused) {
paused = false;
stream.resume();
@@ -876,134 +954,93 @@ Readable.prototype.wrap = function (stream) {
return this;
};
+if (typeof Symbol === 'function') {
+ Readable.prototype[Symbol.asyncIterator] = function () {
+ emitExperimentalWarning('Readable[Symbol.asyncIterator]');
+
+ if (createReadableStreamAsyncIterator === undefined) {
+ createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');
+ }
+
+ return createReadableStreamAsyncIterator(this);
+ };
+}
+
Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
// making it explicit this property is not enumerable
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,
- get: function () {
+ get: function get() {
return this._readableState.highWaterMark;
}
});
+Object.defineProperty(Readable.prototype, 'readableBuffer', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._readableState && this._readableState.buffer;
+ }
+});
+Object.defineProperty(Readable.prototype, 'readableFlowing', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._readableState.flowing;
+ },
+ set: function set(state) {
+ if (this._readableState) {
+ this._readableState.flowing = state;
+ }
+ }
+}); // exposed for testing purposes only.
-// exposed for testing purposes only.
Readable._fromList = fromList;
-
-// Pluck off n bytes from an array of buffers.
+Object.defineProperty(Readable.prototype, 'readableLength', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._readableState.length;
+ }
+}); // Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
+
function fromList(n, state) {
// nothing buffered
if (state.length === 0) return null;
-
var ret;
if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
// read it all, truncate the list
- if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);
state.buffer.clear();
} else {
// read part of list
- ret = fromListPartial(n, state.buffer, state.decoder);
- }
-
- return ret;
-}
-
-// Extracts only enough buffered data to satisfy the amount requested.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function fromListPartial(n, list, hasStrings) {
- var ret;
- if (n < list.head.data.length) {
- // slice is the same for buffers and strings
- ret = list.head.data.slice(0, n);
- list.head.data = list.head.data.slice(n);
- } else if (n === list.head.data.length) {
- // first chunk is a perfect match
- ret = list.shift();
- } else {
- // result spans more than one buffer
- ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
- }
- return ret;
-}
-
-// Copies a specified amount of characters from the list of buffered data
-// chunks.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function copyFromBufferString(n, list) {
- var p = list.head;
- var c = 1;
- var ret = p.data;
- n -= ret.length;
- while (p = p.next) {
- var str = p.data;
- var nb = n > str.length ? str.length : n;
- if (nb === str.length) ret += str;else ret += str.slice(0, n);
- n -= nb;
- if (n === 0) {
- if (nb === str.length) {
- ++c;
- if (p.next) list.head = p.next;else list.head = list.tail = null;
- } else {
- list.head = p;
- p.data = str.slice(nb);
- }
- break;
- }
- ++c;
- }
- list.length -= c;
- return ret;
-}
-
-// Copies a specified amount of bytes from the list of buffered data chunks.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function copyFromBuffer(n, list) {
- var ret = Buffer.allocUnsafe(n);
- var p = list.head;
- var c = 1;
- p.data.copy(ret);
- n -= p.data.length;
- while (p = p.next) {
- var buf = p.data;
- var nb = n > buf.length ? buf.length : n;
- buf.copy(ret, ret.length - n, 0, nb);
- n -= nb;
- if (n === 0) {
- if (nb === buf.length) {
- ++c;
- if (p.next) list.head = p.next;else list.head = list.tail = null;
- } else {
- list.head = p;
- p.data = buf.slice(nb);
- }
- break;
- }
- ++c;
+ ret = state.buffer.consume(n, state.decoder);
}
- list.length -= c;
return ret;
}
function endReadable(stream) {
var state = stream._readableState;
-
- // If we get here before consuming all the bytes, then that is a
- // bug in node. Should never happen.
- if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+ debug('endReadable', state.endEmitted);
if (!state.endEmitted) {
state.ended = true;
- pna.nextTick(endReadableNT, state, stream);
+ process.nextTick(endReadableNT, state, stream);
}
}
function endReadableNT(state, stream) {
- // Check that we didn't get one last unshift.
+ debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.
+
if (!state.endEmitted && state.length === 0) {
state.endEmitted = true;
stream.readable = false;
@@ -1015,5 +1052,6 @@ function indexOf(xs, x) {
for (var i = 0, l = xs.length; i < l; i++) {
if (xs[i] === x) return i;
}
+
return -1;
} \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/readable-stream/lib/_stream_transform.js
index 5d1f8b876d..41a738c4e9 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_transform.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_transform.js
@@ -18,7 +18,6 @@
// 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.
-
// a transform stream is a readable/writable stream where you do
// something with the data. Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
@@ -60,40 +59,37 @@
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.
-
'use strict';
module.exports = Transform;
-var Duplex = require('./_stream_duplex');
+var _require$codes = require('../errors').codes,
+ ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+ ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
+ ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,
+ ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
+var Duplex = require('./_stream_duplex');
-util.inherits(Transform, Duplex);
+require('inherits')(Transform, Duplex);
function afterTransform(er, data) {
var ts = this._transformState;
ts.transforming = false;
-
var cb = ts.writecb;
- if (!cb) {
- return this.emit('error', new Error('write callback called multiple times'));
+ if (cb === null) {
+ return this.emit('error', new ERR_MULTIPLE_CALLBACK());
}
ts.writechunk = null;
ts.writecb = null;
-
if (data != null) // single equals check for both `null` and `undefined`
this.push(data);
-
cb(er);
-
var rs = this._readableState;
rs.reading = false;
+
if (rs.needReadable || rs.length < rs.highWaterMark) {
this._read(rs.highWaterMark);
}
@@ -101,9 +97,7 @@ function afterTransform(er, data) {
function Transform(options) {
if (!(this instanceof Transform)) return new Transform(options);
-
Duplex.call(this, options);
-
this._transformState = {
afterTransform: afterTransform.bind(this),
needTransform: false,
@@ -111,30 +105,27 @@ function Transform(options) {
writecb: null,
writechunk: null,
writeencoding: null
- };
-
- // start out asking for a readable event once data is transformed.
- this._readableState.needReadable = true;
+ }; // start out asking for a readable event once data is transformed.
- // we have implemented the _read method, and done the other things
+ this._readableState.needReadable = true; // we have implemented the _read method, and done the other things
// that Readable wants before the first _read call, so unset the
// sync guard flag.
+
this._readableState.sync = false;
if (options) {
if (typeof options.transform === 'function') this._transform = options.transform;
-
if (typeof options.flush === 'function') this._flush = options.flush;
- }
+ } // When the writable side finishes, then flush out anything remaining.
+
- // When the writable side finishes, then flush out anything remaining.
this.on('prefinish', prefinish);
}
function prefinish() {
var _this = this;
- if (typeof this._flush === 'function') {
+ if (typeof this._flush === 'function' && !this._readableState.destroyed) {
this._flush(function (er, data) {
done(_this, er, data);
});
@@ -146,9 +137,7 @@ function prefinish() {
Transform.prototype.push = function (chunk, encoding) {
this._transformState.needTransform = false;
return Duplex.prototype.push.call(this, chunk, encoding);
-};
-
-// This is the part where you do stuff!
+}; // This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
@@ -158,8 +147,10 @@ Transform.prototype.push = function (chunk, encoding) {
// Call `cb(err)` when you are done with this chunk. If you pass
// an error, then that'll put the hurt on the whole operation. If you
// never call cb(), then you'll never get another chunk.
+
+
Transform.prototype._transform = function (chunk, encoding, cb) {
- throw new Error('_transform() is not implemented');
+ cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));
};
Transform.prototype._write = function (chunk, encoding, cb) {
@@ -167,20 +158,22 @@ Transform.prototype._write = function (chunk, encoding, cb) {
ts.writecb = cb;
ts.writechunk = chunk;
ts.writeencoding = encoding;
+
if (!ts.transforming) {
var rs = this._readableState;
if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
}
-};
-
-// Doesn't matter what the args are here.
+}; // Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
+
+
Transform.prototype._read = function (n) {
var ts = this._transformState;
- if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ if (ts.writechunk !== null && !ts.transforming) {
ts.transforming = true;
+
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
} else {
// mark that we need a transform, so that any data that comes in
@@ -190,25 +183,19 @@ Transform.prototype._read = function (n) {
};
Transform.prototype._destroy = function (err, cb) {
- var _this2 = this;
-
Duplex.prototype._destroy.call(this, err, function (err2) {
cb(err2);
- _this2.emit('close');
});
};
function done(stream, er, data) {
if (er) return stream.emit('error', er);
-
if (data != null) // single equals check for both `null` and `undefined`
- stream.push(data);
-
+ stream.push(data); // TODO(BridgeAR): Write a test for these two error cases
// if there's nothing in the write buffer, then that means
// that nothing more will ever be provided
- if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
-
- if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+ if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();
+ if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
return stream.push(null);
} \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js
index b3f4e85a2f..9abbad6bc2 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js
@@ -18,35 +18,29 @@
// 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.
-
// A bit simpler than readable streams.
// Implement an async ._write(chunk, encoding, cb), and it'll handle all
// the drain event emission and buffering.
-
'use strict';
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
module.exports = Writable;
-
/* <replacement> */
+
function WriteReq(chunk, encoding, cb) {
this.chunk = chunk;
this.encoding = encoding;
this.callback = cb;
this.next = null;
-}
-
-// It seems a linked list but it is not
+} // It seems a linked list but it is not
// there will be only 2 of these for each stream
+
+
function CorkedRequest(state) {
var _this = this;
this.next = null;
this.entry = null;
+
this.finish = function () {
onCorkedFinish(_this, state);
};
@@ -54,266 +48,243 @@ function CorkedRequest(state) {
/* </replacement> */
/*<replacement>*/
-var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
-/*</replacement>*/
-/*<replacement>*/
+
var Duplex;
/*</replacement>*/
Writable.WritableState = WritableState;
-
/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-/*<replacement>*/
var internalUtil = {
deprecate: require('util-deprecate')
};
/*</replacement>*/
/*<replacement>*/
+
var Stream = require('./internal/streams/stream');
/*</replacement>*/
-/*<replacement>*/
-var Buffer = require('safe-buffer').Buffer;
+var Buffer = require('buffer').Buffer;
+
var OurUint8Array = global.Uint8Array || function () {};
+
function _uint8ArrayToBuffer(chunk) {
return Buffer.from(chunk);
}
+
function _isUint8Array(obj) {
return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}
-/*</replacement>*/
-
var destroyImpl = require('./internal/streams/destroy');
-util.inherits(Writable, Stream);
+var _require = require('./internal/streams/state'),
+ getHighWaterMark = _require.getHighWaterMark;
-function nop() {}
+var _require$codes = require('../errors').codes,
+ ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
+ ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+ ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
+ ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,
+ ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,
+ ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,
+ ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,
+ ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
-function WritableState(options, stream) {
- Duplex = Duplex || require('./_stream_duplex');
+require('inherits')(Writable, Stream);
- options = options || {};
+function nop() {}
- // Duplex streams are both readable and writable, but share
+function WritableState(options, stream, isDuplex) {
+ Duplex = Duplex || require('./_stream_duplex');
+ options = options || {}; // Duplex streams are both readable and writable, but share
// the same options object.
// However, some cases require setting options to different
// values for the readable and the writable sides of the duplex stream.
// These options can be provided separately as readableXXX and writableXXX.
- var isDuplex = stream instanceof Duplex;
- // object stream flag to indicate whether or not this stream
+ if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream
// contains buffers or objects.
- this.objectMode = !!options.objectMode;
- if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
-
- // the point at which write() starts returning false
+ this.objectMode = !!options.objectMode;
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false
// Note: 0 is a valid value, means that we always return false if
// the entire buffer is not flushed immediately on write()
- var hwm = options.highWaterMark;
- var writableHwm = options.writableHighWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
- if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+ this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called
- // cast to ints.
- this.highWaterMark = Math.floor(this.highWaterMark);
+ this.finalCalled = false; // drain event flag.
- // if _final has been called
- this.finalCalled = false;
+ this.needDrain = false; // at the start of calling end()
- // drain event flag.
- this.needDrain = false;
- // at the start of calling end()
- this.ending = false;
- // when end() has been called, and returned
- this.ended = false;
- // when 'finish' is emitted
- this.finished = false;
+ this.ending = false; // when end() has been called, and returned
- // has it been destroyed
- this.destroyed = false;
+ this.ended = false; // when 'finish' is emitted
- // should we decode strings into buffers before passing to _write?
+ this.finished = false; // has it been destroyed
+
+ this.destroyed = false; // should we decode strings into buffers before passing to _write?
// this is here so that some node-core streams can optimize string
// handling at a lower level.
- var noDecode = options.decodeStrings === false;
- this.decodeStrings = !noDecode;
- // Crypto is kind of old and crusty. Historically, its default string
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string
// encoding is 'binary' so we have to make this configurable.
// Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
- // not an actual buffer we keep track of, but a measurement
+ this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement
// of how much we're waiting to get pushed to some underlying
// socket or file.
- this.length = 0;
- // a flag to see when we're in the middle of a write.
- this.writing = false;
+ this.length = 0; // a flag to see when we're in the middle of a write.
- // when true all writes will be buffered until .uncork() call
- this.corked = 0;
+ this.writing = false; // when true all writes will be buffered until .uncork() call
- // a flag to be able to tell if the onwrite cb is called immediately,
+ this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,
// or on a later tick. We set this to true at first, because any
// actions that shouldn't happen until "later" should generally also
// not happen before the first write call.
- this.sync = true;
- // a flag to know if we're processing previously buffered items, which
+ this.sync = true; // a flag to know if we're processing previously buffered items, which
// may call the _write() callback in the same tick, so that we don't
// end up in an overlapped onwrite situation.
- this.bufferProcessing = false;
- // the callback that's passed to _write(chunk,cb)
+ this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)
+
this.onwrite = function (er) {
onwrite(stream, er);
- };
+ }; // the callback that the user supplies to write(chunk,encoding,cb)
- // the callback that the user supplies to write(chunk,encoding,cb)
- this.writecb = null;
- // the amount that is being written when _write is called.
- this.writelen = 0;
+ this.writecb = null; // the amount that is being written when _write is called.
+ this.writelen = 0;
this.bufferedRequest = null;
- this.lastBufferedRequest = null;
-
- // number of pending user-supplied write callbacks
+ this.lastBufferedRequest = null; // number of pending user-supplied write callbacks
// this must be 0 before 'finish' can be emitted
- this.pendingcb = 0;
- // emit prefinish if the only thing we're waiting for is _write cbs
+ this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs
// This is relevant for synchronous Transform streams
- this.prefinished = false;
- // True if the error was already emitted and should not be thrown again
- this.errorEmitted = false;
+ this.prefinished = false; // True if the error was already emitted and should not be thrown again
+
+ this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.
- // count buffered requests
- this.bufferedRequestCount = 0;
+ this.emitClose = options.emitClose !== false; // count buffered requests
- // allocate the first CorkedRequest, there is always
+ this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always
// one allocated and free to use, and we maintain at most two
+
this.corkedRequestsFree = new CorkedRequest(this);
}
WritableState.prototype.getBuffer = function getBuffer() {
var current = this.bufferedRequest;
var out = [];
+
while (current) {
out.push(current);
current = current.next;
}
+
return out;
};
(function () {
try {
Object.defineProperty(WritableState.prototype, 'buffer', {
- get: internalUtil.deprecate(function () {
+ get: internalUtil.deprecate(function writableStateBufferGetter() {
return this.getBuffer();
}, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
});
} catch (_) {}
-})();
-
-// Test _writableState for inheritance to account for Duplex streams,
+})(); // Test _writableState for inheritance to account for Duplex streams,
// whose prototype chain only points to Readable.
+
+
var realHasInstance;
+
if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
realHasInstance = Function.prototype[Symbol.hasInstance];
Object.defineProperty(Writable, Symbol.hasInstance, {
- value: function (object) {
+ value: function value(object) {
if (realHasInstance.call(this, object)) return true;
if (this !== Writable) return false;
-
return object && object._writableState instanceof WritableState;
}
});
} else {
- realHasInstance = function (object) {
+ realHasInstance = function realHasInstance(object) {
return object instanceof this;
};
}
function Writable(options) {
- Duplex = Duplex || require('./_stream_duplex');
-
- // Writable ctor is applied to Duplexes, too.
+ Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too.
// `realHasInstance` is necessary because using plain `instanceof`
// would return false, as no `_writableState` property is attached.
-
// Trying to use the custom `instanceof` for Writable here will also break the
// Node.js LazyTransform implementation, which has a non-trivial getter for
// `_writableState` that would lead to infinite recursion.
- if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
- return new Writable(options);
- }
+ // Checking for a Stream.Duplex instance is faster here instead of inside
+ // the WritableState constructor, at least with V8 6.5
- this._writableState = new WritableState(options, this);
+ var isDuplex = this instanceof Duplex;
+ if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);
+ this._writableState = new WritableState(options, this, isDuplex); // legacy.
- // legacy.
this.writable = true;
if (options) {
if (typeof options.write === 'function') this._write = options.write;
-
if (typeof options.writev === 'function') this._writev = options.writev;
-
if (typeof options.destroy === 'function') this._destroy = options.destroy;
-
if (typeof options.final === 'function') this._final = options.final;
}
Stream.call(this);
-}
+} // Otherwise people can pipe Writable streams, which is just wrong.
+
-// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function () {
- this.emit('error', new Error('Cannot pipe, not readable'));
+ this.emit('error', new ERR_STREAM_CANNOT_PIPE());
};
function writeAfterEnd(stream, cb) {
- var er = new Error('write after end');
- // TODO: defer error events consistently everywhere, not just the cb
- stream.emit('error', er);
- pna.nextTick(cb, er);
-}
+ var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb
-// Checks that a user-supplied chunk is valid, especially for the particular
+ stream.emit('error', er);
+ process.nextTick(cb, er);
+} // Checks that a user-supplied chunk is valid, especially for the particular
// mode the stream is in. Currently this means that `null` is never accepted
// and undefined/non-string values are only allowed in object mode.
+
+
function validChunk(stream, state, chunk, cb) {
- var valid = true;
- var er = false;
+ var er;
if (chunk === null) {
- er = new TypeError('May not write null values to stream');
- } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
+ er = new ERR_STREAM_NULL_VALUES();
+ } else if (typeof chunk !== 'string' && !state.objectMode) {
+ er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);
}
+
if (er) {
stream.emit('error', er);
- pna.nextTick(cb, er);
- valid = false;
+ process.nextTick(cb, er);
+ return false;
}
- return valid;
+
+ return true;
}
Writable.prototype.write = function (chunk, encoding, cb) {
var state = this._writableState;
var ret = false;
+
var isBuf = !state.objectMode && _isUint8Array(chunk);
if (isBuf && !Buffer.isBuffer(chunk)) {
@@ -326,21 +297,16 @@ Writable.prototype.write = function (chunk, encoding, cb) {
}
if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
-
if (typeof cb !== 'function') cb = nop;
-
- if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
state.pendingcb++;
ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
}
-
return ret;
};
Writable.prototype.cork = function () {
- var state = this._writableState;
-
- state.corked++;
+ this._writableState.corked++;
};
Writable.prototype.uncork = function () {
@@ -348,23 +314,33 @@ Writable.prototype.uncork = function () {
if (state.corked) {
state.corked--;
-
- if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
}
};
Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
// node::ParseEncoding() requires lower case.
if (typeof encoding === 'string') encoding = encoding.toLowerCase();
- if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);
this._writableState.defaultEncoding = encoding;
return this;
};
+Object.defineProperty(Writable.prototype, 'writableBuffer', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState && this._writableState.getBuffer();
+ }
+});
+
function decodeChunk(state, chunk, encoding) {
if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
chunk = Buffer.from(chunk, encoding);
}
+
return chunk;
}
@@ -373,29 +349,28 @@ Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,
- get: function () {
+ get: function get() {
return this._writableState.highWaterMark;
}
-});
-
-// if we're already writing something, then just put this
+}); // if we're already writing something, then just put this
// in the queue, and wait our turn. Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
+
function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
if (!isBuf) {
var newChunk = decodeChunk(state, chunk, encoding);
+
if (chunk !== newChunk) {
isBuf = true;
encoding = 'buffer';
chunk = newChunk;
}
}
- var len = state.objectMode ? 1 : chunk.length;
+ var len = state.objectMode ? 1 : chunk.length;
state.length += len;
+ var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.
- var ret = state.length < state.highWaterMark;
- // we must ensure that previous needDrain will not be reset to false.
if (!ret) state.needDrain = true;
if (state.writing || state.corked) {
@@ -407,11 +382,13 @@ function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
callback: cb,
next: null
};
+
if (last) {
last.next = state.lastBufferedRequest;
} else {
state.bufferedRequest = state.lastBufferedRequest;
}
+
state.bufferedRequestCount += 1;
} else {
doWrite(stream, state, false, len, chunk, encoding, cb);
@@ -425,7 +402,7 @@ function doWrite(stream, state, writev, len, chunk, encoding, cb) {
state.writecb = cb;
state.writing = true;
state.sync = true;
- if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
state.sync = false;
}
@@ -435,10 +412,10 @@ function onwriteError(stream, state, sync, er, cb) {
if (sync) {
// defer the callback if we are being called synchronously
// to avoid piling up things on the stack
- pna.nextTick(cb, er);
- // this can emit finish, and it will always happen
+ process.nextTick(cb, er); // this can emit finish, and it will always happen
// after error
- pna.nextTick(finishMaybe, stream, state);
+
+ process.nextTick(finishMaybe, stream, state);
stream._writableState.errorEmitted = true;
stream.emit('error', er);
} else {
@@ -446,9 +423,9 @@ function onwriteError(stream, state, sync, er, cb) {
// it is async
cb(er);
stream._writableState.errorEmitted = true;
- stream.emit('error', er);
- // this can emit finish, but finish must
+ stream.emit('error', er); // this can emit finish, but finish must
// always follow error
+
finishMaybe(stream, state);
}
}
@@ -464,9 +441,8 @@ function onwrite(stream, er) {
var state = stream._writableState;
var sync = state.sync;
var cb = state.writecb;
-
+ if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();
onwriteStateUpdate(state);
-
if (er) onwriteError(stream, state, sync, er, cb);else {
// Check if we're actually ready to finish, but don't emit yet
var finished = needFinish(state);
@@ -476,9 +452,7 @@ function onwrite(stream, er) {
}
if (sync) {
- /*<replacement>*/
- asyncWrite(afterWrite, stream, state, finished, cb);
- /*</replacement>*/
+ process.nextTick(afterWrite, stream, state, finished, cb);
} else {
afterWrite(stream, state, finished, cb);
}
@@ -490,19 +464,19 @@ function afterWrite(stream, state, finished, cb) {
state.pendingcb--;
cb();
finishMaybe(stream, state);
-}
-
-// Must force callback to be called on nextTick, so that we don't
+} // Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.
+
+
function onwriteDrain(stream, state) {
if (state.length === 0 && state.needDrain) {
state.needDrain = false;
stream.emit('drain');
}
-}
+} // if there's something in the buffer waiting, then process it
+
-// if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
state.bufferProcessing = true;
var entry = state.bufferedRequest;
@@ -513,29 +487,30 @@ function clearBuffer(stream, state) {
var buffer = new Array(l);
var holder = state.corkedRequestsFree;
holder.entry = entry;
-
var count = 0;
var allBuffers = true;
+
while (entry) {
buffer[count] = entry;
if (!entry.isBuf) allBuffers = false;
entry = entry.next;
count += 1;
}
- buffer.allBuffers = allBuffers;
-
- doWrite(stream, state, true, state.length, buffer, '', holder.finish);
- // doWrite is almost always async, defer these to save a bit of time
+ buffer.allBuffers = allBuffers;
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time
// as the hot path ends with doWrite
+
state.pendingcb++;
state.lastBufferedRequest = null;
+
if (holder.next) {
state.corkedRequestsFree = holder.next;
holder.next = null;
} else {
state.corkedRequestsFree = new CorkedRequest(state);
}
+
state.bufferedRequestCount = 0;
} else {
// Slow case, write chunks one-by-one
@@ -544,14 +519,13 @@ function clearBuffer(stream, state) {
var encoding = entry.encoding;
var cb = entry.callback;
var len = state.objectMode ? 1 : chunk.length;
-
doWrite(stream, state, false, len, chunk, encoding, cb);
entry = entry.next;
- state.bufferedRequestCount--;
- // if we didn't call the onwrite immediately, then
+ state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then
// it means that we need to wait until it does.
// also, that means that the chunk and cb are currently
// being processed, so move the buffer counter past them.
+
if (state.writing) {
break;
}
@@ -565,7 +539,7 @@ function clearBuffer(stream, state) {
}
Writable.prototype._write = function (chunk, encoding, cb) {
- cb(new Error('_write() is not implemented'));
+ cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));
};
Writable.prototype._writev = null;
@@ -582,38 +556,52 @@ Writable.prototype.end = function (chunk, encoding, cb) {
encoding = null;
}
- if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks
- // .end() fully uncorks
if (state.corked) {
state.corked = 1;
this.uncork();
- }
+ } // ignore unnecessary end() calls.
+
- // ignore unnecessary end() calls.
- if (!state.ending && !state.finished) endWritable(this, state, cb);
+ if (!state.ending) endWritable(this, state, cb);
+ return this;
};
+Object.defineProperty(Writable.prototype, 'writableLength', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState.length;
+ }
+});
+
function needFinish(state) {
return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
}
+
function callFinal(stream, state) {
stream._final(function (err) {
state.pendingcb--;
+
if (err) {
stream.emit('error', err);
}
+
state.prefinished = true;
stream.emit('prefinish');
finishMaybe(stream, state);
});
}
+
function prefinish(stream, state) {
if (!state.prefinished && !state.finalCalled) {
- if (typeof stream._final === 'function') {
+ if (typeof stream._final === 'function' && !state.destroyed) {
state.pendingcb++;
state.finalCalled = true;
- pna.nextTick(callFinal, stream, state);
+ process.nextTick(callFinal, stream, state);
} else {
state.prefinished = true;
stream.emit('prefinish');
@@ -623,22 +611,27 @@ function prefinish(stream, state) {
function finishMaybe(stream, state) {
var need = needFinish(state);
+
if (need) {
prefinish(stream, state);
+
if (state.pendingcb === 0) {
state.finished = true;
stream.emit('finish');
}
}
+
return need;
}
function endWritable(stream, state, cb) {
state.ending = true;
finishMaybe(stream, state);
+
if (cb) {
- if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ if (state.finished) process.nextTick(cb);else stream.once('finish', cb);
}
+
state.ended = true;
stream.writable = false;
}
@@ -646,42 +639,45 @@ function endWritable(stream, state, cb) {
function onCorkedFinish(corkReq, state, err) {
var entry = corkReq.entry;
corkReq.entry = null;
+
while (entry) {
var cb = entry.callback;
state.pendingcb--;
cb(err);
entry = entry.next;
- }
- if (state.corkedRequestsFree) {
- state.corkedRequestsFree.next = corkReq;
- } else {
- state.corkedRequestsFree = corkReq;
- }
+ } // reuse the free corkReq.
+
+
+ state.corkedRequestsFree.next = corkReq;
}
Object.defineProperty(Writable.prototype, 'destroyed', {
- get: function () {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
if (this._writableState === undefined) {
return false;
}
+
return this._writableState.destroyed;
},
- set: function (value) {
+ set: function set(value) {
// we ignore the value if the stream
// has not been initialized yet
if (!this._writableState) {
return;
- }
-
- // backward compatibility, the user is explicitly
+ } // backward compatibility, the user is explicitly
// managing destroyed
+
+
this._writableState.destroyed = value;
}
});
-
Writable.prototype.destroy = destroyImpl.destroy;
Writable.prototype._undestroy = destroyImpl.undestroy;
+
Writable.prototype._destroy = function (err, cb) {
- this.end();
cb(err);
}; \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js
new file mode 100644
index 0000000000..79a6e1e11e
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js
@@ -0,0 +1,204 @@
+'use strict';
+
+var _Object$setPrototypeO;
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var finished = require('./end-of-stream');
+
+var kLastResolve = Symbol('lastResolve');
+var kLastReject = Symbol('lastReject');
+var kError = Symbol('error');
+var kEnded = Symbol('ended');
+var kLastPromise = Symbol('lastPromise');
+var kHandlePromise = Symbol('handlePromise');
+var kStream = Symbol('stream');
+
+function createIterResult(value, done) {
+ return {
+ value: value,
+ done: done
+ };
+}
+
+function readAndResolve(iter) {
+ var resolve = iter[kLastResolve];
+
+ if (resolve !== null) {
+ var data = iter[kStream].read(); // we defer if data is null
+ // we can be expecting either 'end' or
+ // 'error'
+
+ if (data !== null) {
+ iter[kLastPromise] = null;
+ iter[kLastResolve] = null;
+ iter[kLastReject] = null;
+ resolve(createIterResult(data, false));
+ }
+ }
+}
+
+function onReadable(iter) {
+ // we wait for the next tick, because it might
+ // emit an error with process.nextTick
+ process.nextTick(readAndResolve, iter);
+}
+
+function wrapForNext(lastPromise, iter) {
+ return function (resolve, reject) {
+ lastPromise.then(function () {
+ iter[kHandlePromise](resolve, reject);
+ }, reject);
+ };
+}
+
+var AsyncIteratorPrototype = Object.getPrototypeOf(function () {});
+var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
+ get stream() {
+ return this[kStream];
+ },
+
+ next: function next() {
+ var _this = this;
+
+ // if we have detected an error in the meanwhile
+ // reject straight away
+ var error = this[kError];
+
+ if (error !== null) {
+ return Promise.reject(error);
+ }
+
+ if (this[kEnded]) {
+ return Promise.resolve(createIterResult(null, true));
+ }
+
+ if (this[kStream].destroyed) {
+ // We need to defer via nextTick because if .destroy(err) is
+ // called, the error will be emitted via nextTick, and
+ // we cannot guarantee that there is no error lingering around
+ // waiting to be emitted.
+ return new Promise(function (resolve, reject) {
+ process.nextTick(function () {
+ if (_this[kError]) {
+ reject(_this[kError]);
+ } else {
+ resolve(createIterResult(null, true));
+ }
+ });
+ });
+ } // if we have multiple next() calls
+ // we will wait for the previous Promise to finish
+ // this logic is optimized to support for await loops,
+ // where next() is only called once at a time
+
+
+ var lastPromise = this[kLastPromise];
+ var promise;
+
+ if (lastPromise) {
+ promise = new Promise(wrapForNext(lastPromise, this));
+ } else {
+ // fast path needed to support multiple this.push()
+ // without triggering the next() queue
+ var data = this[kStream].read();
+
+ if (data !== null) {
+ return Promise.resolve(createIterResult(data, false));
+ }
+
+ promise = new Promise(this[kHandlePromise]);
+ }
+
+ this[kLastPromise] = promise;
+ return promise;
+ }
+}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {
+ return this;
+}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
+ var _this2 = this;
+
+ // destroy(err, cb) is a private API
+ // we can guarantee we have that here, because we control the
+ // Readable class this is attached to
+ return new Promise(function (resolve, reject) {
+ _this2[kStream].destroy(null, function (err) {
+ if (err) {
+ reject(err);
+ return;
+ }
+
+ resolve(createIterResult(null, true));
+ });
+ });
+}), _Object$setPrototypeO), AsyncIteratorPrototype);
+
+var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {
+ var _Object$create;
+
+ var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
+ value: stream,
+ writable: true
+ }), _defineProperty(_Object$create, kLastResolve, {
+ value: null,
+ writable: true
+ }), _defineProperty(_Object$create, kLastReject, {
+ value: null,
+ writable: true
+ }), _defineProperty(_Object$create, kError, {
+ value: null,
+ writable: true
+ }), _defineProperty(_Object$create, kEnded, {
+ value: stream._readableState.endEmitted,
+ writable: true
+ }), _defineProperty(_Object$create, kLastPromise, {
+ value: null,
+ writable: true
+ }), _defineProperty(_Object$create, kHandlePromise, {
+ value: function value(resolve, reject) {
+ var data = iterator[kStream].read();
+
+ if (data) {
+ iterator[kLastPromise] = null;
+ iterator[kLastResolve] = null;
+ iterator[kLastReject] = null;
+ resolve(createIterResult(data, false));
+ } else {
+ iterator[kLastResolve] = resolve;
+ iterator[kLastReject] = reject;
+ }
+ },
+ writable: true
+ }), _Object$create));
+ finished(stream, function (err) {
+ if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
+ var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise
+ // returned by next() and store the error
+
+ if (reject !== null) {
+ iterator[kLastPromise] = null;
+ iterator[kLastResolve] = null;
+ iterator[kLastReject] = null;
+ reject(err);
+ }
+
+ iterator[kError] = err;
+ return;
+ }
+
+ var resolve = iterator[kLastResolve];
+
+ if (resolve !== null) {
+ iterator[kLastPromise] = null;
+ iterator[kLastResolve] = null;
+ iterator[kLastReject] = null;
+ resolve(createIterResult(null, true));
+ }
+
+ iterator[kEnded] = true;
+ });
+ stream.on('readable', onReadable.bind(null, iterator));
+ return iterator;
+};
+
+module.exports = createReadableStreamAsyncIterator; \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/buffer_list.js
new file mode 100644
index 0000000000..ebaf5c72aa
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/buffer_list.js
@@ -0,0 +1,189 @@
+'use strict';
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var _require = require('buffer'),
+ Buffer = _require.Buffer;
+
+var _require2 = require('util'),
+ inspect = _require2.inspect;
+
+var custom = inspect && inspect.custom || 'inspect';
+
+function copyBuffer(src, target, offset) {
+ Buffer.prototype.copy.call(src, target, offset);
+}
+
+module.exports =
+/*#__PURE__*/
+function () {
+ function BufferList() {
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ var _proto = BufferList.prototype;
+
+ _proto.push = function push(v) {
+ var entry = {
+ data: v,
+ next: null
+ };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ _proto.unshift = function unshift(v) {
+ var entry = {
+ data: v,
+ next: this.head
+ };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ _proto.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ _proto.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ _proto.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+
+ while (p = p.next) {
+ ret += s + p.data;
+ }
+
+ return ret;
+ };
+
+ _proto.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+
+ return ret;
+ } // Consumes a specified amount of bytes or characters from the buffered data.
+ ;
+
+ _proto.consume = function consume(n, hasStrings) {
+ var ret;
+
+ if (n < this.head.data.length) {
+ // `slice` is the same for buffers and strings.
+ ret = this.head.data.slice(0, n);
+ this.head.data = this.head.data.slice(n);
+ } else if (n === this.head.data.length) {
+ // First chunk is a perfect match.
+ ret = this.shift();
+ } else {
+ // Result spans more than one buffer.
+ ret = hasStrings ? this._getString(n) : this._getBuffer(n);
+ }
+
+ return ret;
+ };
+
+ _proto.first = function first() {
+ return this.head.data;
+ } // Consumes a specified amount of characters from the buffered data.
+ ;
+
+ _proto._getString = function _getString(n) {
+ var p = this.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) this.head = p.next;else this.head = this.tail = null;
+ } else {
+ this.head = p;
+ p.data = str.slice(nb);
+ }
+
+ break;
+ }
+
+ ++c;
+ }
+
+ this.length -= c;
+ return ret;
+ } // Consumes a specified amount of bytes from the buffered data.
+ ;
+
+ _proto._getBuffer = function _getBuffer(n) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = this.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) this.head = p.next;else this.head = this.tail = null;
+ } else {
+ this.head = p;
+ p.data = buf.slice(nb);
+ }
+
+ break;
+ }
+
+ ++c;
+ }
+
+ this.length -= c;
+ return ret;
+ } // Make sure the linked list only shows the minimal necessary information.
+ ;
+
+ _proto[custom] = function (_, options) {
+ return inspect(this, _objectSpread({}, options, {
+ // Only inspect one level.
+ depth: 0,
+ // It should not recurse.
+ customInspect: false
+ }));
+ };
+
+ return BufferList;
+}(); \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js
index 5a0a0d88ce..63ae49928d 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -1,11 +1,5 @@
-'use strict';
+'use strict'; // undocumented cb() API, needed for core, not for public API
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
-// undocumented cb() API, needed for core, not for public API
function destroy(err, cb) {
var _this = this;
@@ -16,37 +10,52 @@ function destroy(err, cb) {
if (cb) {
cb(err);
} else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
- pna.nextTick(emitErrorNT, this, err);
+ process.nextTick(emitErrorNT, this, err);
}
- return this;
- }
- // we set destroyed to true before firing error callbacks in order
+ return this;
+ } // we set destroyed to true before firing error callbacks in order
// to make it re-entrance safe in case destroy() is called within callbacks
+
if (this._readableState) {
this._readableState.destroyed = true;
- }
+ } // if this is a duplex stream mark the writable part as destroyed as well
+
- // if this is a duplex stream mark the writable part as destroyed as well
if (this._writableState) {
this._writableState.destroyed = true;
}
this._destroy(err || null, function (err) {
if (!cb && err) {
- pna.nextTick(emitErrorNT, _this, err);
+ process.nextTick(emitErrorAndCloseNT, _this, err);
+
if (_this._writableState) {
_this._writableState.errorEmitted = true;
}
} else if (cb) {
+ process.nextTick(emitCloseNT, _this);
cb(err);
+ } else {
+ process.nextTick(emitCloseNT, _this);
}
});
return this;
}
+function emitErrorAndCloseNT(self, err) {
+ emitErrorNT(self, err);
+ emitCloseNT(self);
+}
+
+function emitCloseNT(self) {
+ if (self._writableState && !self._writableState.emitClose) return;
+ if (self._readableState && !self._readableState.emitClose) return;
+ self.emit('close');
+}
+
function undestroy() {
if (this._readableState) {
this._readableState.destroyed = false;
@@ -59,6 +68,8 @@ function undestroy() {
this._writableState.destroyed = false;
this._writableState.ended = false;
this._writableState.ending = false;
+ this._writableState.finalCalled = false;
+ this._writableState.prefinished = false;
this._writableState.finished = false;
this._writableState.errorEmitted = false;
}
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
new file mode 100644
index 0000000000..cf23d53b5a
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
@@ -0,0 +1,91 @@
+// Ported from https://github.com/mafintosh/end-of-stream with
+// permission from the author, Mathias Buus (@mafintosh).
+'use strict';
+
+var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;
+
+function noop() {}
+
+function isRequest(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+}
+
+function once(callback) {
+ var called = false;
+ return function (err) {
+ if (called) return;
+ called = true;
+ callback.call(this, err);
+ };
+}
+
+function eos(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 onlegacyfinish() {
+ if (!stream.writable) onfinish();
+ };
+
+ var onfinish = function onfinish() {
+ writable = false;
+ if (!readable) callback.call(stream);
+ };
+
+ var onend = function onend() {
+ readable = false;
+ if (!writable) callback.call(stream);
+ };
+
+ var onerror = function onerror(err) {
+ callback.call(stream, err);
+ };
+
+ var onclose = function onclose() {
+ if (readable && !(rs && rs.ended)) {
+ return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
+ }
+
+ if (writable && !(ws && ws.ended)) {
+ return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
+ }
+ };
+
+ var onrequest = function onrequest() {
+ 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);
+ }
+
+ 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('end', onend);
+ stream.removeListener('error', onerror);
+ stream.removeListener('close', onclose);
+ };
+}
+
+module.exports = eos; \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/pipeline.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/pipeline.js
new file mode 100644
index 0000000000..6589909889
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/pipeline.js
@@ -0,0 +1,97 @@
+// Ported from https://github.com/mafintosh/pump with
+// permission from the author, Mathias Buus (@mafintosh).
+'use strict';
+
+var eos;
+
+function once(callback) {
+ var called = false;
+ return function () {
+ if (called) return;
+ called = true;
+ callback.apply(void 0, arguments);
+ };
+}
+
+var _require$codes = require('../../../errors').codes,
+ ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,
+ ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
+
+function noop(err) {
+ // Rethrow the error if it exists to avoid swallowing it
+ if (err) throw err;
+}
+
+function isRequest(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+}
+
+function destroyer(stream, reading, writing, callback) {
+ callback = once(callback);
+ var closed = false;
+ stream.on('close', function () {
+ closed = true;
+ });
+ if (eos === undefined) eos = require('./end-of-stream');
+ 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; // request.destroy just do .end - .abort is what we want
+
+ if (isRequest(stream)) return stream.abort();
+ if (typeof stream.destroy === 'function') return stream.destroy();
+ callback(err || new ERR_STREAM_DESTROYED('pipe'));
+ };
+}
+
+function call(fn) {
+ fn();
+}
+
+function pipe(from, to) {
+ return from.pipe(to);
+}
+
+function popCallback(streams) {
+ if (!streams.length) return noop;
+ if (typeof streams[streams.length - 1] !== 'function') return noop;
+ return streams.pop();
+}
+
+function pipeline() {
+ for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
+ streams[_key] = arguments[_key];
+ }
+
+ var callback = popCallback(streams);
+ if (Array.isArray(streams[0])) streams = streams[0];
+
+ if (streams.length < 2) {
+ throw new ERR_MISSING_ARGS('streams');
+ }
+
+ 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);
+ });
+ });
+ return streams.reduce(pipe);
+}
+
+module.exports = pipeline; \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/state.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/state.js
new file mode 100644
index 0000000000..19887eb8a9
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/state.js
@@ -0,0 +1,27 @@
+'use strict';
+
+var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;
+
+function highWaterMarkFrom(options, isDuplex, duplexKey) {
+ return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
+}
+
+function getHighWaterMark(state, options, duplexKey, isDuplex) {
+ var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
+
+ if (hwm != null) {
+ if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
+ var name = isDuplex ? duplexKey : 'highWaterMark';
+ throw new ERR_INVALID_OPT_VALUE(name, hwm);
+ }
+
+ return Math.floor(hwm);
+ } // Default value
+
+
+ return state.objectMode ? 16 : 16 * 1024;
+}
+
+module.exports = {
+ getHighWaterMark: getHighWaterMark
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json
index a5db7b6129..71ce7faf4b 100644
--- a/deps/npm/node_modules/readable-stream/package.json
+++ b/deps/npm/node_modules/readable-stream/package.json
@@ -1,72 +1,69 @@
{
- "_args": [
- [
- "readable-stream@2.3.6",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "readable-stream@2.3.6",
- "_id": "readable-stream@2.3.6",
+ "_from": "readable-stream@3.1.1",
+ "_id": "readable-stream@3.1.1",
"_inBundle": false,
- "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==",
"_location": "/readable-stream",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "readable-stream@2.3.6",
+ "raw": "readable-stream@3.1.1",
"name": "readable-stream",
"escapedName": "readable-stream",
- "rawSpec": "2.3.6",
+ "rawSpec": "3.1.1",
"saveSpec": null,
- "fetchSpec": "2.3.6"
+ "fetchSpec": "3.1.1"
},
"_requiredBy": [
- "/",
- "/are-we-there-yet",
- "/concat-stream",
- "/duplexify",
- "/flush-write-stream",
- "/from2",
- "/fs-write-stream-atomic",
- "/parallel-transform",
- "/sha",
- "/stream-iterate",
- "/tap-mocha-reporter",
- "/tap-mocha-reporter/tap-parser",
- "/through2"
+ "#USER",
+ "/"
],
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "_spec": "2.3.6",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz",
+ "_shasum": "ed6bbc6c5ba58b090039ff18ce670515795aeb06",
+ "_spec": "readable-stream@3.1.1",
+ "_where": "/Users/aeschright/code/cli",
"browser": {
"util": false,
+ "worker_threads": false,
+ "./errors": "./errors-browser.js",
"./readable.js": "./readable-browser.js",
- "./writable.js": "./writable-browser.js",
- "./duplex.js": "./duplex-browser.js",
"./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
},
"bugs": {
"url": "https://github.com/nodejs/readable-stream/issues"
},
+ "bundleDependencies": false,
"dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
},
+ "deprecated": false,
"description": "Streams3, a user-land copy of the stream library from Node.js",
"devDependencies": {
+ "@babel/cli": "^7.2.0",
+ "@babel/core": "^7.2.0",
+ "@babel/polyfill": "^7.0.0",
+ "@babel/preset-env": "^7.2.0",
+ "airtap": "0.0.9",
"assert": "^1.4.0",
- "babel-polyfill": "^6.9.1",
- "buffer": "^4.9.0",
- "lolex": "^2.3.2",
- "nyc": "^6.4.0",
- "tap": "^0.7.0",
- "tape": "^4.8.0"
+ "bl": "^2.0.0",
+ "deep-strict-equal": "^0.2.0",
+ "glob": "^7.1.2",
+ "gunzip-maybe": "^1.4.1",
+ "hyperquest": "^2.1.3",
+ "lolex": "^2.6.0",
+ "nyc": "^11.0.0",
+ "pump": "^3.0.0",
+ "rimraf": "^2.6.2",
+ "tap": "^11.0.0",
+ "tape": "^4.9.0",
+ "tar-fs": "^1.16.2",
+ "util-promisify": "^2.1.0"
+ },
+ "engines": {
+ "node": ">= 6"
},
"homepage": "https://github.com/nodejs/readable-stream#readme",
"keywords": [
@@ -87,10 +84,13 @@
"url": "git://github.com/nodejs/readable-stream.git"
},
"scripts": {
- "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "ci": "TAP=1 tap test/parallel/*.js test/ours/*.js | tee test.tap",
"cover": "nyc npm test",
"report": "nyc report --reporter=lcov",
- "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ "test": "tap -j 4 test/parallel/*.js test/ours/*.js",
+ "test-browser-local": "airtap --open --local -- test/browser.js",
+ "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js",
+ "update-browser-errors": "babel -o errors-browser.js errors.js"
},
- "version": "2.3.6"
+ "version": "3.1.1"
}
diff --git a/deps/npm/node_modules/readable-stream/readable.js b/deps/npm/node_modules/readable-stream/readable.js
index ec89ec5330..aeec0df5b3 100644
--- a/deps/npm/node_modules/readable-stream/readable.js
+++ b/deps/npm/node_modules/readable-stream/readable.js
@@ -16,4 +16,6 @@ if (process.env.READABLE_STREAM === 'disable' && Stream) {
exports.Duplex = require('./lib/_stream_duplex.js');
exports.Transform = require('./lib/_stream_transform.js');
exports.PassThrough = require('./lib/_stream_passthrough.js');
+ exports.finished = require('./lib/internal/streams/end-of-stream.js');
+ exports.pipeline = require('./lib/internal/streams/pipeline.js');
}
diff --git a/deps/npm/node_modules/readable-stream/yarn.lock b/deps/npm/node_modules/readable-stream/yarn.lock
new file mode 100644
index 0000000000..e52970fc95
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/yarn.lock
@@ -0,0 +1,6423 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@babel/cli@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.2.0.tgz#505ed8d351daee6a88918da02c046c18c8c5a24f"
+ integrity sha512-FLteTkEoony0DX8NbnT51CmwmLBzINdlXmiJCSqCLmqWCDA/xk8EITPWqwDnVLbuK0bsZONt/grqHnQzQ15j0Q==
+ dependencies:
+ commander "^2.8.1"
+ convert-source-map "^1.1.0"
+ fs-readdir-recursive "^1.1.0"
+ glob "^7.0.0"
+ lodash "^4.17.10"
+ mkdirp "^0.5.1"
+ output-file-sync "^2.0.0"
+ slash "^2.0.0"
+ source-map "^0.5.0"
+ optionalDependencies:
+ chokidar "^2.0.3"
+
+"@babel/code-frame@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8"
+ integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==
+ dependencies:
+ "@babel/highlight" "^7.0.0"
+
+"@babel/core@^7.2.0":
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687"
+ integrity sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ "@babel/generator" "^7.2.2"
+ "@babel/helpers" "^7.2.0"
+ "@babel/parser" "^7.2.2"
+ "@babel/template" "^7.2.2"
+ "@babel/traverse" "^7.2.2"
+ "@babel/types" "^7.2.2"
+ convert-source-map "^1.1.0"
+ debug "^4.1.0"
+ json5 "^2.1.0"
+ lodash "^4.17.10"
+ resolve "^1.3.2"
+ semver "^5.4.1"
+ source-map "^0.5.0"
+
+"@babel/generator@^7.2.2":
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.2.tgz#18c816c70962640eab42fe8cae5f3947a5c65ccc"
+ integrity sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg==
+ dependencies:
+ "@babel/types" "^7.2.2"
+ jsesc "^2.5.1"
+ lodash "^4.17.10"
+ source-map "^0.5.0"
+ trim-right "^1.0.1"
+
+"@babel/helper-annotate-as-pure@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32"
+ integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==
+ dependencies:
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0":
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f"
+ integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==
+ dependencies:
+ "@babel/helper-explode-assignable-expression" "^7.1.0"
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-call-delegate@^7.1.0":
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a"
+ integrity sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ==
+ dependencies:
+ "@babel/helper-hoist-variables" "^7.0.0"
+ "@babel/traverse" "^7.1.0"
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-define-map@^7.1.0":
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c"
+ integrity sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg==
+ dependencies:
+ "@babel/helper-function-name" "^7.1.0"
+ "@babel/types" "^7.0.0"
+ lodash "^4.17.10"
+
+"@babel/helper-explode-assignable-expression@^7.1.0":
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6"
+ integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==
+ dependencies:
+ "@babel/traverse" "^7.1.0"
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-function-name@^7.1.0":
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53"
+ integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==
+ dependencies:
+ "@babel/helper-get-function-arity" "^7.0.0"
+ "@babel/template" "^7.1.0"
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-get-function-arity@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3"
+ integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==
+ dependencies:
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-hoist-variables@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88"
+ integrity sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w==
+ dependencies:
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-member-expression-to-functions@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f"
+ integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==
+ dependencies:
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-module-imports@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d"
+ integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==
+ dependencies:
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-module-transforms@^7.1.0":
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz#ab2f8e8d231409f8370c883d20c335190284b963"
+ integrity sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA==
+ dependencies:
+ "@babel/helper-module-imports" "^7.0.0"
+ "@babel/helper-simple-access" "^7.1.0"
+ "@babel/helper-split-export-declaration" "^7.0.0"
+ "@babel/template" "^7.2.2"
+ "@babel/types" "^7.2.2"
+ lodash "^4.17.10"
+
+"@babel/helper-optimise-call-expression@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5"
+ integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==
+ dependencies:
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-plugin-utils@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250"
+ integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==
+
+"@babel/helper-regex@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27"
+ integrity sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg==
+ dependencies:
+ lodash "^4.17.10"
+
+"@babel/helper-remap-async-to-generator@^7.1.0":
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f"
+ integrity sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.0.0"
+ "@babel/helper-wrap-function" "^7.1.0"
+ "@babel/template" "^7.1.0"
+ "@babel/traverse" "^7.1.0"
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-replace-supers@^7.1.0":
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362"
+ integrity sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ==
+ dependencies:
+ "@babel/helper-member-expression-to-functions" "^7.0.0"
+ "@babel/helper-optimise-call-expression" "^7.0.0"
+ "@babel/traverse" "^7.1.0"
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-simple-access@^7.1.0":
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c"
+ integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==
+ dependencies:
+ "@babel/template" "^7.1.0"
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-split-export-declaration@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813"
+ integrity sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==
+ dependencies:
+ "@babel/types" "^7.0.0"
+
+"@babel/helper-wrap-function@^7.1.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa"
+ integrity sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==
+ dependencies:
+ "@babel/helper-function-name" "^7.1.0"
+ "@babel/template" "^7.1.0"
+ "@babel/traverse" "^7.1.0"
+ "@babel/types" "^7.2.0"
+
+"@babel/helpers@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21"
+ integrity sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A==
+ dependencies:
+ "@babel/template" "^7.1.2"
+ "@babel/traverse" "^7.1.5"
+ "@babel/types" "^7.2.0"
+
+"@babel/highlight@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4"
+ integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==
+ dependencies:
+ chalk "^2.0.0"
+ esutils "^2.0.2"
+ js-tokens "^4.0.0"
+
+"@babel/parser@^7.2.2":
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.2.tgz#37ebdbc88a2e1ebc6c8dd3d35ea9436e3e39e477"
+ integrity sha512-UNTmQ5cSLDeBGBl+s7JeowkqIHgmFAGBnLDdIzFmUNSuS5JF0XBcN59jsh/vJO/YjfsBqMxhMjoFGmNExmf0FA==
+
+"@babel/plugin-proposal-async-generator-functions@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e"
+ integrity sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-remap-async-to-generator" "^7.1.0"
+ "@babel/plugin-syntax-async-generators" "^7.2.0"
+
+"@babel/plugin-proposal-json-strings@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317"
+ integrity sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/plugin-syntax-json-strings" "^7.2.0"
+
+"@babel/plugin-proposal-object-rest-spread@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8"
+ integrity sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/plugin-syntax-object-rest-spread" "^7.2.0"
+
+"@babel/plugin-proposal-optional-catch-binding@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5"
+ integrity sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/plugin-syntax-optional-catch-binding" "^7.2.0"
+
+"@babel/plugin-proposal-unicode-property-regex@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520"
+ integrity sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-regex" "^7.0.0"
+ regexpu-core "^4.2.0"
+
+"@babel/plugin-syntax-async-generators@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f"
+ integrity sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-syntax-json-strings@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470"
+ integrity sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-syntax-object-rest-spread@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e"
+ integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-syntax-optional-catch-binding@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c"
+ integrity sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-arrow-functions@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550"
+ integrity sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-async-to-generator@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff"
+ integrity sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ==
+ dependencies:
+ "@babel/helper-module-imports" "^7.0.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-remap-async-to-generator" "^7.1.0"
+
+"@babel/plugin-transform-block-scoped-functions@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190"
+ integrity sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-block-scoping@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4"
+ integrity sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ lodash "^4.17.10"
+
+"@babel/plugin-transform-classes@^7.2.0", "@babel/plugin-transform-classes@^7.2.2":
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz#6c90542f210ee975aa2aa8c8b5af7fa73a126953"
+ integrity sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.0.0"
+ "@babel/helper-define-map" "^7.1.0"
+ "@babel/helper-function-name" "^7.1.0"
+ "@babel/helper-optimise-call-expression" "^7.0.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-replace-supers" "^7.1.0"
+ "@babel/helper-split-export-declaration" "^7.0.0"
+ globals "^11.1.0"
+
+"@babel/plugin-transform-computed-properties@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da"
+ integrity sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-destructuring@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3"
+ integrity sha512-coVO2Ayv7g0qdDbrNiadE4bU7lvCd9H539m2gMknyVjjMdwF/iCOM7R+E8PkntoqLkltO0rk+3axhpp/0v68VQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-dotall-regex@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49"
+ integrity sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-regex" "^7.0.0"
+ regexpu-core "^4.1.3"
+
+"@babel/plugin-transform-duplicate-keys@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3"
+ integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-exponentiation-operator@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008"
+ integrity sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==
+ dependencies:
+ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-for-of@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9"
+ integrity sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-function-name@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a"
+ integrity sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ==
+ dependencies:
+ "@babel/helper-function-name" "^7.1.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-literals@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1"
+ integrity sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-modules-amd@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6"
+ integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw==
+ dependencies:
+ "@babel/helper-module-transforms" "^7.1.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-modules-commonjs@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404"
+ integrity sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ==
+ dependencies:
+ "@babel/helper-module-transforms" "^7.1.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-simple-access" "^7.1.0"
+
+"@babel/plugin-transform-modules-systemjs@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz#912bfe9e5ff982924c81d0937c92d24994bb9068"
+ integrity sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ==
+ dependencies:
+ "@babel/helper-hoist-variables" "^7.0.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-modules-umd@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae"
+ integrity sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==
+ dependencies:
+ "@babel/helper-module-transforms" "^7.1.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-new-target@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a"
+ integrity sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-object-super@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598"
+ integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-replace-supers" "^7.1.0"
+
+"@babel/plugin-transform-parameters@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2"
+ integrity sha512-kB9+hhUidIgUoBQ0MsxMewhzr8i60nMa2KgeJKQWYrqQpqcBYtnpR+JgkadZVZoaEZ/eKu9mclFaVwhRpLNSzA==
+ dependencies:
+ "@babel/helper-call-delegate" "^7.1.0"
+ "@babel/helper-get-function-arity" "^7.0.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-regenerator@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1"
+ integrity sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw==
+ dependencies:
+ regenerator-transform "^0.13.3"
+
+"@babel/plugin-transform-shorthand-properties@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0"
+ integrity sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-spread@^7.2.0":
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406"
+ integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-sticky-regex@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1"
+ integrity sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-regex" "^7.0.0"
+
+"@babel/plugin-transform-template-literals@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b"
+ integrity sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.0.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-typeof-symbol@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2"
+ integrity sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-unicode-regex@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b"
+ integrity sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-regex" "^7.0.0"
+ regexpu-core "^4.1.3"
+
+"@babel/polyfill@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.0.0.tgz#c8ff65c9ec3be6a1ba10113ebd40e8750fb90bff"
+ integrity sha512-dnrMRkyyr74CRelJwvgnnSUDh2ge2NCTyHVwpOdvRMHtJUyxLtMAfhBN3s64pY41zdw0kgiLPh6S20eb1NcX6Q==
+ dependencies:
+ core-js "^2.5.7"
+ regenerator-runtime "^0.11.1"
+
+"@babel/preset-env@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.0.tgz#a5030e7e4306af5a295dd5d7c78dc5464af3fee2"
+ integrity sha512-haGR38j5vOGVeBatrQPr3l0xHbs14505DcM57cbJy48kgMFvvHHoYEhHuRV+7vi559yyAUAVbTWzbK/B/pzJng==
+ dependencies:
+ "@babel/helper-module-imports" "^7.0.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/plugin-proposal-async-generator-functions" "^7.2.0"
+ "@babel/plugin-proposal-json-strings" "^7.2.0"
+ "@babel/plugin-proposal-object-rest-spread" "^7.2.0"
+ "@babel/plugin-proposal-optional-catch-binding" "^7.2.0"
+ "@babel/plugin-proposal-unicode-property-regex" "^7.2.0"
+ "@babel/plugin-syntax-async-generators" "^7.2.0"
+ "@babel/plugin-syntax-object-rest-spread" "^7.2.0"
+ "@babel/plugin-syntax-optional-catch-binding" "^7.2.0"
+ "@babel/plugin-transform-arrow-functions" "^7.2.0"
+ "@babel/plugin-transform-async-to-generator" "^7.2.0"
+ "@babel/plugin-transform-block-scoped-functions" "^7.2.0"
+ "@babel/plugin-transform-block-scoping" "^7.2.0"
+ "@babel/plugin-transform-classes" "^7.2.0"
+ "@babel/plugin-transform-computed-properties" "^7.2.0"
+ "@babel/plugin-transform-destructuring" "^7.2.0"
+ "@babel/plugin-transform-dotall-regex" "^7.2.0"
+ "@babel/plugin-transform-duplicate-keys" "^7.2.0"
+ "@babel/plugin-transform-exponentiation-operator" "^7.2.0"
+ "@babel/plugin-transform-for-of" "^7.2.0"
+ "@babel/plugin-transform-function-name" "^7.2.0"
+ "@babel/plugin-transform-literals" "^7.2.0"
+ "@babel/plugin-transform-modules-amd" "^7.2.0"
+ "@babel/plugin-transform-modules-commonjs" "^7.2.0"
+ "@babel/plugin-transform-modules-systemjs" "^7.2.0"
+ "@babel/plugin-transform-modules-umd" "^7.2.0"
+ "@babel/plugin-transform-new-target" "^7.0.0"
+ "@babel/plugin-transform-object-super" "^7.2.0"
+ "@babel/plugin-transform-parameters" "^7.2.0"
+ "@babel/plugin-transform-regenerator" "^7.0.0"
+ "@babel/plugin-transform-shorthand-properties" "^7.2.0"
+ "@babel/plugin-transform-spread" "^7.2.0"
+ "@babel/plugin-transform-sticky-regex" "^7.2.0"
+ "@babel/plugin-transform-template-literals" "^7.2.0"
+ "@babel/plugin-transform-typeof-symbol" "^7.2.0"
+ "@babel/plugin-transform-unicode-regex" "^7.2.0"
+ browserslist "^4.3.4"
+ invariant "^2.2.2"
+ js-levenshtein "^1.1.3"
+ semver "^5.3.0"
+
+"@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2":
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907"
+ integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ "@babel/parser" "^7.2.2"
+ "@babel/types" "^7.2.2"
+
+"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2":
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.2.tgz#961039de1f9bcb946d807efe2dba9c92e859d188"
+ integrity sha512-E5Bn9FSwHpSkUhthw/XEuvFZxIgrqb9M8cX8j5EUQtrUG5DQUy6bFyl7G7iQ1D1Czudor+xkmp81JbLVVM0Sjg==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ "@babel/generator" "^7.2.2"
+ "@babel/helper-function-name" "^7.1.0"
+ "@babel/helper-split-export-declaration" "^7.0.0"
+ "@babel/parser" "^7.2.2"
+ "@babel/types" "^7.2.2"
+ debug "^4.1.0"
+ globals "^11.1.0"
+ lodash "^4.17.10"
+
+"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2":
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e"
+ integrity sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==
+ dependencies:
+ esutils "^2.0.2"
+ lodash "^4.17.10"
+ to-fast-properties "^2.0.0"
+
+"@sindresorhus/is@^0.7.0":
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
+ integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==
+
+JSONStream@^1.0.3:
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"
+ integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==
+ dependencies:
+ jsonparse "^1.2.0"
+ through ">=2.2.7 <3"
+
+abbrev@1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
+ integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
+
+accepts@~1.3.5:
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2"
+ integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I=
+ dependencies:
+ mime-types "~2.1.18"
+ negotiator "0.6.1"
+
+acorn-dynamic-import@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948"
+ integrity sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==
+
+acorn-node@^1.2.0, acorn-node@^1.3.0, acorn-node@^1.5.2:
+ version "1.6.2"
+ resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.6.2.tgz#b7d7ceca6f22e6417af933a62cad4de01048d5d2"
+ integrity sha512-rIhNEZuNI8ibQcL7ANm/mGyPukIaZsRNX9psFNQURyJW0nu6k8wjSDld20z6v2mDBWqX13pIEnk9gGZJHIlEXg==
+ dependencies:
+ acorn "^6.0.2"
+ acorn-dynamic-import "^4.0.0"
+ acorn-walk "^6.1.0"
+ xtend "^4.0.1"
+
+acorn-walk@^6.1.0:
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913"
+ integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==
+
+acorn@^5.2.1:
+ version "5.7.3"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
+ integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==
+
+acorn@^6.0.2:
+ version "6.0.4"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.4.tgz#77377e7353b72ec5104550aa2d2097a2fd40b754"
+ integrity sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==
+
+adm-zip@~0.4.x:
+ version "0.4.13"
+ resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.13.tgz#597e2f8cc3672151e1307d3e95cddbc75672314a"
+ integrity sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw==
+
+airtap@0.0.9:
+ version "0.0.9"
+ resolved "https://registry.yarnpkg.com/airtap/-/airtap-0.0.9.tgz#de0b2f3c0b7371ef5fe5c65b179e0de675e4f047"
+ integrity sha512-TlwVCtNx6ylUfSglscKAoP5h2IdygnyjOKT50eftSDYhMfwNRZZwoAzFYimIEW8P/jcOef6VhMfm66ahpRBQ2Q==
+ dependencies:
+ batch "~0.6.1"
+ body-parser "~1.18.3"
+ browserify "~13.3.0"
+ browserify-istanbul "~3.0.1"
+ chalk "^2.3.1"
+ commander "~2.16.0"
+ compression "~1.7.1"
+ convert-source-map "~1.5.1"
+ debug "~3.1.0"
+ express "~4.16.2"
+ express-state "~1.4.0"
+ find-nearest-file "~1.1.0"
+ firefox-profile "~1.1.0"
+ globs-to-files "~1.0.0"
+ hbs "~4.0.1"
+ highlight.js "~9.12.0"
+ http-proxy "~1.17.0"
+ humanize-duration "~3.15.0"
+ load-script "~1.0.0"
+ lodash "~4.17.5"
+ mkdirp "~0.5.1"
+ opener "~1.4.3"
+ sauce-browsers "~2.0.0"
+ server-destroy "~1.0.1"
+ shell-quote "~1.6.1"
+ split2 "^2.2.0"
+ stack-mapper "~0.2.2"
+ stacktrace-js "~2.0.0"
+ superagent "~3.8.2"
+ tap-finished "~0.0.1"
+ tap-parser "~5.4.0"
+ watchify "~3.11.0"
+ wd "~1.10.0"
+ yamljs "~0.3.0"
+
+ajv@^5.1.0:
+ version "5.5.2"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
+ integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=
+ dependencies:
+ co "^4.6.0"
+ fast-deep-equal "^1.0.0"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.3.0"
+
+ajv@^6.5.5:
+ version "6.6.1"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61"
+ integrity sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==
+ dependencies:
+ fast-deep-equal "^2.0.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
+align-text@^0.1.1, align-text@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
+ integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=
+ dependencies:
+ kind-of "^3.0.2"
+ longest "^1.0.1"
+ repeat-string "^1.5.2"
+
+amdefine@>=0.0.4:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
+ integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=
+
+ansi-regex@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
+ integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8=
+
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+ integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
+
+ansi-styles@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+ integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=
+
+ansi-styles@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
+ integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
+ dependencies:
+ color-convert "^1.9.0"
+
+anymatch@^1.3.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a"
+ integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==
+ dependencies:
+ micromatch "^2.1.5"
+ normalize-path "^2.0.0"
+
+anymatch@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"
+ integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==
+ dependencies:
+ micromatch "^3.1.4"
+ normalize-path "^2.1.1"
+
+append-transform@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991"
+ integrity sha1-126/jKlNJ24keja61EpLdKthGZE=
+ dependencies:
+ default-require-extensions "^1.0.0"
+
+aproba@^1.0.3:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
+ integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
+
+archiver-utils@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-1.3.0.tgz#e50b4c09c70bf3d680e32ff1b7994e9f9d895174"
+ integrity sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=
+ dependencies:
+ glob "^7.0.0"
+ graceful-fs "^4.1.0"
+ lazystream "^1.0.0"
+ lodash "^4.8.0"
+ normalize-path "^2.0.0"
+ readable-stream "^2.0.0"
+
+archiver@2.1.1, archiver@~2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/archiver/-/archiver-2.1.1.tgz#ff662b4a78201494a3ee544d3a33fe7496509ebc"
+ integrity sha1-/2YrSnggFJSj7lRNOjP+dJZQnrw=
+ dependencies:
+ archiver-utils "^1.3.0"
+ async "^2.0.0"
+ buffer-crc32 "^0.2.1"
+ glob "^7.0.0"
+ lodash "^4.8.0"
+ readable-stream "^2.0.0"
+ tar-stream "^1.5.0"
+ zip-stream "^1.2.0"
+
+archy@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40"
+ integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=
+
+are-we-there-yet@~1.1.2:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
+ integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==
+ dependencies:
+ delegates "^1.0.0"
+ readable-stream "^2.0.6"
+
+argparse@^1.0.7:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
+ integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
+ dependencies:
+ sprintf-js "~1.0.2"
+
+arr-diff@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
+ integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=
+ dependencies:
+ arr-flatten "^1.0.1"
+
+arr-diff@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
+ integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=
+
+arr-flatten@^1.0.1, arr-flatten@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
+ integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==
+
+arr-union@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
+ integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
+
+array-filter@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
+ integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw=
+
+array-flatten@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
+ integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
+
+array-map@0.0.0, array-map@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662"
+ integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=
+
+array-reduce@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b"
+ integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=
+
+array-uniq@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
+ integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=
+
+array-unique@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
+ integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=
+
+array-unique@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
+ integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
+
+arrify@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
+ integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
+
+asn1.js@^4.0.0:
+ version "4.10.1"
+ resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0"
+ integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==
+ dependencies:
+ bn.js "^4.0.0"
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+
+asn1@~0.2.3:
+ version "0.2.4"
+ resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
+ integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
+ dependencies:
+ safer-buffer "~2.1.0"
+
+assert-plus@1.0.0, assert-plus@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
+ integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
+
+assert@^1.4.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91"
+ integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=
+ dependencies:
+ util "0.10.3"
+
+assign-symbols@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
+ integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
+
+async-each@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d"
+ integrity sha1-GdOGodntxufByF04iu28xW0zYC0=
+
+async@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/async/-/async-2.0.1.tgz#b709cc0280a9c36f09f4536be823c838a9049e25"
+ integrity sha1-twnMAoCpw28J9FNr6CPIOKkEniU=
+ dependencies:
+ lodash "^4.8.0"
+
+async@^1.4.0:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
+ integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=
+
+async@^2.0.0, async@^2.5.0:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610"
+ integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==
+ dependencies:
+ lodash "^4.17.10"
+
+async@~2.5.0:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d"
+ integrity sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==
+ dependencies:
+ lodash "^4.14.0"
+
+asynckit@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+ integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
+
+asyncreduce@~0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/asyncreduce/-/asyncreduce-0.1.4.tgz#18210e01978bfdcba043955497a5cd315c0a6a41"
+ integrity sha1-GCEOAZeL/cugQ5VUl6XNMVwKakE=
+ dependencies:
+ runnel "~0.5.0"
+
+atob@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
+ integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
+
+aws-sign2@~0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
+ integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
+
+aws4@^1.6.0, aws4@^1.8.0:
+ version "1.8.0"
+ resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
+ integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==
+
+babel-code-frame@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
+ integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=
+ dependencies:
+ chalk "^1.1.3"
+ esutils "^2.0.2"
+ js-tokens "^3.0.2"
+
+babel-generator@^6.18.0:
+ version "6.26.1"
+ resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
+ integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==
+ dependencies:
+ babel-messages "^6.23.0"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ detect-indent "^4.0.0"
+ jsesc "^1.3.0"
+ lodash "^4.17.4"
+ source-map "^0.5.7"
+ trim-right "^1.0.1"
+
+babel-messages@^6.23.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
+ integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-runtime@^6.22.0, babel-runtime@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
+ integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4=
+ dependencies:
+ core-js "^2.4.0"
+ regenerator-runtime "^0.11.0"
+
+babel-template@^6.16.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
+ integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=
+ dependencies:
+ babel-runtime "^6.26.0"
+ babel-traverse "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ lodash "^4.17.4"
+
+babel-traverse@^6.18.0, babel-traverse@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
+ integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=
+ dependencies:
+ babel-code-frame "^6.26.0"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ debug "^2.6.8"
+ globals "^9.18.0"
+ invariant "^2.2.2"
+ lodash "^4.17.4"
+
+babel-types@^6.18.0, babel-types@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
+ integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=
+ dependencies:
+ babel-runtime "^6.26.0"
+ esutils "^2.0.2"
+ lodash "^4.17.4"
+ to-fast-properties "^1.0.3"
+
+babylon@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
+ integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+ integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
+
+base64-js@^1.0.2:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3"
+ integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==
+
+base@^0.11.1:
+ version "0.11.2"
+ resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
+ integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==
+ dependencies:
+ cache-base "^1.0.1"
+ class-utils "^0.3.5"
+ component-emitter "^1.2.1"
+ define-property "^1.0.0"
+ isobject "^3.0.1"
+ mixin-deep "^1.2.0"
+ pascalcase "^0.1.1"
+
+batch@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16"
+ integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=
+
+bcrypt-pbkdf@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
+ integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
+ dependencies:
+ tweetnacl "^0.14.3"
+
+binary-extensions@^1.0.0:
+ version "1.12.0"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14"
+ integrity sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==
+
+bind-obj-methods@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/bind-obj-methods/-/bind-obj-methods-2.0.0.tgz#0178140dbe7b7bb67dc74892ace59bc0247f06f0"
+ integrity sha512-3/qRXczDi2Cdbz6jE+W3IflJOutRVica8frpBn14de1mBOkzDo+6tY33kNhvkw54Kn3PzRRD2VnGbGPcTAk4sw==
+
+bl@^1.0.0:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c"
+ integrity sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==
+ dependencies:
+ readable-stream "^2.3.5"
+ safe-buffer "^5.1.1"
+
+bl@^2.0.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/bl/-/bl-2.1.2.tgz#591182cb9f3f2eff3beb1e76dabedfb5c5fa9a26"
+ integrity sha512-DvC0x+PxmSJNx8wXoFV15pC2+GOJ3ohb4F1REq3X32a2Z3nEBpR1Guu740M7ouYAImFj4BXDNilLNZbygtG9lQ==
+ dependencies:
+ readable-stream "^2.3.5"
+ safe-buffer "^5.1.1"
+
+bluebird@^3.5.1:
+ version "3.5.3"
+ resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7"
+ integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==
+
+bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
+ version "4.11.8"
+ resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
+ integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==
+
+body-parser@1.18.3, body-parser@~1.18.3:
+ version "1.18.3"
+ resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4"
+ integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=
+ dependencies:
+ bytes "3.0.0"
+ content-type "~1.0.4"
+ debug "2.6.9"
+ depd "~1.1.2"
+ http-errors "~1.6.3"
+ iconv-lite "0.4.23"
+ on-finished "~2.3.0"
+ qs "6.5.2"
+ raw-body "2.3.3"
+ type-is "~1.6.16"
+
+boom@4.x.x:
+ version "4.3.1"
+ resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31"
+ integrity sha1-T4owBctKfjiJ90kDD9JbluAdLjE=
+ dependencies:
+ hoek "4.x.x"
+
+boom@5.x.x:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02"
+ integrity sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==
+ dependencies:
+ hoek "4.x.x"
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^1.8.2:
+ version "1.8.5"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
+ integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=
+ dependencies:
+ expand-range "^1.8.1"
+ preserve "^0.2.0"
+ repeat-element "^1.1.2"
+
+braces@^2.3.0, braces@^2.3.1:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
+ integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==
+ dependencies:
+ arr-flatten "^1.1.0"
+ array-unique "^0.3.2"
+ extend-shallow "^2.0.1"
+ fill-range "^4.0.0"
+ isobject "^3.0.1"
+ repeat-element "^1.1.2"
+ snapdragon "^0.8.1"
+ snapdragon-node "^2.0.1"
+ split-string "^3.0.2"
+ to-regex "^3.0.1"
+
+brorand@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
+ integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
+
+browser-pack@^6.0.1:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.1.0.tgz#c34ba10d0b9ce162b5af227c7131c92c2ecd5774"
+ integrity sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==
+ dependencies:
+ JSONStream "^1.0.3"
+ combine-source-map "~0.8.0"
+ defined "^1.0.0"
+ safe-buffer "^5.1.1"
+ through2 "^2.0.0"
+ umd "^3.0.0"
+
+browser-resolve@^1.11.0, browser-resolve@^1.7.0:
+ version "1.11.3"
+ resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6"
+ integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==
+ dependencies:
+ resolve "1.1.7"
+
+browserify-aes@^1.0.0, browserify-aes@^1.0.4:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48"
+ integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==
+ dependencies:
+ buffer-xor "^1.0.3"
+ cipher-base "^1.0.0"
+ create-hash "^1.1.0"
+ evp_bytestokey "^1.0.3"
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+browserify-cipher@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0"
+ integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==
+ dependencies:
+ browserify-aes "^1.0.4"
+ browserify-des "^1.0.0"
+ evp_bytestokey "^1.0.0"
+
+browserify-des@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c"
+ integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==
+ dependencies:
+ cipher-base "^1.0.1"
+ des.js "^1.0.0"
+ inherits "^2.0.1"
+ safe-buffer "^5.1.2"
+
+browserify-istanbul@~3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/browserify-istanbul/-/browserify-istanbul-3.0.1.tgz#1a2dd63c0c81a12391a80a466fbef917eb12de07"
+ integrity sha1-Gi3WPAyBoSORqApGb775F+sS3gc=
+ dependencies:
+ istanbul-lib-instrument "^1.8.0"
+ minimatch "^3.0.4"
+ object-assign "^4.1.1"
+ through "^2.3.8"
+
+browserify-rsa@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524"
+ integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=
+ dependencies:
+ bn.js "^4.1.0"
+ randombytes "^2.0.1"
+
+browserify-sign@^4.0.0:
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298"
+ integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=
+ dependencies:
+ bn.js "^4.1.1"
+ browserify-rsa "^4.0.0"
+ create-hash "^1.1.0"
+ create-hmac "^1.1.2"
+ elliptic "^6.0.0"
+ inherits "^2.0.1"
+ parse-asn1 "^5.0.0"
+
+browserify-zlib@^0.1.4, browserify-zlib@~0.1.2:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d"
+ integrity sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=
+ dependencies:
+ pako "~0.2.0"
+
+browserify-zlib@~0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f"
+ integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==
+ dependencies:
+ pako "~1.0.5"
+
+browserify@^16.1.0:
+ version "16.2.3"
+ resolved "https://registry.yarnpkg.com/browserify/-/browserify-16.2.3.tgz#7ee6e654ba4f92bce6ab3599c3485b1cc7a0ad0b"
+ integrity sha512-zQt/Gd1+W+IY+h/xX2NYMW4orQWhqSwyV+xsblycTtpOuB27h1fZhhNQuipJ4t79ohw4P4mMem0jp/ZkISQtjQ==
+ dependencies:
+ JSONStream "^1.0.3"
+ assert "^1.4.0"
+ browser-pack "^6.0.1"
+ browser-resolve "^1.11.0"
+ browserify-zlib "~0.2.0"
+ buffer "^5.0.2"
+ cached-path-relative "^1.0.0"
+ concat-stream "^1.6.0"
+ console-browserify "^1.1.0"
+ constants-browserify "~1.0.0"
+ crypto-browserify "^3.0.0"
+ defined "^1.0.0"
+ deps-sort "^2.0.0"
+ domain-browser "^1.2.0"
+ duplexer2 "~0.1.2"
+ events "^2.0.0"
+ glob "^7.1.0"
+ has "^1.0.0"
+ htmlescape "^1.1.0"
+ https-browserify "^1.0.0"
+ inherits "~2.0.1"
+ insert-module-globals "^7.0.0"
+ labeled-stream-splicer "^2.0.0"
+ mkdirp "^0.5.0"
+ module-deps "^6.0.0"
+ os-browserify "~0.3.0"
+ parents "^1.0.1"
+ path-browserify "~0.0.0"
+ process "~0.11.0"
+ punycode "^1.3.2"
+ querystring-es3 "~0.2.0"
+ read-only-stream "^2.0.0"
+ readable-stream "^2.0.2"
+ resolve "^1.1.4"
+ shasum "^1.0.0"
+ shell-quote "^1.6.1"
+ stream-browserify "^2.0.0"
+ stream-http "^2.0.0"
+ string_decoder "^1.1.1"
+ subarg "^1.0.0"
+ syntax-error "^1.1.1"
+ through2 "^2.0.0"
+ timers-browserify "^1.0.1"
+ tty-browserify "0.0.1"
+ url "~0.11.0"
+ util "~0.10.1"
+ vm-browserify "^1.0.0"
+ xtend "^4.0.0"
+
+browserify@~13.3.0:
+ version "13.3.0"
+ resolved "https://registry.yarnpkg.com/browserify/-/browserify-13.3.0.tgz#b5a9c9020243f0c70e4675bec8223bc627e415ce"
+ integrity sha1-tanJAgJD8McORnW+yCI7xifkFc4=
+ dependencies:
+ JSONStream "^1.0.3"
+ assert "^1.4.0"
+ browser-pack "^6.0.1"
+ browser-resolve "^1.11.0"
+ browserify-zlib "~0.1.2"
+ buffer "^4.1.0"
+ cached-path-relative "^1.0.0"
+ concat-stream "~1.5.1"
+ console-browserify "^1.1.0"
+ constants-browserify "~1.0.0"
+ crypto-browserify "^3.0.0"
+ defined "^1.0.0"
+ deps-sort "^2.0.0"
+ domain-browser "~1.1.0"
+ duplexer2 "~0.1.2"
+ events "~1.1.0"
+ glob "^7.1.0"
+ has "^1.0.0"
+ htmlescape "^1.1.0"
+ https-browserify "~0.0.0"
+ inherits "~2.0.1"
+ insert-module-globals "^7.0.0"
+ labeled-stream-splicer "^2.0.0"
+ module-deps "^4.0.8"
+ os-browserify "~0.1.1"
+ parents "^1.0.1"
+ path-browserify "~0.0.0"
+ process "~0.11.0"
+ punycode "^1.3.2"
+ querystring-es3 "~0.2.0"
+ read-only-stream "^2.0.0"
+ readable-stream "^2.0.2"
+ resolve "^1.1.4"
+ shasum "^1.0.0"
+ shell-quote "^1.6.1"
+ stream-browserify "^2.0.0"
+ stream-http "^2.0.0"
+ string_decoder "~0.10.0"
+ subarg "^1.0.0"
+ syntax-error "^1.1.1"
+ through2 "^2.0.0"
+ timers-browserify "^1.0.1"
+ tty-browserify "~0.0.0"
+ url "~0.11.0"
+ util "~0.10.1"
+ vm-browserify "~0.0.1"
+ xtend "^4.0.0"
+
+browserslist@^4.3.4:
+ version "4.3.6"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.6.tgz#0f9d9081afc66b36f477c6bdf3813f784f42396a"
+ integrity sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw==
+ dependencies:
+ caniuse-lite "^1.0.30000921"
+ electron-to-chromium "^1.3.92"
+ node-releases "^1.1.1"
+
+buf-compare@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/buf-compare/-/buf-compare-1.0.1.tgz#fef28da8b8113a0a0db4430b0b6467b69730b34a"
+ integrity sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=
+
+buffer-alloc-unsafe@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
+ integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==
+
+buffer-alloc@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec"
+ integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==
+ dependencies:
+ buffer-alloc-unsafe "^1.1.0"
+ buffer-fill "^1.0.0"
+
+buffer-crc32@^0.2.1:
+ version "0.2.13"
+ resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
+ integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=
+
+buffer-fill@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
+ integrity sha1-+PeLdniYiO858gXNY39o5wISKyw=
+
+buffer-from@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.2.tgz#15f4b9bcef012044df31142c14333caf6e0260d0"
+ integrity sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg==
+
+buffer-from@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
+ integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
+
+buffer-xor@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
+ integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=
+
+buffer@^4.1.0:
+ version "4.9.1"
+ resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298"
+ integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=
+ dependencies:
+ base64-js "^1.0.2"
+ ieee754 "^1.1.4"
+ isarray "^1.0.0"
+
+buffer@^5.0.2, buffer@^5.1.0:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.1.tgz#dd57fa0f109ac59c602479044dca7b8b3d0b71d6"
+ integrity sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==
+ dependencies:
+ base64-js "^1.0.2"
+ ieee754 "^1.1.4"
+
+builtin-modules@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
+ integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=
+
+builtin-status-codes@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
+ integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=
+
+bytes@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
+ integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=
+
+cache-base@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
+ integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==
+ dependencies:
+ collection-visit "^1.0.0"
+ component-emitter "^1.2.1"
+ get-value "^2.0.6"
+ has-value "^1.0.0"
+ isobject "^3.0.1"
+ set-value "^2.0.0"
+ to-object-path "^0.3.0"
+ union-value "^1.0.0"
+ unset-value "^1.0.0"
+
+cacheable-request@^2.1.1:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d"
+ integrity sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=
+ dependencies:
+ clone-response "1.0.2"
+ get-stream "3.0.0"
+ http-cache-semantics "3.8.1"
+ keyv "3.0.0"
+ lowercase-keys "1.0.0"
+ normalize-url "2.0.1"
+ responselike "1.0.2"
+
+cached-path-relative@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.2.tgz#a13df4196d26776220cc3356eb147a52dba2c6db"
+ integrity sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==
+
+caching-transform@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1"
+ integrity sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=
+ dependencies:
+ md5-hex "^1.2.0"
+ mkdirp "^0.5.1"
+ write-file-atomic "^1.1.4"
+
+camelcase@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+ integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=
+
+camelcase@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
+ integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=
+
+caniuse-lite@^1.0.30000921:
+ version "1.0.30000921"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000921.tgz#7a607c1623444b22351d834e093aedda3c42fbe8"
+ integrity sha512-Bu09ciy0lMWLgpYC77I0YGuI8eFRBPPzaSOYJK1jTI64txCphYCqnWbxJYjHABYVt/TYX/p3jNjLBR87u1Bfpw==
+
+caseless@~0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
+ integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
+
+center-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+ integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60=
+ dependencies:
+ align-text "^0.1.3"
+ lazy-cache "^1.0.3"
+
+chalk@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
+ integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=
+ dependencies:
+ ansi-styles "^2.2.1"
+ escape-string-regexp "^1.0.2"
+ has-ansi "^2.0.0"
+ strip-ansi "^3.0.0"
+ supports-color "^2.0.0"
+
+chalk@^2.0.0, chalk@^2.3.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
+ integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==
+ dependencies:
+ ansi-styles "^3.2.1"
+ escape-string-regexp "^1.0.5"
+ supports-color "^5.3.0"
+
+chokidar@^1.0.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
+ integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=
+ dependencies:
+ anymatch "^1.3.0"
+ async-each "^1.0.0"
+ glob-parent "^2.0.0"
+ inherits "^2.0.1"
+ is-binary-path "^1.0.0"
+ is-glob "^2.0.0"
+ path-is-absolute "^1.0.0"
+ readdirp "^2.0.0"
+ optionalDependencies:
+ fsevents "^1.0.0"
+
+chokidar@^2.0.3:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26"
+ integrity sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==
+ dependencies:
+ anymatch "^2.0.0"
+ async-each "^1.0.0"
+ braces "^2.3.0"
+ glob-parent "^3.1.0"
+ inherits "^2.0.1"
+ is-binary-path "^1.0.0"
+ is-glob "^4.0.0"
+ lodash.debounce "^4.0.8"
+ normalize-path "^2.1.1"
+ path-is-absolute "^1.0.0"
+ readdirp "^2.0.0"
+ upath "^1.0.5"
+ optionalDependencies:
+ fsevents "^1.2.2"
+
+chownr@^1.0.1, chownr@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494"
+ integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==
+
+cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de"
+ integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==
+ dependencies:
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+class-utils@^0.3.5:
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
+ integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==
+ dependencies:
+ arr-union "^3.1.0"
+ define-property "^0.2.5"
+ isobject "^3.0.0"
+ static-extend "^0.1.1"
+
+clean-yaml-object@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz#63fb110dc2ce1a84dc21f6d9334876d010ae8b68"
+ integrity sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=
+
+cliui@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
+ integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=
+ dependencies:
+ center-align "^0.1.1"
+ right-align "^0.1.1"
+ wordwrap "0.0.2"
+
+cliui@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49"
+ integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==
+ dependencies:
+ string-width "^2.1.1"
+ strip-ansi "^4.0.0"
+ wrap-ansi "^2.0.0"
+
+clone-response@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
+ integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
+ dependencies:
+ mimic-response "^1.0.0"
+
+co@^4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
+ integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=
+
+code-point-at@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+ integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
+
+collection-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
+ integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=
+ dependencies:
+ map-visit "^1.0.0"
+ object-visit "^1.0.0"
+
+color-convert@^1.9.0:
+ version "1.9.3"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
+ integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
+ dependencies:
+ color-name "1.1.3"
+
+color-name@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+ integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+
+color-support@^1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
+ integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
+
+combine-source-map@^0.8.0, combine-source-map@~0.8.0:
+ version "0.8.0"
+ resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.8.0.tgz#a58d0df042c186fcf822a8e8015f5450d2d79a8b"
+ integrity sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=
+ dependencies:
+ convert-source-map "~1.1.0"
+ inline-source-map "~0.6.0"
+ lodash.memoize "~3.0.3"
+ source-map "~0.5.3"
+
+combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828"
+ integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==
+ dependencies:
+ delayed-stream "~1.0.0"
+
+commander@^2.8.1:
+ version "2.19.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
+ integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==
+
+commander@~2.16.0:
+ version "2.16.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50"
+ integrity sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==
+
+commander@~2.17.1:
+ version "2.17.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
+ integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==
+
+commondir@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
+ integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=
+
+component-emitter@^1.2.0, component-emitter@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
+ integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=
+
+compress-commons@^1.2.0:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-1.2.2.tgz#524a9f10903f3a813389b0225d27c48bb751890f"
+ integrity sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=
+ dependencies:
+ buffer-crc32 "^0.2.1"
+ crc32-stream "^2.0.0"
+ normalize-path "^2.0.0"
+ readable-stream "^2.0.0"
+
+compressible@~2.0.14:
+ version "2.0.15"
+ resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.15.tgz#857a9ab0a7e5a07d8d837ed43fe2defff64fe212"
+ integrity sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw==
+ dependencies:
+ mime-db ">= 1.36.0 < 2"
+
+compression@~1.7.1:
+ version "1.7.3"
+ resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db"
+ integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==
+ dependencies:
+ accepts "~1.3.5"
+ bytes "3.0.0"
+ compressible "~2.0.14"
+ debug "2.6.9"
+ on-headers "~1.0.1"
+ safe-buffer "5.1.2"
+ vary "~1.1.2"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
+
+concat-stream@^1.6.0, concat-stream@^1.6.1, concat-stream@~1.6.0:
+ version "1.6.2"
+ resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
+ integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==
+ dependencies:
+ buffer-from "^1.0.0"
+ inherits "^2.0.3"
+ readable-stream "^2.2.2"
+ typedarray "^0.0.6"
+
+concat-stream@~1.5.0, concat-stream@~1.5.1:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266"
+ integrity sha1-cIl4Yk2FavQaWnQd790mHadSwmY=
+ dependencies:
+ inherits "~2.0.1"
+ readable-stream "~2.0.0"
+ typedarray "~0.0.5"
+
+console-browserify@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
+ integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=
+ dependencies:
+ date-now "^0.1.4"
+
+console-control-strings@^1.0.0, console-control-strings@~1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
+ integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
+
+constants-browserify@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
+ integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=
+
+content-disposition@0.5.2:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4"
+ integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ=
+
+content-type@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
+ integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
+
+convert-source-map@^1.1.0, convert-source-map@^1.5.1:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
+ integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==
+ dependencies:
+ safe-buffer "~5.1.1"
+
+convert-source-map@~1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860"
+ integrity sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=
+
+convert-source-map@~1.5.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"
+ integrity sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=
+
+cookie-signature@1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
+ integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
+
+cookie@0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
+ integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=
+
+cookiejar@^2.1.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c"
+ integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==
+
+copy-descriptor@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
+ integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
+
+core-assert@^0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/core-assert/-/core-assert-0.2.1.tgz#f85e2cf9bfed28f773cc8b3fa5c5b69bdc02fe3f"
+ integrity sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=
+ dependencies:
+ buf-compare "^1.0.0"
+ is-error "^2.2.0"
+
+core-js@^2.4.0, core-js@^2.5.7:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.0.tgz#1e30793e9ee5782b307e37ffa22da0eacddd84d4"
+ integrity sha512-kLRC6ncVpuEW/1kwrOXYX6KQASCVtrh1gQr/UiaVgFlf9WE5Vp+lNe5+h3LuMr5PAucWnnEXwH0nQHRH/gpGtw==
+
+core-util-is@1.0.2, core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+ integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
+
+coveralls@^3.0.1:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.2.tgz#f5a0bcd90ca4e64e088b710fa8dda640aea4884f"
+ integrity sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw==
+ dependencies:
+ growl "~> 1.10.0"
+ js-yaml "^3.11.0"
+ lcov-parse "^0.0.10"
+ log-driver "^1.2.7"
+ minimist "^1.2.0"
+ request "^2.85.0"
+
+crc32-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-2.0.0.tgz#e3cdd3b4df3168dd74e3de3fbbcb7b297fe908f4"
+ integrity sha1-483TtN8xaN10494/u8t7KX/pCPQ=
+ dependencies:
+ crc "^3.4.4"
+ readable-stream "^2.0.0"
+
+crc@^3.4.4:
+ version "3.8.0"
+ resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6"
+ integrity sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==
+ dependencies:
+ buffer "^5.1.0"
+
+create-ecdh@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff"
+ integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==
+ dependencies:
+ bn.js "^4.1.0"
+ elliptic "^6.0.0"
+
+create-hash@^1.1.0, create-hash@^1.1.2:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196"
+ integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==
+ dependencies:
+ cipher-base "^1.0.1"
+ inherits "^2.0.1"
+ md5.js "^1.3.4"
+ ripemd160 "^2.0.1"
+ sha.js "^2.4.0"
+
+create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff"
+ integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==
+ dependencies:
+ cipher-base "^1.0.3"
+ create-hash "^1.1.0"
+ inherits "^2.0.1"
+ ripemd160 "^2.0.0"
+ safe-buffer "^5.0.1"
+ sha.js "^2.4.8"
+
+cross-spawn@^4:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
+ integrity sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=
+ dependencies:
+ lru-cache "^4.0.1"
+ which "^1.2.9"
+
+cross-spawn@^5.0.1:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
+ integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=
+ dependencies:
+ lru-cache "^4.0.1"
+ shebang-command "^1.2.0"
+ which "^1.2.9"
+
+cryptiles@3.x.x:
+ version "3.1.4"
+ resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.4.tgz#769a68c95612b56faadfcebf57ac86479cbe8322"
+ integrity sha512-8I1sgZHfVwcSOY6mSGpVU3lw/GSIZvusg8dD2+OGehCJpOhQRLNcH0qb9upQnOH4XhgxxFJSg6E2kx95deb1Tw==
+ dependencies:
+ boom "5.x.x"
+
+crypto-browserify@^3.0.0:
+ version "3.12.0"
+ resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
+ integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==
+ dependencies:
+ browserify-cipher "^1.0.0"
+ browserify-sign "^4.0.0"
+ create-ecdh "^4.0.0"
+ create-hash "^1.1.0"
+ create-hmac "^1.1.0"
+ diffie-hellman "^5.0.0"
+ inherits "^2.0.1"
+ pbkdf2 "^3.0.3"
+ public-encrypt "^4.0.0"
+ randombytes "^2.0.0"
+ randomfill "^1.0.3"
+
+dashdash@^1.12.0:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
+ integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
+ dependencies:
+ assert-plus "^1.0.0"
+
+date-now@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
+ integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=
+
+debug-log@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f"
+ integrity sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=
+
+debug@2.6.9, debug@^2.1.2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+debug@=3.1.0, debug@~3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
+ integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
+ dependencies:
+ ms "2.0.0"
+
+debug@^3.1.0:
+ version "3.2.6"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
+ integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
+ dependencies:
+ ms "^2.1.1"
+
+debug@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87"
+ integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==
+ dependencies:
+ ms "^2.1.1"
+
+decamelize@^1.0.0, decamelize@^1.1.1:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+ integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
+
+decode-uri-component@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
+ integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
+
+decompress-response@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
+ integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
+ dependencies:
+ mimic-response "^1.0.0"
+
+deep-equal@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
+ integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=
+
+deep-extend@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
+ integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
+
+deep-strict-equal@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz#4a078147a8ab57f6a0d4f5547243cd22f44eb4e4"
+ integrity sha1-SgeBR6irV/ag1PVUckPNIvROtOQ=
+ dependencies:
+ core-assert "^0.2.0"
+
+default-require-extensions@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8"
+ integrity sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=
+ dependencies:
+ strip-bom "^2.0.0"
+
+define-properties@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
+ integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
+ dependencies:
+ object-keys "^1.0.12"
+
+define-property@^0.2.5:
+ version "0.2.5"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
+ integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=
+ dependencies:
+ is-descriptor "^0.1.0"
+
+define-property@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
+ integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY=
+ dependencies:
+ is-descriptor "^1.0.0"
+
+define-property@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
+ integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==
+ dependencies:
+ is-descriptor "^1.0.2"
+ isobject "^3.0.1"
+
+defined@^1.0.0, defined@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
+ integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+ integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
+
+delegates@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
+ integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
+
+depd@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
+ integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
+
+deps-sort@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5"
+ integrity sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=
+ dependencies:
+ JSONStream "^1.0.3"
+ shasum "^1.0.0"
+ subarg "^1.0.0"
+ through2 "^2.0.0"
+
+des.js@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc"
+ integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=
+ dependencies:
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+
+destroy@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
+ integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
+
+detect-indent@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
+ integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg=
+ dependencies:
+ repeating "^2.0.0"
+
+detect-libc@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
+ integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
+
+detective@^4.0.0:
+ version "4.7.1"
+ resolved "https://registry.yarnpkg.com/detective/-/detective-4.7.1.tgz#0eca7314338442febb6d65da54c10bb1c82b246e"
+ integrity sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==
+ dependencies:
+ acorn "^5.2.1"
+ defined "^1.0.0"
+
+detective@^5.0.2:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/detective/-/detective-5.1.0.tgz#7a20d89236d7b331ccea65832e7123b5551bb7cb"
+ integrity sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ==
+ dependencies:
+ acorn-node "^1.3.0"
+ defined "^1.0.0"
+ minimist "^1.1.1"
+
+diff@^1.3.2:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf"
+ integrity sha1-fyjS657nsVqX79ic5j3P2qPMur8=
+
+diffie-hellman@^5.0.0:
+ version "5.0.3"
+ resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
+ integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==
+ dependencies:
+ bn.js "^4.1.0"
+ miller-rabin "^4.0.0"
+ randombytes "^2.0.0"
+
+domain-browser@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
+ integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==
+
+domain-browser@~1.1.0:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
+ integrity sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=
+
+duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
+ integrity sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=
+ dependencies:
+ readable-stream "^2.0.2"
+
+duplexer2@~0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db"
+ integrity sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=
+ dependencies:
+ readable-stream "~1.1.9"
+
+duplexer3@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
+ integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
+
+duplexify@^3.5.0, duplexify@^3.6.0:
+ version "3.6.1"
+ resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.1.tgz#b1a7a29c4abfd639585efaecce80d666b1e34125"
+ integrity sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA==
+ dependencies:
+ end-of-stream "^1.0.0"
+ inherits "^2.0.1"
+ readable-stream "^2.0.0"
+ stream-shift "^1.0.0"
+
+ecc-jsbn@~0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
+ integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
+ dependencies:
+ jsbn "~0.1.0"
+ safer-buffer "^2.1.0"
+
+ee-first@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
+ integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
+
+electron-to-chromium@^1.3.92:
+ version "1.3.92"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.92.tgz#9027b5abaea400045edd652c0e4838675c814399"
+ integrity sha512-En051LMzMl3/asMWGZEtU808HOoVWIpmmZx1Ep8N+TT9e7z/X8RcLeBU2kLSNLGQ+5SuKELzMx+MVuTBXk6Q9w==
+
+elliptic@^6.0.0:
+ version "6.4.1"
+ resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a"
+ integrity sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==
+ dependencies:
+ bn.js "^4.4.0"
+ brorand "^1.0.1"
+ hash.js "^1.0.0"
+ hmac-drbg "^1.0.0"
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+ minimalistic-crypto-utils "^1.0.0"
+
+encodeurl@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
+ integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
+
+end-of-stream@^1.0.0, end-of-stream@^1.1.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43"
+ integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==
+ dependencies:
+ once "^1.4.0"
+
+error-ex@^1.2.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
+ integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
+ dependencies:
+ is-arrayish "^0.2.1"
+
+error-stack-parser@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.2.tgz#4ae8dbaa2bf90a8b450707b9149dcabca135520d"
+ integrity sha512-E1fPutRDdIj/hohG0UpT5mayXNCxXP9d+snxFsPU9X0XgccOumKraa3juDMwTUyi7+Bu5+mCGagjg4IYeNbOdw==
+ dependencies:
+ stackframe "^1.0.4"
+
+es-abstract@^1.5.0, es-abstract@^1.5.1:
+ version "1.12.0"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165"
+ integrity sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==
+ dependencies:
+ es-to-primitive "^1.1.1"
+ function-bind "^1.1.1"
+ has "^1.0.1"
+ is-callable "^1.1.3"
+ is-regex "^1.0.4"
+
+es-to-primitive@^1.1.1:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377"
+ integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==
+ dependencies:
+ is-callable "^1.1.4"
+ is-date-object "^1.0.1"
+ is-symbol "^1.0.2"
+
+escape-html@~1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
+ integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
+
+escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.3, escape-string-regexp@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+ integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
+
+esprima@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
+ integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
+
+esutils@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
+ integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=
+
+etag@~1.8.1:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
+ integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
+
+eventemitter3@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163"
+ integrity sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==
+
+events-to-array@^1.0.1:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/events-to-array/-/events-to-array-1.1.2.tgz#2d41f563e1fe400ed4962fe1a4d5c6a7539df7f6"
+ integrity sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=
+
+events@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/events/-/events-2.1.0.tgz#2a9a1e18e6106e0e812aa9ebd4a819b3c29c0ba5"
+ integrity sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==
+
+events@~1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
+ integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=
+
+evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02"
+ integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==
+ dependencies:
+ md5.js "^1.3.4"
+ safe-buffer "^5.1.1"
+
+execa@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
+ integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=
+ dependencies:
+ cross-spawn "^5.0.1"
+ get-stream "^3.0.0"
+ is-stream "^1.1.0"
+ npm-run-path "^2.0.0"
+ p-finally "^1.0.0"
+ signal-exit "^3.0.0"
+ strip-eof "^1.0.0"
+
+expand-brackets@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
+ integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=
+ dependencies:
+ is-posix-bracket "^0.1.0"
+
+expand-brackets@^2.1.4:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
+ integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI=
+ dependencies:
+ debug "^2.3.3"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ posix-character-classes "^0.1.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+expand-range@^1.8.1:
+ version "1.8.2"
+ resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
+ integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=
+ dependencies:
+ fill-range "^2.1.0"
+
+express-state@~1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/express-state/-/express-state-1.4.0.tgz#3ae100132ae11fdfef836fe190cab7ba729d227d"
+ integrity sha1-OuEAEyrhH9/vg2/hkMq3unKdIn0=
+ dependencies:
+ serialize-javascript "^1.1.0"
+
+express@~4.16.2:
+ version "4.16.4"
+ resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e"
+ integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==
+ dependencies:
+ accepts "~1.3.5"
+ array-flatten "1.1.1"
+ body-parser "1.18.3"
+ content-disposition "0.5.2"
+ content-type "~1.0.4"
+ cookie "0.3.1"
+ cookie-signature "1.0.6"
+ debug "2.6.9"
+ depd "~1.1.2"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ finalhandler "1.1.1"
+ fresh "0.5.2"
+ merge-descriptors "1.0.1"
+ methods "~1.1.2"
+ on-finished "~2.3.0"
+ parseurl "~1.3.2"
+ path-to-regexp "0.1.7"
+ proxy-addr "~2.0.4"
+ qs "6.5.2"
+ range-parser "~1.2.0"
+ safe-buffer "5.1.2"
+ send "0.16.2"
+ serve-static "1.13.2"
+ setprototypeof "1.1.0"
+ statuses "~1.4.0"
+ type-is "~1.6.16"
+ utils-merge "1.0.1"
+ vary "~1.1.2"
+
+extend-shallow@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+ integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=
+ dependencies:
+ is-extendable "^0.1.0"
+
+extend-shallow@^3.0.0, extend-shallow@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
+ integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=
+ dependencies:
+ assign-symbols "^1.0.0"
+ is-extendable "^1.0.1"
+
+extend@^3.0.0, extend@~3.0.1, extend@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
+ integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
+
+extglob@^0.3.1:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
+ integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=
+ dependencies:
+ is-extglob "^1.0.0"
+
+extglob@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
+ integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==
+ dependencies:
+ array-unique "^0.3.2"
+ define-property "^1.0.0"
+ expand-brackets "^2.1.4"
+ extend-shallow "^2.0.1"
+ fragment-cache "^0.2.1"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+extsprintf@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
+ integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
+
+extsprintf@^1.2.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
+ integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
+
+fast-deep-equal@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
+ integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=
+
+fast-deep-equal@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
+ integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
+
+fast-json-stable-stringify@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
+ integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I=
+
+filename-regex@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
+ integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=
+
+fill-range@^2.1.0:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
+ integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==
+ dependencies:
+ is-number "^2.1.0"
+ isobject "^2.0.0"
+ randomatic "^3.0.0"
+ repeat-element "^1.1.2"
+ repeat-string "^1.5.2"
+
+fill-range@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
+ integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+ to-regex-range "^2.1.0"
+
+finalhandler@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105"
+ integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==
+ dependencies:
+ debug "2.6.9"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ on-finished "~2.3.0"
+ parseurl "~1.3.2"
+ statuses "~1.4.0"
+ unpipe "~1.0.0"
+
+find-cache-dir@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9"
+ integrity sha1-yN765XyKUqinhPnjHFfHQumToLk=
+ dependencies:
+ commondir "^1.0.1"
+ mkdirp "^0.5.1"
+ pkg-dir "^1.0.0"
+
+find-nearest-file@~1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/find-nearest-file/-/find-nearest-file-1.1.0.tgz#e29441740329a2015f7655faecd7b85e02cad686"
+ integrity sha512-NMsS0ITOwpBPrHOyO7YUtDhaVEGUKS0kBJDVaWZPuCzO7JMW+uzFQQVts/gPyIV9ioyNWDb5LjhHWXVf1OnBDA==
+
+find-up@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
+ integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=
+ dependencies:
+ path-exists "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+find-up@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
+ integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c=
+ dependencies:
+ locate-path "^2.0.0"
+
+firefox-profile@~1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/firefox-profile/-/firefox-profile-1.1.0.tgz#50090d1ff62dce3052cc7f46d1243c6a487db47a"
+ integrity sha512-wUIE4QeAjwoHvFbomWmXgKyYtV4/oZxDcJG4znxtGGa/0BhKkd3HzeOf3tAsMWPq1ExARZxCRRiNw1BL3FuPqA==
+ dependencies:
+ adm-zip "~0.4.x"
+ archiver "~2.1.0"
+ async "~2.5.0"
+ fs-extra "~4.0.2"
+ ini "~1.3.3"
+ jetpack-id "1.0.0"
+ lazystream "~1.0.0"
+ lodash "~4.17.2"
+ minimist "^1.1.1"
+ uuid "^3.0.0"
+ xml2js "~0.4.4"
+
+follow-redirects@^1.0.0:
+ version "1.5.10"
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
+ integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
+ dependencies:
+ debug "=3.1.0"
+
+for-each@~0.3.3:
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
+ integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==
+ dependencies:
+ is-callable "^1.1.3"
+
+for-in@^1.0.1, for-in@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
+ integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
+
+for-own@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
+ integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=
+ dependencies:
+ for-in "^1.0.1"
+
+foreach-shim@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/foreach-shim/-/foreach-shim-0.1.1.tgz#be61d75f46abb7176f5abd295e35885751b71d94"
+ integrity sha1-vmHXX0artxdvWr0pXjWIV1G3HZQ=
+
+foreachasync@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/foreachasync/-/foreachasync-3.0.0.tgz#5502987dc8714be3392097f32e0071c9dee07cf6"
+ integrity sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY=
+
+foreground-child@^1.3.3, foreground-child@^1.5.3, foreground-child@^1.5.6:
+ version "1.5.6"
+ resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9"
+ integrity sha1-T9ca0t/elnibmApcCilZN8svXOk=
+ dependencies:
+ cross-spawn "^4"
+ signal-exit "^3.0.0"
+
+forever-agent@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
+ integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
+
+form-data@^2.3.1, form-data@~2.3.1, form-data@~2.3.2:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
+ integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.6"
+ mime-types "^2.1.12"
+
+formidable@^1.2.0:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.1.tgz#70fb7ca0290ee6ff961090415f4b3df3d2082659"
+ integrity sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==
+
+forwarded@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
+ integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
+
+fragment-cache@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
+ integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=
+ dependencies:
+ map-cache "^0.2.2"
+
+fresh@0.5.2:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
+ integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
+
+from2@^2.1.1:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af"
+ integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=
+ dependencies:
+ inherits "^2.0.1"
+ readable-stream "^2.0.0"
+
+fs-constants@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
+ integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
+
+fs-exists-cached@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz#cf25554ca050dc49ae6656b41de42258989dcbce"
+ integrity sha1-zyVVTKBQ3EmuZla0HeQiWJidy84=
+
+fs-extra@~4.0.2:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
+ integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^4.0.0"
+ universalify "^0.1.0"
+
+fs-minipass@^1.2.5:
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
+ integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==
+ dependencies:
+ minipass "^2.2.1"
+
+fs-readdir-recursive@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27"
+ integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
+
+fsevents@^1.0.0, fsevents@^1.2.2:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426"
+ integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==
+ dependencies:
+ nan "^2.9.2"
+ node-pre-gyp "^0.10.0"
+
+function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
+ integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+
+function-loop@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/function-loop/-/function-loop-1.0.1.tgz#8076bb305e8e6a3cceee2920765f330d190f340c"
+ integrity sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw=
+
+gauge@~2.7.3:
+ version "2.7.4"
+ resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
+ integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=
+ dependencies:
+ aproba "^1.0.3"
+ console-control-strings "^1.0.0"
+ has-unicode "^2.0.0"
+ object-assign "^4.1.0"
+ signal-exit "^3.0.0"
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+ wide-align "^1.1.0"
+
+get-assigned-identifiers@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz#6dbf411de648cbaf8d9169ebb0d2d576191e2ff1"
+ integrity sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==
+
+get-caller-file@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
+ integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==
+
+get-stream@3.0.0, get-stream@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
+ integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=
+
+get-value@^2.0.3, get-value@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
+ integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=
+
+getpass@^0.1.1:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
+ integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
+ dependencies:
+ assert-plus "^1.0.0"
+
+glob-base@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
+ integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=
+ dependencies:
+ glob-parent "^2.0.0"
+ is-glob "^2.0.0"
+
+glob-parent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
+ integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=
+ dependencies:
+ is-glob "^2.0.0"
+
+glob-parent@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
+ integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=
+ dependencies:
+ is-glob "^3.1.0"
+ path-dirname "^1.0.0"
+
+glob@^5.0.10:
+ version "5.0.15"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
+ integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=
+ dependencies:
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "2 || 3"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+glob@^7.0.0, glob@^7.0.5, glob@^7.0.6, glob@^7.1.0, glob@^7.1.2, glob@~7.1.2:
+ version "7.1.3"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
+ integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+globals@^11.1.0:
+ version "11.9.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249"
+ integrity sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==
+
+globals@^9.18.0:
+ version "9.18.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
+ integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==
+
+globs-to-files@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/globs-to-files/-/globs-to-files-1.0.0.tgz#54490f6d1f4b9fd2de9d99445146ffb37550380d"
+ integrity sha1-VEkPbR9Ln9LenZlEUUb/s3VQOA0=
+ dependencies:
+ array-uniq "~1.0.2"
+ asyncreduce "~0.1.4"
+ glob "^5.0.10"
+ xtend "^4.0.0"
+
+got@^8.2.0:
+ version "8.3.2"
+ resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937"
+ integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==
+ dependencies:
+ "@sindresorhus/is" "^0.7.0"
+ cacheable-request "^2.1.1"
+ decompress-response "^3.3.0"
+ duplexer3 "^0.1.4"
+ get-stream "^3.0.0"
+ into-stream "^3.1.0"
+ is-retry-allowed "^1.1.0"
+ isurl "^1.0.0-alpha5"
+ lowercase-keys "^1.0.0"
+ mimic-response "^1.0.0"
+ p-cancelable "^0.4.0"
+ p-timeout "^2.0.1"
+ pify "^3.0.0"
+ safe-buffer "^5.1.1"
+ timed-out "^4.0.1"
+ url-parse-lax "^3.0.0"
+ url-to-options "^1.0.1"
+
+graceful-fs@^4.1.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
+ version "4.1.15"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
+ integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
+
+"growl@~> 1.10.0":
+ version "1.10.5"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
+ integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==
+
+gunzip-maybe@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/gunzip-maybe/-/gunzip-maybe-1.4.1.tgz#39c72ed89d1b49ba708e18776500488902a52027"
+ integrity sha512-qtutIKMthNJJgeHQS7kZ9FqDq59/Wn0G2HYCRNjpup7yKfVI6/eqwpmroyZGFoCYaG+sW6psNVb4zoLADHpp2g==
+ dependencies:
+ browserify-zlib "^0.1.4"
+ is-deflate "^1.0.0"
+ is-gzip "^1.0.0"
+ peek-stream "^1.1.0"
+ pumpify "^1.3.3"
+ through2 "^2.0.3"
+
+handlebars@4.0.5:
+ version "4.0.5"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.5.tgz#92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7"
+ integrity sha1-ksbta7FkEQxQ1NjQ+93HCAbG+Oc=
+ dependencies:
+ async "^1.4.0"
+ optimist "^0.6.1"
+ source-map "^0.4.4"
+ optionalDependencies:
+ uglify-js "^2.6"
+
+handlebars@^4.0.3:
+ version "4.0.12"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5"
+ integrity sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==
+ dependencies:
+ async "^2.5.0"
+ optimist "^0.6.1"
+ source-map "^0.6.1"
+ optionalDependencies:
+ uglify-js "^3.1.4"
+
+har-schema@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
+ integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
+
+har-validator@~5.0.3:
+ version "5.0.3"
+ resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd"
+ integrity sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=
+ dependencies:
+ ajv "^5.1.0"
+ har-schema "^2.0.0"
+
+har-validator@~5.1.0:
+ version "5.1.3"
+ resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080"
+ integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==
+ dependencies:
+ ajv "^6.5.5"
+ har-schema "^2.0.0"
+
+has-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
+ integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=
+ dependencies:
+ ansi-regex "^2.0.0"
+
+has-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
+ integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=
+
+has-flag@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+ integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+
+has-symbol-support-x@^1.4.1:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455"
+ integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==
+
+has-symbols@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44"
+ integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=
+
+has-to-string-tag-x@^1.2.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d"
+ integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==
+ dependencies:
+ has-symbol-support-x "^1.4.1"
+
+has-unicode@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
+ integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=
+
+has-value@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
+ integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=
+ dependencies:
+ get-value "^2.0.3"
+ has-values "^0.1.4"
+ isobject "^2.0.0"
+
+has-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
+ integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=
+ dependencies:
+ get-value "^2.0.6"
+ has-values "^1.0.0"
+ isobject "^3.0.0"
+
+has-values@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
+ integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E=
+
+has-values@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
+ integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=
+ dependencies:
+ is-number "^3.0.0"
+ kind-of "^4.0.0"
+
+has@^1.0.0, has@^1.0.1, has@~1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
+ integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
+ dependencies:
+ function-bind "^1.1.1"
+
+hash-base@^3.0.0:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918"
+ integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=
+ dependencies:
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+hash.js@^1.0.0, hash.js@^1.0.3:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42"
+ integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==
+ dependencies:
+ inherits "^2.0.3"
+ minimalistic-assert "^1.0.1"
+
+hawk@~6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038"
+ integrity sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==
+ dependencies:
+ boom "4.x.x"
+ cryptiles "3.x.x"
+ hoek "4.x.x"
+ sntp "2.x.x"
+
+hbs@~4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/hbs/-/hbs-4.0.1.tgz#4bfd98650dc8c9dac44b3ca9adf9c098e8bc33b6"
+ integrity sha1-S/2YZQ3IydrESzyprfnAmOi8M7Y=
+ dependencies:
+ handlebars "4.0.5"
+ walk "2.3.9"
+
+highlight.js@~9.12.0:
+ version "9.12.0"
+ resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e"
+ integrity sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=
+
+hmac-drbg@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
+ integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=
+ dependencies:
+ hash.js "^1.0.3"
+ minimalistic-assert "^1.0.0"
+ minimalistic-crypto-utils "^1.0.1"
+
+hoek@4.x.x:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb"
+ integrity sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==
+
+hosted-git-info@^2.1.4:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
+ integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==
+
+htmlescape@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351"
+ integrity sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=
+
+http-cache-semantics@3.8.1:
+ version "3.8.1"
+ resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
+ integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==
+
+http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3:
+ version "1.6.3"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d"
+ integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.3"
+ setprototypeof "1.1.0"
+ statuses ">= 1.4.0 < 2"
+
+http-proxy@~1.17.0:
+ version "1.17.0"
+ resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a"
+ integrity sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==
+ dependencies:
+ eventemitter3 "^3.0.0"
+ follow-redirects "^1.0.0"
+ requires-port "^1.0.0"
+
+http-signature@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
+ integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
+ dependencies:
+ assert-plus "^1.0.0"
+ jsprim "^1.2.2"
+ sshpk "^1.7.0"
+
+https-browserify@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
+ integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=
+
+https-browserify@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82"
+ integrity sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=
+
+humanize-duration@~3.15.0:
+ version "3.15.3"
+ resolved "https://registry.yarnpkg.com/humanize-duration/-/humanize-duration-3.15.3.tgz#600a939bd9d9a16b696e907b3fc08d1a4f15e8c9"
+ integrity sha512-BMz6w8p3NVa6QP9wDtqUkXfwgBqDaZ5z/np0EYdoWrLqL849Onp6JWMXMhbHtuvO9jUThLN5H1ThRQ8dUWnYkA==
+
+hyperquest@^2.1.3:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/hyperquest/-/hyperquest-2.1.3.tgz#523127d7a343181b40bf324e231d2576edf52633"
+ integrity sha512-fUuDOrB47PqNK/BAMOS13v41UoaqIxqSLHX6CAbOD7OfT+/GCWO1/vPLfTNutOeXrv1ikuaZ3yux+33Z9vh+rw==
+ dependencies:
+ buffer-from "^0.1.1"
+ duplexer2 "~0.0.2"
+ through2 "~0.6.3"
+
+iconv-lite@0.4.23:
+ version "0.4.23"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
+ integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
+iconv-lite@^0.4.4:
+ version "0.4.24"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
+ integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
+ieee754@^1.1.4:
+ version "1.1.12"
+ resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b"
+ integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==
+
+ignore-walk@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8"
+ integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==
+ dependencies:
+ minimatch "^3.0.4"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+ integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
+
+indexof@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
+ integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+ integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
+
+inherits@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
+ integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=
+
+ini@~1.3.0, ini@~1.3.3:
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
+ integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
+
+inline-source-map@~0.6.0:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5"
+ integrity sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=
+ dependencies:
+ source-map "~0.5.3"
+
+insert-module-globals@^7.0.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.2.0.tgz#ec87e5b42728479e327bd5c5c71611ddfb4752ba"
+ integrity sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==
+ dependencies:
+ JSONStream "^1.0.3"
+ acorn-node "^1.5.2"
+ combine-source-map "^0.8.0"
+ concat-stream "^1.6.1"
+ is-buffer "^1.1.0"
+ path-is-absolute "^1.0.1"
+ process "~0.11.0"
+ through2 "^2.0.0"
+ undeclared-identifiers "^1.1.2"
+ xtend "^4.0.0"
+
+into-stream@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6"
+ integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=
+ dependencies:
+ from2 "^2.1.1"
+ p-is-promise "^1.1.0"
+
+invariant@^2.2.2:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
+ integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
+ dependencies:
+ loose-envify "^1.0.0"
+
+invert-kv@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
+ integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY=
+
+ipaddr.js@1.8.0:
+ version "1.8.0"
+ resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e"
+ integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4=
+
+is-accessor-descriptor@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
+ integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-accessor-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
+ integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+ integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
+
+is-binary-path@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
+ integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=
+ dependencies:
+ binary-extensions "^1.0.0"
+
+is-buffer@^1.1.0, is-buffer@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+ integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
+
+is-builtin-module@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
+ integrity sha1-VAVy0096wxGfj3bDDLwbHgN6/74=
+ dependencies:
+ builtin-modules "^1.0.0"
+
+is-callable@^1.1.3, is-callable@^1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"
+ integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==
+
+is-data-descriptor@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
+ integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-data-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
+ integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-date-object@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
+ integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=
+
+is-deflate@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-deflate/-/is-deflate-1.0.0.tgz#c862901c3c161fb09dac7cdc7e784f80e98f2f14"
+ integrity sha1-yGKQHDwWH7CdrHzcfnhPgOmPLxQ=
+
+is-descriptor@^0.1.0:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
+ integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==
+ dependencies:
+ is-accessor-descriptor "^0.1.6"
+ is-data-descriptor "^0.1.4"
+ kind-of "^5.0.0"
+
+is-descriptor@^1.0.0, is-descriptor@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
+ integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==
+ dependencies:
+ is-accessor-descriptor "^1.0.0"
+ is-data-descriptor "^1.0.0"
+ kind-of "^6.0.2"
+
+is-dotfile@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
+ integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=
+
+is-equal-shallow@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
+ integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=
+ dependencies:
+ is-primitive "^2.0.0"
+
+is-error@^2.2.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/is-error/-/is-error-2.2.1.tgz#684a96d84076577c98f4cdb40c6d26a5123bf19c"
+ integrity sha1-aEqW2EB2V3yY9M20DG0mpRI78Zw=
+
+is-extendable@^0.1.0, is-extendable@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+ integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=
+
+is-extendable@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
+ integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
+ dependencies:
+ is-plain-object "^2.0.4"
+
+is-extglob@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
+ integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=
+
+is-extglob@^2.1.0, is-extglob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+ integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
+
+is-finite@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
+ integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
+ integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs=
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+ integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
+
+is-glob@^2.0.0, is-glob@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
+ integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=
+ dependencies:
+ is-extglob "^1.0.0"
+
+is-glob@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
+ integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=
+ dependencies:
+ is-extglob "^2.1.0"
+
+is-glob@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0"
+ integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=
+ dependencies:
+ is-extglob "^2.1.1"
+
+is-gzip@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83"
+ integrity sha1-bKiwe5nHeZgCWQDlVc7Y7YCHmoM=
+
+is-number@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
+ integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
+ integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff"
+ integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==
+
+is-object@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470"
+ integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA=
+
+is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
+ integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
+
+is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+ integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
+ dependencies:
+ isobject "^3.0.1"
+
+is-posix-bracket@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
+ integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=
+
+is-primitive@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
+ integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU=
+
+is-regex@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
+ integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=
+ dependencies:
+ has "^1.0.1"
+
+is-retry-allowed@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
+ integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=
+
+is-stream@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+ integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
+
+is-symbol@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38"
+ integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==
+ dependencies:
+ has-symbols "^1.0.0"
+
+is-typedarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+ integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
+
+is-utf8@^0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
+ integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=
+
+is-windows@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
+ integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
+
+isarray@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
+ integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=
+
+isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+ integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+
+isarray@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.4.tgz#38e7bcbb0f3ba1b7933c86ba1894ddfc3781bbb7"
+ integrity sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+ integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
+
+isobject@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=
+ dependencies:
+ isarray "1.0.0"
+
+isobject@^3.0.0, isobject@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+ integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
+
+isstream@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+ integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
+
+istanbul-lib-coverage@^1.1.2, istanbul-lib-coverage@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0"
+ integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==
+
+istanbul-lib-hook@^1.1.0:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86"
+ integrity sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw==
+ dependencies:
+ append-transform "^0.4.0"
+
+istanbul-lib-instrument@^1.10.0, istanbul-lib-instrument@^1.8.0:
+ version "1.10.2"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca"
+ integrity sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==
+ dependencies:
+ babel-generator "^6.18.0"
+ babel-template "^6.16.0"
+ babel-traverse "^6.18.0"
+ babel-types "^6.18.0"
+ babylon "^6.18.0"
+ istanbul-lib-coverage "^1.2.1"
+ semver "^5.3.0"
+
+istanbul-lib-report@^1.1.3:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c"
+ integrity sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw==
+ dependencies:
+ istanbul-lib-coverage "^1.2.1"
+ mkdirp "^0.5.1"
+ path-parse "^1.0.5"
+ supports-color "^3.1.2"
+
+istanbul-lib-source-maps@^1.2.3:
+ version "1.2.6"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f"
+ integrity sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg==
+ dependencies:
+ debug "^3.1.0"
+ istanbul-lib-coverage "^1.2.1"
+ mkdirp "^0.5.1"
+ rimraf "^2.6.1"
+ source-map "^0.5.3"
+
+istanbul-reports@^1.4.0:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a"
+ integrity sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw==
+ dependencies:
+ handlebars "^4.0.3"
+
+isurl@^1.0.0-alpha5:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67"
+ integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==
+ dependencies:
+ has-to-string-tag-x "^1.2.0"
+ is-object "^1.0.1"
+
+jetpack-id@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/jetpack-id/-/jetpack-id-1.0.0.tgz#2cf9fbae46d8074fc16b7de0071c8efebca473a6"
+ integrity sha1-LPn7rkbYB0/Ba33gBxyO/rykc6Y=
+
+js-levenshtein@^1.1.3:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e"
+ integrity sha512-PxfGzSs0ztShKrUYPIn5r0MtyAhYcCwmndozzpz8YObbPnD1jFxzlBGbRnX2mIu6Z13xN6+PTu05TQFnZFlzow==
+
+"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
+ integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+
+js-tokens@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
+ integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
+
+js-yaml@^3.11.0, js-yaml@^3.2.7, js-yaml@^3.3.1:
+ version "3.12.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
+ integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^4.0.0"
+
+jsbn@~0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
+ integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
+
+jsesc@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
+ integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s=
+
+jsesc@^2.5.1:
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
+ integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
+
+jsesc@~0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
+ integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=
+
+json-buffer@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
+ integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
+
+json-schema-traverse@^0.3.0:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
+ integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=
+
+json-schema-traverse@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
+ integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
+
+json-schema@0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
+ integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
+
+json-stable-stringify@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45"
+ integrity sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=
+ dependencies:
+ jsonify "~0.0.0"
+
+json-stringify-safe@~5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
+ integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
+
+json5@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850"
+ integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==
+ dependencies:
+ minimist "^1.2.0"
+
+jsonfile@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
+ integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
+jsonify@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
+ integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=
+
+jsonparse@^1.2.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
+ integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=
+
+jsprim@^1.2.2:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
+ integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
+ dependencies:
+ assert-plus "1.0.0"
+ extsprintf "1.3.0"
+ json-schema "0.2.3"
+ verror "1.10.0"
+
+keyv@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373"
+ integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==
+ dependencies:
+ json-buffer "3.0.0"
+
+kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
+ integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
+ integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==
+
+kind-of@^6.0.0, kind-of@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
+ integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==
+
+labeled-stream-splicer@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz#9cffa32fd99e1612fd1d86a8db962416d5292926"
+ integrity sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==
+ dependencies:
+ inherits "^2.0.1"
+ isarray "^2.0.4"
+ stream-splicer "^2.0.0"
+
+lazy-cache@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+ integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4=
+
+lazystream@^1.0.0, lazystream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4"
+ integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=
+ dependencies:
+ readable-stream "^2.0.5"
+
+lcid@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
+ integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=
+ dependencies:
+ invert-kv "^1.0.0"
+
+lcov-parse@^0.0.10:
+ version "0.0.10"
+ resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"
+ integrity sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=
+
+load-json-file@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
+ integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=
+ dependencies:
+ graceful-fs "^4.1.2"
+ parse-json "^2.2.0"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+ strip-bom "^2.0.0"
+
+load-script@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4"
+ integrity sha1-BJGTngvuVkPuSUp+PaPSuscMbKQ=
+
+locate-path@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
+ integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=
+ dependencies:
+ p-locate "^2.0.0"
+ path-exists "^3.0.0"
+
+lodash.debounce@^4.0.8:
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
+ integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
+
+lodash.memoize@~3.0.3:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f"
+ integrity sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=
+
+lodash@4.17.10:
+ version "4.17.10"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
+ integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==
+
+lodash@^4.14.0, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.8.0, lodash@~4.17.2, lodash@~4.17.5:
+ version "4.17.11"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
+ integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
+
+log-driver@^1.2.7:
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
+ integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==
+
+lolex@^2.6.0:
+ version "2.7.5"
+ resolved "https://registry.yarnpkg.com/lolex/-/lolex-2.7.5.tgz#113001d56bfc7e02d56e36291cc5c413d1aa0733"
+ integrity sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==
+
+longest@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
+ integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=
+
+loose-envify@^1.0.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
+ integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
+ dependencies:
+ js-tokens "^3.0.0 || ^4.0.0"
+
+lowercase-keys@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306"
+ integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=
+
+lowercase-keys@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
+ integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==
+
+lru-cache@^4.0.1:
+ version "4.1.5"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
+ integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==
+ dependencies:
+ pseudomap "^1.0.2"
+ yallist "^2.1.2"
+
+map-cache@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
+ integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=
+
+map-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
+ integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=
+ dependencies:
+ object-visit "^1.0.0"
+
+math-random@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac"
+ integrity sha1-izqsWIuKZuSXXjzepn97sylgH6w=
+
+md5-hex@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4"
+ integrity sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=
+ dependencies:
+ md5-o-matic "^0.1.1"
+
+md5-o-matic@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3"
+ integrity sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=
+
+md5.js@^1.3.4:
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f"
+ integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==
+ dependencies:
+ hash-base "^3.0.0"
+ inherits "^2.0.1"
+ safe-buffer "^5.1.2"
+
+media-typer@0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
+ integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
+
+mem@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76"
+ integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=
+ dependencies:
+ mimic-fn "^1.0.0"
+
+merge-descriptors@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
+ integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
+
+merge-source-map@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646"
+ integrity sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==
+ dependencies:
+ source-map "^0.6.1"
+
+methods@^1.1.1, methods@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
+ integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
+
+micromatch@^2.1.5, micromatch@^2.3.11:
+ version "2.3.11"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
+ integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=
+ dependencies:
+ arr-diff "^2.0.0"
+ array-unique "^0.2.1"
+ braces "^1.8.2"
+ expand-brackets "^0.1.4"
+ extglob "^0.3.1"
+ filename-regex "^2.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.1"
+ kind-of "^3.0.2"
+ normalize-path "^2.0.1"
+ object.omit "^2.0.0"
+ parse-glob "^3.0.4"
+ regex-cache "^0.4.2"
+
+micromatch@^3.1.10, micromatch@^3.1.4:
+ version "3.1.10"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
+ integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ braces "^2.3.1"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ extglob "^2.0.4"
+ fragment-cache "^0.2.1"
+ kind-of "^6.0.2"
+ nanomatch "^1.2.9"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.2"
+
+miller-rabin@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d"
+ integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==
+ dependencies:
+ bn.js "^4.0.0"
+ brorand "^1.0.1"
+
+"mime-db@>= 1.36.0 < 2", mime-db@~1.37.0:
+ version "1.37.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8"
+ integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==
+
+mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19:
+ version "2.1.21"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96"
+ integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==
+ dependencies:
+ mime-db "~1.37.0"
+
+mime@1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
+ integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==
+
+mime@^1.4.1:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
+ integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
+
+mimic-fn@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
+ integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
+
+mimic-response@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
+ integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
+
+minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
+ integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==
+
+minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
+ integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=
+
+"minimatch@2 || 3", minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+ integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
+
+minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0, minimist@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+ integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
+
+minimist@~0.0.1:
+ version "0.0.10"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
+ integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=
+
+minipass@^2.2.0, minipass@^2.2.1, minipass@^2.3.0, minipass@^2.3.4:
+ version "2.3.5"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848"
+ integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==
+ dependencies:
+ safe-buffer "^5.1.2"
+ yallist "^3.0.0"
+
+minizlib@^1.1.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614"
+ integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==
+ dependencies:
+ minipass "^2.2.1"
+
+mixin-deep@^1.2.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
+ integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==
+ dependencies:
+ for-in "^1.0.2"
+ is-extendable "^1.0.1"
+
+mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
+ dependencies:
+ minimist "0.0.8"
+
+module-deps@^4.0.8:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd"
+ integrity sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=
+ dependencies:
+ JSONStream "^1.0.3"
+ browser-resolve "^1.7.0"
+ cached-path-relative "^1.0.0"
+ concat-stream "~1.5.0"
+ defined "^1.0.0"
+ detective "^4.0.0"
+ duplexer2 "^0.1.2"
+ inherits "^2.0.1"
+ parents "^1.0.0"
+ readable-stream "^2.0.2"
+ resolve "^1.1.3"
+ stream-combiner2 "^1.1.1"
+ subarg "^1.0.0"
+ through2 "^2.0.0"
+ xtend "^4.0.0"
+
+module-deps@^6.0.0:
+ version "6.2.0"
+ resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-6.2.0.tgz#d41a2e790245ce319171e4e7c4d8c73993ba3cd5"
+ integrity sha512-hKPmO06so6bL/ZvqVNVqdTVO8UAYsi3tQWlCa+z9KuWhoN4KDQtb5hcqQQv58qYiDE21wIvnttZEPiDgEbpwbA==
+ dependencies:
+ JSONStream "^1.0.3"
+ browser-resolve "^1.7.0"
+ cached-path-relative "^1.0.0"
+ concat-stream "~1.6.0"
+ defined "^1.0.0"
+ detective "^5.0.2"
+ duplexer2 "^0.1.2"
+ inherits "^2.0.1"
+ parents "^1.0.0"
+ readable-stream "^2.0.2"
+ resolve "^1.4.0"
+ stream-combiner2 "^1.1.1"
+ subarg "^1.0.0"
+ through2 "^2.0.0"
+ xtend "^4.0.0"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+ integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
+
+ms@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
+ integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
+
+nan@^2.9.2:
+ version "2.11.1"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766"
+ integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==
+
+nanomatch@^1.2.9:
+ version "1.2.13"
+ resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
+ integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ fragment-cache "^0.2.1"
+ is-windows "^1.0.2"
+ kind-of "^6.0.2"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+needle@^2.2.1:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e"
+ integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA==
+ dependencies:
+ debug "^2.1.2"
+ iconv-lite "^0.4.4"
+ sax "^1.2.4"
+
+negotiator@0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
+ integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=
+
+node-pre-gyp@^0.10.0:
+ version "0.10.3"
+ resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc"
+ integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A==
+ dependencies:
+ detect-libc "^1.0.2"
+ mkdirp "^0.5.1"
+ needle "^2.2.1"
+ nopt "^4.0.1"
+ npm-packlist "^1.1.6"
+ npmlog "^4.0.2"
+ rc "^1.2.7"
+ rimraf "^2.6.1"
+ semver "^5.3.0"
+ tar "^4"
+
+node-releases@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.1.tgz#8fff8aea1cfcad1fb4205f805149054fbf73cafd"
+ integrity sha512-2UXrBr6gvaebo5TNF84C66qyJJ6r0kxBObgZIDX3D3/mt1ADKiHux3NJPWisq0wxvJJdkjECH+9IIKYViKj71Q==
+ dependencies:
+ semver "^5.3.0"
+
+nopt@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
+ integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=
+ dependencies:
+ abbrev "1"
+ osenv "^0.1.4"
+
+normalize-package-data@^2.3.2:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
+ integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==
+ dependencies:
+ hosted-git-info "^2.1.4"
+ is-builtin-module "^1.0.0"
+ semver "2 || 3 || 4 || 5"
+ validate-npm-package-license "^3.0.1"
+
+normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
+ integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=
+ dependencies:
+ remove-trailing-separator "^1.0.1"
+
+normalize-url@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6"
+ integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==
+ dependencies:
+ prepend-http "^2.0.0"
+ query-string "^5.0.1"
+ sort-keys "^2.0.0"
+
+npm-bundled@^1.0.1:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979"
+ integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==
+
+npm-packlist@^1.1.6:
+ version "1.1.12"
+ resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a"
+ integrity sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g==
+ dependencies:
+ ignore-walk "^3.0.1"
+ npm-bundled "^1.0.1"
+
+npm-run-path@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
+ integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=
+ dependencies:
+ path-key "^2.0.0"
+
+npmlog@^4.0.2:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
+ integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
+ dependencies:
+ are-we-there-yet "~1.1.2"
+ console-control-strings "~1.1.0"
+ gauge "~2.7.3"
+ set-blocking "~2.0.0"
+
+number-is-nan@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
+ integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
+
+nyc@^11.0.0, nyc@^11.7.2:
+ version "11.9.0"
+ resolved "https://registry.yarnpkg.com/nyc/-/nyc-11.9.0.tgz#4106e89e8fbe73623a1fc8b6ecb7abaa271ae1e4"
+ integrity sha512-w8OdJAhXL5izerzZMdqzYKMj/pgHJyY3qEPYBjLLxrhcVoHEY9pU5ENIiZyCgG9OR7x3VcUMoD40o6PtVpfR4g==
+ dependencies:
+ archy "^1.0.0"
+ arrify "^1.0.1"
+ caching-transform "^1.0.0"
+ convert-source-map "^1.5.1"
+ debug-log "^1.0.1"
+ default-require-extensions "^1.0.0"
+ find-cache-dir "^0.1.1"
+ find-up "^2.1.0"
+ foreground-child "^1.5.3"
+ glob "^7.0.6"
+ istanbul-lib-coverage "^1.1.2"
+ istanbul-lib-hook "^1.1.0"
+ istanbul-lib-instrument "^1.10.0"
+ istanbul-lib-report "^1.1.3"
+ istanbul-lib-source-maps "^1.2.3"
+ istanbul-reports "^1.4.0"
+ md5-hex "^1.2.0"
+ merge-source-map "^1.1.0"
+ micromatch "^3.1.10"
+ mkdirp "^0.5.0"
+ resolve-from "^2.0.0"
+ rimraf "^2.6.2"
+ signal-exit "^3.0.1"
+ spawn-wrap "^1.4.2"
+ test-exclude "^4.2.0"
+ yargs "11.1.0"
+ yargs-parser "^8.0.0"
+
+oauth-sign@~0.8.2:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
+ integrity sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=
+
+oauth-sign@~0.9.0:
+ version "0.9.0"
+ resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
+ integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
+
+object-assign@^4.1.0, object-assign@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+ integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
+
+object-copy@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
+ integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw=
+ dependencies:
+ copy-descriptor "^0.1.0"
+ define-property "^0.2.5"
+ kind-of "^3.0.3"
+
+object-inspect@~1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b"
+ integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==
+
+object-keys@^1.0.12:
+ version "1.0.12"
+ resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2"
+ integrity sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==
+
+object-visit@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
+ integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=
+ dependencies:
+ isobject "^3.0.0"
+
+object.getownpropertydescriptors@^2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
+ integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=
+ dependencies:
+ define-properties "^1.1.2"
+ es-abstract "^1.5.1"
+
+object.omit@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
+ integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=
+ dependencies:
+ for-own "^0.1.4"
+ is-extendable "^0.1.1"
+
+object.pick@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
+ integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=
+ dependencies:
+ isobject "^3.0.1"
+
+on-finished@~2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
+ integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
+ dependencies:
+ ee-first "1.1.1"
+
+on-headers@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7"
+ integrity sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=
+
+once@^1.3.0, once@^1.3.1, once@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
+ dependencies:
+ wrappy "1"
+
+opener@^1.4.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed"
+ integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==
+
+opener@~1.4.3:
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8"
+ integrity sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=
+
+optimist@^0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
+ integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY=
+ dependencies:
+ minimist "~0.0.1"
+ wordwrap "~0.0.2"
+
+os-browserify@~0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54"
+ integrity sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=
+
+os-browserify@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27"
+ integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=
+
+os-homedir@^1.0.0, os-homedir@^1.0.1, os-homedir@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+ integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
+
+os-locale@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2"
+ integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==
+ dependencies:
+ execa "^0.7.0"
+ lcid "^1.0.0"
+ mem "^1.1.0"
+
+os-tmpdir@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+ integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
+
+osenv@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
+ integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
+ dependencies:
+ os-homedir "^1.0.0"
+ os-tmpdir "^1.0.0"
+
+outpipe@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/outpipe/-/outpipe-1.1.1.tgz#50cf8616365e87e031e29a5ec9339a3da4725fa2"
+ integrity sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I=
+ dependencies:
+ shell-quote "^1.4.2"
+
+output-file-sync@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0"
+ integrity sha512-mDho4qm7WgIXIGf4eYU1RHN2UU5tPfVYVSRwDJw0uTmj35DQUt/eNp19N7v6T3SrR0ESTEf2up2CGO73qI35zQ==
+ dependencies:
+ graceful-fs "^4.1.11"
+ is-plain-obj "^1.1.0"
+ mkdirp "^0.5.1"
+
+own-or-env@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/own-or-env/-/own-or-env-1.0.1.tgz#54ce601d3bf78236c5c65633aa1c8ec03f8007e4"
+ integrity sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw==
+ dependencies:
+ own-or "^1.0.0"
+
+own-or@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/own-or/-/own-or-1.0.0.tgz#4e877fbeda9a2ec8000fbc0bcae39645ee8bf8dc"
+ integrity sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw=
+
+p-cancelable@^0.4.0:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0"
+ integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==
+
+p-finally@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
+ integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
+
+p-is-promise@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e"
+ integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=
+
+p-limit@^1.1.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
+ integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==
+ dependencies:
+ p-try "^1.0.0"
+
+p-locate@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
+ integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=
+ dependencies:
+ p-limit "^1.1.0"
+
+p-timeout@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038"
+ integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==
+ dependencies:
+ p-finally "^1.0.0"
+
+p-try@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
+ integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=
+
+pako@~0.2.0:
+ version "0.2.9"
+ resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
+ integrity sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=
+
+pako@~1.0.5:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.7.tgz#2473439021b57f1516c82f58be7275ad8ef1bb27"
+ integrity sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ==
+
+parents@^1.0.0, parents@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751"
+ integrity sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=
+ dependencies:
+ path-platform "~0.11.15"
+
+parse-asn1@^5.0.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8"
+ integrity sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==
+ dependencies:
+ asn1.js "^4.0.0"
+ browserify-aes "^1.0.0"
+ create-hash "^1.1.0"
+ evp_bytestokey "^1.0.0"
+ pbkdf2 "^3.0.3"
+
+parse-glob@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
+ integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw=
+ dependencies:
+ glob-base "^0.3.0"
+ is-dotfile "^1.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.0"
+
+parse-json@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
+ integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=
+ dependencies:
+ error-ex "^1.2.0"
+
+parseurl@~1.3.2:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3"
+ integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=
+
+pascalcase@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
+ integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=
+
+path-browserify@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a"
+ integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==
+
+path-dirname@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
+ integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=
+
+path-exists@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
+ integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=
+ dependencies:
+ pinkie-promise "^2.0.0"
+
+path-exists@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
+ integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=
+
+path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
+
+path-key@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
+ integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
+
+path-parse@^1.0.5:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
+ integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
+
+path-platform@~0.11.15:
+ version "0.11.15"
+ resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2"
+ integrity sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=
+
+path-to-regexp@0.1.7:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
+ integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
+
+path-type@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
+ integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=
+ dependencies:
+ graceful-fs "^4.1.2"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+pbkdf2@^3.0.3:
+ version "3.0.17"
+ resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6"
+ integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==
+ dependencies:
+ create-hash "^1.1.2"
+ create-hmac "^1.1.4"
+ ripemd160 "^2.0.1"
+ safe-buffer "^5.0.1"
+ sha.js "^2.4.8"
+
+peek-stream@^1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/peek-stream/-/peek-stream-1.1.3.tgz#3b35d84b7ccbbd262fff31dc10da56856ead6d67"
+ integrity sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA==
+ dependencies:
+ buffer-from "^1.0.0"
+ duplexify "^3.5.0"
+ through2 "^2.0.3"
+
+performance-now@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
+ integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
+
+pify@^2.0.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
+ integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
+
+pify@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
+ integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
+
+pinkie-promise@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
+ integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o=
+ dependencies:
+ pinkie "^2.0.0"
+
+pinkie@^2.0.0:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+ integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
+
+pkg-dir@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4"
+ integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q=
+ dependencies:
+ find-up "^1.0.0"
+
+posix-character-classes@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
+ integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
+
+prepend-http@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
+ integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
+
+preserve@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
+ integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
+
+private@^0.1.6:
+ version "0.1.8"
+ resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
+ integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==
+
+process-nextick-args@~1.0.6:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
+ integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=
+
+process-nextick-args@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
+ integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==
+
+process@~0.11.0:
+ version "0.11.10"
+ resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
+ integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
+
+proxy-addr@~2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93"
+ integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==
+ dependencies:
+ forwarded "~0.1.2"
+ ipaddr.js "1.8.0"
+
+pseudomap@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
+ integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM=
+
+psl@^1.1.24:
+ version "1.1.31"
+ resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184"
+ integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==
+
+public-encrypt@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0"
+ integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==
+ dependencies:
+ bn.js "^4.1.0"
+ browserify-rsa "^4.0.0"
+ create-hash "^1.1.0"
+ parse-asn1 "^5.0.0"
+ randombytes "^2.0.1"
+ safe-buffer "^5.1.2"
+
+pump@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954"
+ integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==
+ dependencies:
+ end-of-stream "^1.1.0"
+ once "^1.3.1"
+
+pump@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909"
+ integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==
+ dependencies:
+ end-of-stream "^1.1.0"
+ once "^1.3.1"
+
+pump@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
+ integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
+ dependencies:
+ end-of-stream "^1.1.0"
+ once "^1.3.1"
+
+pumpify@^1.3.3:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce"
+ integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==
+ dependencies:
+ duplexify "^3.6.0"
+ inherits "^2.0.3"
+ pump "^2.0.0"
+
+punycode@1.3.2:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"
+ integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=
+
+punycode@^1.3.2, punycode@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
+ integrity sha1-wNWmOycYgArY4esPpSachN1BhF4=
+
+punycode@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
+ integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
+
+q@1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e"
+ integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=
+
+qs@6.5.2, qs@~6.5.1, qs@~6.5.2:
+ version "6.5.2"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
+ integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
+
+qs@^6.5.1:
+ version "6.6.0"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2"
+ integrity sha512-KIJqT9jQJDQx5h5uAVPimw6yVg2SekOKu959OCtktD3FjzbpvaPr8i4zzg07DOMz+igA4W/aNM7OV8H37pFYfA==
+
+query-string@^5.0.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb"
+ integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==
+ dependencies:
+ decode-uri-component "^0.2.0"
+ object-assign "^4.1.0"
+ strict-uri-encode "^1.0.0"
+
+querystring-es3@~0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
+ integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=
+
+querystring@0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
+ integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=
+
+randomatic@^3.0.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed"
+ integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==
+ dependencies:
+ is-number "^4.0.0"
+ kind-of "^6.0.0"
+ math-random "^1.0.1"
+
+randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80"
+ integrity sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==
+ dependencies:
+ safe-buffer "^5.1.0"
+
+randomfill@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458"
+ integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==
+ dependencies:
+ randombytes "^2.0.5"
+ safe-buffer "^5.1.0"
+
+range-parser@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e"
+ integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=
+
+raw-body@2.3.3:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3"
+ integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==
+ dependencies:
+ bytes "3.0.0"
+ http-errors "1.6.3"
+ iconv-lite "0.4.23"
+ unpipe "1.0.0"
+
+rc@^1.2.7:
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
+ integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
+ dependencies:
+ deep-extend "^0.6.0"
+ ini "~1.3.0"
+ minimist "^1.2.0"
+ strip-json-comments "~2.0.1"
+
+read-only-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0"
+ integrity sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=
+ dependencies:
+ readable-stream "^2.0.2"
+
+read-pkg-up@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
+ integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=
+ dependencies:
+ find-up "^1.0.0"
+ read-pkg "^1.0.0"
+
+read-pkg@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
+ integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=
+ dependencies:
+ load-json-file "^1.0.0"
+ normalize-package-data "^2.3.2"
+ path-type "^1.0.0"
+
+"readable-stream@>=1.0.33-1 <1.1.0-0":
+ version "1.0.34"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
+ integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "0.0.1"
+ string_decoder "~0.10.x"
+
+readable-stream@^2, readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6:
+ version "2.3.6"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
+ integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.3"
+ isarray "~1.0.0"
+ process-nextick-args "~2.0.0"
+ safe-buffer "~5.1.1"
+ string_decoder "~1.1.1"
+ util-deprecate "~1.0.1"
+
+readable-stream@~1.1.9:
+ version "1.1.14"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
+ integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk=
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "0.0.1"
+ string_decoder "~0.10.x"
+
+readable-stream@~2.0.0:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
+ integrity sha1-j5A0HmilPMySh4jaz80Rs265t44=
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "~1.0.0"
+ process-nextick-args "~1.0.6"
+ string_decoder "~0.10.x"
+ util-deprecate "~1.0.1"
+
+readdirp@^2.0.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525"
+ integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==
+ dependencies:
+ graceful-fs "^4.1.11"
+ micromatch "^3.1.10"
+ readable-stream "^2.0.2"
+
+regenerate-unicode-properties@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c"
+ integrity sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw==
+ dependencies:
+ regenerate "^1.4.0"
+
+regenerate@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
+ integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==
+
+regenerator-runtime@^0.11.0, regenerator-runtime@^0.11.1:
+ version "0.11.1"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
+ integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
+
+regenerator-transform@^0.13.3:
+ version "0.13.3"
+ resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb"
+ integrity sha512-5ipTrZFSq5vU2YoGoww4uaRVAK4wyYC4TSICibbfEPOruUu8FFP7ErV0BjmbIOEpn3O/k9na9UEdYR/3m7N6uA==
+ dependencies:
+ private "^0.1.6"
+
+regex-cache@^0.4.2:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
+ integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==
+ dependencies:
+ is-equal-shallow "^0.1.3"
+
+regex-not@^1.0.0, regex-not@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
+ integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==
+ dependencies:
+ extend-shallow "^3.0.2"
+ safe-regex "^1.1.0"
+
+regexpu-core@^4.1.3, regexpu-core@^4.2.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32"
+ integrity sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA==
+ dependencies:
+ regenerate "^1.4.0"
+ regenerate-unicode-properties "^7.0.0"
+ regjsgen "^0.5.0"
+ regjsparser "^0.6.0"
+ unicode-match-property-ecmascript "^1.0.4"
+ unicode-match-property-value-ecmascript "^1.0.2"
+
+regjsgen@^0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd"
+ integrity sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==
+
+regjsparser@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c"
+ integrity sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==
+ dependencies:
+ jsesc "~0.5.0"
+
+remove-trailing-separator@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
+ integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8=
+
+repeat-element@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
+ integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==
+
+repeat-string@^1.5.2, repeat-string@^1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+ integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
+
+repeating@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
+ integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=
+ dependencies:
+ is-finite "^1.0.0"
+
+request@2.85.0:
+ version "2.85.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa"
+ integrity sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==
+ dependencies:
+ aws-sign2 "~0.7.0"
+ aws4 "^1.6.0"
+ caseless "~0.12.0"
+ combined-stream "~1.0.5"
+ extend "~3.0.1"
+ forever-agent "~0.6.1"
+ form-data "~2.3.1"
+ har-validator "~5.0.3"
+ hawk "~6.0.2"
+ http-signature "~1.2.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.17"
+ oauth-sign "~0.8.2"
+ performance-now "^2.1.0"
+ qs "~6.5.1"
+ safe-buffer "^5.1.1"
+ stringstream "~0.0.5"
+ tough-cookie "~2.3.3"
+ tunnel-agent "^0.6.0"
+ uuid "^3.1.0"
+
+request@^2.85.0:
+ version "2.88.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
+ integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==
+ dependencies:
+ aws-sign2 "~0.7.0"
+ aws4 "^1.8.0"
+ caseless "~0.12.0"
+ combined-stream "~1.0.6"
+ extend "~3.0.2"
+ forever-agent "~0.6.1"
+ form-data "~2.3.2"
+ har-validator "~5.1.0"
+ http-signature "~1.2.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.19"
+ oauth-sign "~0.9.0"
+ performance-now "^2.1.0"
+ qs "~6.5.2"
+ safe-buffer "^5.1.2"
+ tough-cookie "~2.4.3"
+ tunnel-agent "^0.6.0"
+ uuid "^3.3.2"
+
+require-directory@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+ integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
+
+require-main-filename@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
+ integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=
+
+requires-port@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
+ integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=
+
+resolve-from@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
+ integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=
+
+resolve-url@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
+ integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
+
+resolve@1.1.7:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
+ integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=
+
+resolve@^1.1.3, resolve@^1.1.4, resolve@^1.3.2, resolve@^1.4.0:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
+ integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==
+ dependencies:
+ path-parse "^1.0.5"
+
+resolve@~1.7.1:
+ version "1.7.1"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3"
+ integrity sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==
+ dependencies:
+ path-parse "^1.0.5"
+
+responselike@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
+ integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
+ dependencies:
+ lowercase-keys "^1.0.0"
+
+resumer@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759"
+ integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=
+ dependencies:
+ through "~2.3.4"
+
+ret@~0.1.10:
+ version "0.1.15"
+ resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
+ integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
+
+right-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
+ integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8=
+ dependencies:
+ align-text "^0.1.1"
+
+rimraf@^2.6.1, rimraf@^2.6.2:
+ version "2.6.2"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
+ integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==
+ dependencies:
+ glob "^7.0.5"
+
+ripemd160@^2.0.0, ripemd160@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c"
+ integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==
+ dependencies:
+ hash-base "^3.0.0"
+ inherits "^2.0.1"
+
+runnel@~0.5.0:
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/runnel/-/runnel-0.5.3.tgz#f9362b165a05fc6f5e46e458f77a1f7ecdc0daec"
+ integrity sha1-+TYrFloF/G9eRuRY93offs3A2uw=
+
+safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
+safe-regex@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
+ integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4=
+ dependencies:
+ ret "~0.1.10"
+
+"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
+
+sauce-browsers@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/sauce-browsers/-/sauce-browsers-2.0.0.tgz#a3ecd9252fd431b499a2df37b30b78fd57136612"
+ integrity sha512-IW+G/5ceUFRITwSqL9L9Pyg68VJerAGK4Nf1ubiZw5oAVNvH59lpBiHEaDfbr6MyZqUfVGExfihyHmbfbnlV7A==
+ dependencies:
+ got "^8.2.0"
+
+sax@>=0.6.0, sax@^1.2.4:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
+ integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
+
+"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1:
+ version "5.6.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
+ integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
+
+send@0.16.2:
+ version "0.16.2"
+ resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1"
+ integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==
+ dependencies:
+ debug "2.6.9"
+ depd "~1.1.2"
+ destroy "~1.0.4"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ fresh "0.5.2"
+ http-errors "~1.6.2"
+ mime "1.4.1"
+ ms "2.0.0"
+ on-finished "~2.3.0"
+ range-parser "~1.2.0"
+ statuses "~1.4.0"
+
+serialize-javascript@^1.1.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe"
+ integrity sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==
+
+serve-static@1.13.2:
+ version "1.13.2"
+ resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1"
+ integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==
+ dependencies:
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ parseurl "~1.3.2"
+ send "0.16.2"
+
+server-destroy@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd"
+ integrity sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=
+
+set-blocking@^2.0.0, set-blocking@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+ integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
+
+set-value@^0.4.3:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"
+ integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE=
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.1"
+ to-object-path "^0.3.0"
+
+set-value@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
+ integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.3"
+ split-string "^3.0.1"
+
+setprototypeof@1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
+ integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==
+
+sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4:
+ version "2.4.11"
+ resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7"
+ integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==
+ dependencies:
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+shasum@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f"
+ integrity sha1-5wEjENj0F/TetXEhUOVni4euVl8=
+ dependencies:
+ json-stable-stringify "~0.0.0"
+ sha.js "~2.4.4"
+
+shebang-command@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
+ integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
+ dependencies:
+ shebang-regex "^1.0.0"
+
+shebang-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
+ integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
+
+shell-quote@^1.4.2, shell-quote@^1.6.1, shell-quote@~1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
+ integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=
+ dependencies:
+ array-filter "~0.0.0"
+ array-map "~0.0.0"
+ array-reduce "~0.0.0"
+ jsonify "~0.0.0"
+
+signal-exit@^3.0.0, signal-exit@^3.0.1, signal-exit@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+ integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
+
+simple-concat@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6"
+ integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=
+
+slash@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44"
+ integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==
+
+slide@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
+ integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=
+
+snapdragon-node@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
+ integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==
+ dependencies:
+ define-property "^1.0.0"
+ isobject "^3.0.0"
+ snapdragon-util "^3.0.1"
+
+snapdragon-util@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
+ integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==
+ dependencies:
+ kind-of "^3.2.0"
+
+snapdragon@^0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
+ integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==
+ dependencies:
+ base "^0.11.1"
+ debug "^2.2.0"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ map-cache "^0.2.2"
+ source-map "^0.5.6"
+ source-map-resolve "^0.5.0"
+ use "^3.1.0"
+
+sntp@2.x.x:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8"
+ integrity sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==
+ dependencies:
+ hoek "4.x.x"
+
+sort-keys@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
+ integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=
+ dependencies:
+ is-plain-obj "^1.0.0"
+
+source-map-cjs@~0.1.31:
+ version "0.1.32"
+ resolved "https://registry.yarnpkg.com/source-map-cjs/-/source-map-cjs-0.1.32.tgz#b113f00065b484f4d3a1123ef084046a56228ce7"
+ integrity sha1-sRPwAGW0hPTToRI+8IQEalYijOc=
+
+source-map-resolve@^0.5.0:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"
+ integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==
+ dependencies:
+ atob "^2.1.1"
+ decode-uri-component "^0.2.0"
+ resolve-url "^0.2.1"
+ source-map-url "^0.4.0"
+ urix "^0.1.0"
+
+source-map-support@^0.5.5:
+ version "0.5.9"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
+ integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
+source-map-url@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
+ integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
+
+source-map@0.5.6:
+ version "0.5.6"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
+ integrity sha1-dc449SvwczxafwwRjYEzSiu19BI=
+
+source-map@^0.4.4:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
+ integrity sha1-66T12pwNyZneaAMti092FzZSA2s=
+ dependencies:
+ amdefine ">=0.0.4"
+
+source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.3:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+ integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
+
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+ integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+
+spawn-wrap@^1.4.2:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c"
+ integrity sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==
+ dependencies:
+ foreground-child "^1.5.6"
+ mkdirp "^0.5.0"
+ os-homedir "^1.0.1"
+ rimraf "^2.6.2"
+ signal-exit "^3.0.2"
+ which "^1.3.0"
+
+spdx-correct@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4"
+ integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==
+ dependencies:
+ spdx-expression-parse "^3.0.0"
+ spdx-license-ids "^3.0.0"
+
+spdx-exceptions@^2.1.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977"
+ integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==
+
+spdx-expression-parse@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0"
+ integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==
+ dependencies:
+ spdx-exceptions "^2.1.0"
+ spdx-license-ids "^3.0.0"
+
+spdx-license-ids@^3.0.0:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz#a59efc09784c2a5bada13cfeaf5c75dd214044d2"
+ integrity sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==
+
+split-string@^3.0.1, split-string@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
+ integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==
+ dependencies:
+ extend-shallow "^3.0.0"
+
+split2@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493"
+ integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==
+ dependencies:
+ through2 "^2.0.2"
+
+split@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/split/-/split-0.1.2.tgz#f0710744c453d551fc7143ead983da6014e336cc"
+ integrity sha1-8HEHRMRT1VH8cUPq2YPaYBTjNsw=
+ dependencies:
+ through "1"
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+ integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
+
+sshpk@^1.7.0:
+ version "1.15.2"
+ resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.15.2.tgz#c946d6bd9b1a39d0e8635763f5242d6ed6dcb629"
+ integrity sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==
+ dependencies:
+ asn1 "~0.2.3"
+ assert-plus "^1.0.0"
+ bcrypt-pbkdf "^1.0.0"
+ dashdash "^1.12.0"
+ ecc-jsbn "~0.1.1"
+ getpass "^0.1.1"
+ jsbn "~0.1.0"
+ safer-buffer "^2.0.2"
+ tweetnacl "~0.14.0"
+
+stack-generator@^2.0.1:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-2.0.3.tgz#bb74385c67ffc4ccf3c4dee5831832d4e509c8a0"
+ integrity sha512-kdzGoqrnqsMxOEuXsXyQTmvWXZmG0f3Ql2GDx5NtmZs59sT2Bt9Vdyq0XdtxUi58q/+nxtbF9KOQ9HkV1QznGg==
+ dependencies:
+ stackframe "^1.0.4"
+
+stack-mapper@~0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/stack-mapper/-/stack-mapper-0.2.2.tgz#789029054937b7d47c1b5b67612cbb1e7cfe7071"
+ integrity sha1-eJApBUk3t9R8G1tnYSy7Hnz+cHE=
+ dependencies:
+ array-map "0.0.0"
+ foreach-shim "~0.1.1"
+ isarray "0.0.1"
+ source-map-cjs "~0.1.31"
+
+stack-utils@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8"
+ integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==
+
+stackframe@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.0.4.tgz#357b24a992f9427cba6b545d96a14ed2cbca187b"
+ integrity sha512-to7oADIniaYwS3MhtCa/sQhrxidCCQiF/qp4/m5iN3ipf0Y7Xlri0f6eG29r08aL7JYl8n32AF3Q5GYBZ7K8vw==
+
+stacktrace-gps@^3.0.1:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/stacktrace-gps/-/stacktrace-gps-3.0.2.tgz#33f8baa4467323ab2bd1816efa279942ba431ccc"
+ integrity sha512-9o+nWhiz5wFnrB3hBHs2PTyYrS60M1vvpSzHxwxnIbtY2q9Nt51hZvhrG1+2AxD374ecwyS+IUwfkHRE/2zuGg==
+ dependencies:
+ source-map "0.5.6"
+ stackframe "^1.0.4"
+
+stacktrace-js@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/stacktrace-js/-/stacktrace-js-2.0.0.tgz#776ca646a95bc6c6b2b90776536a7fc72c6ddb58"
+ integrity sha1-d2ymRqlbxsayuQd2U2p/xyxt21g=
+ dependencies:
+ error-stack-parser "^2.0.1"
+ stack-generator "^2.0.1"
+ stacktrace-gps "^3.0.1"
+
+static-extend@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
+ integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=
+ dependencies:
+ define-property "^0.2.5"
+ object-copy "^0.1.0"
+
+"statuses@>= 1.4.0 < 2":
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
+ integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
+
+statuses@~1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
+ integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==
+
+stream-browserify@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db"
+ integrity sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=
+ dependencies:
+ inherits "~2.0.1"
+ readable-stream "^2.0.2"
+
+stream-combiner2@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe"
+ integrity sha1-+02KFCDqNidk4hrUeAOXvry0HL4=
+ dependencies:
+ duplexer2 "~0.1.0"
+ readable-stream "^2.0.2"
+
+stream-http@^2.0.0:
+ version "2.8.3"
+ resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc"
+ integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==
+ dependencies:
+ builtin-status-codes "^3.0.0"
+ inherits "^2.0.1"
+ readable-stream "^2.3.6"
+ to-arraybuffer "^1.0.0"
+ xtend "^4.0.0"
+
+stream-shift@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
+ integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=
+
+stream-splicer@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83"
+ integrity sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=
+ dependencies:
+ inherits "^2.0.1"
+ readable-stream "^2.0.2"
+
+strict-uri-encode@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
+ integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=
+
+string-width@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
+ integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=
+ dependencies:
+ code-point-at "^1.0.0"
+ is-fullwidth-code-point "^1.0.0"
+ strip-ansi "^3.0.0"
+
+"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
+ integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^4.0.0"
+
+string.prototype.trim@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea"
+ integrity sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=
+ dependencies:
+ define-properties "^1.1.2"
+ es-abstract "^1.5.0"
+ function-bind "^1.0.2"
+
+string_decoder@^1.1.1:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d"
+ integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==
+ dependencies:
+ safe-buffer "~5.1.0"
+
+string_decoder@~0.10.0, string_decoder@~0.10.x:
+ version "0.10.31"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
+ integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=
+
+string_decoder@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
+ integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
+ dependencies:
+ safe-buffer "~5.1.0"
+
+stringstream@~0.0.5:
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72"
+ integrity sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==
+
+strip-ansi@^3.0.0, strip-ansi@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
+ dependencies:
+ ansi-regex "^2.0.0"
+
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
+ dependencies:
+ ansi-regex "^3.0.0"
+
+strip-bom@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
+ integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=
+ dependencies:
+ is-utf8 "^0.2.0"
+
+strip-eof@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
+ integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
+
+strip-json-comments@~2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
+ integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
+
+subarg@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2"
+ integrity sha1-9izxdYHplrSPyWVpn1TAauJouNI=
+ dependencies:
+ minimist "^1.1.0"
+
+superagent@~3.8.2:
+ version "3.8.3"
+ resolved "https://registry.yarnpkg.com/superagent/-/superagent-3.8.3.tgz#460ea0dbdb7d5b11bc4f78deba565f86a178e128"
+ integrity sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==
+ dependencies:
+ component-emitter "^1.2.0"
+ cookiejar "^2.1.0"
+ debug "^3.1.0"
+ extend "^3.0.0"
+ form-data "^2.3.1"
+ formidable "^1.2.0"
+ methods "^1.1.1"
+ mime "^1.4.1"
+ qs "^6.5.1"
+ readable-stream "^2.3.5"
+
+supports-color@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
+ integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
+
+supports-color@^3.1.2:
+ version "3.2.3"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
+ integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=
+ dependencies:
+ has-flag "^1.0.0"
+
+supports-color@^5.3.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
+ integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
+ dependencies:
+ has-flag "^3.0.0"
+
+syntax-error@^1.1.1:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c"
+ integrity sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==
+ dependencies:
+ acorn-node "^1.2.0"
+
+tap-finished@~0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/tap-finished/-/tap-finished-0.0.1.tgz#08b5b543fdc04830290c6c561279552e71c4bd67"
+ integrity sha1-CLW1Q/3ASDApDGxWEnlVLnHEvWc=
+ dependencies:
+ tap-parser "~0.2.0"
+ through "~2.3.4"
+
+tap-mocha-reporter@^3.0.7:
+ version "3.0.7"
+ resolved "https://registry.yarnpkg.com/tap-mocha-reporter/-/tap-mocha-reporter-3.0.7.tgz#235e57893b500861ea5d0924965dadfb2f05eaa7"
+ integrity sha512-GHVXJ38C3oPRpM3YUc43JlGdpVZYiKeT1fmAd3HH2+J+ZWwsNAUFvRRdoGsXLw9+gU9o+zXpBqhS/oXyRQYwlA==
+ dependencies:
+ color-support "^1.1.0"
+ debug "^2.1.3"
+ diff "^1.3.2"
+ escape-string-regexp "^1.0.3"
+ glob "^7.0.5"
+ js-yaml "^3.3.1"
+ tap-parser "^5.1.0"
+ unicode-length "^1.0.0"
+ optionalDependencies:
+ readable-stream "^2.1.5"
+
+tap-parser@^5.1.0, tap-parser@~5.4.0:
+ version "5.4.0"
+ resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-5.4.0.tgz#6907e89725d7b7fa6ae41ee2c464c3db43188aec"
+ integrity sha512-BIsIaGqv7uTQgTW1KLTMNPSEQf4zDDPgYOBRdgOfuB+JFOLRBfEu6cLa/KvMvmqggu1FKXDfitjLwsq4827RvA==
+ dependencies:
+ events-to-array "^1.0.1"
+ js-yaml "^3.2.7"
+ optionalDependencies:
+ readable-stream "^2"
+
+tap-parser@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-7.0.0.tgz#54db35302fda2c2ccc21954ad3be22b2cba42721"
+ integrity sha512-05G8/LrzqOOFvZhhAk32wsGiPZ1lfUrl+iV7+OkKgfofZxiceZWMHkKmow71YsyVQ8IvGBP2EjcIjE5gL4l5lA==
+ dependencies:
+ events-to-array "^1.0.1"
+ js-yaml "^3.2.7"
+ minipass "^2.2.0"
+
+tap-parser@~0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-0.2.1.tgz#8e1e823f2114ee21d032e2f31e4fb642a296f50b"
+ integrity sha1-jh6CPyEU7iHQMuLzHk+2QqKW9Qs=
+ dependencies:
+ split "~0.1.2"
+
+tap@^11.0.0:
+ version "11.1.5"
+ resolved "https://registry.yarnpkg.com/tap/-/tap-11.1.5.tgz#31bbef84c7a2ca78b2f811edf5fabd336c0ec846"
+ integrity sha512-rOmL7+8U5v7E8ADxFF9SYbGIrqdYPeJy8d6eFMStEXIasJ85tjv8F9M4SSry314eIvqRv/aKf/0YVrkoMj/byQ==
+ dependencies:
+ bind-obj-methods "^2.0.0"
+ bluebird "^3.5.1"
+ clean-yaml-object "^0.1.0"
+ color-support "^1.1.0"
+ coveralls "^3.0.1"
+ foreground-child "^1.3.3"
+ fs-exists-cached "^1.0.0"
+ function-loop "^1.0.1"
+ glob "^7.0.0"
+ isexe "^2.0.0"
+ js-yaml "^3.11.0"
+ minipass "^2.3.0"
+ mkdirp "^0.5.1"
+ nyc "^11.7.2"
+ opener "^1.4.1"
+ os-homedir "^1.0.2"
+ own-or "^1.0.0"
+ own-or-env "^1.0.1"
+ rimraf "^2.6.2"
+ signal-exit "^3.0.0"
+ source-map-support "^0.5.5"
+ stack-utils "^1.0.0"
+ tap-mocha-reporter "^3.0.7"
+ tap-parser "^7.0.0"
+ tmatch "^3.1.0"
+ trivial-deferred "^1.0.1"
+ tsame "^1.1.2"
+ write-file-atomic "^2.3.0"
+ yapool "^1.0.0"
+
+tape@^4.9.0:
+ version "4.9.1"
+ resolved "https://registry.yarnpkg.com/tape/-/tape-4.9.1.tgz#1173d7337e040c76fbf42ec86fcabedc9b3805c9"
+ integrity sha512-6fKIXknLpoe/Jp4rzHKFPpJUHDHDqn8jus99IfPnHIjyz78HYlefTGD3b5EkbQzuLfaEvmfPK3IolLgq2xT3kw==
+ dependencies:
+ deep-equal "~1.0.1"
+ defined "~1.0.0"
+ for-each "~0.3.3"
+ function-bind "~1.1.1"
+ glob "~7.1.2"
+ has "~1.0.3"
+ inherits "~2.0.3"
+ minimist "~1.2.0"
+ object-inspect "~1.6.0"
+ resolve "~1.7.1"
+ resumer "~0.0.0"
+ string.prototype.trim "~1.1.2"
+ through "~2.3.8"
+
+tar-fs@^1.16.2:
+ version "1.16.3"
+ resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509"
+ integrity sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==
+ dependencies:
+ chownr "^1.0.1"
+ mkdirp "^0.5.1"
+ pump "^1.0.0"
+ tar-stream "^1.1.2"
+
+tar-stream@^1.1.2, tar-stream@^1.5.0:
+ version "1.6.2"
+ resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555"
+ integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==
+ dependencies:
+ bl "^1.0.0"
+ buffer-alloc "^1.2.0"
+ end-of-stream "^1.0.0"
+ fs-constants "^1.0.0"
+ readable-stream "^2.3.0"
+ to-buffer "^1.1.1"
+ xtend "^4.0.0"
+
+tar@^4:
+ version "4.4.8"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d"
+ integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==
+ dependencies:
+ chownr "^1.1.1"
+ fs-minipass "^1.2.5"
+ minipass "^2.3.4"
+ minizlib "^1.1.1"
+ mkdirp "^0.5.0"
+ safe-buffer "^5.1.2"
+ yallist "^3.0.2"
+
+test-exclude@^4.2.0:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20"
+ integrity sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA==
+ dependencies:
+ arrify "^1.0.1"
+ micromatch "^2.3.11"
+ object-assign "^4.1.0"
+ read-pkg-up "^1.0.1"
+ require-main-filename "^1.0.1"
+
+through2@^2.0.0, through2@^2.0.2, through2@^2.0.3:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd"
+ integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==
+ dependencies:
+ readable-stream "~2.3.6"
+ xtend "~4.0.1"
+
+through2@~0.6.3:
+ version "0.6.5"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
+ integrity sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=
+ dependencies:
+ readable-stream ">=1.0.33-1 <1.1.0-0"
+ xtend ">=4.0.0 <4.1.0-0"
+
+through@1:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/through/-/through-1.1.2.tgz#344a5425a3773314ca7e0eb6512fbafaf76c0bfe"
+ integrity sha1-NEpUJaN3MxTKfg62US+6+vdsC/4=
+
+"through@>=2.2.7 <3", through@^2.3.8, through@~2.3.4, through@~2.3.8:
+ version "2.3.8"
+ resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
+ integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
+
+timed-out@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"
+ integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=
+
+timers-browserify@^1.0.1:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d"
+ integrity sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=
+ dependencies:
+ process "~0.11.0"
+
+tmatch@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/tmatch/-/tmatch-3.1.0.tgz#701264fd7582d0144a80c85af3358cca269c71e3"
+ integrity sha512-W3MSATOCN4pVu2qFxmJLIArSifeSOFqnfx9hiUaVgOmeRoI2NbU7RNga+6G+L8ojlFeQge+ZPCclWyUpQ8UeNQ==
+
+to-arraybuffer@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
+ integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=
+
+to-buffer@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80"
+ integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==
+
+to-fast-properties@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
+ integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=
+
+to-fast-properties@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
+ integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
+
+to-object-path@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
+ integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=
+ dependencies:
+ kind-of "^3.0.2"
+
+to-regex-range@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
+ integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=
+ dependencies:
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+
+to-regex@^3.0.1, to-regex@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
+ integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==
+ dependencies:
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ regex-not "^1.0.2"
+ safe-regex "^1.1.0"
+
+tough-cookie@~2.3.3:
+ version "2.3.4"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
+ integrity sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==
+ dependencies:
+ punycode "^1.4.1"
+
+tough-cookie@~2.4.3:
+ version "2.4.3"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"
+ integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==
+ dependencies:
+ psl "^1.1.24"
+ punycode "^1.4.1"
+
+trim-right@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
+ integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=
+
+trivial-deferred@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/trivial-deferred/-/trivial-deferred-1.0.1.tgz#376d4d29d951d6368a6f7a0ae85c2f4d5e0658f3"
+ integrity sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=
+
+tsame@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/tsame/-/tsame-1.1.2.tgz#5ce0002acf685942789c63018797a2aa5e6b03c5"
+ integrity sha512-ovCs24PGjmByVPr9tSIOs/yjUX9sJl0grEmOsj9dZA/UknQkgPOKcUqM84aSCvt9awHuhc/boMzTg3BHFalxWw==
+
+tty-browserify@0.0.1, tty-browserify@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811"
+ integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==
+
+tunnel-agent@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
+ integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
+ dependencies:
+ safe-buffer "^5.0.1"
+
+tweetnacl@^0.14.3, tweetnacl@~0.14.0:
+ version "0.14.5"
+ resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
+ integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
+
+type-is@~1.6.16:
+ version "1.6.16"
+ resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194"
+ integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==
+ dependencies:
+ media-typer "0.3.0"
+ mime-types "~2.1.18"
+
+typedarray@^0.0.6, typedarray@~0.0.5:
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
+ integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
+
+uglify-js@^2.6:
+ version "2.8.29"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
+ integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0=
+ dependencies:
+ source-map "~0.5.1"
+ yargs "~3.10.0"
+ optionalDependencies:
+ uglify-to-browserify "~1.0.0"
+
+uglify-js@^3.1.4:
+ version "3.4.9"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3"
+ integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==
+ dependencies:
+ commander "~2.17.1"
+ source-map "~0.6.1"
+
+uglify-to-browserify@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+ integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc=
+
+umd@^3.0.0:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.3.tgz#aa9fe653c42b9097678489c01000acb69f0b26cf"
+ integrity sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==
+
+undeclared-identifiers@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz#7d850a98887cff4bd0bf64999c014d08ed6d1acc"
+ integrity sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==
+ dependencies:
+ acorn-node "^1.3.0"
+ get-assigned-identifiers "^1.2.0"
+ simple-concat "^1.0.0"
+ xtend "^4.0.1"
+
+unicode-canonical-property-names-ecmascript@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
+ integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==
+
+unicode-length@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/unicode-length/-/unicode-length-1.0.3.tgz#5ada7a7fed51841a418a328cf149478ac8358abb"
+ integrity sha1-Wtp6f+1RhBpBijKM8UlHisg1irs=
+ dependencies:
+ punycode "^1.3.2"
+ strip-ansi "^3.0.1"
+
+unicode-match-property-ecmascript@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c"
+ integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==
+ dependencies:
+ unicode-canonical-property-names-ecmascript "^1.0.4"
+ unicode-property-aliases-ecmascript "^1.0.4"
+
+unicode-match-property-value-ecmascript@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4"
+ integrity sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ==
+
+unicode-property-aliases-ecmascript@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0"
+ integrity sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg==
+
+union-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
+ integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=
+ dependencies:
+ arr-union "^3.1.0"
+ get-value "^2.0.6"
+ is-extendable "^0.1.1"
+ set-value "^0.4.3"
+
+universalify@^0.1.0:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
+ integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
+
+unpipe@1.0.0, unpipe@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
+ integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
+
+unset-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
+ integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=
+ dependencies:
+ has-value "^0.3.1"
+ isobject "^3.0.0"
+
+upath@^1.0.5:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd"
+ integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==
+
+uri-js@^4.2.2:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
+ integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
+ dependencies:
+ punycode "^2.1.0"
+
+urix@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
+ integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
+
+url-parse-lax@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
+ integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
+ dependencies:
+ prepend-http "^2.0.0"
+
+url-to-options@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9"
+ integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=
+
+url@~0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
+ integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=
+ dependencies:
+ punycode "1.3.2"
+ querystring "0.2.0"
+
+use@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
+ integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
+
+util-deprecate@^1.0.1, util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+ integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
+
+util-promisify@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53"
+ integrity sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=
+ dependencies:
+ object.getownpropertydescriptors "^2.0.3"
+
+util@0.10.3:
+ version "0.10.3"
+ resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9"
+ integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk=
+ dependencies:
+ inherits "2.0.1"
+
+util@~0.10.1:
+ version "0.10.4"
+ resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901"
+ integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==
+ dependencies:
+ inherits "2.0.3"
+
+utils-merge@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
+ integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
+
+uuid@^3.0.0, uuid@^3.1.0, uuid@^3.3.2:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
+ integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==
+
+validate-npm-package-license@^3.0.1:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
+ integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==
+ dependencies:
+ spdx-correct "^3.0.0"
+ spdx-expression-parse "^3.0.0"
+
+vargs@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/vargs/-/vargs-0.1.0.tgz#6b6184da6520cc3204ce1b407cac26d92609ebff"
+ integrity sha1-a2GE2mUgzDIEzhtAfKwm2SYJ6/8=
+
+vary@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
+ integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
+
+verror@1.10.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
+ integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
+ dependencies:
+ assert-plus "^1.0.0"
+ core-util-is "1.0.2"
+ extsprintf "^1.2.0"
+
+vm-browserify@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019"
+ integrity sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==
+
+vm-browserify@~0.0.1:
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
+ integrity sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=
+ dependencies:
+ indexof "0.0.1"
+
+walk@2.3.9:
+ version "2.3.9"
+ resolved "https://registry.yarnpkg.com/walk/-/walk-2.3.9.tgz#31b4db6678f2ae01c39ea9fb8725a9031e558a7b"
+ integrity sha1-MbTbZnjyrgHDnqn7hyWpAx5Vins=
+ dependencies:
+ foreachasync "^3.0.0"
+
+watchify@~3.11.0:
+ version "3.11.0"
+ resolved "https://registry.yarnpkg.com/watchify/-/watchify-3.11.0.tgz#03f1355c643955e7ab8dcbf399f624644221330f"
+ integrity sha512-7jWG0c3cKKm2hKScnSAMUEUjRJKXUShwMPk0ASVhICycQhwND3IMAdhJYmc1mxxKzBUJTSF5HZizfrKrS6BzkA==
+ dependencies:
+ anymatch "^1.3.0"
+ browserify "^16.1.0"
+ chokidar "^1.0.0"
+ defined "^1.0.0"
+ outpipe "^1.1.0"
+ through2 "^2.0.0"
+ xtend "^4.0.0"
+
+wd@~1.10.0:
+ version "1.10.3"
+ resolved "https://registry.yarnpkg.com/wd/-/wd-1.10.3.tgz#395ac7eb58a98e556369f8f8e5f845d91fb152a3"
+ integrity sha512-ffqqZDtFFLeg5u/4pw2vYKECW+z+vW6vc+7rcqF15uu1/rmw3BydV84BONNc9DIcQ5Z7gQFS/hAuMvj53eVtSg==
+ dependencies:
+ archiver "2.1.1"
+ async "2.0.1"
+ lodash "4.17.10"
+ mkdirp "^0.5.1"
+ q "1.4.1"
+ request "2.85.0"
+ vargs "0.1.0"
+
+which-module@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
+ integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
+
+which@^1.2.9, which@^1.3.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
+ integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
+ dependencies:
+ isexe "^2.0.0"
+
+wide-align@^1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
+ integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==
+ dependencies:
+ string-width "^1.0.2 || 2"
+
+window-size@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
+ integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=
+
+wordwrap@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+ integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=
+
+wordwrap@~0.0.2:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
+ integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc=
+
+wrap-ansi@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
+ integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=
+ dependencies:
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
+
+write-file-atomic@^1.1.4:
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f"
+ integrity sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=
+ dependencies:
+ graceful-fs "^4.1.11"
+ imurmurhash "^0.1.4"
+ slide "^1.1.5"
+
+write-file-atomic@^2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab"
+ integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==
+ dependencies:
+ graceful-fs "^4.1.11"
+ imurmurhash "^0.1.4"
+ signal-exit "^3.0.2"
+
+xml2js@~0.4.4:
+ version "0.4.19"
+ resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7"
+ integrity sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==
+ dependencies:
+ sax ">=0.6.0"
+ xmlbuilder "~9.0.1"
+
+xmlbuilder@~9.0.1:
+ version "9.0.7"
+ resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"
+ integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=
+
+"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
+ integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68=
+
+y18n@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
+ integrity sha1-bRX7qITAhnnA136I53WegR4H+kE=
+
+yallist@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
+ integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
+
+yallist@^3.0.0, yallist@^3.0.2:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9"
+ integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==
+
+yamljs@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.3.0.tgz#dc060bf267447b39f7304e9b2bfbe8b5a7ddb03b"
+ integrity sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==
+ dependencies:
+ argparse "^1.0.7"
+ glob "^7.0.5"
+
+yapool@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/yapool/-/yapool-1.0.0.tgz#f693f29a315b50d9a9da2646a7a6645c96985b6a"
+ integrity sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o=
+
+yargs-parser@^8.0.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950"
+ integrity sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==
+ dependencies:
+ camelcase "^4.1.0"
+
+yargs-parser@^9.0.2:
+ version "9.0.2"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077"
+ integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=
+ dependencies:
+ camelcase "^4.1.0"
+
+yargs@11.1.0:
+ version "11.1.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77"
+ integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==
+ dependencies:
+ cliui "^4.0.0"
+ decamelize "^1.1.1"
+ find-up "^2.1.0"
+ get-caller-file "^1.0.1"
+ os-locale "^2.0.0"
+ require-directory "^2.1.1"
+ require-main-filename "^1.0.1"
+ set-blocking "^2.0.0"
+ string-width "^2.0.0"
+ which-module "^2.0.0"
+ y18n "^3.2.1"
+ yargs-parser "^9.0.2"
+
+yargs@~3.10.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+ integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=
+ dependencies:
+ camelcase "^1.0.2"
+ cliui "^2.1.0"
+ decamelize "^1.0.0"
+ window-size "0.1.0"
+
+zip-stream@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-1.2.0.tgz#a8bc45f4c1b49699c6b90198baacaacdbcd4ba04"
+ integrity sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=
+ dependencies:
+ archiver-utils "^1.3.0"
+ compress-commons "^1.2.0"
+ lodash "^4.8.0"
+ readable-stream "^2.0.0"
diff --git a/deps/npm/node_modules/rimraf/package.json b/deps/npm/node_modules/rimraf/package.json
index 758856bf6f..a82c85a695 100644
--- a/deps/npm/node_modules/rimraf/package.json
+++ b/deps/npm/node_modules/rimraf/package.json
@@ -1,46 +1,39 @@
{
- "_args": [
- [
- "rimraf@2.6.2",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "rimraf@2.6.2",
- "_id": "rimraf@2.6.2",
+ "_from": "rimraf@2.6.3",
+ "_id": "rimraf@2.6.3",
"_inBundle": false,
- "_integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
+ "_integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
"_location": "/rimraf",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "rimraf@2.6.2",
+ "raw": "rimraf@2.6.3",
"name": "rimraf",
"escapedName": "rimraf",
- "rawSpec": "2.6.2",
+ "rawSpec": "2.6.3",
"saveSpec": null,
- "fetchSpec": "2.6.2"
+ "fetchSpec": "2.6.3"
},
"_requiredBy": [
+ "#USER",
"/",
"/cacache",
"/copy-concurrently",
- "/del",
+ "/flat-cache",
"/fs-vacuum",
"/fstream",
"/libcipm",
"/libnpx",
"/move-concurrently",
"/node-gyp",
- "/npm-profile/cacache",
- "/npm-registry-fetch/cacache",
"/pacote",
- "/tacks",
"/tap"
],
- "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
- "_spec": "2.6.2",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+ "_shasum": "b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab",
+ "_spec": "rimraf@2.6.3",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -52,13 +45,15 @@
"bugs": {
"url": "https://github.com/isaacs/rimraf/issues"
},
+ "bundleDependencies": false,
"dependencies": {
- "glob": "^7.0.5"
+ "glob": "^7.1.3"
},
+ "deprecated": false,
"description": "A deep deletion module for node (like `rm -rf`)",
"devDependencies": {
"mkdirp": "^0.5.1",
- "tap": "^10.1.2"
+ "tap": "^12.1.1"
},
"files": [
"LICENSE",
@@ -75,7 +70,10 @@
"url": "git://github.com/isaacs/rimraf.git"
},
"scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
"test": "tap test/*.js"
},
- "version": "2.6.2"
+ "version": "2.6.3"
}
diff --git a/deps/npm/node_modules/run-queue/node_modules/aproba/LICENSE b/deps/npm/node_modules/run-queue/node_modules/aproba/LICENSE
new file mode 100644
index 0000000000..2a4982dc40
--- /dev/null
+++ b/deps/npm/node_modules/run-queue/node_modules/aproba/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/run-queue/node_modules/aproba/README.md b/deps/npm/node_modules/run-queue/node_modules/aproba/README.md
new file mode 100644
index 0000000000..e94799201c
--- /dev/null
+++ b/deps/npm/node_modules/run-queue/node_modules/aproba/README.md
@@ -0,0 +1,93 @@
+aproba
+======
+
+A ridiculously light-weight function argument validator
+
+```
+var validate = require("aproba")
+
+function myfunc(a, b, c) {
+ // `a` must be a string, `b` a number, `c` a function
+ validate('SNF', arguments) // [a,b,c] is also valid
+}
+
+myfunc('test', 23, function () {}) // ok
+myfunc(123, 23, function () {}) // type error
+myfunc('test', 23) // missing arg error
+myfunc('test', 23, function () {}, true) // too many args error
+
+```
+
+Valid types are:
+
+| type | description
+| :--: | :----------
+| * | matches any type
+| A | `Array.isArray` OR an `arguments` object
+| S | typeof == string
+| N | typeof == number
+| F | typeof == function
+| O | typeof == object and not type A and not type E
+| B | typeof == boolean
+| E | `instanceof Error` OR `null` **(special: see below)**
+| Z | == `null`
+
+Validation failures throw one of three exception types, distinguished by a
+`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
+
+If you pass in an invalid type then it will throw with a code of
+`EUNKNOWNTYPE`.
+
+If an **error** argument is found and is not null then the remaining
+arguments are optional. That is, if you say `ESO` then that's like using a
+non-magical `E` in: `E|ESO|ZSO`.
+
+### But I have optional arguments?!
+
+You can provide more than one signature by separating them with pipes `|`.
+If any signature matches the arguments then they'll be considered valid.
+
+So for example, say you wanted to write a signature for
+`fs.createWriteStream`. The docs for it describe it thusly:
+
+```
+fs.createWriteStream(path[, options])
+```
+
+This would be a signature of `SO|S`. That is, a string and and object, or
+just a string.
+
+Now, if you read the full `fs` docs, you'll see that actually path can ALSO
+be a buffer. And options can be a string, that is:
+```
+path <String> | <Buffer>
+options <String> | <Object>
+```
+
+To reproduce this you have to fully enumerate all of the possible
+combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
+awkwardness is a feature: It reminds you of the complexity you're adding to
+your API when you do this sort of thing.
+
+
+### Browser support
+
+This has no dependencies and should work in browsers, though you'll have
+noisier stack traces.
+
+### Why this exists
+
+I wanted a very simple argument validator. It needed to do two things:
+
+1. Be more concise and easier to use than assertions
+
+2. Not encourage an infinite bikeshed of DSLs
+
+This is why types are specified by a single character and there's no such
+thing as an optional argument.
+
+This is not intended to validate user data. This is specifically about
+asserting the interface of your functions.
+
+If you need greater validation, I encourage you to write them by hand or
+look elsewhere.
diff --git a/deps/npm/node_modules/run-queue/node_modules/aproba/index.js b/deps/npm/node_modules/run-queue/node_modules/aproba/index.js
new file mode 100644
index 0000000000..6f3f797c09
--- /dev/null
+++ b/deps/npm/node_modules/run-queue/node_modules/aproba/index.js
@@ -0,0 +1,105 @@
+'use strict'
+
+function isArguments (thingy) {
+ return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
+}
+
+var types = {
+ '*': {label: 'any', check: function () { return true }},
+ A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
+ S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
+ N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
+ F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
+ O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
+ B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
+ E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
+ Z: {label: 'null', check: function (thingy) { return thingy == null }}
+}
+
+function addSchema (schema, arity) {
+ var group = arity[schema.length] = arity[schema.length] || []
+ if (group.indexOf(schema) === -1) group.push(schema)
+}
+
+var validate = module.exports = function (rawSchemas, args) {
+ if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
+ if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
+ if (!args) throw missingRequiredArg(1, 'args')
+ if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
+ if (!types.A.check(args)) throw invalidType(1, ['array'], args)
+ var schemas = rawSchemas.split('|')
+ var arity = {}
+
+ schemas.forEach(function (schema) {
+ for (var ii = 0; ii < schema.length; ++ii) {
+ var type = schema[ii]
+ if (!types[type]) throw unknownType(ii, type)
+ }
+ if (/E.*E/.test(schema)) throw moreThanOneError(schema)
+ addSchema(schema, arity)
+ if (/E/.test(schema)) {
+ addSchema(schema.replace(/E.*$/, 'E'), arity)
+ addSchema(schema.replace(/E/, 'Z'), arity)
+ if (schema.length === 1) addSchema('', arity)
+ }
+ })
+ var matching = arity[args.length]
+ if (!matching) {
+ throw wrongNumberOfArgs(Object.keys(arity), args.length)
+ }
+ for (var ii = 0; ii < args.length; ++ii) {
+ var newMatching = matching.filter(function (schema) {
+ var type = schema[ii]
+ var typeCheck = types[type].check
+ return typeCheck(args[ii])
+ })
+ if (!newMatching.length) {
+ var labels = matching.map(function (schema) {
+ return types[schema[ii]].label
+ }).filter(function (schema) { return schema != null })
+ throw invalidType(ii, labels, args[ii])
+ }
+ matching = newMatching
+ }
+}
+
+function missingRequiredArg (num) {
+ return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
+}
+
+function unknownType (num, type) {
+ return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
+}
+
+function invalidType (num, expectedTypes, value) {
+ var valueType
+ Object.keys(types).forEach(function (typeCode) {
+ if (types[typeCode].check(value)) valueType = types[typeCode].label
+ })
+ return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
+ englishList(expectedTypes) + ' but got ' + valueType)
+}
+
+function englishList (list) {
+ return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
+}
+
+function wrongNumberOfArgs (expected, got) {
+ var english = englishList(expected)
+ var args = expected.every(function (ex) { return ex.length === 1 })
+ ? 'argument'
+ : 'arguments'
+ return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
+}
+
+function moreThanOneError (schema) {
+ return newException('ETOOMANYERRORTYPES',
+ 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
+}
+
+function newException (code, msg) {
+ var e = new Error(msg)
+ e.code = code
+ if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
+ return e
+}
diff --git a/deps/npm/node_modules/run-queue/node_modules/aproba/package.json b/deps/npm/node_modules/run-queue/node_modules/aproba/package.json
new file mode 100644
index 0000000000..04fb91f559
--- /dev/null
+++ b/deps/npm/node_modules/run-queue/node_modules/aproba/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "aproba@^1.1.1",
+ "_id": "aproba@1.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "_location": "/run-queue/aproba",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "aproba@^1.1.1",
+ "name": "aproba",
+ "escapedName": "aproba",
+ "rawSpec": "^1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.1"
+ },
+ "_requiredBy": [
+ "/run-queue"
+ ],
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
+ "_spec": "aproba@^1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/run-queue",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/aproba/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "A ridiculously light-weight argument validator (now browser friendly)",
+ "devDependencies": {
+ "standard": "^10.0.3",
+ "tap": "^10.0.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/iarna/aproba",
+ "keywords": [
+ "argument",
+ "validate"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "aproba",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/aproba.git"
+ },
+ "scripts": {
+ "test": "standard && tap -j3 test/*.js"
+ },
+ "version": "1.2.0"
+}
diff --git a/deps/npm/node_modules/semver/README.md b/deps/npm/node_modules/semver/README.md
index 9f7161e2ce..e0edbb7333 100644
--- a/deps/npm/node_modules/semver/README.md
+++ b/deps/npm/node_modules/semver/README.md
@@ -29,8 +29,6 @@ As a command-line utility:
```
$ semver -h
-SemVer 5.3.0
-
A JavaScript implementation of the http://semver.org/ specification
Copyright Isaac Z. Schlueter
@@ -54,6 +52,9 @@ Options:
-l --loose
Interpret versions and ranges loosely
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
-c --coerce
Coerce a string into SemVer if possible
(does not imply --loose)
@@ -289,9 +290,19 @@ part ::= nr | [-0-9A-Za-z]+
## Functions
-All methods and classes take a final `loose` boolean argument that, if
-true, will be more forgiving about not-quite-valid semver strings.
-The resulting output will always be 100% strict, of course.
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose` Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease` Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
Strict-mode Comparators and Ranges will be strict about the SemVer
strings that they parse.
diff --git a/deps/npm/node_modules/semver/bin/semver b/deps/npm/node_modules/semver/bin/semver
index dddbcdf118..9100ed42b8 100755
--- a/deps/npm/node_modules/semver/bin/semver
+++ b/deps/npm/node_modules/semver/bin/semver
@@ -12,10 +12,12 @@ var argv = process.argv.slice(2)
, inc = null
, version = require("../package.json").version
, loose = false
+ , includePrerelease = false
, coerce = false
, identifier = undefined
, semver = require("../semver")
, reverse = false
+ , options = {}
main()
@@ -35,6 +37,9 @@ function main () {
case "-l": case "--loose":
loose = true
break
+ case "-p": case "--include-prerelease":
+ includePrerelease = true
+ break
case "-v": case "--version":
versions.push(argv.shift())
break
@@ -66,6 +71,8 @@ function main () {
}
}
+ var options = { loose: loose, includePrerelease: includePrerelease }
+
versions = versions.map(function (v) {
return coerce ? (semver.coerce(v) || {version: v}).version : v
}).filter(function (v) {
@@ -77,7 +84,7 @@ function main () {
for (var i = 0, l = range.length; i < l ; i ++) {
versions = versions.filter(function (v) {
- return semver.satisfies(v, range[i], loose)
+ return semver.satisfies(v, range[i], options)
})
if (!versions.length) return fail()
}
@@ -94,11 +101,11 @@ function fail () { process.exit(1) }
function success () {
var compare = reverse ? "rcompare" : "compare"
versions.sort(function (a, b) {
- return semver[compare](a, b, loose)
+ return semver[compare](a, b, options)
}).map(function (v) {
- return semver.clean(v, loose)
+ return semver.clean(v, options)
}).map(function (v) {
- return inc ? semver.inc(v, inc, loose, identifier) : v
+ return inc ? semver.inc(v, inc, options, identifier) : v
}).forEach(function (v,i,_) { console.log(v) })
}
@@ -128,6 +135,9 @@ function help () {
,"-l --loose"
," Interpret versions and ranges loosely"
,""
+ ,"-p --include-prerelease"
+ ," Always include prerelease versions in range matching"
+ ,""
,"-c --coerce"
," Coerce a string into SemVer if possible"
," (does not imply --loose)"
diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json
index d7d4cbb128..2d1c04f1b9 100644
--- a/deps/npm/node_modules/semver/package.json
+++ b/deps/npm/node_modules/semver/package.json
@@ -1,19 +1,19 @@
{
- "_from": "semver@5.5.1",
- "_id": "semver@5.5.1",
+ "_from": "semver@5.6.0",
+ "_id": "semver@5.6.0",
"_inBundle": false,
- "_integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==",
+ "_integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
"_location": "/semver",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "semver@5.5.1",
+ "raw": "semver@5.6.0",
"name": "semver",
"escapedName": "semver",
- "rawSpec": "5.5.1",
+ "rawSpec": "5.6.0",
"saveSpec": null,
- "fetchSpec": "5.5.1"
+ "fetchSpec": "5.6.0"
},
"_requiredBy": [
"#USER",
@@ -21,21 +21,21 @@
"/eslint",
"/eslint-plugin-node",
"/init-package-json",
+ "/libnpmpublish",
+ "/licensee",
"/lock-verify",
"/normalize-package-data",
"/npm-install-checks",
"/npm-package-arg",
"/npm-pick-manifest",
- "/npm-registry-client",
"/package-json",
- "/pacote",
"/read-installed",
"/semver-diff"
],
- "_resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz",
- "_shasum": "7dfdd8814bdb7cabc7be0fb1d734cfb66c940477",
- "_spec": "semver@5.5.1",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
+ "_shasum": "7e74256fbaa49c75aa7c7a205cc22799cac80004",
+ "_spec": "semver@5.6.0",
+ "_where": "/Users/aeschright/code/cli",
"bin": {
"semver": "./bin/semver"
},
@@ -64,5 +64,5 @@
"scripts": {
"test": "tap test/*.js --cov -J"
},
- "version": "5.5.1"
+ "version": "5.6.0"
}
diff --git a/deps/npm/node_modules/semver/semver.js b/deps/npm/node_modules/semver/semver.js
index 6a2bc01002..16e9a6754c 100644
--- a/deps/npm/node_modules/semver/semver.js
+++ b/deps/npm/node_modules/semver/semver.js
@@ -245,7 +245,10 @@ for (var i = 0; i < R; i++) {
}
exports.parse = parse;
-function parse(version, loose) {
+function parse(version, options) {
+ if (!options || typeof options !== 'object')
+ options = { loose: !!options, includePrerelease: false }
+
if (version instanceof SemVer)
return version;
@@ -255,35 +258,37 @@ function parse(version, loose) {
if (version.length > MAX_LENGTH)
return null;
- var r = loose ? re[LOOSE] : re[FULL];
+ var r = options.loose ? re[LOOSE] : re[FULL];
if (!r.test(version))
return null;
try {
- return new SemVer(version, loose);
+ return new SemVer(version, options);
} catch (er) {
return null;
}
}
exports.valid = valid;
-function valid(version, loose) {
- var v = parse(version, loose);
+function valid(version, options) {
+ var v = parse(version, options);
return v ? v.version : null;
}
exports.clean = clean;
-function clean(version, loose) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
+function clean(version, options) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), options);
return s ? s.version : null;
}
exports.SemVer = SemVer;
-function SemVer(version, loose) {
+function SemVer(version, options) {
+ if (!options || typeof options !== 'object')
+ options = { loose: !!options, includePrerelease: false }
if (version instanceof SemVer) {
- if (version.loose === loose)
+ if (version.loose === options.loose)
return version;
else
version = version.version;
@@ -295,11 +300,13 @@ function SemVer(version, loose) {
throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
if (!(this instanceof SemVer))
- return new SemVer(version, loose);
+ return new SemVer(version, options);
+
+ debug('SemVer', version, options);
+ this.options = options;
+ this.loose = !!options.loose;
- debug('SemVer', version, loose);
- this.loose = loose;
- var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+ var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]);
if (!m)
throw new TypeError('Invalid Version: ' + version);
@@ -349,16 +356,16 @@ SemVer.prototype.toString = function() {
};
SemVer.prototype.compare = function(other) {
- debug('SemVer.compare', this.version, this.loose, other);
+ debug('SemVer.compare', this.version, this.options, other);
if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
+ other = new SemVer(other, this.options);
return this.compareMain(other) || this.comparePre(other);
};
SemVer.prototype.compareMain = function(other) {
if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
+ other = new SemVer(other, this.options);
return compareIdentifiers(this.major, other.major) ||
compareIdentifiers(this.minor, other.minor) ||
@@ -367,7 +374,7 @@ SemVer.prototype.compareMain = function(other) {
SemVer.prototype.comparePre = function(other) {
if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
+ other = new SemVer(other, this.options);
// NOT having a prerelease is > having one
if (this.prerelease.length && !other.prerelease.length)
@@ -658,19 +665,23 @@ function cmp(a, op, b, loose) {
}
exports.Comparator = Comparator;
-function Comparator(comp, loose) {
+function Comparator(comp, options) {
+ if (!options || typeof options !== 'object')
+ options = { loose: !!options, includePrerelease: false }
+
if (comp instanceof Comparator) {
- if (comp.loose === loose)
+ if (comp.loose === !!options.loose)
return comp;
else
comp = comp.value;
}
if (!(this instanceof Comparator))
- return new Comparator(comp, loose);
+ return new Comparator(comp, options);
- debug('comparator', comp, loose);
- this.loose = loose;
+ debug('comparator', comp, options);
+ this.options = options;
+ this.loose = !!options.loose;
this.parse(comp);
if (this.semver === ANY)
@@ -683,7 +694,7 @@ function Comparator(comp, loose) {
var ANY = {};
Comparator.prototype.parse = function(comp) {
- var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
var m = comp.match(r);
if (!m)
@@ -697,7 +708,7 @@ Comparator.prototype.parse = function(comp) {
if (!m[2])
this.semver = ANY;
else
- this.semver = new SemVer(m[2], this.loose);
+ this.semver = new SemVer(m[2], this.options.loose);
};
Comparator.prototype.toString = function() {
@@ -705,30 +716,33 @@ Comparator.prototype.toString = function() {
};
Comparator.prototype.test = function(version) {
- debug('Comparator.test', version, this.loose);
+ debug('Comparator.test', version, this.options.loose);
if (this.semver === ANY)
return true;
if (typeof version === 'string')
- version = new SemVer(version, this.loose);
+ version = new SemVer(version, this.options);
- return cmp(version, this.operator, this.semver, this.loose);
+ return cmp(version, this.operator, this.semver, this.options);
};
-Comparator.prototype.intersects = function(comp, loose) {
+Comparator.prototype.intersects = function(comp, options) {
if (!(comp instanceof Comparator)) {
throw new TypeError('a Comparator is required');
}
+ if (!options || typeof options !== 'object')
+ options = { loose: !!options, includePrerelease: false }
+
var rangeTmp;
if (this.operator === '') {
- rangeTmp = new Range(comp.value, loose);
- return satisfies(this.value, rangeTmp, loose);
+ rangeTmp = new Range(comp.value, options);
+ return satisfies(this.value, rangeTmp, options);
} else if (comp.operator === '') {
- rangeTmp = new Range(this.value, loose);
- return satisfies(comp.semver, rangeTmp, loose);
+ rangeTmp = new Range(this.value, options);
+ return satisfies(comp.semver, rangeTmp, options);
}
var sameDirectionIncreasing =
@@ -742,11 +756,11 @@ Comparator.prototype.intersects = function(comp, loose) {
(this.operator === '>=' || this.operator === '<=') &&
(comp.operator === '>=' || comp.operator === '<=');
var oppositeDirectionsLessThan =
- cmp(this.semver, '<', comp.semver, loose) &&
+ cmp(this.semver, '<', comp.semver, options) &&
((this.operator === '>=' || this.operator === '>') &&
(comp.operator === '<=' || comp.operator === '<'));
var oppositeDirectionsGreaterThan =
- cmp(this.semver, '>', comp.semver, loose) &&
+ cmp(this.semver, '>', comp.semver, options) &&
((this.operator === '<=' || this.operator === '<') &&
(comp.operator === '>=' || comp.operator === '>'));
@@ -757,23 +771,29 @@ Comparator.prototype.intersects = function(comp, loose) {
exports.Range = Range;
-function Range(range, loose) {
+function Range(range, options) {
+ if (!options || typeof options !== 'object')
+ options = { loose: !!options, includePrerelease: false }
+
if (range instanceof Range) {
- if (range.loose === loose) {
+ if (range.loose === !!options.loose &&
+ range.includePrerelease === !!options.includePrerelease) {
return range;
} else {
- return new Range(range.raw, loose);
+ return new Range(range.raw, options);
}
}
if (range instanceof Comparator) {
- return new Range(range.value, loose);
+ return new Range(range.value, options);
}
if (!(this instanceof Range))
- return new Range(range, loose);
+ return new Range(range, options);
- this.loose = loose;
+ this.options = options;
+ this.loose = !!options.loose;
+ this.includePrerelease = !!options.includePrerelease
// First, split based on boolean or ||
this.raw = range;
@@ -803,9 +823,8 @@ Range.prototype.toString = function() {
};
Range.prototype.parseRange = function(range) {
- var loose = this.loose;
+ var loose = this.options.loose;
range = range.trim();
- debug('range', range, loose);
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
range = range.replace(hr, hyphenReplace);
@@ -828,22 +847,22 @@ Range.prototype.parseRange = function(range) {
var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
var set = range.split(' ').map(function(comp) {
- return parseComparator(comp, loose);
- }).join(' ').split(/\s+/);
- if (this.loose) {
+ return parseComparator(comp, this.options);
+ }, this).join(' ').split(/\s+/);
+ if (this.options.loose) {
// in loose mode, throw out any that are not valid comparators
set = set.filter(function(comp) {
return !!comp.match(compRe);
});
}
set = set.map(function(comp) {
- return new Comparator(comp, loose);
- });
+ return new Comparator(comp, this.options);
+ }, this);
return set;
};
-Range.prototype.intersects = function(range, loose) {
+Range.prototype.intersects = function(range, options) {
if (!(range instanceof Range)) {
throw new TypeError('a Range is required');
}
@@ -852,7 +871,7 @@ Range.prototype.intersects = function(range, loose) {
return thisComparators.every(function(thisComparator) {
return range.set.some(function(rangeComparators) {
return rangeComparators.every(function(rangeComparator) {
- return thisComparator.intersects(rangeComparator, loose);
+ return thisComparator.intersects(rangeComparator, options);
});
});
});
@@ -861,8 +880,8 @@ Range.prototype.intersects = function(range, loose) {
// Mostly just for testing and legacy API reasons
exports.toComparators = toComparators;
-function toComparators(range, loose) {
- return new Range(range, loose).set.map(function(comp) {
+function toComparators(range, options) {
+ return new Range(range, options).set.map(function(comp) {
return comp.map(function(c) {
return c.value;
}).join(' ').trim().split(' ');
@@ -872,15 +891,15 @@ function toComparators(range, loose) {
// comprised of xranges, tildes, stars, and gtlt's at this point.
// already replaced the hyphen ranges
// turn into a set of JUST comparators.
-function parseComparator(comp, loose) {
- debug('comp', comp);
- comp = replaceCarets(comp, loose);
+function parseComparator(comp, options) {
+ debug('comp', comp, options);
+ comp = replaceCarets(comp, options);
debug('caret', comp);
- comp = replaceTildes(comp, loose);
+ comp = replaceTildes(comp, options);
debug('tildes', comp);
- comp = replaceXRanges(comp, loose);
+ comp = replaceXRanges(comp, options);
debug('xrange', comp);
- comp = replaceStars(comp, loose);
+ comp = replaceStars(comp, options);
debug('stars', comp);
return comp;
}
@@ -895,14 +914,16 @@ function isX(id) {
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes(comp, loose) {
+function replaceTildes(comp, options) {
return comp.trim().split(/\s+/).map(function(comp) {
- return replaceTilde(comp, loose);
+ return replaceTilde(comp, options);
}).join(' ');
}
-function replaceTilde(comp, loose) {
- var r = loose ? re[TILDELOOSE] : re[TILDE];
+function replaceTilde(comp, options) {
+ if (!options || typeof options !== 'object')
+ options = { loose: !!options, includePrerelease: false }
+ var r = options.loose ? re[TILDELOOSE] : re[TILDE];
return comp.replace(r, function(_, M, m, p, pr) {
debug('tilde', comp, _, M, m, p, pr);
var ret;
@@ -936,15 +957,17 @@ function replaceTilde(comp, loose) {
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
// ^1.2.3 --> >=1.2.3 <2.0.0
// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets(comp, loose) {
+function replaceCarets(comp, options) {
return comp.trim().split(/\s+/).map(function(comp) {
- return replaceCaret(comp, loose);
+ return replaceCaret(comp, options);
}).join(' ');
}
-function replaceCaret(comp, loose) {
- debug('caret', comp, loose);
- var r = loose ? re[CARETLOOSE] : re[CARET];
+function replaceCaret(comp, options) {
+ debug('caret', comp, options);
+ if (!options || typeof options !== 'object')
+ options = { loose: !!options, includePrerelease: false }
+ var r = options.loose ? re[CARETLOOSE] : re[CARET];
return comp.replace(r, function(_, M, m, p, pr) {
debug('caret', comp, _, M, m, p, pr);
var ret;
@@ -991,16 +1014,18 @@ function replaceCaret(comp, loose) {
});
}
-function replaceXRanges(comp, loose) {
- debug('replaceXRanges', comp, loose);
+function replaceXRanges(comp, options) {
+ debug('replaceXRanges', comp, options);
return comp.split(/\s+/).map(function(comp) {
- return replaceXRange(comp, loose);
+ return replaceXRange(comp, options);
}).join(' ');
}
-function replaceXRange(comp, loose) {
+function replaceXRange(comp, options) {
comp = comp.trim();
- var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ if (!options || typeof options !== 'object')
+ options = { loose: !!options, includePrerelease: false }
+ var r = options.loose ? re[XRANGELOOSE] : re[XRANGE];
return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
debug('xRange', comp, ret, gtlt, M, m, p, pr);
var xM = isX(M);
@@ -1064,8 +1089,8 @@ function replaceXRange(comp, loose) {
// Because * is AND-ed with everything else in the comparator,
// and '' means "any version", just remove the *s entirely.
-function replaceStars(comp, loose) {
- debug('replaceStars', comp, loose);
+function replaceStars(comp, options) {
+ debug('replaceStars', comp, options);
// Looseness is ignored here. star is always as loose as it gets!
return comp.trim().replace(re[STAR], '');
}
@@ -1109,22 +1134,25 @@ Range.prototype.test = function(version) {
return false;
if (typeof version === 'string')
- version = new SemVer(version, this.loose);
+ version = new SemVer(version, this.options);
for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version))
+ if (testSet(this.set[i], version, this.options))
return true;
}
return false;
};
-function testSet(set, version) {
+function testSet(set, version, options) {
for (var i = 0; i < set.length; i++) {
if (!set[i].test(version))
return false;
}
- if (version.prerelease.length) {
+ if (!options)
+ options = {}
+
+ if (version.prerelease.length && !options.includePrerelease) {
// Find the set of versions that are allowed to have prereleases
// For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
// That should allow `1.2.3-pr.2` to pass.
@@ -1152,9 +1180,9 @@ function testSet(set, version) {
}
exports.satisfies = satisfies;
-function satisfies(version, range, loose) {
+function satisfies(version, range, options) {
try {
- range = new Range(range, loose);
+ range = new Range(range, options);
} catch (er) {
return false;
}
@@ -1162,19 +1190,19 @@ function satisfies(version, range, loose) {
}
exports.maxSatisfying = maxSatisfying;
-function maxSatisfying(versions, range, loose) {
+function maxSatisfying(versions, range, options) {
var max = null;
var maxSV = null;
try {
- var rangeObj = new Range(range, loose);
+ var rangeObj = new Range(range, options);
} catch (er) {
return null;
}
versions.forEach(function (v) {
- if (rangeObj.test(v)) { // satisfies(v, range, loose)
+ if (rangeObj.test(v)) { // satisfies(v, range, options)
if (!max || maxSV.compare(v) === -1) { // compare(max, v, true)
max = v;
- maxSV = new SemVer(max, loose);
+ maxSV = new SemVer(max, options);
}
}
})
@@ -1182,19 +1210,19 @@ function maxSatisfying(versions, range, loose) {
}
exports.minSatisfying = minSatisfying;
-function minSatisfying(versions, range, loose) {
+function minSatisfying(versions, range, options) {
var min = null;
var minSV = null;
try {
- var rangeObj = new Range(range, loose);
+ var rangeObj = new Range(range, options);
} catch (er) {
return null;
}
versions.forEach(function (v) {
- if (rangeObj.test(v)) { // satisfies(v, range, loose)
+ if (rangeObj.test(v)) { // satisfies(v, range, options)
if (!min || minSV.compare(v) === 1) { // compare(min, v, true)
min = v;
- minSV = new SemVer(min, loose);
+ minSV = new SemVer(min, options);
}
}
})
@@ -1202,11 +1230,11 @@ function minSatisfying(versions, range, loose) {
}
exports.validRange = validRange;
-function validRange(range, loose) {
+function validRange(range, options) {
try {
// Return '*' instead of '' so that truthiness works.
// This will throw if it's invalid anyway
- return new Range(range, loose).range || '*';
+ return new Range(range, options).range || '*';
} catch (er) {
return null;
}
@@ -1214,20 +1242,20 @@ function validRange(range, loose) {
// Determine if version is less than all the versions possible in the range
exports.ltr = ltr;
-function ltr(version, range, loose) {
- return outside(version, range, '<', loose);
+function ltr(version, range, options) {
+ return outside(version, range, '<', options);
}
// Determine if version is greater than all the versions possible in the range.
exports.gtr = gtr;
-function gtr(version, range, loose) {
- return outside(version, range, '>', loose);
+function gtr(version, range, options) {
+ return outside(version, range, '>', options);
}
exports.outside = outside;
-function outside(version, range, hilo, loose) {
- version = new SemVer(version, loose);
- range = new Range(range, loose);
+function outside(version, range, hilo, options) {
+ version = new SemVer(version, options);
+ range = new Range(range, options);
var gtfn, ltefn, ltfn, comp, ecomp;
switch (hilo) {
@@ -1250,7 +1278,7 @@ function outside(version, range, hilo, loose) {
}
// If it satisifes the range it is not outside
- if (satisfies(version, range, loose)) {
+ if (satisfies(version, range, options)) {
return false;
}
@@ -1269,9 +1297,9 @@ function outside(version, range, hilo, loose) {
}
high = high || comparator;
low = low || comparator;
- if (gtfn(comparator.semver, high.semver, loose)) {
+ if (gtfn(comparator.semver, high.semver, options)) {
high = comparator;
- } else if (ltfn(comparator.semver, low.semver, loose)) {
+ } else if (ltfn(comparator.semver, low.semver, options)) {
low = comparator;
}
});
@@ -1295,15 +1323,15 @@ function outside(version, range, hilo, loose) {
}
exports.prerelease = prerelease;
-function prerelease(version, loose) {
- var parsed = parse(version, loose);
+function prerelease(version, options) {
+ var parsed = parse(version, options);
return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
}
exports.intersects = intersects;
-function intersects(r1, r2, loose) {
- r1 = new Range(r1, loose)
- r2 = new Range(r2, loose)
+function intersects(r1, r2, options) {
+ r1 = new Range(r1, options)
+ r2 = new Range(r2, options)
return r1.intersects(r2)
}
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000000..40992555bf
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,55 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000000..f478d58dca
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/sha/node_modules/readable-stream/README.md b/deps/npm/node_modules/sha/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..23fe3f3e30
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000000..c141a99c26
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,58 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000000..f8b2db83db
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..46924cbfdf
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..a1ca813e5a
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..bf34ac65e1
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..5d1f8b876d
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..b3f4e85a2f
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000000..aefc68bd90
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,79 @@
+'use strict';
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+var util = require('util');
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..5a0a0d88ce
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json b/deps/npm/node_modules/sha/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..3f5e9beb37
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "readable-stream@^2.0.2",
+ "_id": "readable-stream@2.3.6",
+ "_inBundle": false,
+ "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_location": "/sha/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@^2.0.2",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "^2.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.2"
+ },
+ "_requiredBy": [
+ "/sha"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
+ "_spec": "readable-stream@^2.0.2",
+ "_where": "/Users/aeschright/code/cli/node_modules/sha",
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ },
+ "version": "2.3.6"
+}
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..ffd791d7ff
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/transform.js b/deps/npm/node_modules/sha/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..b1baba26da
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000000..ebdde6a85d
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/writable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..3211a6f80d
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/readable-stream/writable.js
@@ -0,0 +1,8 @@
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+} else {
+ module.exports = Writable
+}
diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml
new file mode 100644
index 0000000000..3347a72546
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/sha/node_modules/string_decoder/README.md b/deps/npm/node_modules/sha/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..5fd58315ed
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..2e89e63f79
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/package.json b/deps/npm/node_modules/sha/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..8bd2cfa9ab
--- /dev/null
+++ b/deps/npm/node_modules/sha/node_modules/string_decoder/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "string_decoder@~1.1.1",
+ "_id": "string_decoder@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_location": "/sha/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.1.1",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.1"
+ },
+ "_requiredBy": [
+ "/sha/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
+ "_spec": "string_decoder@~1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/sha/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/spdx-license-ids/README.md b/deps/npm/node_modules/spdx-license-ids/README.md
index 09b080cb20..c7b5b5f320 100644
--- a/deps/npm/node_modules/spdx-license-ids/README.md
+++ b/deps/npm/node_modules/spdx-license-ids/README.md
@@ -23,7 +23,7 @@ All license IDs except for the currently deprecated ones.
```javascript
const ids = require('spdx-license-ids');
-//=> ['0BSD', 'AAL', 'Abstyles', 'Adobe-2006', 'Adobe-Glyph', 'ADSL', 'AFL-1.1', ...]
+//=> ['0BSD', 'AAL', 'Abstyles', 'Adobe-2006', 'Adobe-Glyph', 'ADSL', 'AFL-1.1', 'AFL-1.2', ...]
ids.includes('BSD-3-Clause'); //=> true
ids.includes('CC-BY-1.0'); //=> true
@@ -39,7 +39,7 @@ Deprecated license IDs.
```javascript
const deprecatedIds = require('spdx-license-ids/deprecated');
-//=> ['AGPL-3.0', 'eCos-2.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', ...]
+//=> ['AGPL-1.0', 'AGPL-3.0', 'eCos-2.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', ...]
deprecatedIds.includes('BSD-3-Clause'); //=> false
deprecatedIds.includes('CC-BY-1.0'); //=> false
diff --git a/deps/npm/node_modules/spdx-license-ids/deprecated.json b/deps/npm/node_modules/spdx-license-ids/deprecated.json
index 2e40ab7618..1681f4870d 100644
--- a/deps/npm/node_modules/spdx-license-ids/deprecated.json
+++ b/deps/npm/node_modules/spdx-license-ids/deprecated.json
@@ -1,23 +1,24 @@
[
+ "AGPL-1.0",
"AGPL-3.0",
- "eCos-2.0",
"GFDL-1.1",
"GFDL-1.2",
"GFDL-1.3",
"GPL-1.0",
+ "GPL-2.0",
+ "GPL-2.0-with-GCC-exception",
"GPL-2.0-with-autoconf-exception",
"GPL-2.0-with-bison-exception",
"GPL-2.0-with-classpath-exception",
"GPL-2.0-with-font-exception",
- "GPL-2.0-with-GCC-exception",
- "GPL-2.0",
- "GPL-3.0-with-autoconf-exception",
- "GPL-3.0-with-GCC-exception",
"GPL-3.0",
+ "GPL-3.0-with-GCC-exception",
+ "GPL-3.0-with-autoconf-exception",
"LGPL-2.0",
"LGPL-2.1",
"LGPL-3.0",
"Nunit",
"StandardML-NJ",
+ "eCos-2.0",
"wxWindows"
]
diff --git a/deps/npm/node_modules/spdx-license-ids/index.json b/deps/npm/node_modules/spdx-license-ids/index.json
index d383fccb3a..ed06199127 100644
--- a/deps/npm/node_modules/spdx-license-ids/index.json
+++ b/deps/npm/node_modules/spdx-license-ids/index.json
@@ -1,63 +1,61 @@
[
"0BSD",
"AAL",
- "Abstyles",
- "Adobe-2006",
- "Adobe-Glyph",
"ADSL",
"AFL-1.1",
"AFL-1.2",
"AFL-2.0",
"AFL-2.1",
"AFL-3.0",
- "Afmparse",
- "AGPL-1.0",
+ "AGPL-1.0-only",
+ "AGPL-1.0-or-later",
"AGPL-3.0-only",
"AGPL-3.0-or-later",
- "Aladdin",
"AMDPLPA",
"AML",
"AMPAS",
"ANTLR-PD",
- "Apache-1.0",
- "Apache-1.1",
- "Apache-2.0",
"APAFML",
"APL-1.0",
"APSL-1.0",
"APSL-1.1",
"APSL-1.2",
"APSL-2.0",
- "Artistic-1.0-cl8",
- "Artistic-1.0-Perl",
+ "Abstyles",
+ "Adobe-2006",
+ "Adobe-Glyph",
+ "Afmparse",
+ "Aladdin",
+ "Apache-1.0",
+ "Apache-1.1",
+ "Apache-2.0",
"Artistic-1.0",
+ "Artistic-1.0-Perl",
+ "Artistic-1.0-cl8",
"Artistic-2.0",
- "Bahyph",
- "Barr",
- "Beerware",
- "BitTorrent-1.0",
- "BitTorrent-1.1",
- "Borceux",
"BSD-1-Clause",
+ "BSD-2-Clause",
"BSD-2-Clause-FreeBSD",
"BSD-2-Clause-NetBSD",
"BSD-2-Clause-Patent",
- "BSD-2-Clause",
+ "BSD-3-Clause",
"BSD-3-Clause-Attribution",
"BSD-3-Clause-Clear",
"BSD-3-Clause-LBNL",
- "BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-No-Nuclear-License",
+ "BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-No-Nuclear-Warranty",
- "BSD-3-Clause",
- "BSD-4-Clause-UC",
"BSD-4-Clause",
+ "BSD-4-Clause-UC",
"BSD-Protection",
"BSD-Source-Code",
"BSL-1.0",
- "bzip2-1.0.5",
- "bzip2-1.0.6",
- "Caldera",
+ "Bahyph",
+ "Barr",
+ "Beerware",
+ "BitTorrent-1.0",
+ "BitTorrent-1.1",
+ "Borceux",
"CATOSL-1.1",
"CC-BY-1.0",
"CC-BY-2.0",
@@ -100,85 +98,77 @@
"CECILL-2.1",
"CECILL-B",
"CECILL-C",
- "ClArtistic",
"CNRI-Jython",
- "CNRI-Python-GPL-Compatible",
"CNRI-Python",
- "Condor-1.1",
+ "CNRI-Python-GPL-Compatible",
"CPAL-1.0",
"CPL-1.0",
"CPOL-1.02",
+ "CUA-OPL-1.0",
+ "Caldera",
+ "ClArtistic",
+ "Condor-1.1",
"Crossword",
"CrystalStacker",
- "CUA-OPL-1.0",
"Cube",
- "curl",
"D-FSL-1.0",
- "diffmark",
"DOC",
- "Dotseqn",
"DSDP",
- "dvipdfm",
+ "Dotseqn",
"ECL-1.0",
"ECL-2.0",
"EFL-1.0",
"EFL-2.0",
- "eGenix",
- "Entessa",
"EPL-1.0",
"EPL-2.0",
- "ErlPL-1.1",
"EUDatagrid",
"EUPL-1.0",
"EUPL-1.1",
"EUPL-1.2",
+ "Entessa",
+ "ErlPL-1.1",
"Eurosym",
- "Fair",
- "Frameworx-1.0",
- "FreeImage",
"FSFAP",
"FSFUL",
"FSFULLR",
"FTL",
+ "Fair",
+ "Frameworx-1.0",
+ "FreeImage",
"GFDL-1.1-only",
"GFDL-1.1-or-later",
"GFDL-1.2-only",
"GFDL-1.2-or-later",
"GFDL-1.3-only",
"GFDL-1.3-or-later",
- "Giftware",
"GL2PS",
- "Glide",
- "Glulxe",
- "gnuplot",
"GPL-1.0-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"GPL-2.0-or-later",
"GPL-3.0-only",
"GPL-3.0-or-later",
- "gSOAP-1.3b",
- "HaskellReport",
+ "Giftware",
+ "Glide",
+ "Glulxe",
"HPND",
+ "HaskellReport",
"IBM-pibs",
"ICU",
"IJG",
+ "IPA",
+ "IPL-1.0",
+ "ISC",
"ImageMagick",
- "iMatix",
"Imlib2",
"Info-ZIP",
- "Intel-ACPI",
"Intel",
+ "Intel-ACPI",
"Interbase-1.0",
- "IPA",
- "IPL-1.0",
- "ISC",
- "JasPer-2.0",
"JSON",
+ "JasPer-2.0",
"LAL-1.2",
"LAL-1.3",
- "Latex2e",
- "Leptonica",
"LGPL-2.0-only",
"LGPL-2.0-or-later",
"LGPL-2.1-only",
@@ -186,11 +176,6 @@
"LGPL-3.0-only",
"LGPL-3.0-or-later",
"LGPLLR",
- "Libpng",
- "libtiff",
- "LiLiQ-P-1.1",
- "LiLiQ-R-1.1",
- "LiLiQ-Rplus-1.1",
"LPL-1.0",
"LPL-1.02",
"LPPL-1.0",
@@ -198,59 +183,70 @@
"LPPL-1.2",
"LPPL-1.3a",
"LPPL-1.3c",
- "MakeIndex",
- "MirOS",
- "MIT-advertising",
+ "Latex2e",
+ "Leptonica",
+ "LiLiQ-P-1.1",
+ "LiLiQ-R-1.1",
+ "LiLiQ-Rplus-1.1",
+ "Libpng",
+ "Linux-OpenIB",
+ "MIT",
+ "MIT-0",
"MIT-CMU",
+ "MIT-advertising",
"MIT-enna",
"MIT-feh",
- "MIT",
"MITNFA",
- "Motosoto",
- "mpich2",
"MPL-1.0",
"MPL-1.1",
- "MPL-2.0-no-copyleft-exception",
"MPL-2.0",
+ "MPL-2.0-no-copyleft-exception",
"MS-PL",
"MS-RL",
"MTLL",
+ "MakeIndex",
+ "MirOS",
+ "Motosoto",
"Multics",
"Mup",
"NASA-1.3",
- "Naumen",
"NBPL-1.0",
"NCSA",
- "Net-SNMP",
- "NetCDF",
- "Newsletr",
"NGPL",
"NLOD-1.0",
"NLPL",
- "Nokia",
"NOSL",
- "Noweb",
"NPL-1.0",
"NPL-1.1",
"NPOSL-3.0",
"NRL",
"NTP",
+ "Naumen",
+ "Net-SNMP",
+ "NetCDF",
+ "Newsletr",
+ "Nokia",
+ "Noweb",
"OCCT-PL",
"OCLC-2.0",
+ "ODC-By-1.0",
"ODbL-1.0",
"OFL-1.0",
"OFL-1.1",
+ "OGL-UK-1.0",
+ "OGL-UK-2.0",
+ "OGL-UK-3.0",
"OGTSL",
"OLDAP-1.1",
"OLDAP-1.2",
"OLDAP-1.3",
"OLDAP-1.4",
- "OLDAP-2.0.1",
"OLDAP-2.0",
+ "OLDAP-2.0.1",
"OLDAP-2.1",
+ "OLDAP-2.2",
"OLDAP-2.2.1",
"OLDAP-2.2.2",
- "OLDAP-2.2",
"OLDAP-2.3",
"OLDAP-2.4",
"OLDAP-2.5",
@@ -258,7 +254,6 @@
"OLDAP-2.7",
"OLDAP-2.8",
"OML",
- "OpenSSL",
"OPL-1.0",
"OSET-PL-2.1",
"OSL-1.0",
@@ -266,79 +261,96 @@
"OSL-2.0",
"OSL-2.1",
"OSL-3.0",
+ "OpenSSL",
"PDDL-1.0",
"PHP-3.0",
"PHP-3.01",
"Plexus",
"PostgreSQL",
- "psfrag",
- "psutils",
"Python-2.0",
- "Qhull",
"QPL-1.0",
- "Rdisc",
+ "Qhull",
"RHeCos-1.1",
"RPL-1.1",
"RPL-1.5",
"RPSL-1.0",
"RSA-MD",
"RSCPL",
+ "Rdisc",
"Ruby",
"SAX-PD",
- "Saxpath",
"SCEA",
- "Sendmail",
"SGI-B-1.0",
"SGI-B-1.1",
"SGI-B-2.0",
- "SimPL-2.0",
- "SISSL-1.2",
"SISSL",
- "Sleepycat",
+ "SISSL-1.2",
"SMLNJ",
"SMPPL",
"SNIA",
+ "SPL-1.0",
+ "SWL",
+ "Saxpath",
+ "Sendmail",
+ "Sendmail-8.23",
+ "SimPL-2.0",
+ "Sleepycat",
"Spencer-86",
"Spencer-94",
"Spencer-99",
- "SPL-1.0",
"SugarCRM-1.1.3",
- "SWL",
"TCL",
"TCP-wrappers",
"TMate",
"TORQUE-1.1",
"TOSL",
+ "TU-Berlin-1.0",
+ "TU-Berlin-2.0",
+ "UPL-1.0",
"Unicode-DFS-2015",
"Unicode-DFS-2016",
"Unicode-TOU",
"Unlicense",
- "UPL-1.0",
- "Vim",
"VOSTROM",
"VSL-1.0",
+ "Vim",
+ "W3C",
"W3C-19980720",
"W3C-20150513",
- "W3C",
+ "WTFPL",
"Watcom-1.0",
"Wsuipa",
- "WTFPL",
"X11",
- "Xerox",
"XFree86-1.1",
- "xinetd",
- "Xnet",
- "xpp",
"XSkat",
+ "Xerox",
+ "Xnet",
"YPL-1.0",
"YPL-1.1",
+ "ZPL-1.1",
+ "ZPL-2.0",
+ "ZPL-2.1",
"Zed",
"Zend-2.0",
"Zimbra-1.3",
"Zimbra-1.4",
- "zlib-acknowledgement",
"Zlib",
- "ZPL-1.1",
- "ZPL-2.0",
- "ZPL-2.1"
+ "bzip2-1.0.5",
+ "bzip2-1.0.6",
+ "copyleft-next-0.3.0",
+ "copyleft-next-0.3.1",
+ "curl",
+ "diffmark",
+ "dvipdfm",
+ "eGenix",
+ "gSOAP-1.3b",
+ "gnuplot",
+ "iMatix",
+ "libtiff",
+ "mpich2",
+ "psfrag",
+ "psutils",
+ "xinetd",
+ "xpp",
+ "zlib-acknowledgement"
]
diff --git a/deps/npm/node_modules/spdx-license-ids/package.json b/deps/npm/node_modules/spdx-license-ids/package.json
index a8b60d5886..84fd02c3d6 100644
--- a/deps/npm/node_modules/spdx-license-ids/package.json
+++ b/deps/npm/node_modules/spdx-license-ids/package.json
@@ -1,28 +1,30 @@
{
- "_from": "spdx-license-ids@^3.0.0",
- "_id": "spdx-license-ids@3.0.0",
+ "_from": "spdx-license-ids@3.0.3",
+ "_id": "spdx-license-ids@3.0.3",
"_inBundle": false,
- "_integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==",
+ "_integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==",
"_location": "/spdx-license-ids",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "spdx-license-ids@^3.0.0",
+ "raw": "spdx-license-ids@3.0.3",
"name": "spdx-license-ids",
"escapedName": "spdx-license-ids",
- "rawSpec": "^3.0.0",
+ "rawSpec": "3.0.3",
"saveSpec": null,
- "fetchSpec": "^3.0.0"
+ "fetchSpec": "3.0.3"
},
"_requiredBy": [
+ "#USER",
+ "/",
"/spdx-correct",
"/spdx-expression-parse"
],
- "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz",
- "_shasum": "7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87",
- "_spec": "spdx-license-ids@^3.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/spdx-correct",
+ "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz",
+ "_shasum": "81c0ce8f21474756148bbb5f3bfc0f36bf15d76e",
+ "_spec": "spdx-license-ids@3.0.3",
+ "_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Shinnosuke Watanabe",
"url": "https://github.com/shinnn"
@@ -34,18 +36,15 @@
"deprecated": false,
"description": "A list of SPDX license identifiers",
"devDependencies": {
- "@shinnn/eslint-config-node": "^5.0.0",
- "chalk": "^2.3.0",
- "eslint": "^4.16.0",
+ "@shinnn/eslint-config": "^6.8.7",
+ "chalk": "^2.4.1",
+ "eslint": "^5.10.0",
"get-spdx-license-ids": "^2.1.0",
- "log-symbols": "^2.2.0",
- "loud-rejection": "^1.6.0",
- "rmfr": "^2.0.0-3",
- "tape": "^4.8.0",
- "write-file-atomically": "^1.0.0"
+ "rmfr": "^2.0.0",
+ "tape": "^4.9.1"
},
"eslintConfig": {
- "extends": "@shinnn/node"
+ "extends": "@shinnn"
},
"files": [
"deprecated.json",
@@ -71,8 +70,8 @@
},
"scripts": {
"build": "node build.js",
- "pretest": "eslint --fix --format=codeframe .",
+ "pretest": "eslint .",
"test": "node test.js"
},
- "version": "3.0.0"
+ "version": "3.0.3"
}
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000000..40992555bf
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,55 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000000..f478d58dca
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/stream-iterate/node_modules/readable-stream/README.md b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..23fe3f3e30
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000000..c141a99c26
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,58 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000000..f8b2db83db
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..46924cbfdf
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..a1ca813e5a
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..bf34ac65e1
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..5d1f8b876d
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..b3f4e85a2f
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000000..aefc68bd90
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,79 @@
+'use strict';
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+var util = require('util');
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..5a0a0d88ce
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/package.json b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..2d5b4eae1d
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "readable-stream@^2.1.5",
+ "_id": "readable-stream@2.3.6",
+ "_inBundle": false,
+ "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_location": "/stream-iterate/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@^2.1.5",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "^2.1.5",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.5"
+ },
+ "_requiredBy": [
+ "/stream-iterate"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
+ "_spec": "readable-stream@^2.1.5",
+ "_where": "/Users/aeschright/code/cli/node_modules/stream-iterate",
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ },
+ "version": "2.3.6"
+}
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..ffd791d7ff
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/readable.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/transform.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..b1baba26da
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000000..ebdde6a85d
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/writable.js b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..3211a6f80d
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/readable-stream/writable.js
@@ -0,0 +1,8 @@
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+} else {
+ module.exports = Writable
+}
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/.travis.yml
new file mode 100644
index 0000000000..3347a72546
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/stream-iterate/node_modules/string_decoder/README.md b/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..5fd58315ed
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..2e89e63f79
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/package.json b/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..e8bac87784
--- /dev/null
+++ b/deps/npm/node_modules/stream-iterate/node_modules/string_decoder/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "string_decoder@~1.1.1",
+ "_id": "string_decoder@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_location": "/stream-iterate/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.1.1",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.1"
+ },
+ "_requiredBy": [
+ "/stream-iterate/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
+ "_spec": "string_decoder@~1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/stream-iterate/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/string_decoder/package.json b/deps/npm/node_modules/string_decoder/package.json
index e98874b555..0b704d99a1 100644
--- a/deps/npm/node_modules/string_decoder/package.json
+++ b/deps/npm/node_modules/string_decoder/package.json
@@ -1,27 +1,27 @@
{
- "_from": "string_decoder@~1.1.1",
- "_id": "string_decoder@1.1.1",
+ "_from": "string_decoder@^1.1.1",
+ "_id": "string_decoder@1.2.0",
"_inBundle": false,
- "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
"_location": "/string_decoder",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "string_decoder@~1.1.1",
+ "raw": "string_decoder@^1.1.1",
"name": "string_decoder",
"escapedName": "string_decoder",
- "rawSpec": "~1.1.1",
+ "rawSpec": "^1.1.1",
"saveSpec": null,
- "fetchSpec": "~1.1.1"
+ "fetchSpec": "^1.1.1"
},
"_requiredBy": [
"/readable-stream"
],
- "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
- "_spec": "string_decoder@~1.1.1",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream",
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
+ "_shasum": "fe86e738b19544afe70469243b2a1ee9240eae8d",
+ "_spec": "string_decoder@^1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/readable-stream",
"bugs": {
"url": "https://github.com/nodejs/string_decoder/issues"
},
@@ -37,6 +37,9 @@
"inherits": "^2.0.3",
"tap": "~0.4.8"
},
+ "files": [
+ "lib"
+ ],
"homepage": "https://github.com/nodejs/string_decoder",
"keywords": [
"string",
@@ -55,5 +58,5 @@
"ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
"test": "tap test/parallel/*.js && node test/verify-dependencies"
},
- "version": "1.1.1"
+ "version": "1.2.0"
}
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/through2/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000000..40992555bf
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,55 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000000..f478d58dca
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000000..16ffb93f24
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/through2/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/through2/node_modules/readable-stream/README.md b/deps/npm/node_modules/through2/node_modules/readable-stream/README.md
new file mode 100644
index 0000000000..23fe3f3e30
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000000..c141a99c26
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,58 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/through2/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000000..f8b2db83db
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/through2/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000000..46924cbfdf
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000000..a1ca813e5a
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000000..a9c8358848
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000000..bf34ac65e1
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000000..5d1f8b876d
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000000..b3f4e85a2f
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000000..aefc68bd90
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,79 @@
+'use strict';
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+var util = require('util');
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000000..5a0a0d88ce
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000000..9332a3fdae
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000000..ce2ad5b6ee
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/package.json b/deps/npm/node_modules/through2/node_modules/readable-stream/package.json
new file mode 100644
index 0000000000..d97bcfa712
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "readable-stream@^2.1.5",
+ "_id": "readable-stream@2.3.6",
+ "_inBundle": false,
+ "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "_location": "/through2/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-stream@^2.1.5",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "^2.1.5",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.5"
+ },
+ "_requiredBy": [
+ "/through2"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
+ "_spec": "readable-stream@^2.1.5",
+ "_where": "/Users/aeschright/code/cli/node_modules/through2",
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
+ },
+ "version": "2.3.6"
+}
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/through2/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000000..ffd791d7ff
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/through2/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000000..e50372592e
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/readable.js b/deps/npm/node_modules/through2/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000000..ec89ec5330
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/transform.js b/deps/npm/node_modules/through2/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000000..b1baba26da
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/through2/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000000..ebdde6a85d
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/deps/npm/node_modules/through2/node_modules/readable-stream/writable.js b/deps/npm/node_modules/through2/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000000..3211a6f80d
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/readable-stream/writable.js
@@ -0,0 +1,8 @@
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+} else {
+ module.exports = Writable
+}
diff --git a/deps/npm/node_modules/through2/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/through2/node_modules/string_decoder/.travis.yml
new file mode 100644
index 0000000000..3347a72546
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/string_decoder/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
diff --git a/deps/npm/node_modules/through2/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/through2/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000000..2873b3b2e5
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/string_decoder/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", 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/through2/node_modules/string_decoder/README.md b/deps/npm/node_modules/through2/node_modules/string_decoder/README.md
new file mode 100644
index 0000000000..5fd58315ed
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/deps/npm/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000000..2e89e63f79
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/through2/node_modules/string_decoder/package.json b/deps/npm/node_modules/through2/node_modules/string_decoder/package.json
new file mode 100644
index 0000000000..617fff7d12
--- /dev/null
+++ b/deps/npm/node_modules/through2/node_modules/string_decoder/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "string_decoder@~1.1.1",
+ "_id": "string_decoder@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "_location": "/through2/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "string_decoder@~1.1.1",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "~1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.1.1"
+ },
+ "_requiredBy": [
+ "/through2/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
+ "_spec": "string_decoder@~1.1.1",
+ "_where": "/Users/aeschright/code/cli/node_modules/through2/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "deprecated": false,
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.1.1"
+}
diff --git a/deps/npm/node_modules/unique-filename/.npmignore b/deps/npm/node_modules/unique-filename/.npmignore
deleted file mode 100644
index 1ab9fa63f5..0000000000
--- a/deps/npm/node_modules/unique-filename/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-*~
-.#*
-DEADJOE
-
-node_modules
diff --git a/deps/npm/node_modules/unique-filename/LICENSE b/deps/npm/node_modules/unique-filename/LICENSE
new file mode 100644
index 0000000000..69619c125e
--- /dev/null
+++ b/deps/npm/node_modules/unique-filename/LICENSE
@@ -0,0 +1,5 @@
+Copyright 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 AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/unique-filename/package.json b/deps/npm/node_modules/unique-filename/package.json
index f0b7074b28..293cc3489c 100644
--- a/deps/npm/node_modules/unique-filename/package.json
+++ b/deps/npm/node_modules/unique-filename/package.json
@@ -1,36 +1,28 @@
{
- "_args": [
- [
- "unique-filename@1.1.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "unique-filename@1.1.0",
- "_id": "unique-filename@1.1.0",
+ "_from": "unique-filename@1.1.1",
+ "_id": "unique-filename@1.1.1",
"_inBundle": false,
- "_integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=",
+ "_integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==",
"_location": "/unique-filename",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "unique-filename@1.1.0",
+ "raw": "unique-filename@1.1.1",
"name": "unique-filename",
"escapedName": "unique-filename",
- "rawSpec": "1.1.0",
+ "rawSpec": "1.1.1",
"saveSpec": null,
- "fetchSpec": "1.1.0"
+ "fetchSpec": "1.1.1"
},
"_requiredBy": [
- "/",
- "/cacache",
- "/npm-profile/cacache",
- "/npm-registry-fetch/cacache",
- "/pacote"
+ "#USER",
+ "/"
],
- "_resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz",
- "_spec": "1.1.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz",
+ "_shasum": "1d69769369ada0583103a1e6ae87681b56573230",
+ "_spec": "unique-filename@1.1.1",
+ "_where": "/Users/aeschright/code/cli",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
@@ -39,9 +31,11 @@
"bugs": {
"url": "https://github.com/iarna/unique-filename/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"unique-slug": "^2.0.0"
},
+ "deprecated": false,
"description": "Generate a unique filename for use in temporary directories or caches.",
"devDependencies": {
"standard": "^5.4.1",
@@ -59,5 +53,5 @@
"scripts": {
"test": "standard && tap test"
},
- "version": "1.1.0"
+ "version": "1.1.1"
}
diff --git a/deps/npm/node_modules/write-file-atomic/CHANGELOG.md b/deps/npm/node_modules/write-file-atomic/CHANGELOG.md
new file mode 100644
index 0000000000..61fb4d2233
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/CHANGELOG.md
@@ -0,0 +1,20 @@
+# 2.4.2
+
+* A pair of patches to fix some fd leaks. We would leak fds with sync use
+ when errors occured and with async use any time fsync was not in use. (#34)
+
+# 2.4.1
+
+* Fix a bug where `signal-exit` instances would be leaked. This was fixed when addressing #35.
+
+# 2.4.0
+
+## Features
+
+* Allow chown and mode options to be set to false to disable the defaulting behavior. (#20)
+* Support passing encoding strings in options slot for compat with Node.js API. (#31)
+* Add support for running inside of worker threads (#37)
+
+## Fixes
+
+* Remove unneeded call when returning success (#36)
diff --git a/deps/npm/node_modules/write-file-atomic/README.md b/deps/npm/node_modules/write-file-atomic/README.md
index af385f3b70..ca28e99a2b 100644
--- a/deps/npm/node_modules/write-file-atomic/README.md
+++ b/deps/npm/node_modules/write-file-atomic/README.md
@@ -8,20 +8,21 @@ atomic and allows you set ownership (uid/gid of the file).
* filename **String**
* data **String** | **Buffer**
-* options **Object**
- * chown **Object**
+* options **Object** | **String**
+ * chown **Object** default, uid & gid of existing file, if any
* uid **Number**
* gid **Number**
* encoding **String** | **Null** default = 'utf8'
* fsync **Boolean** default = true
- * mode **Number** default = 438 (aka 0666 in Octal)
+ * mode **Number** default, from existing file, if any
* Promise **Object** default = native Promise object
-callback **Function**
+* callback **Function**
Atomically and asynchronously writes data to a file, replacing the file if it already
exists. data can be a string or a buffer.
The file is initially named `filename + "." + murmurhex(__filename, process.pid, ++invocations)`.
+Note that `require('worker_threads').threadId` is used in addition to `process.pid` if running inside of a worker thread.
If writeFile completes successfully then, if passed the **chown** option it will change
the ownership of the file. Finally it renames the file back to the filename you specified. If
it encounters errors at any of these steps it will attempt to unlink the temporary file and then
@@ -29,9 +30,15 @@ pass the error back to the caller.
If multiple writes are concurrently issued to the same file, the write operations are put into a queue and serialized in the order they were called, using Promises. Native promises are used by default, but you can inject your own promise-like object with the **Promise** option. Writes to different files are still executed in parallel.
If provided, the **chown** option requires both **uid** and **gid** properties or else
-you'll get an error.
+you'll get an error. If **chown** is not specified it will default to using
+the owner of the previous file. To prevent chown from being ran you can
+also pass `false`, in which case the file will be created with the current user's credentials.
-The **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'.
+If **mode** is not specified, it will default to using the permissions from
+an existing file, if any. Expicitly setting this to `false` remove this default, resulting
+in a file created with the system default permissions.
+
+If options is a String, it's assumed to be the **encoding** option. The **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'.
If the **fsync** option is **false**, writeFile will skip the final fsync call.
diff --git a/deps/npm/node_modules/write-file-atomic/index.js b/deps/npm/node_modules/write-file-atomic/index.js
index 3b5607d154..fe9fdfb9db 100644
--- a/deps/npm/node_modules/write-file-atomic/index.js
+++ b/deps/npm/node_modules/write-file-atomic/index.js
@@ -10,11 +10,26 @@ var onExit = require('signal-exit')
var path = require('path')
var activeFiles = {}
+// if we run inside of a worker_thread, `process.pid` is not unique
+/* istanbul ignore next */
+var threadId = (function getId () {
+ try {
+ var workerThreads = require('worker_threads')
+
+ /// if we are in main thread, this is set to `0`
+ return workerThreads.threadId
+ } catch (e) {
+ // worker_threads are not available, fallback to 0
+ return 0
+ }
+})()
+
var invocations = 0
function getTmpname (filename) {
return filename + '.' +
MurmurHash3(__filename)
.hash(String(process.pid))
+ .hash(String(threadId))
.hash(String(++invocations))
.result()
}
@@ -28,17 +43,23 @@ function cleanupOnExit (tmpfile) {
}
function writeFile (filename, data, options, callback) {
- if (options instanceof Function) {
- callback = options
- options = null
+ if (options) {
+ if (options instanceof Function) {
+ callback = options
+ options = {}
+ } else if (typeof options === 'string') {
+ options = { encoding: options }
+ }
+ } else {
+ options = {}
}
- if (!options) options = {}
var Promise = options.Promise || global.Promise
var truename
var fd
var tmpfile
- var removeOnExit = cleanupOnExit(() => tmpfile)
+ /* istanbul ignore next -- The closure only gets called when onExit triggers */
+ var removeOnExitHandler = onExit(cleanupOnExit(() => tmpfile))
var absoluteName = path.resolve(filename)
new Promise(function serializeSameFile (resolve) {
@@ -66,10 +87,10 @@ function writeFile (filename, data, options, callback) {
else {
options = Object.assign({}, options)
- if (!options.mode) {
+ if (options.mode == null) {
options.mode = stats.mode
}
- if (!options.chown && process.getuid) {
+ if (options.chown == null && process.getuid) {
options.chown = { uid: stats.uid, gid: stats.gid }
}
resolve()
@@ -100,15 +121,18 @@ function writeFile (filename, data, options, callback) {
} else resolve()
})
}).then(function syncAndClose () {
- if (options.fsync !== false) {
- return new Promise(function (resolve, reject) {
+ return new Promise(function (resolve, reject) {
+ if (options.fsync !== false) {
fs.fsync(fd, function (err) {
- if (err) reject(err)
+ if (err) fs.close(fd, () => reject(err))
else fs.close(fd, resolve)
})
- })
- }
+ } else {
+ fs.close(fd, resolve)
+ }
+ })
}).then(function chown () {
+ fd = null
if (options.chown) {
return new Promise(function (resolve, reject) {
fs.chown(tmpfile, options.chown.uid, options.chown.gid, function (err) {
@@ -134,12 +158,16 @@ function writeFile (filename, data, options, callback) {
})
})
}).then(function success () {
- removeOnExit()
+ removeOnExitHandler()
callback()
- }).catch(function fail (err) {
- removeOnExit()
- fs.unlink(tmpfile, function () {
- callback(err)
+ }, function fail (err) {
+ return new Promise(resolve => {
+ return fd ? fs.close(fd, resolve) : resolve()
+ }).then(() => {
+ removeOnExitHandler()
+ fs.unlink(tmpfile, function () {
+ callback(err)
+ })
})
}).then(function checkQueue () {
activeFiles[absoluteName].shift() // remove the element added by serializeSameFile
@@ -150,7 +178,8 @@ function writeFile (filename, data, options, callback) {
}
function writeFileSync (filename, data, options) {
- if (!options) options = {}
+ if (typeof options === 'string') options = { encoding: options }
+ else if (!options) options = {}
try {
filename = fs.realpathSync(filename)
} catch (ex) {
@@ -158,26 +187,30 @@ function writeFileSync (filename, data, options) {
}
var tmpfile = getTmpname(filename)
- try {
- if (!options.mode || !options.chown) {
- // Either mode or chown is not explicitly set
- // Default behavior is to copy it from original file
- try {
- var stats = fs.statSync(filename)
- options = Object.assign({}, options)
- if (!options.mode) {
- options.mode = stats.mode
- }
- if (!options.chown && process.getuid) {
- options.chown = { uid: stats.uid, gid: stats.gid }
- }
- } catch (ex) {
- // ignore stat errors
+ if (!options.mode || !options.chown) {
+ // Either mode or chown is not explicitly set
+ // Default behavior is to copy it from original file
+ try {
+ var stats = fs.statSync(filename)
+ options = Object.assign({}, options)
+ if (!options.mode) {
+ options.mode = stats.mode
+ }
+ if (!options.chown && process.getuid) {
+ options.chown = { uid: stats.uid, gid: stats.gid }
}
+ } catch (ex) {
+ // ignore stat errors
}
+ }
+
+ var fd
+ var cleanup = cleanupOnExit(tmpfile)
+ var removeOnExitHandler = onExit(cleanup)
+
+ try {
- var removeOnExit = onExit(cleanupOnExit(tmpfile))
- var fd = fs.openSync(tmpfile, 'w', options.mode)
+ fd = fs.openSync(tmpfile, 'w', options.mode)
if (Buffer.isBuffer(data)) {
fs.writeSync(fd, data, 0, data.length, 0)
} else if (data != null) {
@@ -190,10 +223,11 @@ function writeFileSync (filename, data, options) {
if (options.chown) fs.chownSync(tmpfile, options.chown.uid, options.chown.gid)
if (options.mode) fs.chmodSync(tmpfile, options.mode)
fs.renameSync(tmpfile, filename)
- removeOnExit()
+ removeOnExitHandler()
} catch (err) {
- removeOnExit()
- try { fs.unlinkSync(tmpfile) } catch (e) {}
+ if (fd) fs.closeSync(fd)
+ removeOnExitHandler()
+ cleanup()
throw err
}
}
diff --git a/deps/npm/node_modules/write-file-atomic/package.json b/deps/npm/node_modules/write-file-atomic/package.json
index cdf47414a4..f8f55fbd22 100644
--- a/deps/npm/node_modules/write-file-atomic/package.json
+++ b/deps/npm/node_modules/write-file-atomic/package.json
@@ -1,35 +1,31 @@
{
- "_args": [
- [
- "write-file-atomic@2.3.0",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "write-file-atomic@2.3.0",
- "_id": "write-file-atomic@2.3.0",
+ "_from": "write-file-atomic@^2.3.0",
+ "_id": "write-file-atomic@2.4.2",
"_inBundle": false,
- "_integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==",
+ "_integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==",
"_location": "/write-file-atomic",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "write-file-atomic@2.3.0",
+ "raw": "write-file-atomic@^2.3.0",
"name": "write-file-atomic",
"escapedName": "write-file-atomic",
- "rawSpec": "2.3.0",
+ "rawSpec": "^2.3.0",
"saveSpec": null,
- "fetchSpec": "2.3.0"
+ "fetchSpec": "^2.3.0"
},
"_requiredBy": [
+ "#USER",
"/",
"/bin-links",
"/configstore",
"/tap"
],
- "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz",
- "_spec": "2.3.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz",
+ "_shasum": "a7181706dfba17855d221140a9c06e15fcdd87b9",
+ "_spec": "write-file-atomic@^2.3.0",
+ "_where": "/Users/zkat/Documents/code/work/npm",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
@@ -38,18 +34,20 @@
"bugs": {
"url": "https://github.com/iarna/write-file-atomic/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"graceful-fs": "^4.1.11",
"imurmurhash": "^0.1.4",
"signal-exit": "^3.0.2"
},
+ "deprecated": false,
"description": "Write files in an atomic fashion w/configurable ownership",
"devDependencies": {
"mkdirp": "^0.5.1",
"require-inject": "^1.4.0",
"rimraf": "^2.5.4",
- "standard": "^10.0.2",
- "tap": "^10.3.2"
+ "standard": "^12.0.1",
+ "tap": "^12.1.3"
},
"files": [
"index.js"
@@ -69,5 +67,5 @@
"scripts": {
"test": "standard && tap --100 test/*.js"
},
- "version": "2.3.0"
+ "version": "2.4.2"
}