summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request')
-rw-r--r--deps/npm/node_modules/request/.npmignore6
-rw-r--r--deps/npm/node_modules/request/.travis.yml21
-rw-r--r--deps/npm/node_modules/request/CHANGELOG.md41
-rw-r--r--deps/npm/node_modules/request/CONTRIBUTING.md81
-rw-r--r--deps/npm/node_modules/request/README.md3
-rw-r--r--deps/npm/node_modules/request/codecov.yml2
-rwxr-xr-xdeps/npm/node_modules/request/index.js5
-rw-r--r--deps/npm/node_modules/request/lib/auth.js2
-rw-r--r--deps/npm/node_modules/request/lib/helpers.js17
-rw-r--r--deps/npm/node_modules/request/lib/multipart.js2
-rw-r--r--deps/npm/node_modules/request/lib/oauth.js2
-rw-r--r--deps/npm/node_modules/request/lib/redirect.js6
-rw-r--r--deps/npm/node_modules/request/node_modules/aws4/README.md9
-rw-r--r--deps/npm/node_modules/request/node_modules/aws4/aws4.js11
-rw-r--r--deps/npm/node_modules/request/node_modules/aws4/package.json27
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/.jshintrc59
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/.npmignore1
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/.travis.yml13
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/LICENSE.md13
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/README.md200
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/bl.js243
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore5
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml52
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml1
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE18
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md36
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown1760
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md60
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js75
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js26
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js880
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js180
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js516
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE19
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md3
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch604
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js107
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json95
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js68
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.npmignore1
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.travis.yml4
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/Makefile6
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md60
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json19
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js5
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json105
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/test.js20
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml12
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js43
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/license.md19
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json84
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/readme.md18
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js24
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore2
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md7
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js221
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json88
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/History.md16
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE24
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/README.md53
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js67
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js6
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json90
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json114
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js12
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js1
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/package.json100
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/test/test.js640
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/Readme.md8
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/lib/browser.js2
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js15
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/package.json64
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/CHANGES.md364
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/LICENSE.txt (renamed from deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE)21
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/etc/dashdash.bash_completion.in7
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json28
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md6
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md10
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json20
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json48
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/package.json37
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/.npmignore4
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/README.md254
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/benchmark/README.md53
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu174
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.sh34
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c34
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js84
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/bower.json23
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/component.json25
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/package.json114
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/test/compare_v1.js63
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/test/test.html17
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/test/test.js231
-rw-r--r--deps/npm/node_modules/request/node_modules/node-uuid/uuid.js272
-rw-r--r--deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md14
-rw-r--r--deps/npm/node_modules/request/node_modules/qs/README.md28
-rw-r--r--deps/npm/node_modules/request/node_modules/qs/dist/qs.js160
-rw-r--r--deps/npm/node_modules/request/node_modules/qs/lib/formats.js18
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/lib/index.js10
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/lib/parse.js18
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/lib/stringify.js76
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/lib/utils.js28
-rw-r--r--deps/npm/node_modules/request/node_modules/qs/package.json54
-rw-r--r--deps/npm/node_modules/request/node_modules/qs/test/index.js2
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/test/parse.js96
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/test/stringify.js287
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/qs/test/utils.js13
-rw-r--r--deps/npm/node_modules/request/node_modules/tough-cookie/README.md2
-rw-r--r--deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt20
-rw-r--r--deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md176
-rw-r--r--deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json127
-rw-r--r--deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js533
-rw-r--r--deps/npm/node_modules/request/node_modules/tough-cookie/package.json39
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/.npmignore8
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/.travis.yml5
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/AUTHORS5
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/HISTORY.md27
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/LICENSE.md (renamed from deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md)2
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/README.md132
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/uuid/bin/uuid (renamed from deps/npm/node_modules/request/node_modules/node-uuid/bin/uuid)0
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/index.js8
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/lib/bytesToUuid.js23
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/lib/rng-browser.js33
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/lib/rng.js10
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/package.json122
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/test/mocha.opts3
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/test/test.js96
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/v1.js103
-rw-r--r--deps/npm/node_modules/request/node_modules/uuid/v4.js29
-rw-r--r--deps/npm/node_modules/request/package.json63
-rw-r--r--deps/npm/node_modules/request/request.js123
135 files changed, 2839 insertions, 8799 deletions
diff --git a/deps/npm/node_modules/request/.npmignore b/deps/npm/node_modules/request/.npmignore
deleted file mode 100644
index 67fe11cc0a..0000000000
--- a/deps/npm/node_modules/request/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-coverage
-tests
-node_modules
-examples
-release.sh
-disabled.appveyor.yml
diff --git a/deps/npm/node_modules/request/.travis.yml b/deps/npm/node_modules/request/.travis.yml
deleted file mode 100644
index 9be8247c7b..0000000000
--- a/deps/npm/node_modules/request/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-language: node_js
-
-node_js:
- - node
- - 6
- - 4
- - 0.12
-
-after_script:
- - npm run test-cov
- - codecov
- - cat ./coverage/lcov.info | coveralls
-
-webhooks:
- urls: https://webhooks.gitter.im/e/237280ed4796c19cc626
- on_success: change # options: [always|never|change] default: always
- on_failure: always # options: [always|never|change] default: always
- on_start: false # default: false
-
-sudo: false
diff --git a/deps/npm/node_modules/request/CHANGELOG.md b/deps/npm/node_modules/request/CHANGELOG.md
index 042c6e526f..7a9b2abf9e 100644
--- a/deps/npm/node_modules/request/CHANGELOG.md
+++ b/deps/npm/node_modules/request/CHANGELOG.md
@@ -1,5 +1,33 @@
## Change Log
+### v2.79.0 (2016/11/18)
+- [#2368](https://github.com/request/request/pull/2368) Fix typeof check in test-pool.js (@forivall)
+- [#2394](https://github.com/request/request/pull/2394) Use `files` in package.json (@SimenB)
+- [#2463](https://github.com/request/request/pull/2463) AWS support for session tokens for temporary credentials (@simov)
+- [#2467](https://github.com/request/request/pull/2467) Migrate to uuid (@simov, @antialias)
+- [#2459](https://github.com/request/request/pull/2459) Update taper to version 0.5.0 🚀 (@greenkeeperio-bot)
+- [#2448](https://github.com/request/request/pull/2448) Make other connect timeout test more reliable too (@mscdex)
+
+### v2.78.0 (2016/11/03)
+- [#2447](https://github.com/request/request/pull/2447) Always set request timeout on keep-alive connections (@mscdex)
+
+### v2.77.0 (2016/11/03)
+- [#2439](https://github.com/request/request/pull/2439) Fix socket 'connect' listener handling (@mscdex)
+- [#2442](https://github.com/request/request/pull/2442) 👻😱 Node.js 0.10 is unmaintained 😱👻 (@greenkeeperio-bot)
+- [#2435](https://github.com/request/request/pull/2435) Add followOriginalHttpMethod to redirect to original HTTP method (@kirrg001)
+- [#2414](https://github.com/request/request/pull/2414) Improve test-timeout reliability (@mscdex)
+
+### v2.76.0 (2016/10/25)
+- [#2424](https://github.com/request/request/pull/2424) Handle buffers directly instead of using "bl" (@zertosh)
+- [#2415](https://github.com/request/request/pull/2415) Re-enable timeout tests on Travis + other fixes (@mscdex)
+- [#2431](https://github.com/request/request/pull/2431) Improve timeouts accuracy and node v6.8.0+ compatibility (@mscdex, @greenkeeperio-bot)
+- [#2428](https://github.com/request/request/pull/2428) Update qs to version 6.3.0 🚀 (@greenkeeperio-bot)
+- [#2420](https://github.com/request/request/pull/2420) change .on to .once, remove possible memory leaks (@duereg)
+- [#2426](https://github.com/request/request/pull/2426) Remove "isFunction" helper in favor of "typeof" check (@zertosh)
+- [#2425](https://github.com/request/request/pull/2425) Simplify "defer" helper creation (@zertosh)
+- [#2402](https://github.com/request/request/pull/2402) form-data@2.1.1 breaks build 🚨 (@greenkeeperio-bot)
+- [#2393](https://github.com/request/request/pull/2393) Update form-data to version 2.1.0 🚀 (@greenkeeperio-bot)
+
### v2.75.0 (2016/09/17)
- [#2381](https://github.com/request/request/pull/2381) Drop support for Node 0.10 (@simov)
- [#2377](https://github.com/request/request/pull/2377) Update form-data to version 2.0.0 🚀 (@greenkeeperio-bot)
@@ -476,7 +504,6 @@
### v2.29.0 (2013/12/06)
- [#727](https://github.com/request/request/pull/727) fix requester bug (@jchris)
-
### v2.28.0 (2013/12/04)
- [#724](https://github.com/request/request/pull/724) README.md: add custom HTTP Headers example. (@tcort)
- [#719](https://github.com/request/request/pull/719) Made a comment gender neutral. (@unsetbit)
@@ -493,15 +520,9 @@
- [#662](https://github.com/request/request/pull/662) option.tunnel to explicitly disable tunneling (@seanmonstar)
- [#659](https://github.com/request/request/pull/659) fix failure when running with NODE_DEBUG=request, and a test for that (@jrgm)
- [#630](https://github.com/request/request/pull/630) Send random cnonce for HTTP Digest requests (@wprl)
-
-### v2.27.0 (2013/08/15)
- [#619](https://github.com/request/request/pull/619) decouple things a bit (@joaojeronimo)
-
-### v2.26.0 (2013/08/07)
- [#613](https://github.com/request/request/pull/613) Fixes #583, moved initialization of self.uri.pathname (@lexander)
- [#605](https://github.com/request/request/pull/605) Only include ":" + pass in Basic Auth if it's defined (fixes #602) (@bendrucker)
-
-### v2.25.0 (2013/07/23)
- [#596](https://github.com/request/request/pull/596) Global agent is being used when pool is specified (@Cauldrath)
- [#594](https://github.com/request/request/pull/594) Emit complete event when there is no callback (@RomainLK)
- [#601](https://github.com/request/request/pull/601) Fixed a small typo (@michalstanko)
@@ -574,7 +595,7 @@
- [#290](https://github.com/request/request/pull/290) A test for #289 (@isaacs)
- [#280](https://github.com/request/request/pull/280) Like in node.js print options if NODE_DEBUG contains the word request (@Filirom1)
- [#207](https://github.com/request/request/pull/207) Fix #206 Change HTTP/HTTPS agent when redirecting between protocols (@isaacs)
-- [#214](https://github.com/request/request/pull/214) documenting additional behavior of json option (@jphaas)
+- [#214](https://github.com/request/request/pull/214) documenting additional behavior of json option (@jphaas, @vpulim)
- [#272](https://github.com/request/request/pull/272) Boundary begins with CRLF? (@elspoono, @timshadel, @naholyr, @nanodocumet, @TehShrike)
- [#284](https://github.com/request/request/pull/284) Remove stray `console.log()` call in multipart generator. (@bcherry)
- [#241](https://github.com/request/request/pull/241) Composability updates suggested by issue #239 (@polotek)
@@ -592,10 +613,10 @@
- [#246](https://github.com/request/request/pull/246) Fixing the set-cookie header (@jeromegn)
- [#243](https://github.com/request/request/pull/243) Dynamic boundary (@zephrax)
- [#240](https://github.com/request/request/pull/240) don't error when null is passed for options (@polotek)
-- [#211](https://github.com/request/request/pull/211) Replace all occurrences of special chars in RFC3986 (@chriso)
+- [#211](https://github.com/request/request/pull/211) Replace all occurrences of special chars in RFC3986 (@chriso, @vpulim)
- [#224](https://github.com/request/request/pull/224) Multipart content-type change (@janjongboom)
- [#217](https://github.com/request/request/pull/217) need to use Authorization (titlecase) header with Tumblr OAuth (@visnup)
-- [#203](https://github.com/request/request/pull/203) Fix cookie and redirect bugs and add auth support for HTTPS tunnel (@milewise)
+- [#203](https://github.com/request/request/pull/203) Fix cookie and redirect bugs and add auth support for HTTPS tunnel (@vpulim)
- [#199](https://github.com/request/request/pull/199) Tunnel (@isaacs)
- [#198](https://github.com/request/request/pull/198) Bugfix on forever usage of util.inherits (@isaacs)
- [#197](https://github.com/request/request/pull/197) Make ForeverAgent work with HTTPS (@isaacs)
diff --git a/deps/npm/node_modules/request/CONTRIBUTING.md b/deps/npm/node_modules/request/CONTRIBUTING.md
deleted file mode 100644
index 8aa6999acd..0000000000
--- a/deps/npm/node_modules/request/CONTRIBUTING.md
+++ /dev/null
@@ -1,81 +0,0 @@
-
-# Contributing to Request
-
-:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
-
-The following is a set of guidelines for contributing to Request and its packages, which are hosted in the [Request Organization](https://github.com/request) on GitHub.
-These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request.
-
-
-## Submitting an Issue
-
-1. Provide a small self **sufficient** code example to **reproduce** the issue.
-2. Run your test code using [request-debug](https://github.com/request/request-debug) and copy/paste the results inside the issue.
-3. You should **always** use fenced code blocks when submitting code examples or any other formatted output:
- <pre>
- ```js
- put your javascript code here
- ```
-
- ```
- put any other formatted output here,
- like for example the one returned from using request-debug
- ```
- </pre>
-
-If the problem cannot be reliably reproduced, the issue will be marked as `Not enough info (see CONTRIBUTING.md)`.
-
-If the problem is not related to request the issue will be marked as `Help (please use Stackoverflow)`.
-
-
-## Submitting a Pull Request
-
-1. In almost all of the cases your PR **needs tests**. Make sure you have any.
-2. Run `npm test` locally. Fix any errors before pushing to GitHub.
-3. After submitting the PR a build will be triggered on TravisCI. Wait for it to ends and make sure all jobs are passing.
-
-
------------------------------------------
-
-
-## Becoming a Contributor
-
-Individuals making significant and valuable contributions are given
-commit-access to the project to contribute as they see fit. This project is
-more like an open wiki than a standard guarded open source project.
-
-
-## Rules
-
-There are a few basic ground-rules for contributors:
-
-1. **No `--force` pushes** or modifying the Git history in any way.
-1. **Non-master branches** ought to be used for ongoing work.
-1. **Any** change should be added through Pull Request.
-1. **External API changes and significant modifications** ought to be subject
- to an **internal pull-request** to solicit feedback from other contributors.
-1. Internal pull-requests to solicit feedback are *encouraged* for any other
- non-trivial contribution but left to the discretion of the contributor.
-1. For significant changes wait a full 24 hours before merging so that active
- contributors who are distributed throughout the world have a chance to weigh
- in.
-1. Contributors should attempt to adhere to the prevailing code-style.
-1. Run `npm test` locally before submitting your PR, to catch any easy to miss
- style & testing issues. To diagnose test failures, there are two ways to
- run a single test file:
- - `node_modules/.bin/taper tests/test-file.js` - run using the default
- [`taper`](https://github.com/nylen/taper) test reporter.
- - `node tests/test-file.js` - view the raw
- [tap](https://testanything.org/) output.
-
-
-## Releases
-
-Declaring formal releases remains the prerogative of the project maintainer.
-
-
-## Changes to this arrangement
-
-This is an experiment and feedback is welcome! This document may also be
-subject to pull-requests or changes by contributors where you believe you have
-something valuable to add or change.
diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md
index 6eaaa0547f..2ddfe72c53 100644
--- a/deps/npm/node_modules/request/README.md
+++ b/deps/npm/node_modules/request/README.md
@@ -755,13 +755,14 @@ The first argument can be either a `url` or an `options` object. The only requir
- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.
- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
-- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first.
+- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`, and optionally `session` (note that this only works for services that require session as part of the canonical string). Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first.
- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.
---
- `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise.
- `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)
+- `followOriginalHttpMethod` - by default we redirect to HTTP method GET. you can enable this property to redirect to the original HTTP method (default: `false`)
- `maxRedirects` - the maximum number of redirects to follow (default: `10`)
- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). **Note:** if true, referer header set in the initial request is preserved during redirect chain.
diff --git a/deps/npm/node_modules/request/codecov.yml b/deps/npm/node_modules/request/codecov.yml
deleted file mode 100644
index acd3f33ceb..0000000000
--- a/deps/npm/node_modules/request/codecov.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-comment: false
diff --git a/deps/npm/node_modules/request/index.js b/deps/npm/node_modules/request/index.js
index 911a90dbb5..9ec65ea268 100755
--- a/deps/npm/node_modules/request/index.js
+++ b/deps/npm/node_modules/request/index.js
@@ -18,8 +18,7 @@ var extend = require('extend')
, cookies = require('./lib/cookies')
, helpers = require('./lib/helpers')
-var isFunction = helpers.isFunction
- , paramsHaveRequestBody = helpers.paramsHaveRequestBody
+var paramsHaveRequestBody = helpers.paramsHaveRequestBody
// organize params for patch, post, put, head, del
@@ -95,7 +94,7 @@ function wrapRequestMethod (method, options, requester, verb) {
target.method = verb.toUpperCase()
}
- if (isFunction(requester)) {
+ if (typeof requester === 'function') {
method = requester
}
diff --git a/deps/npm/node_modules/request/lib/auth.js b/deps/npm/node_modules/request/lib/auth.js
index 1cb695216f..559ca57be9 100644
--- a/deps/npm/node_modules/request/lib/auth.js
+++ b/deps/npm/node_modules/request/lib/auth.js
@@ -1,7 +1,7 @@
'use strict'
var caseless = require('caseless')
- , uuid = require('node-uuid')
+ , uuid = require('uuid')
, helpers = require('./helpers')
var md5 = helpers.md5
diff --git a/deps/npm/node_modules/request/lib/helpers.js b/deps/npm/node_modules/request/lib/helpers.js
index 356ff748e2..f9d727e382 100644
--- a/deps/npm/node_modules/request/lib/helpers.js
+++ b/deps/npm/node_modules/request/lib/helpers.js
@@ -3,17 +3,9 @@
var jsonSafeStringify = require('json-stringify-safe')
, crypto = require('crypto')
-function deferMethod() {
- if (typeof setImmediate === 'undefined') {
- return process.nextTick
- }
-
- return setImmediate
-}
-
-function isFunction(value) {
- return typeof value === 'function'
-}
+var defer = typeof setImmediate === 'undefined'
+ ? process.nextTick
+ : setImmediate
function paramsHaveRequestBody(params) {
return (
@@ -63,7 +55,6 @@ function version () {
}
}
-exports.isFunction = isFunction
exports.paramsHaveRequestBody = paramsHaveRequestBody
exports.safeStringify = safeStringify
exports.md5 = md5
@@ -71,4 +62,4 @@ exports.isReadStream = isReadStream
exports.toBase64 = toBase64
exports.copy = copy
exports.version = version
-exports.defer = deferMethod()
+exports.defer = defer
diff --git a/deps/npm/node_modules/request/lib/multipart.js b/deps/npm/node_modules/request/lib/multipart.js
index c128172618..3b605bd47b 100644
--- a/deps/npm/node_modules/request/lib/multipart.js
+++ b/deps/npm/node_modules/request/lib/multipart.js
@@ -1,6 +1,6 @@
'use strict'
-var uuid = require('node-uuid')
+var uuid = require('uuid')
, CombinedStream = require('combined-stream')
, isstream = require('isstream')
diff --git a/deps/npm/node_modules/request/lib/oauth.js b/deps/npm/node_modules/request/lib/oauth.js
index c24209b897..56b39b0f51 100644
--- a/deps/npm/node_modules/request/lib/oauth.js
+++ b/deps/npm/node_modules/request/lib/oauth.js
@@ -3,7 +3,7 @@
var url = require('url')
, qs = require('qs')
, caseless = require('caseless')
- , uuid = require('node-uuid')
+ , uuid = require('uuid')
, oauth = require('oauth-sign')
, crypto = require('crypto')
diff --git a/deps/npm/node_modules/request/lib/redirect.js b/deps/npm/node_modules/request/lib/redirect.js
index 040dfe0e03..f8604491f3 100644
--- a/deps/npm/node_modules/request/lib/redirect.js
+++ b/deps/npm/node_modules/request/lib/redirect.js
@@ -8,6 +8,7 @@ function Redirect (request) {
this.followRedirect = true
this.followRedirects = true
this.followAllRedirects = false
+ this.followOriginalHttpMethod = false
this.allowRedirect = function () {return true}
this.maxRedirects = 10
this.redirects = []
@@ -36,6 +37,9 @@ Redirect.prototype.onRequest = function (options) {
if (options.removeRefererHeader !== undefined) {
self.removeRefererHeader = options.removeRefererHeader
}
+ if (options.followOriginalHttpMethod !== undefined) {
+ self.followOriginalHttpMethod = options.followOriginalHttpMethod
+ }
}
Redirect.prototype.redirectTo = function (response) {
@@ -115,7 +119,7 @@ Redirect.prototype.onResponse = function (response) {
)
if (self.followAllRedirects && request.method !== 'HEAD'
&& response.statusCode !== 401 && response.statusCode !== 307) {
- request.method = 'GET'
+ request.method = self.followOriginalHttpMethod ? request.method : 'GET'
}
// request.method = 'GET' // Force all redirects to use GET || commented out fixes #215
delete request.src
diff --git a/deps/npm/node_modules/request/node_modules/aws4/README.md b/deps/npm/node_modules/request/node_modules/aws4/README.md
index 6c55da8052..6b002d02f7 100644
--- a/deps/npm/node_modules/request/node_modules/aws4/README.md
+++ b/deps/npm/node_modules/request/node_modules/aws4/README.md
@@ -434,6 +434,15 @@ request(aws4.sign({
/*
(HTTP 202, empty response)
*/
+
+// Generate CodeCommit Git access password
+var signer = new aws4.RequestSigner({
+ service: 'codecommit',
+ host: 'git-codecommit.us-east-1.amazonaws.com',
+ method: 'GIT',
+ path: '/v1/repos/MyAwesomeRepo',
+})
+var password = signer.getDateTime() + 'Z' + signer.signature()
```
API
diff --git a/deps/npm/node_modules/request/node_modules/aws4/aws4.js b/deps/npm/node_modules/request/node_modules/aws4/aws4.js
index cbe5dc9049..a54318065b 100644
--- a/deps/npm/node_modules/request/node_modules/aws4/aws4.js
+++ b/deps/npm/node_modules/request/node_modules/aws4/aws4.js
@@ -52,6 +52,8 @@ function RequestSigner(request, credentials) {
}
if (!request.hostname && !request.host)
request.hostname = headers.Host || headers.host
+
+ this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT'
}
RequestSigner.prototype.matchHost = function(host) {
@@ -109,7 +111,7 @@ RequestSigner.prototype.prepareRequest = function() {
} else {
- if (!request.doNotModifyHeaders) {
+ if (!request.doNotModifyHeaders && !this.isCodeCommitGit) {
if (request.body && !headers['Content-Type'] && !headers['content-type'])
headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8'
@@ -153,6 +155,9 @@ RequestSigner.prototype.getDateTime = function() {
date = new Date(headers.Date || headers.date || new Date)
this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '')
+
+ // Remove the trailing 'Z' on the timestamp string for CodeCommit git access
+ if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1)
}
return this.datetime
}
@@ -202,8 +207,8 @@ RequestSigner.prototype.canonicalString = function() {
decodePath = this.service === 's3' || this.request.doNotEncodePath,
decodeSlashesInPath = this.service === 's3',
firstValOnly = this.service === 's3',
- bodyHash = this.service === 's3' && this.request.signQuery ?
- 'UNSIGNED-PAYLOAD' : hash(this.request.body || '', 'hex')
+ bodyHash = this.service === 's3' && this.request.signQuery ? 'UNSIGNED-PAYLOAD' :
+ (this.isCodeCommitGit ? '' : hash(this.request.body || '', 'hex'))
if (query) {
queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) {
diff --git a/deps/npm/node_modules/request/node_modules/aws4/package.json b/deps/npm/node_modules/request/node_modules/aws4/package.json
index 7151d7aae9..4e7caf0d30 100644
--- a/deps/npm/node_modules/request/node_modules/aws4/package.json
+++ b/deps/npm/node_modules/request/node_modules/aws4/package.json
@@ -10,24 +10,23 @@
"spec": ">=1.2.1 <2.0.0",
"type": "range"
},
- "/Users/rebecca/code/npm/node_modules/request"
+ "/Users/ogd/Documents/projects/npm/npm/node_modules/request"
]
],
"_from": "aws4@>=1.2.1 <2.0.0",
- "_id": "aws4@1.4.1",
+ "_id": "aws4@1.5.0",
"_inCache": true,
- "_installable": true,
"_location": "/request/aws4",
- "_nodeVersion": "4.4.3",
+ "_nodeVersion": "4.5.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/aws4-1.4.1.tgz_1462643218465_0.6527479749638587"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/aws4-1.5.0.tgz_1476226259635_0.2796843808609992"
},
"_npmUser": {
"name": "hichaelmart",
"email": "michael.hart.au@gmail.com"
},
- "_npmVersion": "2.15.4",
+ "_npmVersion": "2.15.11",
"_phantomChildren": {},
"_requested": {
"raw": "aws4@^1.2.1",
@@ -41,11 +40,11 @@
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.4.1.tgz",
- "_shasum": "fde7d5292466d230e5ee0f4e038d9dfaab08fc61",
+ "_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.5.0.tgz",
+ "_shasum": "0a29ffb79c31c9e712eeb087e8e7a64b4a56d755",
"_shrinkwrap": null,
"_spec": "aws4@^1.2.1",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request",
"author": {
"name": "Michael Hart",
"email": "michael.hart.au@gmail.com",
@@ -62,10 +61,10 @@
},
"directories": {},
"dist": {
- "shasum": "fde7d5292466d230e5ee0f4e038d9dfaab08fc61",
- "tarball": "https://registry.npmjs.org/aws4/-/aws4-1.4.1.tgz"
+ "shasum": "0a29ffb79c31c9e712eeb087e8e7a64b4a56d755",
+ "tarball": "https://registry.npmjs.org/aws4/-/aws4-1.5.0.tgz"
},
- "gitHead": "f126d3ff80be1ddde0fc6b50bb51a7f199547e81",
+ "gitHead": "ba136334ee08884c6042c8578a22e376233eef34",
"homepage": "https://github.com/mhart/aws4#readme",
"keywords": [
"amazon",
@@ -137,5 +136,5 @@
"scripts": {
"test": "mocha ./test/fast.js ./test/slow.js -b -t 100s -R list"
},
- "version": "1.4.1"
+ "version": "1.5.0"
}
diff --git a/deps/npm/node_modules/request/node_modules/bl/.jshintrc b/deps/npm/node_modules/request/node_modules/bl/.jshintrc
deleted file mode 100644
index c8ef3ca409..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/.jshintrc
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "predef": [ ]
- , "bitwise": false
- , "camelcase": false
- , "curly": false
- , "eqeqeq": false
- , "forin": false
- , "immed": false
- , "latedef": false
- , "noarg": true
- , "noempty": true
- , "nonew": true
- , "plusplus": false
- , "quotmark": true
- , "regexp": false
- , "undef": true
- , "unused": true
- , "strict": false
- , "trailing": true
- , "maxlen": 120
- , "asi": true
- , "boss": true
- , "debug": true
- , "eqnull": true
- , "esnext": true
- , "evil": true
- , "expr": true
- , "funcscope": false
- , "globalstrict": false
- , "iterator": false
- , "lastsemic": true
- , "laxbreak": true
- , "laxcomma": true
- , "loopfunc": true
- , "multistr": false
- , "onecase": false
- , "proto": false
- , "regexdash": false
- , "scripturl": true
- , "smarttabs": false
- , "shadow": false
- , "sub": true
- , "supernew": false
- , "validthis": true
- , "browser": true
- , "couch": false
- , "devel": false
- , "dojo": false
- , "mootools": false
- , "node": true
- , "nonstandard": true
- , "prototypejs": false
- , "rhino": false
- , "worker": true
- , "wsh": false
- , "nomen": false
- , "onevar": false
- , "passfail": false
-} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/bl/.npmignore b/deps/npm/node_modules/request/node_modules/bl/.npmignore
deleted file mode 100644
index 40b878db5b..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules/ \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/bl/.travis.yml b/deps/npm/node_modules/request/node_modules/bl/.travis.yml
deleted file mode 100644
index 5cb0480b45..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - '0.10'
- - '0.12'
- - '4'
- - '5'
-branches:
- only:
- - master
-notifications:
- email:
- - rod@vagg.org
diff --git a/deps/npm/node_modules/request/node_modules/bl/LICENSE.md b/deps/npm/node_modules/request/node_modules/bl/LICENSE.md
deleted file mode 100644
index ccb24797c8..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/LICENSE.md
+++ /dev/null
@@ -1,13 +0,0 @@
-The MIT License (MIT)
-=====================
-
-Copyright (c) 2014 bl contributors
-----------------------------------
-
-*bl contributors listed at <https://github.com/rvagg/bl#contributors>*
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/bl/README.md b/deps/npm/node_modules/request/node_modules/bl/README.md
deleted file mode 100644
index f7044db26e..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/README.md
+++ /dev/null
@@ -1,200 +0,0 @@
-# bl *(BufferList)*
-
-[![Build Status](https://travis-ci.org/rvagg/bl.svg?branch=master)](https://travis-ci.org/rvagg/bl)
-
-**A Node.js Buffer list collector, reader and streamer thingy.**
-
-[![NPM](https://nodei.co/npm/bl.png?downloads=true&downloadRank=true)](https://nodei.co/npm/bl/)
-[![NPM](https://nodei.co/npm-dl/bl.png?months=6&height=3)](https://nodei.co/npm/bl/)
-
-**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them!
-
-The original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently.
-
-```js
-const BufferList = require('bl')
-
-var bl = new BufferList()
-bl.append(new Buffer('abcd'))
-bl.append(new Buffer('efg'))
-bl.append('hi') // bl will also accept & convert Strings
-bl.append(new Buffer('j'))
-bl.append(new Buffer([ 0x3, 0x4 ]))
-
-console.log(bl.length) // 12
-
-console.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij'
-console.log(bl.slice(3, 10).toString('ascii')) // 'defghij'
-console.log(bl.slice(3, 6).toString('ascii')) // 'def'
-console.log(bl.slice(3, 8).toString('ascii')) // 'defgh'
-console.log(bl.slice(5, 10).toString('ascii')) // 'fghij'
-
-// or just use toString!
-console.log(bl.toString()) // 'abcdefghij\u0003\u0004'
-console.log(bl.toString('ascii', 3, 8)) // 'defgh'
-console.log(bl.toString('ascii', 5, 10)) // 'fghij'
-
-// other standard Buffer readables
-console.log(bl.readUInt16BE(10)) // 0x0304
-console.log(bl.readUInt16LE(10)) // 0x0403
-```
-
-Give it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**:
-
-```js
-const bl = require('bl')
- , fs = require('fs')
-
-fs.createReadStream('README.md')
- .pipe(bl(function (err, data) { // note 'new' isn't strictly required
- // `data` is a complete Buffer object containing the full data
- console.log(data.toString())
- }))
-```
-
-Note that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream.
-
-Or to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!):
-```js
-const hyperquest = require('hyperquest')
- , bl = require('bl')
- , url = 'https://raw.github.com/rvagg/bl/master/README.md'
-
-hyperquest(url).pipe(bl(function (err, data) {
- console.log(data.toString())
-}))
-```
-
-Or, use it as a readable stream to recompose a list of Buffers to an output source:
-
-```js
-const BufferList = require('bl')
- , fs = require('fs')
-
-var bl = new BufferList()
-bl.append(new Buffer('abcd'))
-bl.append(new Buffer('efg'))
-bl.append(new Buffer('hi'))
-bl.append(new Buffer('j'))
-
-bl.pipe(fs.createWriteStream('gibberish.txt'))
-```
-
-## API
-
- * <a href="#ctor"><code><b>new BufferList([ callback ])</b></code></a>
- * <a href="#length"><code>bl.<b>length</b></code></a>
- * <a href="#append"><code>bl.<b>append(buffer)</b></code></a>
- * <a href="#get"><code>bl.<b>get(index)</b></code></a>
- * <a href="#slice"><code>bl.<b>slice([ start[, end ] ])</b></code></a>
- * <a href="#copy"><code>bl.<b>copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])</b></code></a>
- * <a href="#duplicate"><code>bl.<b>duplicate()</b></code></a>
- * <a href="#consume"><code>bl.<b>consume(bytes)</b></code></a>
- * <a href="#toString"><code>bl.<b>toString([encoding, [ start, [ end ]]])</b></code></a>
- * <a href="#readXX"><code>bl.<b>readDoubleBE()</b></code>, <code>bl.<b>readDoubleLE()</b></code>, <code>bl.<b>readFloatBE()</b></code>, <code>bl.<b>readFloatLE()</b></code>, <code>bl.<b>readInt32BE()</b></code>, <code>bl.<b>readInt32LE()</b></code>, <code>bl.<b>readUInt32BE()</b></code>, <code>bl.<b>readUInt32LE()</b></code>, <code>bl.<b>readInt16BE()</b></code>, <code>bl.<b>readInt16LE()</b></code>, <code>bl.<b>readUInt16BE()</b></code>, <code>bl.<b>readUInt16LE()</b></code>, <code>bl.<b>readInt8()</b></code>, <code>bl.<b>readUInt8()</b></code></a>
- * <a href="#streams">Streams</a>
-
---------------------------------------------------------
-<a name="ctor"></a>
-### new BufferList([ callback | Buffer | Buffer array | BufferList | BufferList array | String ])
-The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream.
-
-Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object.
-
-`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with:
-
-```js
-var bl = require('bl')
-var myinstance = bl()
-
-// equivilant to:
-
-var BufferList = require('bl')
-var myinstance = new BufferList()
-```
-
---------------------------------------------------------
-<a name="length"></a>
-### bl.length
-Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list.
-
---------------------------------------------------------
-<a name="append"></a>
-### bl.append(Buffer | Buffer array | BufferList | BufferList array | String)
-`append(buffer)` adds an additional buffer or BufferList to the internal list. `this` is returned so it can be chained.
-
---------------------------------------------------------
-<a name="get"></a>
-### bl.get(index)
-`get()` will return the byte at the specified index.
-
---------------------------------------------------------
-<a name="slice"></a>
-### bl.slice([ start, [ end ] ])
-`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.
-
-If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer.
-
---------------------------------------------------------
-<a name="copy"></a>
-### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])
-`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively.
-
---------------------------------------------------------
-<a name="duplicate"></a>
-### bl.duplicate()
-`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example:
-
-```js
-var bl = new BufferList()
-
-bl.append('hello')
-bl.append(' world')
-bl.append('\n')
-
-bl.duplicate().pipe(process.stdout, { end: false })
-
-console.log(bl.toString())
-```
-
---------------------------------------------------------
-<a name="consume"></a>
-### bl.consume(bytes)
-`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers&mdash;initial offsets will be calculated accordingly in order to give you a consistent view of the data.
-
---------------------------------------------------------
-<a name="toString"></a>
-### bl.toString([encoding, [ start, [ end ]]])
-`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information.
-
---------------------------------------------------------
-<a name="readXX"></a>
-### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8()
-
-All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently.
-
-See the <b><code>[Buffer](http://nodejs.org/docs/latest/api/buffer.html)</code></b> documentation for how these work.
-
---------------------------------------------------------
-<a name="streams"></a>
-### Streams
-**bl** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **bl** instance.
-
---------------------------------------------------------
-
-## Contributors
-
-**bl** is brought to you by the following hackers:
-
- * [Rod Vagg](https://github.com/rvagg)
- * [Matteo Collina](https://github.com/mcollina)
- * [Jarett Cruger](https://github.com/jcrugzz)
-
-=======
-
-<a name="license"></a>
-## License &amp; copyright
-
-Copyright (c) 2013-2014 bl contributors (listed above).
-
-bl is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
diff --git a/deps/npm/node_modules/request/node_modules/bl/bl.js b/deps/npm/node_modules/request/node_modules/bl/bl.js
deleted file mode 100644
index f585df1721..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/bl.js
+++ /dev/null
@@ -1,243 +0,0 @@
-var DuplexStream = require('readable-stream/duplex')
- , util = require('util')
-
-
-function BufferList (callback) {
- if (!(this instanceof BufferList))
- return new BufferList(callback)
-
- this._bufs = []
- this.length = 0
-
- if (typeof callback == 'function') {
- this._callback = callback
-
- var piper = function piper (err) {
- if (this._callback) {
- this._callback(err)
- this._callback = null
- }
- }.bind(this)
-
- this.on('pipe', function onPipe (src) {
- src.on('error', piper)
- })
- this.on('unpipe', function onUnpipe (src) {
- src.removeListener('error', piper)
- })
- } else {
- this.append(callback)
- }
-
- DuplexStream.call(this)
-}
-
-
-util.inherits(BufferList, DuplexStream)
-
-
-BufferList.prototype._offset = function _offset (offset) {
- var tot = 0, i = 0, _t
- for (; i < this._bufs.length; i++) {
- _t = tot + this._bufs[i].length
- if (offset < _t)
- return [ i, offset - tot ]
- tot = _t
- }
-}
-
-
-BufferList.prototype.append = function append (buf) {
- var i = 0
- , newBuf
-
- if (Array.isArray(buf)) {
- for (; i < buf.length; i++)
- this.append(buf[i])
- } else if (buf instanceof BufferList) {
- // unwrap argument into individual BufferLists
- for (; i < buf._bufs.length; i++)
- this.append(buf._bufs[i])
- } else if (buf != null) {
- // coerce number arguments to strings, since Buffer(number) does
- // uninitialized memory allocation
- if (typeof buf == 'number')
- buf = buf.toString()
-
- newBuf = Buffer.isBuffer(buf) ? buf : new Buffer(buf)
- this._bufs.push(newBuf)
- this.length += newBuf.length
- }
-
- return this
-}
-
-
-BufferList.prototype._write = function _write (buf, encoding, callback) {
- this.append(buf)
-
- if (typeof callback == 'function')
- callback()
-}
-
-
-BufferList.prototype._read = function _read (size) {
- if (!this.length)
- return this.push(null)
-
- size = Math.min(size, this.length)
- this.push(this.slice(0, size))
- this.consume(size)
-}
-
-
-BufferList.prototype.end = function end (chunk) {
- DuplexStream.prototype.end.call(this, chunk)
-
- if (this._callback) {
- this._callback(null, this.slice())
- this._callback = null
- }
-}
-
-
-BufferList.prototype.get = function get (index) {
- return this.slice(index, index + 1)[0]
-}
-
-
-BufferList.prototype.slice = function slice (start, end) {
- return this.copy(null, 0, start, end)
-}
-
-
-BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
- if (typeof srcStart != 'number' || srcStart < 0)
- srcStart = 0
- if (typeof srcEnd != 'number' || srcEnd > this.length)
- srcEnd = this.length
- if (srcStart >= this.length)
- return dst || new Buffer(0)
- if (srcEnd <= 0)
- return dst || new Buffer(0)
-
- var copy = !!dst
- , off = this._offset(srcStart)
- , len = srcEnd - srcStart
- , bytes = len
- , bufoff = (copy && dstStart) || 0
- , start = off[1]
- , l
- , i
-
- // copy/slice everything
- if (srcStart === 0 && srcEnd == this.length) {
- if (!copy) // slice, just return a full concat
- return Buffer.concat(this._bufs)
-
- // copy, need to copy individual buffers
- for (i = 0; i < this._bufs.length; i++) {
- this._bufs[i].copy(dst, bufoff)
- bufoff += this._bufs[i].length
- }
-
- return dst
- }
-
- // easy, cheap case where it's a subset of one of the buffers
- if (bytes <= this._bufs[off[0]].length - start) {
- return copy
- ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes)
- : this._bufs[off[0]].slice(start, start + bytes)
- }
-
- if (!copy) // a slice, we need something to copy in to
- dst = new Buffer(len)
-
- for (i = off[0]; i < this._bufs.length; i++) {
- l = this._bufs[i].length - start
-
- if (bytes > l) {
- this._bufs[i].copy(dst, bufoff, start)
- } else {
- this._bufs[i].copy(dst, bufoff, start, start + bytes)
- break
- }
-
- bufoff += l
- bytes -= l
-
- if (start)
- start = 0
- }
-
- return dst
-}
-
-BufferList.prototype.toString = function toString (encoding, start, end) {
- return this.slice(start, end).toString(encoding)
-}
-
-BufferList.prototype.consume = function consume (bytes) {
- while (this._bufs.length) {
- if (bytes >= this._bufs[0].length) {
- bytes -= this._bufs[0].length
- this.length -= this._bufs[0].length
- this._bufs.shift()
- } else {
- this._bufs[0] = this._bufs[0].slice(bytes)
- this.length -= bytes
- break
- }
- }
- return this
-}
-
-
-BufferList.prototype.duplicate = function duplicate () {
- var i = 0
- , copy = new BufferList()
-
- for (; i < this._bufs.length; i++)
- copy.append(this._bufs[i])
-
- return copy
-}
-
-
-BufferList.prototype.destroy = function destroy () {
- this._bufs.length = 0
- this.length = 0
- this.push(null)
-}
-
-
-;(function () {
- var methods = {
- 'readDoubleBE' : 8
- , 'readDoubleLE' : 8
- , 'readFloatBE' : 4
- , 'readFloatLE' : 4
- , 'readInt32BE' : 4
- , 'readInt32LE' : 4
- , 'readUInt32BE' : 4
- , 'readUInt32LE' : 4
- , 'readInt16BE' : 2
- , 'readInt16LE' : 2
- , 'readUInt16BE' : 2
- , 'readUInt16LE' : 2
- , 'readInt8' : 1
- , 'readUInt8' : 1
- }
-
- for (var m in methods) {
- (function (m) {
- BufferList.prototype[m] = function (offset) {
- return this.slice(offset, offset + methods[m])[m](0)
- }
- }(m))
- }
-}())
-
-
-module.exports = BufferList
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore
deleted file mode 100644
index 38344f87a6..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-build/
-test/
-examples/
-fs.js
-zlib.js \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml
deleted file mode 100644
index 1b82118460..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-sudo: false
-language: node_js
-before_install:
- - npm install -g npm@2
- - npm install -g npm
-notifications:
- email: false
-matrix:
- fast_finish: true
- allow_failures:
- - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest"
- - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest"
- include:
- - node_js: '0.8'
- env: TASK=test
- - node_js: '0.10'
- env: TASK=test
- - node_js: '0.11'
- env: TASK=test
- - node_js: '0.12'
- env: TASK=test
- - node_js: 1
- env: TASK=test
- - node_js: 2
- env: TASK=test
- - node_js: 3
- env: TASK=test
- - node_js: 4
- env: TASK=test
- - node_js: 5
- env: TASK=test
- - node_js: 5
- env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest"
-script: "npm run $TASK"
-env:
- global:
- - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
- - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml
deleted file mode 100644
index 96d9cfbd38..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml
+++ /dev/null
@@ -1 +0,0 @@
-ui: tape
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE
deleted file mode 100644
index e3d4e695a4..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-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/request/node_modules/bl/node_modules/readable-stream/README.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md
deleted file mode 100644
index 86b95a3bf6..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# readable-stream
-
-***Node-core v5.8.0 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, including [documentation](doc/stream.markdown).
-
-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 WG 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;
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown
deleted file mode 100644
index 0bc3819e63..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown
+++ /dev/null
@@ -1,1760 +0,0 @@
-# Stream
-
- Stability: 2 - Stable
-
-A stream is an abstract interface implemented by various objects in
-Node.js. For example a [request to an HTTP server][http-incoming-message] is a
-stream, as is [`process.stdout`][]. Streams are readable, writable, or both. All
-streams are instances of [`EventEmitter`][].
-
-You can load the Stream base classes by doing `require('stream')`.
-There are base classes provided for [Readable][] streams, [Writable][]
-streams, [Duplex][] streams, and [Transform][] streams.
-
-This document is split up into 3 sections:
-
-1. The first section explains the parts of the API that you need to be
- aware of to use streams in your programs.
-2. The second section explains the parts of the API that you need to
- use if you implement your own custom streams yourself. The API is designed to
- make this easy for you to do.
-3. The third section goes into more depth about how streams work,
- including some of the internal mechanisms and functions that you
- should probably not modify unless you definitely know what you are
- doing.
-
-
-## API for Stream Consumers
-
-<!--type=misc-->
-
-Streams can be either [Readable][], [Writable][], or both ([Duplex][]).
-
-All streams are EventEmitters, but they also have other custom methods
-and properties depending on whether they are Readable, Writable, or
-Duplex.
-
-If a stream is both Readable and Writable, then it implements all of
-the methods and events. So, a [Duplex][] or [Transform][] stream is
-fully described by this API, though their implementation may be
-somewhat different.
-
-It is not necessary to implement Stream interfaces in order to consume
-streams in your programs. If you **are** implementing streaming
-interfaces in your own program, please also refer to
-[API for Stream Implementors][].
-
-Almost all Node.js programs, no matter how simple, use Streams in some
-way. Here is an example of using Streams in an Node.js program:
-
-```js
-const http = require('http');
-
-var server = http.createServer( (req, res) => {
- // req is an http.IncomingMessage, which is a Readable Stream
- // res is an http.ServerResponse, which is a Writable Stream
-
- var body = '';
- // we want to get the data as utf8 strings
- // If you don't set an encoding, then you'll get Buffer objects
- req.setEncoding('utf8');
-
- // Readable streams emit 'data' events once a listener is added
- req.on('data', (chunk) => {
- body += chunk;
- });
-
- // the end event tells you that you have entire body
- req.on('end', () => {
- try {
- var data = JSON.parse(body);
- } catch (er) {
- // uh oh! bad json!
- res.statusCode = 400;
- return res.end(`error: ${er.message}`);
- }
-
- // write back something interesting to the user:
- res.write(typeof data);
- res.end();
- });
-});
-
-server.listen(1337);
-
-// $ curl localhost:1337 -d '{}'
-// object
-// $ curl localhost:1337 -d '"foo"'
-// string
-// $ curl localhost:1337 -d 'not json'
-// error: Unexpected token o
-```
-
-### Class: stream.Duplex
-
-Duplex streams are streams that implement both the [Readable][] and
-[Writable][] interfaces.
-
-Examples of Duplex streams include:
-
-* [TCP sockets][]
-* [zlib streams][zlib]
-* [crypto streams][crypto]
-
-### Class: stream.Readable
-
-<!--type=class-->
-
-The Readable stream interface is the abstraction for a *source* of
-data that you are reading from. In other words, data comes *out* of a
-Readable stream.
-
-A Readable stream will not start emitting data until you indicate that
-you are ready to receive it.
-
-Readable streams have two "modes": a **flowing mode** and a **paused
-mode**. When in flowing mode, data is read from the underlying system
-and provided to your program as fast as possible. In paused mode, you
-must explicitly call [`stream.read()`][stream-read] to get chunks of data out.
-Streams start out in paused mode.
-
-**Note**: If no data event handlers are attached, and there are no
-[`stream.pipe()`][] destinations, and the stream is switched into flowing
-mode, then data will be lost.
-
-You can switch to flowing mode by doing any of the following:
-
-* Adding a [`'data'`][] event handler to listen for data.
-* Calling the [`stream.resume()`][stream-resume] method to explicitly open the
- flow.
-* Calling the [`stream.pipe()`][] method to send the data to a [Writable][].
-
-You can switch back to paused mode by doing either of the following:
-
-* If there are no pipe destinations, by calling the
- [`stream.pause()`][stream-pause] method.
-* If there are pipe destinations, by removing any [`'data'`][] event
- handlers, and removing all pipe destinations by calling the
- [`stream.unpipe()`][] method.
-
-Note that, for backwards compatibility reasons, removing [`'data'`][]
-event handlers will **not** automatically pause the stream. Also, if
-there are piped destinations, then calling [`stream.pause()`][stream-pause] will
-not guarantee that the stream will *remain* paused once those
-destinations drain and ask for more data.
-
-Examples of readable streams include:
-
-* [HTTP responses, on the client][http-incoming-message]
-* [HTTP requests, on the server][http-incoming-message]
-* [fs read streams][]
-* [zlib streams][zlib]
-* [crypto streams][crypto]
-* [TCP sockets][]
-* [child process stdout and stderr][]
-* [`process.stdin`][]
-
-#### Event: 'close'
-
-Emitted when the stream and any of its underlying resources (a file
-descriptor, for example) have been closed. The event indicates that
-no more events will be emitted, and no further computation will occur.
-
-Not all streams will emit the `'close'` event.
-
-#### Event: 'data'
-
-* `chunk` {Buffer|String} The chunk of data.
-
-Attaching a `'data'` event listener to a stream that has not been
-explicitly paused will switch the stream into flowing mode. Data will
-then be passed as soon as it is available.
-
-If you just want to get all the data out of the stream as fast as
-possible, this is the best way to do so.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.on('data', (chunk) => {
- console.log('got %d bytes of data', chunk.length);
-});
-```
-
-#### Event: 'end'
-
-This event fires when there will be no more data to read.
-
-Note that the `'end'` event **will not fire** unless the data is
-completely consumed. This can be done by switching into flowing mode,
-or by calling [`stream.read()`][stream-read] repeatedly until you get to the
-end.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.on('data', (chunk) => {
- console.log('got %d bytes of data', chunk.length);
-});
-readable.on('end', () => {
- console.log('there will be no more data.');
-});
-```
-
-#### Event: 'error'
-
-* {Error Object}
-
-Emitted if there was an error receiving data.
-
-#### Event: 'readable'
-
-When a chunk of data can be read from the stream, it will emit a
-`'readable'` event.
-
-In some cases, listening for a `'readable'` event will cause some data
-to be read into the internal buffer from the underlying system, if it
-hadn't already.
-
-```javascript
-var readable = getReadableStreamSomehow();
-readable.on('readable', () => {
- // there is some data to read now
-});
-```
-
-Once the internal buffer is drained, a `'readable'` event will fire
-again when more data is available.
-
-The `'readable'` event is not emitted in the "flowing" mode with the
-sole exception of the last one, on end-of-stream.
-
-The `'readable'` event indicates that the stream has new information:
-either new data is available or the end of the stream has been reached.
-In the former case, [`stream.read()`][stream-read] will return that data. In the
-latter case, [`stream.read()`][stream-read] will return null. For instance, in
-the following example, `foo.txt` is an empty file:
-
-```js
-const fs = require('fs');
-var rr = fs.createReadStream('foo.txt');
-rr.on('readable', () => {
- console.log('readable:', rr.read());
-});
-rr.on('end', () => {
- console.log('end');
-});
-```
-
-The output of running this script is:
-
-```
-$ node test.js
-readable: null
-end
-```
-
-#### readable.isPaused()
-
-* Return: {Boolean}
-
-This method returns whether or not the `readable` has been **explicitly**
-paused by client code (using [`stream.pause()`][stream-pause] without a
-corresponding [`stream.resume()`][stream-resume]).
-
-```js
-var readable = new stream.Readable
-
-readable.isPaused() // === false
-readable.pause()
-readable.isPaused() // === true
-readable.resume()
-readable.isPaused() // === false
-```
-
-#### readable.pause()
-
-* Return: `this`
-
-This method will cause a stream in flowing mode to stop emitting
-[`'data'`][] events, switching out of flowing mode. Any data that becomes
-available will remain in the internal buffer.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.on('data', (chunk) => {
- console.log('got %d bytes of data', chunk.length);
- readable.pause();
- console.log('there will be no more data for 1 second');
- setTimeout(() => {
- console.log('now data will start flowing again');
- readable.resume();
- }, 1000);
-});
-```
-
-#### readable.pipe(destination[, options])
-
-* `destination` {stream.Writable} The destination for writing data
-* `options` {Object} Pipe options
- * `end` {Boolean} End the writer when the reader ends. Default = `true`
-
-This method pulls all the data out of a readable stream, and writes it
-to the supplied destination, automatically managing the flow so that
-the destination is not overwhelmed by a fast readable stream.
-
-Multiple destinations can be piped to safely.
-
-```js
-var readable = getReadableStreamSomehow();
-var writable = fs.createWriteStream('file.txt');
-// All the data from readable goes into 'file.txt'
-readable.pipe(writable);
-```
-
-This function returns the destination stream, so you can set up pipe
-chains like so:
-
-```js
-var r = fs.createReadStream('file.txt');
-var z = zlib.createGzip();
-var w = fs.createWriteStream('file.txt.gz');
-r.pipe(z).pipe(w);
-```
-
-For example, emulating the Unix `cat` command:
-
-```js
-process.stdin.pipe(process.stdout);
-```
-
-By default [`stream.end()`][stream-end] is called on the destination when the
-source stream emits [`'end'`][], so that `destination` is no longer writable.
-Pass `{ end: false }` as `options` to keep the destination stream open.
-
-This keeps `writer` open so that "Goodbye" can be written at the
-end.
-
-```js
-reader.pipe(writer, { end: false });
-reader.on('end', () => {
- writer.end('Goodbye\n');
-});
-```
-
-Note that [`process.stderr`][] and [`process.stdout`][] are never closed until
-the process exits, regardless of the specified options.
-
-#### readable.read([size])
-
-* `size` {Number} Optional argument to specify how much data to read.
-* Return {String|Buffer|Null}
-
-The `read()` method pulls some data out of the internal buffer and
-returns it. If there is no data available, then it will return
-`null`.
-
-If you pass in a `size` argument, then it will return that many
-bytes. If `size` bytes are not available, then it will return `null`,
-unless we've ended, in which case it will return the data remaining
-in the buffer.
-
-If you do not specify a `size` argument, then it will return all the
-data in the internal buffer.
-
-This method should only be called in paused mode. In flowing mode,
-this method is called automatically until the internal buffer is
-drained.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.on('readable', () => {
- var chunk;
- while (null !== (chunk = readable.read())) {
- console.log('got %d bytes of data', chunk.length);
- }
-});
-```
-
-If this method returns a data chunk, then it will also trigger the
-emission of a [`'data'`][] event.
-
-Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][]
-event has been triggered will return `null`. No runtime error will be raised.
-
-#### readable.resume()
-
-* Return: `this`
-
-This method will cause the readable stream to resume emitting [`'data'`][]
-events.
-
-This method will switch the stream into flowing mode. If you do *not*
-want to consume the data from a stream, but you *do* want to get to
-its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open
-the flow of data.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.resume();
-readable.on('end', () => {
- console.log('got to the end, but did not read anything');
-});
-```
-
-#### readable.setEncoding(encoding)
-
-* `encoding` {String} The encoding to use.
-* Return: `this`
-
-Call this function to cause the stream to return strings of the specified
-encoding instead of Buffer objects. For example, if you do
-`readable.setEncoding('utf8')`, then the output data will be interpreted as
-UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`,
-then the data will be encoded in hexadecimal string format.
-
-This properly handles multi-byte characters that would otherwise be
-potentially mangled if you simply pulled the Buffers directly and
-called [`buf.toString(encoding)`][] on them. If you want to read the data
-as strings, always use this method.
-
-Also you can disable any encoding at all with `readable.setEncoding(null)`.
-This approach is very useful if you deal with binary data or with large
-multi-byte strings spread out over multiple chunks.
-
-```js
-var readable = getReadableStreamSomehow();
-readable.setEncoding('utf8');
-readable.on('data', (chunk) => {
- assert.equal(typeof chunk, 'string');
- console.log('got %d characters of string data', chunk.length);
-});
-```
-
-#### readable.unpipe([destination])
-
-* `destination` {stream.Writable} Optional specific stream to unpipe
-
-This method will remove the hooks set up for a previous [`stream.pipe()`][]
-call.
-
-If the destination is not specified, then all pipes are removed.
-
-If the destination is specified, but no pipe is set up for it, then
-this is a no-op.
-
-```js
-var readable = getReadableStreamSomehow();
-var writable = fs.createWriteStream('file.txt');
-// All the data from readable goes into 'file.txt',
-// but only for the first second
-readable.pipe(writable);
-setTimeout(() => {
- console.log('stop writing to file.txt');
- readable.unpipe(writable);
- console.log('manually close the file stream');
- writable.end();
-}, 1000);
-```
-
-#### readable.unshift(chunk)
-
-* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue
-
-This is useful in certain cases where a stream is being consumed by a
-parser, which needs to "un-consume" some data that it has
-optimistically pulled out of the source, so that the stream can be
-passed on to some other party.
-
-Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event
-has been triggered; a runtime error will be raised.
-
-If you find that you must often call `stream.unshift(chunk)` in your
-programs, consider implementing a [Transform][] stream instead. (See [API
-for Stream Implementors][].)
-
-```js
-// Pull off a header delimited by \n\n
-// use unshift() if we get too much
-// Call the callback with (error, header, stream)
-const StringDecoder = require('string_decoder').StringDecoder;
-function parseHeader(stream, callback) {
- stream.on('error', callback);
- stream.on('readable', onReadable);
- var decoder = new StringDecoder('utf8');
- var header = '';
- function onReadable() {
- var chunk;
- while (null !== (chunk = stream.read())) {
- var str = decoder.write(chunk);
- if (str.match(/\n\n/)) {
- // found the header boundary
- var split = str.split(/\n\n/);
- header += split.shift();
- var remaining = split.join('\n\n');
- var buf = new Buffer(remaining, 'utf8');
- if (buf.length)
- stream.unshift(buf);
- stream.removeListener('error', callback);
- stream.removeListener('readable', onReadable);
- // now the body of the message can be read from the stream.
- callback(null, header, stream);
- } else {
- // still reading the header.
- header += str;
- }
- }
- }
-}
-```
-
-Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)`
-will not end the reading process by resetting the internal reading state of the
-stream. This can cause unexpected results if `unshift()` is called during a
-read (i.e. from within a [`stream._read()`][stream-_read] implementation on a
-custom stream). Following the call to `unshift()` with an immediate
-[`stream.push('')`][stream-push] will reset the reading state appropriately,
-however it is best to simply avoid calling `unshift()` while in the process of
-performing a read.
-
-#### readable.wrap(stream)
-
-* `stream` {Stream} An "old style" readable stream
-
-Versions of Node.js prior to v0.10 had streams that did not implement the
-entire Streams API as it is today. (See [Compatibility][] for
-more information.)
-
-If you are using an older Node.js library that emits [`'data'`][] events and
-has a [`stream.pause()`][stream-pause] method that is advisory only, then you
-can use the `wrap()` method to create a [Readable][] stream that uses the old
-stream as its data source.
-
-You will very rarely ever need to call this function, but it exists
-as a convenience for interacting with old Node.js programs and libraries.
-
-For example:
-
-```js
-const OldReader = require('./old-api-module.js').OldReader;
-const Readable = require('stream').Readable;
-const oreader = new OldReader;
-const myReader = new Readable().wrap(oreader);
-
-myReader.on('readable', () => {
- myReader.read(); // etc.
-});
-```
-
-### Class: stream.Transform
-
-Transform streams are [Duplex][] streams where the output is in some way
-computed from the input. They implement both the [Readable][] and
-[Writable][] interfaces.
-
-Examples of Transform streams include:
-
-* [zlib streams][zlib]
-* [crypto streams][crypto]
-
-### Class: stream.Writable
-
-<!--type=class-->
-
-The Writable stream interface is an abstraction for a *destination*
-that you are writing data *to*.
-
-Examples of writable streams include:
-
-* [HTTP requests, on the client][]
-* [HTTP responses, on the server][]
-* [fs write streams][]
-* [zlib streams][zlib]
-* [crypto streams][crypto]
-* [TCP sockets][]
-* [child process stdin][]
-* [`process.stdout`][], [`process.stderr`][]
-
-#### Event: 'drain'
-
-If a [`stream.write(chunk)`][stream-write] call returns `false`, then the
-`'drain'` event will indicate when it is appropriate to begin writing more data
-to the stream.
-
-```js
-// Write the data to the supplied writable stream one million times.
-// Be attentive to back-pressure.
-function writeOneMillionTimes(writer, data, encoding, callback) {
- var i = 1000000;
- write();
- function write() {
- var ok = true;
- do {
- i -= 1;
- if (i === 0) {
- // last time!
- writer.write(data, encoding, callback);
- } else {
- // see if we should continue, or wait
- // don't pass the callback, because we're not done yet.
- ok = writer.write(data, encoding);
- }
- } while (i > 0 && ok);
- if (i > 0) {
- // had to stop early!
- // write some more once it drains
- writer.once('drain', write);
- }
- }
-}
-```
-
-#### Event: 'error'
-
-* {Error}
-
-Emitted if there was an error when writing or piping data.
-
-#### Event: 'finish'
-
-When the [`stream.end()`][stream-end] method has been called, and all data has
-been flushed to the underlying system, this event is emitted.
-
-```javascript
-var writer = getWritableStreamSomehow();
-for (var i = 0; i < 100; i ++) {
- writer.write('hello, #${i}!\n');
-}
-writer.end('this is the end\n');
-writer.on('finish', () => {
- console.error('all writes are now complete.');
-});
-```
-
-#### Event: 'pipe'
-
-* `src` {stream.Readable} source stream that is piping to this writable
-
-This is emitted whenever the [`stream.pipe()`][] method is called on a readable
-stream, adding this writable to its set of destinations.
-
-```js
-var writer = getWritableStreamSomehow();
-var reader = getReadableStreamSomehow();
-writer.on('pipe', (src) => {
- console.error('something is piping into the writer');
- assert.equal(src, reader);
-});
-reader.pipe(writer);
-```
-
-#### Event: 'unpipe'
-
-* `src` {[Readable][] Stream} The source stream that
- [unpiped][`stream.unpipe()`] this writable
-
-This is emitted whenever the [`stream.unpipe()`][] method is called on a
-readable stream, removing this writable from its set of destinations.
-
-```js
-var writer = getWritableStreamSomehow();
-var reader = getReadableStreamSomehow();
-writer.on('unpipe', (src) => {
- console.error('something has stopped piping into the writer');
- assert.equal(src, reader);
-});
-reader.pipe(writer);
-reader.unpipe(writer);
-```
-
-#### writable.cork()
-
-Forces buffering of all writes.
-
-Buffered data will be flushed either at [`stream.uncork()`][] or at
-[`stream.end()`][stream-end] call.
-
-#### writable.end([chunk][, encoding][, callback])
-
-* `chunk` {String|Buffer} Optional data to write
-* `encoding` {String} The encoding, if `chunk` is a String
-* `callback` {Function} Optional callback for when the stream is finished
-
-Call this method when no more data will be written to the stream. If supplied,
-the callback is attached as a listener on the [`'finish'`][] event.
-
-Calling [`stream.write()`][stream-write] after calling
-[`stream.end()`][stream-end] will raise an error.
-
-```js
-// write 'hello, ' and then end with 'world!'
-var file = fs.createWriteStream('example.txt');
-file.write('hello, ');
-file.end('world!');
-// writing more now is not allowed!
-```
-
-#### writable.setDefaultEncoding(encoding)
-
-* `encoding` {String} The new default encoding
-
-Sets the default encoding for a writable stream.
-
-#### writable.uncork()
-
-Flush all data, buffered since [`stream.cork()`][] call.
-
-#### writable.write(chunk[, encoding][, callback])
-
-* `chunk` {String|Buffer} The data to write
-* `encoding` {String} The encoding, if `chunk` is a String
-* `callback` {Function} Callback for when this chunk of data is flushed
-* Returns: {Boolean} `true` if the data was handled completely.
-
-This method writes some data to the underlying system, and calls the
-supplied callback once the data has been fully handled.
-
-The return value indicates if you should continue writing right now.
-If the data had to be buffered internally, then it will return
-`false`. Otherwise, it will return `true`.
-
-This return value is strictly advisory. You MAY continue to write,
-even if it returns `false`. However, writes will be buffered in
-memory, so it is best not to do this excessively. Instead, wait for
-the [`'drain'`][] event before writing more data.
-
-
-## API for Stream Implementors
-
-<!--type=misc-->
-
-To implement any sort of stream, the pattern is the same:
-
-1. Extend the appropriate parent class in your own subclass. (The
- [`util.inherits()`][] method is particularly helpful for this.)
-2. Call the appropriate parent class constructor in your constructor,
- to be sure that the internal mechanisms are set up properly.
-3. Implement one or more specific methods, as detailed below.
-
-The class to extend and the method(s) to implement depend on the sort
-of stream class you are writing:
-
-<table>
- <thead>
- <tr>
- <th>
- <p>Use-case</p>
- </th>
- <th>
- <p>Class</p>
- </th>
- <th>
- <p>Method(s) to implement</p>
- </th>
- </tr>
- </thead>
- <tr>
- <td>
- <p>Reading only</p>
- </td>
- <td>
- <p>[Readable](#stream_class_stream_readable_1)</p>
- </td>
- <td>
- <p><code>[_read][stream-_read]</code></p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Writing only</p>
- </td>
- <td>
- <p>[Writable](#stream_class_stream_writable_1)</p>
- </td>
- <td>
- <p><code>[_write][stream-_write]</code>, <code>[_writev][stream-_writev]</code></p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Reading and writing</p>
- </td>
- <td>
- <p>[Duplex](#stream_class_stream_duplex_1)</p>
- </td>
- <td>
- <p><code>[_read][stream-_read]</code>, <code>[_write][stream-_write]</code>, <code>[_writev][stream-_writev]</code></p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Operate on written data, then read the result</p>
- </td>
- <td>
- <p>[Transform](#stream_class_stream_transform_1)</p>
- </td>
- <td>
- <p><code>[_transform][stream-_transform]</code>, <code>[_flush][stream-_flush]</code></p>
- </td>
- </tr>
-</table>
-
-In your implementation code, it is very important to never call the methods
-described in [API for Stream Consumers][]. Otherwise, you can potentially cause
-adverse side effects in programs that consume your streaming interfaces.
-
-### Class: stream.Duplex
-
-<!--type=class-->
-
-A "duplex" stream is one that is both Readable and Writable, such as a TCP
-socket connection.
-
-Note that `stream.Duplex` is an abstract class designed to be extended
-with an underlying implementation of the [`stream._read(size)`][stream-_read]
-and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you
-would with a Readable or Writable stream class.
-
-Since JavaScript doesn't have multiple prototypal inheritance, this class
-prototypally inherits from Readable, and then parasitically from Writable. It is
-thus up to the user to implement both the low-level
-[`stream._read(n)`][stream-_read] method as well as the low-level
-[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension
-duplex classes.
-
-#### new stream.Duplex(options)
-
-* `options` {Object} Passed to both Writable and Readable
- constructors. Also has the following fields:
- * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then
- the stream will automatically end the readable side when the
- writable side ends and vice versa.
- * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode`
- for readable side of the stream. Has no effect if `objectMode`
- is `true`.
- * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode`
- for writable side of the stream. Has no effect if `objectMode`
- is `true`.
-
-In classes that extend the Duplex class, make sure to call the
-constructor so that the buffering settings can be properly
-initialized.
-
-### Class: stream.PassThrough
-
-This is a trivial implementation of a [Transform][] stream that simply
-passes the input bytes across to the output. Its purpose is mainly
-for examples and testing, but there are occasionally use cases where
-it can come in handy as a building block for novel sorts of streams.
-
-### Class: stream.Readable
-
-<!--type=class-->
-
-`stream.Readable` is an abstract class designed to be extended with an
-underlying implementation of the [`stream._read(size)`][stream-_read] method.
-
-Please see [API for Stream Consumers][] for how to consume
-streams in your programs. What follows is an explanation of how to
-implement Readable streams in your programs.
-
-#### new stream.Readable([options])
-
-* `options` {Object}
- * `highWaterMark` {Number} The maximum number of bytes to store in
- the internal buffer before ceasing to read from the underlying
- resource. Default = `16384` (16kb), or `16` for `objectMode` streams
- * `encoding` {String} If specified, then buffers will be decoded to
- strings using the specified encoding. Default = `null`
- * `objectMode` {Boolean} Whether this stream should behave
- as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns
- a single value instead of a Buffer of size n. Default = `false`
- * `read` {Function} Implementation for the [`stream._read()`][stream-_read]
- method.
-
-In classes that extend the Readable class, make sure to call the
-Readable constructor so that the buffering settings can be properly
-initialized.
-
-#### readable.\_read(size)
-
-* `size` {Number} Number of bytes to read asynchronously
-
-Note: **Implement this method, but do NOT call it directly.**
-
-This method is prefixed with an underscore because it is internal to the
-class that defines it and should only be called by the internal Readable
-class methods. All Readable stream implementations must provide a \_read
-method to fetch data from the underlying resource.
-
-When `_read()` is called, if data is available from the resource, the `_read()`
-implementation should start pushing that data into the read queue by calling
-[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from
-the resource and pushing data until push returns `false`, at which point it
-should stop reading from the resource. Only when `_read()` is called again after
-it has stopped should it start reading more data from the resource and pushing
-that data onto the queue.
-
-Note: once the `_read()` method is called, it will not be called again until
-the [`stream.push()`][stream-push] method is called.
-
-The `size` argument is advisory. Implementations where a "read" is a
-single call that returns data can use this to know how much data to
-fetch. Implementations where that is not relevant, such as TCP or
-TLS, may ignore this argument, and simply provide data whenever it
-becomes available. There is no need, for example to "wait" until
-`size` bytes are available before calling [`stream.push(chunk)`][stream-push].
-
-#### readable.push(chunk[, encoding])
-
-
-* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue
-* `encoding` {String} Encoding of String chunks. Must be a valid
- Buffer encoding, such as `'utf8'` or `'ascii'`
-* return {Boolean} Whether or not more pushes should be performed
-
-Note: **This method should be called by Readable implementors, NOT
-by consumers of Readable streams.**
-
-If a value other than null is passed, The `push()` method adds a chunk of data
-into the queue for subsequent stream processors to consume. If `null` is
-passed, it signals the end of the stream (EOF), after which no more data
-can be written.
-
-The data added with `push()` can be pulled out by calling the
-[`stream.read()`][stream-read] method when the [`'readable'`][] event fires.
-
-This API is designed to be as flexible as possible. For example,
-you may be wrapping a lower-level source which has some sort of
-pause/resume mechanism, and a data callback. In those cases, you
-could wrap the low-level source object by doing something like this:
-
-```js
-// source is an object with readStop() and readStart() methods,
-// and an `ondata` member that gets called when it has data, and
-// an `onend` member that gets called when the data is over.
-
-util.inherits(SourceWrapper, Readable);
-
-function SourceWrapper(options) {
- Readable.call(this, options);
-
- this._source = getLowlevelSourceObject();
-
- // Every time there's data, we push it into the internal buffer.
- this._source.ondata = (chunk) => {
- // if push() returns false, then we need to stop reading from source
- if (!this.push(chunk))
- this._source.readStop();
- };
-
- // When the source ends, we push the EOF-signaling `null` chunk
- this._source.onend = () => {
- this.push(null);
- };
-}
-
-// _read will be called when the stream wants to pull more data in
-// the advisory size argument is ignored in this case.
-SourceWrapper.prototype._read = function(size) {
- this._source.readStart();
-};
-```
-
-#### Example: A Counting Stream
-
-<!--type=example-->
-
-This is a basic example of a Readable stream. It emits the numerals
-from 1 to 1,000,000 in ascending order, and then ends.
-
-```js
-const Readable = require('stream').Readable;
-const util = require('util');
-util.inherits(Counter, Readable);
-
-function Counter(opt) {
- Readable.call(this, opt);
- this._max = 1000000;
- this._index = 1;
-}
-
-Counter.prototype._read = function() {
- var i = this._index++;
- if (i > this._max)
- this.push(null);
- else {
- var str = '' + i;
- var buf = new Buffer(str, 'ascii');
- this.push(buf);
- }
-};
-```
-
-#### Example: SimpleProtocol v1 (Sub-optimal)
-
-This is similar to the `parseHeader` function described
-[here](#stream_readable_unshift_chunk), but implemented as a custom stream.
-Also, note that this implementation does not convert the incoming data to a
-string.
-
-However, this would be better implemented as a [Transform][] stream. See
-[SimpleProtocol v2][] for a better implementation.
-
-```js
-// A parser for a simple data protocol.
-// The "header" is a JSON object, followed by 2 \n characters, and
-// then a message body.
-//
-// NOTE: This can be done more simply as a Transform stream!
-// Using Readable directly for this is sub-optimal. See the
-// alternative example below under the Transform section.
-
-const Readable = require('stream').Readable;
-const util = require('util');
-
-util.inherits(SimpleProtocol, Readable);
-
-function SimpleProtocol(source, options) {
- if (!(this instanceof SimpleProtocol))
- return new SimpleProtocol(source, options);
-
- Readable.call(this, options);
- this._inBody = false;
- this._sawFirstCr = false;
-
- // source is a readable stream, such as a socket or file
- this._source = source;
-
- var self = this;
- source.on('end', () => {
- self.push(null);
- });
-
- // give it a kick whenever the source is readable
- // read(0) will not consume any bytes
- source.on('readable', () => {
- self.read(0);
- });
-
- this._rawHeader = [];
- this.header = null;
-}
-
-SimpleProtocol.prototype._read = function(n) {
- if (!this._inBody) {
- var chunk = this._source.read();
-
- // if the source doesn't have data, we don't have data yet.
- if (chunk === null)
- return this.push('');
-
- // check if the chunk has a \n\n
- var split = -1;
- for (var i = 0; i < chunk.length; i++) {
- if (chunk[i] === 10) { // '\n'
- if (this._sawFirstCr) {
- split = i;
- break;
- } else {
- this._sawFirstCr = true;
- }
- } else {
- this._sawFirstCr = false;
- }
- }
-
- if (split === -1) {
- // still waiting for the \n\n
- // stash the chunk, and try again.
- this._rawHeader.push(chunk);
- this.push('');
- } else {
- this._inBody = true;
- var h = chunk.slice(0, split);
- this._rawHeader.push(h);
- var header = Buffer.concat(this._rawHeader).toString();
- try {
- this.header = JSON.parse(header);
- } catch (er) {
- this.emit('error', new Error('invalid simple protocol data'));
- return;
- }
- // now, because we got some extra data, unshift the rest
- // back into the read queue so that our consumer will see it.
- var b = chunk.slice(split);
- this.unshift(b);
- // calling unshift by itself does not reset the reading state
- // of the stream; since we're inside _read, doing an additional
- // push('') will reset the state appropriately.
- this.push('');
-
- // and let them know that we are done parsing the header.
- this.emit('header', this.header);
- }
- } else {
- // from there on, just provide the data to our consumer.
- // careful not to push(null), since that would indicate EOF.
- var chunk = this._source.read();
- if (chunk) this.push(chunk);
- }
-};
-
-// Usage:
-// var parser = new SimpleProtocol(source);
-// Now parser is a readable stream that will emit 'header'
-// with the parsed header data.
-```
-
-### Class: stream.Transform
-
-A "transform" stream is a duplex stream where the output is causally
-connected in some way to the input, such as a [zlib][] stream or a
-[crypto][] stream.
-
-There is no requirement that the output be the same size as the input,
-the same number of chunks, or arrive at the same time. For example, a
-Hash stream will only ever have a single chunk of output which is
-provided when the input is ended. A zlib stream will produce output
-that is either much smaller or much larger than its input.
-
-Rather than implement the [`stream._read()`][stream-_read] and
-[`stream._write()`][stream-_write] methods, Transform classes must implement the
-[`stream._transform()`][stream-_transform] method, and may optionally
-also implement the [`stream._flush()`][stream-_flush] method. (See below.)
-
-#### new stream.Transform([options])
-
-* `options` {Object} Passed to both Writable and Readable
- constructors. Also has the following fields:
- * `transform` {Function} Implementation for the
- [`stream._transform()`][stream-_transform] method.
- * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush]
- method.
-
-In classes that extend the Transform class, make sure to call the
-constructor so that the buffering settings can be properly
-initialized.
-
-#### Events: 'finish' and 'end'
-
-The [`'finish'`][] and [`'end'`][] events are from the parent Writable
-and Readable classes respectively. The `'finish'` event is fired after
-[`stream.end()`][stream-end] is called and all chunks have been processed by
-[`stream._transform()`][stream-_transform], `'end'` is fired after all data has
-been output which is after the callback in [`stream._flush()`][stream-_flush]
-has been called.
-
-#### transform.\_flush(callback)
-
-* `callback` {Function} Call this function (optionally with an error
- argument) when you are done flushing any remaining data.
-
-Note: **This function MUST NOT be called directly.** It MAY be implemented
-by child classes, and if so, will be called by the internal Transform
-class methods only.
-
-In some cases, your transform operation may need to emit a bit more
-data at the end of the stream. For example, a `Zlib` compression
-stream will store up some internal state so that it can optimally
-compress the output. At the end, however, it needs to do the best it
-can with what is left, so that the data will be complete.
-
-In those cases, you can implement a `_flush()` method, which will be
-called at the very end, after all the written data is consumed, but
-before emitting [`'end'`][] to signal the end of the readable side. Just
-like with [`stream._transform()`][stream-_transform], call
-`transform.push(chunk)` zero or more times, as appropriate, and call `callback`
-when the flush operation is complete.
-
-This method is prefixed with an underscore because it is internal to
-the class that defines it, and should not be called directly by user
-programs. However, you **are** expected to override this method in
-your own extension classes.
-
-#### transform.\_transform(chunk, encoding, callback)
-
-* `chunk` {Buffer|String} The chunk to be transformed. Will **always**
- be a buffer unless the `decodeStrings` option was set to `false`.
-* `encoding` {String} If the chunk is a string, then this is the
- encoding type. If chunk is a buffer, then this is the special
- value - 'buffer', ignore it in this case.
-* `callback` {Function} Call this function (optionally with an error
- argument and data) when you are done processing the supplied chunk.
-
-Note: **This function MUST NOT be called directly.** It should be
-implemented by child classes, and called by the internal Transform
-class methods only.
-
-All Transform stream implementations must provide a `_transform()`
-method to accept input and produce output.
-
-`_transform()` should do whatever has to be done in this specific
-Transform class, to handle the bytes being written, and pass them off
-to the readable portion of the interface. Do asynchronous I/O,
-process things, and so on.
-
-Call `transform.push(outputChunk)` 0 or more times to generate output
-from this input chunk, depending on how much data you want to output
-as a result of this chunk.
-
-Call the callback function only when the current chunk is completely
-consumed. Note that there may or may not be output as a result of any
-particular input chunk. If you supply a second argument to the callback
-it will be passed to the push method. In other words the following are
-equivalent:
-
-```js
-transform.prototype._transform = function (data, encoding, callback) {
- this.push(data);
- callback();
-};
-
-transform.prototype._transform = function (data, encoding, callback) {
- callback(null, data);
-};
-```
-
-This method is prefixed with an underscore because it is internal to
-the class that defines it, and should not be called directly by user
-programs. However, you **are** expected to override this method in
-your own extension classes.
-
-#### Example: `SimpleProtocol` parser v2
-
-The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple
-protocol parser can be implemented simply by using the higher level
-[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol
-v1` examples.
-
-In this example, rather than providing the input as an argument, it
-would be piped into the parser, which is a more idiomatic Node.js stream
-approach.
-
-```javascript
-const util = require('util');
-const Transform = require('stream').Transform;
-util.inherits(SimpleProtocol, Transform);
-
-function SimpleProtocol(options) {
- if (!(this instanceof SimpleProtocol))
- return new SimpleProtocol(options);
-
- Transform.call(this, options);
- this._inBody = false;
- this._sawFirstCr = false;
- this._rawHeader = [];
- this.header = null;
-}
-
-SimpleProtocol.prototype._transform = function(chunk, encoding, done) {
- if (!this._inBody) {
- // check if the chunk has a \n\n
- var split = -1;
- for (var i = 0; i < chunk.length; i++) {
- if (chunk[i] === 10) { // '\n'
- if (this._sawFirstCr) {
- split = i;
- break;
- } else {
- this._sawFirstCr = true;
- }
- } else {
- this._sawFirstCr = false;
- }
- }
-
- if (split === -1) {
- // still waiting for the \n\n
- // stash the chunk, and try again.
- this._rawHeader.push(chunk);
- } else {
- this._inBody = true;
- var h = chunk.slice(0, split);
- this._rawHeader.push(h);
- var header = Buffer.concat(this._rawHeader).toString();
- try {
- this.header = JSON.parse(header);
- } catch (er) {
- this.emit('error', new Error('invalid simple protocol data'));
- return;
- }
- // and let them know that we are done parsing the header.
- this.emit('header', this.header);
-
- // now, because we got some extra data, emit this first.
- this.push(chunk.slice(split));
- }
- } else {
- // from there on, just provide the data to our consumer as-is.
- this.push(chunk);
- }
- done();
-};
-
-// Usage:
-// var parser = new SimpleProtocol();
-// source.pipe(parser)
-// Now parser is a readable stream that will emit 'header'
-// with the parsed header data.
-```
-
-### Class: stream.Writable
-
-<!--type=class-->
-
-`stream.Writable` is an abstract class designed to be extended with an
-underlying implementation of the
-[`stream._write(chunk, encoding, callback)`][stream-_write] method.
-
-Please see [API for Stream Consumers][] for how to consume
-writable streams in your programs. What follows is an explanation of
-how to implement Writable streams in your programs.
-
-#### new stream.Writable([options])
-
-* `options` {Object}
- * `highWaterMark` {Number} Buffer level when
- [`stream.write()`][stream-write] starts returning `false`. Default = `16384`
- (16kb), or `16` for `objectMode` streams.
- * `decodeStrings` {Boolean} Whether or not to decode strings into
- Buffers before passing them to [`stream._write()`][stream-_write].
- Default = `true`
- * `objectMode` {Boolean} Whether or not the
- [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can
- write arbitrary data instead of only `Buffer` / `String` data.
- Default = `false`
- * `write` {Function} Implementation for the
- [`stream._write()`][stream-_write] method.
- * `writev` {Function} Implementation for the
- [`stream._writev()`][stream-_writev] method.
-
-In classes that extend the Writable class, make sure to call the
-constructor so that the buffering settings can be properly
-initialized.
-
-#### writable.\_write(chunk, encoding, callback)
-
-* `chunk` {Buffer|String} The chunk to be written. Will **always**
- be a buffer unless the `decodeStrings` option was set to `false`.
-* `encoding` {String} If the chunk is a string, then this is the
- encoding type. If chunk is a buffer, then this is the special
- value - 'buffer', ignore it in this case.
-* `callback` {Function} Call this function (optionally with an error
- argument) when you are done processing the supplied chunk.
-
-All Writable stream implementations must provide a
-[`stream._write()`][stream-_write] method to send data to the underlying
-resource.
-
-Note: **This function MUST NOT be called directly.** It should be
-implemented by child classes, and called by the internal Writable
-class methods only.
-
-Call the callback using the standard `callback(error)` pattern to
-signal that the write completed successfully or with an error.
-
-If the `decodeStrings` flag is set in the constructor options, then
-`chunk` may be a string rather than a Buffer, and `encoding` will
-indicate the sort of string that it is. This is to support
-implementations that have an optimized handling for certain string
-data encodings. If you do not explicitly set the `decodeStrings`
-option to `false`, then you can safely ignore the `encoding` argument,
-and assume that `chunk` will always be a Buffer.
-
-This method is prefixed with an underscore because it is internal to
-the class that defines it, and should not be called directly by user
-programs. However, you **are** expected to override this method in
-your own extension classes.
-
-#### writable.\_writev(chunks, callback)
-
-* `chunks` {Array} The chunks to be written. Each chunk has following
- format: `{ chunk: ..., encoding: ... }`.
-* `callback` {Function} Call this function (optionally with an error
- argument) when you are done processing the supplied chunks.
-
-Note: **This function MUST NOT be called directly.** It may be
-implemented by child classes, and called by the internal Writable
-class methods only.
-
-This function is completely optional to implement. In most cases it is
-unnecessary. If implemented, it will be called with all the chunks
-that are buffered in the write queue.
-
-
-## Simplified Constructor API
-
-<!--type=misc-->
-
-In simple cases there is now the added benefit of being able to construct a
-stream without inheritance.
-
-This can be done by passing the appropriate methods as constructor options:
-
-Examples:
-
-### Duplex
-
-```js
-var duplex = new stream.Duplex({
- read: function(n) {
- // sets this._read under the hood
-
- // push data onto the read queue, passing null
- // will signal the end of the stream (EOF)
- this.push(chunk);
- },
- write: function(chunk, encoding, next) {
- // sets this._write under the hood
-
- // An optional error can be passed as the first argument
- next()
- }
-});
-
-// or
-
-var duplex = new stream.Duplex({
- read: function(n) {
- // sets this._read under the hood
-
- // push data onto the read queue, passing null
- // will signal the end of the stream (EOF)
- this.push(chunk);
- },
- writev: function(chunks, next) {
- // sets this._writev under the hood
-
- // An optional error can be passed as the first argument
- next()
- }
-});
-```
-
-### Readable
-
-```js
-var readable = new stream.Readable({
- read: function(n) {
- // sets this._read under the hood
-
- // push data onto the read queue, passing null
- // will signal the end of the stream (EOF)
- this.push(chunk);
- }
-});
-```
-
-### Transform
-
-```js
-var transform = new stream.Transform({
- transform: function(chunk, encoding, next) {
- // sets this._transform under the hood
-
- // generate output as many times as needed
- // this.push(chunk);
-
- // call when the current chunk is consumed
- next();
- },
- flush: function(done) {
- // sets this._flush under the hood
-
- // generate output as many times as needed
- // this.push(chunk);
-
- done();
- }
-});
-```
-
-### Writable
-
-```js
-var writable = new stream.Writable({
- write: function(chunk, encoding, next) {
- // sets this._write under the hood
-
- // An optional error can be passed as the first argument
- next()
- }
-});
-
-// or
-
-var writable = new stream.Writable({
- writev: function(chunks, next) {
- // sets this._writev under the hood
-
- // An optional error can be passed as the first argument
- next()
- }
-});
-```
-
-## Streams: Under the Hood
-
-<!--type=misc-->
-
-### Buffering
-
-<!--type=misc-->
-
-Both Writable and Readable streams will buffer data on an internal
-object which can be retrieved from `_writableState.getBuffer()` or
-`_readableState.buffer`, respectively.
-
-The amount of data that will potentially be buffered depends on the
-`highWaterMark` option which is passed into the constructor.
-
-Buffering in Readable streams happens when the implementation calls
-[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not
-call [`stream.read()`][stream-read], then the data will sit in the internal
-queue until it is consumed.
-
-Buffering in Writable streams happens when the user calls
-[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`.
-
-The purpose of streams, especially with the [`stream.pipe()`][] method, is to
-limit the buffering of data to acceptable levels, so that sources and
-destinations of varying speed will not overwhelm the available memory.
-
-### Compatibility with Older Node.js Versions
-
-<!--type=misc-->
-
-In versions of Node.js prior to v0.10, the Readable stream interface was
-simpler, but also less powerful and less useful.
-
-* Rather than waiting for you to call the [`stream.read()`][stream-read] method,
- [`'data'`][] events would start emitting immediately. If you needed to do
- some I/O to decide how to handle data, then you had to store the chunks
- in some kind of buffer so that they would not be lost.
-* The [`stream.pause()`][stream-pause] method was advisory, rather than
- guaranteed. This meant that you still had to be prepared to receive
- [`'data'`][] events even when the stream was in a paused state.
-
-In Node.js v0.10, the [Readable][] class was added.
-For backwards compatibility with older Node.js programs, Readable streams
-switch into "flowing mode" when a [`'data'`][] event handler is added, or
-when the [`stream.resume()`][stream-resume] method is called. The effect is
-that, even if you are not using the new [`stream.read()`][stream-read] method
-and [`'readable'`][] event, you no longer have to worry about losing
-[`'data'`][] chunks.
-
-Most programs will continue to function normally. However, this
-introduces an edge case in the following conditions:
-
-* No [`'data'`][] event handler is added.
-* The [`stream.resume()`][stream-resume] method is never called.
-* The stream is not piped to any writable destination.
-
-For example, consider the following code:
-
-```js
-// WARNING! BROKEN!
-net.createServer((socket) => {
-
- // we add an 'end' method, but never consume the data
- socket.on('end', () => {
- // It will never get here.
- socket.end('I got your message (but didnt read it)\n');
- });
-
-}).listen(1337);
-```
-
-In versions of Node.js prior to v0.10, the incoming message data would be
-simply discarded. However, in Node.js v0.10 and beyond,
-the socket will remain paused forever.
-
-The workaround in this situation is to call the
-[`stream.resume()`][stream-resume] method to start the flow of data:
-
-```js
-// Workaround
-net.createServer((socket) => {
-
- socket.on('end', () => {
- socket.end('I got your message (but didnt read it)\n');
- });
-
- // start the flow of data, discarding it.
- socket.resume();
-
-}).listen(1337);
-```
-
-In addition to new Readable streams switching into flowing mode,
-pre-v0.10 style streams can be wrapped in a Readable class using the
-[`stream.wrap()`][] method.
-
-
-### Object Mode
-
-<!--type=misc-->
-
-Normally, Streams operate on Strings and Buffers exclusively.
-
-Streams that are in **object mode** can emit generic JavaScript values
-other than Buffers and Strings.
-
-A Readable stream in object mode will always return a single item from
-a call to [`stream.read(size)`][stream-read], regardless of what the size
-argument is.
-
-A Writable stream in object mode will always ignore the `encoding`
-argument to [`stream.write(data, encoding)`][stream-write].
-
-The special value `null` still retains its special value for object
-mode streams. That is, for object mode readable streams, `null` as a
-return value from [`stream.read()`][stream-read] indicates that there is no more
-data, and [`stream.push(null)`][stream-push] will signal the end of stream data
-(`EOF`).
-
-No streams in Node.js core are object mode streams. This pattern is only
-used by userland streaming libraries.
-
-You should set `objectMode` in your stream child class constructor on
-the options object. Setting `objectMode` mid-stream is not safe.
-
-For Duplex streams `objectMode` can be set exclusively for readable or
-writable side with `readableObjectMode` and `writableObjectMode`
-respectively. These options can be used to implement parsers and
-serializers with Transform streams.
-
-```js
-const util = require('util');
-const StringDecoder = require('string_decoder').StringDecoder;
-const Transform = require('stream').Transform;
-util.inherits(JSONParseStream, Transform);
-
-// Gets \n-delimited JSON string data, and emits the parsed objects
-function JSONParseStream() {
- if (!(this instanceof JSONParseStream))
- return new JSONParseStream();
-
- Transform.call(this, { readableObjectMode : true });
-
- this._buffer = '';
- this._decoder = new StringDecoder('utf8');
-}
-
-JSONParseStream.prototype._transform = function(chunk, encoding, cb) {
- this._buffer += this._decoder.write(chunk);
- // split on newlines
- var lines = this._buffer.split(/\r?\n/);
- // keep the last partial line buffered
- this._buffer = lines.pop();
- for (var l = 0; l < lines.length; l++) {
- var line = lines[l];
- try {
- var obj = JSON.parse(line);
- } catch (er) {
- this.emit('error', er);
- return;
- }
- // push the parsed object out to the readable consumer
- this.push(obj);
- }
- cb();
-};
-
-JSONParseStream.prototype._flush = function(cb) {
- // Just handle any leftover
- var rem = this._buffer.trim();
- if (rem) {
- try {
- var obj = JSON.parse(rem);
- } catch (er) {
- this.emit('error', er);
- return;
- }
- // push the parsed object out to the readable consumer
- this.push(obj);
- }
- cb();
-};
-```
-
-### `stream.read(0)`
-
-There are some cases where you want to trigger a refresh of the
-underlying readable stream mechanisms, without actually consuming any
-data. In that case, you can call `stream.read(0)`, which will always
-return null.
-
-If the internal read buffer is below the `highWaterMark`, and the
-stream is not currently reading, then calling `stream.read(0)` will trigger
-a low-level [`stream._read()`][stream-_read] call.
-
-There is almost never a need to do this. However, you will see some
-cases in Node.js's internals where this is done, particularly in the
-Readable stream class internals.
-
-### `stream.push('')`
-
-Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an
-interesting side effect. Because it *is* a call to
-[`stream.push()`][stream-push], it will end the `reading` process. However, it
-does *not* add any data to the readable buffer, so there's nothing for
-a user to consume.
-
-Very rarely, there are cases where you have no data to provide now,
-but the consumer of your stream (or, perhaps, another bit of your own
-code) will know when to check again, by calling [`stream.read(0)`][stream-read].
-In those cases, you *may* call `stream.push('')`.
-
-So far, the only use case for this functionality is in the
-[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you
-find that you have to use `stream.push('')`, please consider another
-approach, because it almost certainly indicates that something is
-horribly wrong.
-
-[`'data'`]: #stream_event_data
-[`'drain'`]: #stream_event_drain
-[`'end'`]: #stream_event_end
-[`'finish'`]: #stream_event_finish
-[`'readable'`]: #stream_event_readable
-[`buf.toString(encoding)`]: https://nodejs.org/docs/v5.8.0/api/buffer.html#buffer_buf_tostring_encoding_start_end
-[`EventEmitter`]: https://nodejs.org/docs/v5.8.0/api/events.html#events_class_eventemitter
-[`process.stderr`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stderr
-[`process.stdin`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdin
-[`process.stdout`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdout
-[`stream.cork()`]: #stream_writable_cork
-[`stream.pipe()`]: #stream_readable_pipe_destination_options
-[`stream.uncork()`]: #stream_writable_uncork
-[`stream.unpipe()`]: #stream_readable_unpipe_destination
-[`stream.wrap()`]: #stream_readable_wrap_stream
-[`tls.CryptoStream`]: https://nodejs.org/docs/v5.8.0/api/tls.html#tls_class_cryptostream
-[`util.inherits()`]: https://nodejs.org/docs/v5.8.0/api/util.html#util_util_inherits_constructor_superconstructor
-[API for Stream Consumers]: #stream_api_for_stream_consumers
-[API for Stream Implementors]: #stream_api_for_stream_implementors
-[child process stdin]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdin
-[child process stdout and stderr]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdout
-[Compatibility]: #stream_compatibility_with_older_node_js_versions
-[crypto]: crypto.html
-[Duplex]: #stream_class_stream_duplex
-[fs read streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_readstream
-[fs write streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_writestream
-[HTTP requests, on the client]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_clientrequest
-[HTTP responses, on the server]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_serverresponse
-[http-incoming-message]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_incomingmessage
-[Object mode]: #stream_object_mode
-[Readable]: #stream_class_stream_readable
-[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2
-[stream-_flush]: #stream_transform_flush_callback
-[stream-_read]: #stream_readable_read_size_1
-[stream-_transform]: #stream_transform_transform_chunk_encoding_callback
-[stream-_write]: #stream_writable_write_chunk_encoding_callback_1
-[stream-_writev]: #stream_writable_writev_chunks_callback
-[stream-end]: #stream_writable_end_chunk_encoding_callback
-[stream-pause]: #stream_readable_pause
-[stream-push]: #stream_readable_push_chunk_encoding
-[stream-read]: #stream_readable_read_size
-[stream-resume]: #stream_readable_resume
-[stream-write]: #stream_writable_write_chunk_encoding_callback
-[TCP sockets]: https://nodejs.org/docs/v5.8.0/api/net.html#net_class_net_socket
-[Transform]: #stream_class_stream_transform
-[Writable]: #stream_class_stream_writable
-[zlib]: zlib.html
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
deleted file mode 100644
index 83275f192e..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# 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/request/node_modules/bl/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js
deleted file mode 100644
index ca807af876..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_duplex.js")
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js
deleted file mode 100644
index 736693b840..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// 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 objectKeys = Object.keys || function (obj) {
- var keys = [];
- for (var key in obj) {
- keys.push(key);
- }return keys;
-};
-/*</replacement>*/
-
-module.exports = Duplex;
-
-/*<replacement>*/
-var processNextTick = require('process-nextick-args');
-/*</replacement>*/
-
-/*<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);
-
-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);
-}
-
-// 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.
- processNextTick(onEndNT, this);
-}
-
-function onEndNT(self) {
- self.end();
-}
-
-function forEach(xs, f) {
- for (var i = 0, l = xs.length; i < l; i++) {
- f(xs[i], i);
- }
-} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js
deleted file mode 100644
index d06f71f186..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// 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/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
deleted file mode 100644
index 54a9d5c553..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
+++ /dev/null
@@ -1,880 +0,0 @@
-'use strict';
-
-module.exports = Readable;
-
-/*<replacement>*/
-var processNextTick = require('process-nextick-args');
-/*</replacement>*/
-
-/*<replacement>*/
-var isArray = require('isarray');
-/*</replacement>*/
-
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
-Readable.ReadableState = ReadableState;
-
-var EE = require('events');
-
-/*<replacement>*/
-var EElistenerCount = function (emitter, type) {
- return emitter.listeners(type).length;
-};
-/*</replacement>*/
-
-/*<replacement>*/
-var Stream;
-(function () {
- try {
- Stream = require('st' + 'ream');
- } catch (_) {} finally {
- if (!Stream) Stream = require('events').EventEmitter;
- }
-})();
-/*</replacement>*/
-
-var Buffer = require('buffer').Buffer;
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-/*<replacement>*/
-var debugUtil = require('util');
-var debug = undefined;
-if (debugUtil && debugUtil.debuglog) {
- debug = debugUtil.debuglog('stream');
-} else {
- debug = function () {};
-}
-/*</replacement>*/
-
-var StringDecoder;
-
-util.inherits(Readable, Stream);
-
-var Duplex;
-function ReadableState(options, stream) {
- Duplex = Duplex || require('./_stream_duplex');
-
- options = options || {};
-
- // 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 (stream instanceof Duplex) 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 defaultHwm = this.objectMode ? 16 : 16 * 1024;
- this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
-
- // cast to ints.
- this.highWaterMark = ~ ~this.highWaterMark;
-
- this.buffer = [];
- 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 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;
-
- // 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;
-
- // 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';
-
- // when piping, we only care about 'readable' events that happen
- // after read()ing all the bytes and not getting any pushback.
- this.ranOut = false;
-
- // 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;
- }
-}
-
-var Duplex;
-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 && typeof options.read === 'function') this._read = options.read;
-
- Stream.call(this);
-}
-
-// 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;
-
- if (!state.objectMode && typeof chunk === 'string') {
- encoding = encoding || state.defaultEncoding;
- if (encoding !== state.encoding) {
- chunk = new Buffer(chunk, encoding);
- encoding = '';
- }
- }
-
- return readableAddChunk(this, state, chunk, encoding, false);
-};
-
-// Unshift should *always* be something directly out of read()
-Readable.prototype.unshift = function (chunk) {
- var state = this._readableState;
- return readableAddChunk(this, state, chunk, '', true);
-};
-
-Readable.prototype.isPaused = function () {
- return this._readableState.flowing === false;
-};
-
-function readableAddChunk(stream, state, chunk, encoding, addToFront) {
- var er = chunkInvalid(state, chunk);
- if (er) {
- stream.emit('error', er);
- } else if (chunk === null) {
- state.reading = false;
- onEofChunk(stream, state);
- } else if (state.objectMode || chunk && chunk.length > 0) {
- if (state.ended && !addToFront) {
- var e = new Error('stream.push() after EOF');
- stream.emit('error', e);
- } else if (state.endEmitted && addToFront) {
- var e = new Error('stream.unshift() after end event');
- stream.emit('error', e);
- } else {
- var skipAdd;
- if (state.decoder && !addToFront && !encoding) {
- chunk = state.decoder.write(chunk);
- skipAdd = !state.objectMode && chunk.length === 0;
- }
-
- if (!addToFront) state.reading = false;
-
- // Don't add to the buffer if we've decoded to an empty string chunk and
- // we're not in object mode
- if (!skipAdd) {
- // if we want the data now, just emit it.
- 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);
- }
- } else if (!addToFront) {
- state.reading = false;
- }
-
- return needMoreData(state);
-}
-
-// 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);
-}
-
-// 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
- n--;
- n |= n >>> 1;
- n |= n >>> 2;
- n |= n >>> 4;
- n |= n >>> 8;
- n |= n >>> 16;
- n++;
- }
- return n;
-}
-
-function howMuchToRead(n, state) {
- if (state.length === 0 && state.ended) return 0;
-
- if (state.objectMode) return n === 0 ? 0 : 1;
-
- if (n === null || isNaN(n)) {
- // only flow one buffer at a time
- if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length;
- }
-
- if (n <= 0) return 0;
-
- // If we're asking for more than the target buffer level,
- // then raise the water mark. Bump up to the next highest
- // power of 2, to prevent increasing it excessively in tiny
- // amounts.
- if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
-
- // don't have that much. return null, unless we've ended.
- if (n > state.length) {
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- } else {
- return state.length;
- }
- }
-
- return n;
-}
-
-// you can override either this method, or the async _read(n) below.
-Readable.prototype.read = function (n) {
- debug('read', n);
- var state = this._readableState;
- var nOrig = n;
-
- if (typeof n !== 'number' || 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);
- }
-
- 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 (doRead && !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;
- }
-
- state.length -= n;
-
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (state.length === 0 && !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 && state.length === 0) endReadable(this);
-
- if (ret !== null) this.emit('data', ret);
-
- return ret;
-};
-
-function chunkInvalid(state, chunk) {
- var er = null;
- if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- return er;
-}
-
-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) processNextTick(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;
- processNextTick(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('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 : cleanup;
- if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
-
- dest.on('unpipe', onunpipe);
- function onunpipe(readable) {
- debug('onunpipe');
- if (readable === src) {
- 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', cleanup);
- 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();
- }
-
- src.on('data', ondata);
- function ondata(chunk) {
- debug('ondata');
- var ret = dest.write(chunk);
- if (false === ret) {
- // If the user unpiped during `dest.write()`, it is possible
- // to get stuck in a permanently paused state if that write
- // also returned false.
- if (state.pipesCount === 1 && state.pipes[0] === dest && src.listenerCount('data') === 1 && !cleanedUp) {
- debug('false write response, pause', src._readableState.awaitDrain);
- src._readableState.awaitDrain++;
- }
- 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);
- }
- // This is a brutally ugly hack to make sure that our error handler
- // is attached before any userland ones. NEVER DO THIS.
- if (!dest._events || !dest._events.error) dest.on('error', onerror);else if (isArray(dest._events.error)) dest._events.error.unshift(onerror);else dest._events.error = [onerror, dest._events.error];
-
- // 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;
-
- // 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);
- 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);
- }return this;
- }
-
- // try to find the right one.
- var i = indexOf(state.pipes, dest);
- if (i === -1) return this;
-
- state.pipes.splice(i, 1);
- state.pipesCount -= 1;
- if (state.pipesCount === 1) state.pipes = state.pipes[0];
-
- dest.emit('unpipe', this);
-
- 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 listening to data, and it has not explicitly been paused,
- // then call resume to start the flow of data on the next tick.
- if (ev === 'data' && false !== this._readableState.flowing) {
- this.resume();
- }
-
- if (ev === 'readable' && !this._readableState.endEmitted) {
- var state = this._readableState;
- if (!state.readableListening) {
- state.readableListening = true;
- state.emittedReadable = false;
- state.needReadable = true;
- if (!state.reading) {
- processNextTick(nReadingNextTick, this);
- } else if (state.length) {
- emitReadable(this, state);
- }
- }
- }
-
- 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;
- processNextTick(resume_, stream, state);
- }
-}
-
-function resume_(stream, state) {
- if (!state.reading) {
- debug('resume read 0');
- stream.read(0);
- }
-
- state.resumeScheduled = false;
- 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);
- if (state.flowing) {
- do {
- var chunk = stream.read();
- } while (null !== chunk && state.flowing);
- }
-}
-
-// 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 state = this._readableState;
- var paused = false;
-
- var self = this;
- stream.on('end', function () {
- debug('wrapped end');
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) self.push(chunk);
- }
-
- self.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 = self.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.
- var events = ['error', 'close', 'destroy', 'pause', 'resume'];
- forEach(events, function (ev) {
- stream.on(ev, self.emit.bind(self, ev));
- });
-
- // when we try to consume some more bytes, simply unpause the
- // underlying stream.
- self._read = function (n) {
- debug('wrapped _read', n);
- if (paused) {
- paused = false;
- stream.resume();
- }
- };
-
- return self;
-};
-
-// 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.
-function fromList(n, state) {
- var list = state.buffer;
- var length = state.length;
- var stringMode = !!state.decoder;
- var objectMode = !!state.objectMode;
- var ret;
-
- // nothing in the list, definitely empty.
- if (list.length === 0) return null;
-
- if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) {
- // read it all, truncate the array.
- if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length);
- list.length = 0;
- } else {
- // read just some of it.
- if (n < list[0].length) {
- // just take a part of the first list item.
- // slice is the same for buffers and strings.
- var buf = list[0];
- ret = buf.slice(0, n);
- list[0] = buf.slice(n);
- } else if (n === list[0].length) {
- // first list is a perfect match
- ret = list.shift();
- } else {
- // complex case.
- // we have enough to cover it, but it spans past the first buffer.
- if (stringMode) ret = '';else ret = new Buffer(n);
-
- var c = 0;
- for (var i = 0, l = list.length; i < l && c < n; i++) {
- var buf = list[0];
- var cpy = Math.min(n - c, buf.length);
-
- if (stringMode) ret += buf.slice(0, cpy);else buf.copy(ret, c, 0, cpy);
-
- if (cpy < buf.length) list[0] = buf.slice(cpy);else list.shift();
-
- c += cpy;
- }
- }
- }
-
- 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;
- processNextTick(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 forEach(xs, f) {
- for (var i = 0, l = xs.length; i < l; i++) {
- f(xs[i], i);
- }
-}
-
-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/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js
deleted file mode 100644
index 625cdc1769..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js
+++ /dev/null
@@ -1,180 +0,0 @@
-// 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 TransformState(stream) {
- this.afterTransform = function (er, data) {
- return afterTransform(stream, er, data);
- };
-
- this.needTransform = false;
- this.transforming = false;
- this.writecb = null;
- this.writechunk = null;
- this.writeencoding = null;
-}
-
-function afterTransform(stream, er, data) {
- var ts = stream._transformState;
- ts.transforming = false;
-
- var cb = ts.writecb;
-
- if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));
-
- ts.writechunk = null;
- ts.writecb = null;
-
- if (data !== null && data !== undefined) stream.push(data);
-
- cb(er);
-
- var rs = stream._readableState;
- rs.reading = false;
- if (rs.needReadable || rs.length < rs.highWaterMark) {
- stream._read(rs.highWaterMark);
- }
-}
-
-function Transform(options) {
- if (!(this instanceof Transform)) return new Transform(options);
-
- Duplex.call(this, options);
-
- this._transformState = new TransformState(this);
-
- // when the writable side finishes, then flush out anything remaining.
- var stream = this;
-
- // 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;
- }
-
- this.once('prefinish', function () {
- if (typeof this._flush === 'function') this._flush(function (er) {
- done(stream, er);
- });else done(stream);
- });
-}
-
-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('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;
- }
-};
-
-function done(stream, er) {
- if (er) return stream.emit('error', er);
-
- // if there's nothing in the write buffer, then that means
- // that nothing more will ever be provided
- var ws = stream._writableState;
- var ts = stream._transformState;
-
- if (ws.length) throw new Error('calling transform done when ws.length != 0');
-
- if (ts.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/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
deleted file mode 100644
index 95916c992a..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
+++ /dev/null
@@ -1,516 +0,0 @@
-// 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';
-
-module.exports = Writable;
-
-/*<replacement>*/
-var processNextTick = require('process-nextick-args');
-/*</replacement>*/
-
-/*<replacement>*/
-var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
-/*</replacement>*/
-
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</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;
-(function () {
- try {
- Stream = require('st' + 'ream');
- } catch (_) {} finally {
- if (!Stream) Stream = require('events').EventEmitter;
- }
-})();
-/*</replacement>*/
-
-var Buffer = require('buffer').Buffer;
-
-util.inherits(Writable, Stream);
-
-function nop() {}
-
-function WriteReq(chunk, encoding, cb) {
- this.chunk = chunk;
- this.encoding = encoding;
- this.callback = cb;
- this.next = null;
-}
-
-var Duplex;
-function WritableState(options, stream) {
- Duplex = Duplex || require('./_stream_duplex');
-
- options = options || {};
-
- // object stream flag to indicate whether or not this stream
- // contains buffers or objects.
- this.objectMode = !!options.objectMode;
-
- if (stream instanceof Duplex) 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 defaultHwm = this.objectMode ? 16 : 16 * 1024;
- this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
-
- // cast to ints.
- this.highWaterMark = ~ ~this.highWaterMark;
-
- 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;
-
- // 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;
-
- // create the two objects needed to store the corked requests
- // they are not a linked list, as no new elements are inserted in there
- this.corkedRequestsFree = new CorkedRequest(this);
- this.corkedRequestsFree.next = new CorkedRequest(this);
-}
-
-WritableState.prototype.getBuffer = function writableStateGetBuffer() {
- 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.')
- });
- } catch (_) {}
-})();
-
-var Duplex;
-function Writable(options) {
- Duplex = Duplex || require('./_stream_duplex');
-
- // Writable ctor is applied to Duplexes, though they're not
- // instanceof Writable, they're instanceof Readable.
- if (!(this instanceof Writable) && !(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;
- }
-
- 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);
- processNextTick(cb, er);
-}
-
-// If we get something that is not a buffer, string, null, or undefined,
-// and we're not in objectMode, then that's an error.
-// Otherwise stream chunks are all considered to be of length=1, and the
-// watermarks determine how many objects to keep in the buffer, rather than
-// how many bytes or characters.
-function validChunk(stream, state, chunk, cb) {
- var valid = true;
-
- if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
- var er = new TypeError('Invalid non-string/buffer chunk');
- stream.emit('error', er);
- processNextTick(cb, er);
- valid = false;
- }
- return valid;
-}
-
-Writable.prototype.write = function (chunk, encoding, cb) {
- var state = this._writableState;
- var ret = false;
-
- if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
-
- if (typeof cb !== 'function') cb = nop;
-
- if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
- state.pendingcb++;
- ret = writeOrBuffer(this, state, 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;
-};
-
-function decodeChunk(state, chunk, encoding) {
- if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
- chunk = new Buffer(chunk, encoding);
- }
- return chunk;
-}
-
-// 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, chunk, encoding, cb) {
- chunk = decodeChunk(state, chunk, encoding);
-
- if (Buffer.isBuffer(chunk)) encoding = 'buffer';
- 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 = new WriteReq(chunk, encoding, cb);
- 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) processNextTick(cb, er);else cb(er);
-
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
-}
-
-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;
- while (entry) {
- buffer[count] = entry;
- entry = entry.next;
- count += 1;
- }
-
- doWrite(stream, state, true, state.length, buffer, '', holder.finish);
-
- // doWrite is always async, defer these to save a bit of time
- // as the hot path ends with doWrite
- state.pendingcb++;
- state.lastBufferedRequest = null;
- state.corkedRequestsFree = holder.next;
- holder.next = null;
- } 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;
- // 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.bufferedRequestCount = 0;
- state.bufferedRequest = entry;
- state.bufferProcessing = false;
-}
-
-Writable.prototype._write = function (chunk, encoding, cb) {
- cb(new Error('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 prefinish(stream, state) {
- if (!state.prefinished) {
- state.prefinished = true;
- stream.emit('prefinish');
- }
-}
-
-function finishMaybe(stream, state) {
- var need = needFinish(state);
- if (need) {
- if (state.pendingcb === 0) {
- prefinish(stream, state);
- state.finished = true;
- stream.emit('finish');
- } else {
- prefinish(stream, state);
- }
- }
- return need;
-}
-
-function endWritable(stream, state, cb) {
- state.ending = true;
- finishMaybe(stream, state);
- if (cb) {
- if (state.finished) processNextTick(cb);else stream.once('finish', cb);
- }
- state.ended = true;
- stream.writable = false;
-}
-
-// 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 (err) {
- var entry = _this.entry;
- _this.entry = null;
- while (entry) {
- var cb = entry.callback;
- state.pendingcb--;
- cb(err);
- entry = entry.next;
- }
- if (state.corkedRequestsFree) {
- state.corkedRequestsFree.next = _this;
- } else {
- state.corkedRequestsFree = _this;
- }
- };
-} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE
deleted file mode 100644
index d8d7f9437d..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-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.
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md
deleted file mode 100644
index 5a76b4149c..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# core-util-is
-
-The `util.is*` functions introduced in Node v0.12.
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch
deleted file mode 100644
index a06d5c05f7..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch
+++ /dev/null
@@ -1,604 +0,0 @@
-diff --git a/lib/util.js b/lib/util.js
-index a03e874..9074e8e 100644
---- a/lib/util.js
-+++ b/lib/util.js
-@@ -19,430 +19,6 @@
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--var formatRegExp = /%[sdj%]/g;
--exports.format = function(f) {
-- if (!isString(f)) {
-- var objects = [];
-- for (var i = 0; i < arguments.length; i++) {
-- objects.push(inspect(arguments[i]));
-- }
-- return objects.join(' ');
-- }
--
-- var i = 1;
-- var args = arguments;
-- var len = args.length;
-- var str = String(f).replace(formatRegExp, function(x) {
-- if (x === '%%') return '%';
-- if (i >= len) return x;
-- switch (x) {
-- case '%s': return String(args[i++]);
-- case '%d': return Number(args[i++]);
-- case '%j':
-- try {
-- return JSON.stringify(args[i++]);
-- } catch (_) {
-- return '[Circular]';
-- }
-- default:
-- return x;
-- }
-- });
-- for (var x = args[i]; i < len; x = args[++i]) {
-- if (isNull(x) || !isObject(x)) {
-- str += ' ' + x;
-- } else {
-- str += ' ' + inspect(x);
-- }
-- }
-- return str;
--};
--
--
--// Mark that a method should not be used.
--// Returns a modified function which warns once by default.
--// If --no-deprecation is set, then it is a no-op.
--exports.deprecate = function(fn, msg) {
-- // Allow for deprecating things in the process of starting up.
-- if (isUndefined(global.process)) {
-- return function() {
-- return exports.deprecate(fn, msg).apply(this, arguments);
-- };
-- }
--
-- if (process.noDeprecation === true) {
-- return fn;
-- }
--
-- var warned = false;
-- function deprecated() {
-- if (!warned) {
-- if (process.throwDeprecation) {
-- throw new Error(msg);
-- } else if (process.traceDeprecation) {
-- console.trace(msg);
-- } else {
-- console.error(msg);
-- }
-- warned = true;
-- }
-- return fn.apply(this, arguments);
-- }
--
-- return deprecated;
--};
--
--
--var debugs = {};
--var debugEnviron;
--exports.debuglog = function(set) {
-- if (isUndefined(debugEnviron))
-- debugEnviron = process.env.NODE_DEBUG || '';
-- set = set.toUpperCase();
-- if (!debugs[set]) {
-- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
-- var pid = process.pid;
-- debugs[set] = function() {
-- var msg = exports.format.apply(exports, arguments);
-- console.error('%s %d: %s', set, pid, msg);
-- };
-- } else {
-- debugs[set] = function() {};
-- }
-- }
-- return debugs[set];
--};
--
--
--/**
-- * Echos the value of a value. Trys to print the value out
-- * in the best way possible given the different types.
-- *
-- * @param {Object} obj The object to print out.
-- * @param {Object} opts Optional options object that alters the output.
-- */
--/* legacy: obj, showHidden, depth, colors*/
--function inspect(obj, opts) {
-- // default options
-- var ctx = {
-- seen: [],
-- stylize: stylizeNoColor
-- };
-- // legacy...
-- if (arguments.length >= 3) ctx.depth = arguments[2];
-- if (arguments.length >= 4) ctx.colors = arguments[3];
-- if (isBoolean(opts)) {
-- // legacy...
-- ctx.showHidden = opts;
-- } else if (opts) {
-- // got an "options" object
-- exports._extend(ctx, opts);
-- }
-- // set default options
-- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
-- if (isUndefined(ctx.depth)) ctx.depth = 2;
-- if (isUndefined(ctx.colors)) ctx.colors = false;
-- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
-- if (ctx.colors) ctx.stylize = stylizeWithColor;
-- return formatValue(ctx, obj, ctx.depth);
--}
--exports.inspect = inspect;
--
--
--// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
--inspect.colors = {
-- 'bold' : [1, 22],
-- 'italic' : [3, 23],
-- 'underline' : [4, 24],
-- 'inverse' : [7, 27],
-- 'white' : [37, 39],
-- 'grey' : [90, 39],
-- 'black' : [30, 39],
-- 'blue' : [34, 39],
-- 'cyan' : [36, 39],
-- 'green' : [32, 39],
-- 'magenta' : [35, 39],
-- 'red' : [31, 39],
-- 'yellow' : [33, 39]
--};
--
--// Don't use 'blue' not visible on cmd.exe
--inspect.styles = {
-- 'special': 'cyan',
-- 'number': 'yellow',
-- 'boolean': 'yellow',
-- 'undefined': 'grey',
-- 'null': 'bold',
-- 'string': 'green',
-- 'date': 'magenta',
-- // "name": intentionally not styling
-- 'regexp': 'red'
--};
--
--
--function stylizeWithColor(str, styleType) {
-- var style = inspect.styles[styleType];
--
-- if (style) {
-- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
-- '\u001b[' + inspect.colors[style][1] + 'm';
-- } else {
-- return str;
-- }
--}
--
--
--function stylizeNoColor(str, styleType) {
-- return str;
--}
--
--
--function arrayToHash(array) {
-- var hash = {};
--
-- array.forEach(function(val, idx) {
-- hash[val] = true;
-- });
--
-- return hash;
--}
--
--
--function formatValue(ctx, value, recurseTimes) {
-- // Provide a hook for user-specified inspect functions.
-- // Check that value is an object with an inspect function on it
-- if (ctx.customInspect &&
-- value &&
-- isFunction(value.inspect) &&
-- // Filter out the util module, it's inspect function is special
-- value.inspect !== exports.inspect &&
-- // Also filter out any prototype objects using the circular check.
-- !(value.constructor && value.constructor.prototype === value)) {
-- var ret = value.inspect(recurseTimes, ctx);
-- if (!isString(ret)) {
-- ret = formatValue(ctx, ret, recurseTimes);
-- }
-- return ret;
-- }
--
-- // Primitive types cannot have properties
-- var primitive = formatPrimitive(ctx, value);
-- if (primitive) {
-- return primitive;
-- }
--
-- // Look up the keys of the object.
-- var keys = Object.keys(value);
-- var visibleKeys = arrayToHash(keys);
--
-- if (ctx.showHidden) {
-- keys = Object.getOwnPropertyNames(value);
-- }
--
-- // Some type of object without properties can be shortcutted.
-- if (keys.length === 0) {
-- if (isFunction(value)) {
-- var name = value.name ? ': ' + value.name : '';
-- return ctx.stylize('[Function' + name + ']', 'special');
-- }
-- if (isRegExp(value)) {
-- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
-- }
-- if (isDate(value)) {
-- return ctx.stylize(Date.prototype.toString.call(value), 'date');
-- }
-- if (isError(value)) {
-- return formatError(value);
-- }
-- }
--
-- var base = '', array = false, braces = ['{', '}'];
--
-- // Make Array say that they are Array
-- if (isArray(value)) {
-- array = true;
-- braces = ['[', ']'];
-- }
--
-- // Make functions say that they are functions
-- if (isFunction(value)) {
-- var n = value.name ? ': ' + value.name : '';
-- base = ' [Function' + n + ']';
-- }
--
-- // Make RegExps say that they are RegExps
-- if (isRegExp(value)) {
-- base = ' ' + RegExp.prototype.toString.call(value);
-- }
--
-- // Make dates with properties first say the date
-- if (isDate(value)) {
-- base = ' ' + Date.prototype.toUTCString.call(value);
-- }
--
-- // Make error with message first say the error
-- if (isError(value)) {
-- base = ' ' + formatError(value);
-- }
--
-- if (keys.length === 0 && (!array || value.length == 0)) {
-- return braces[0] + base + braces[1];
-- }
--
-- if (recurseTimes < 0) {
-- if (isRegExp(value)) {
-- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
-- } else {
-- return ctx.stylize('[Object]', 'special');
-- }
-- }
--
-- ctx.seen.push(value);
--
-- var output;
-- if (array) {
-- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
-- } else {
-- output = keys.map(function(key) {
-- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
-- });
-- }
--
-- ctx.seen.pop();
--
-- return reduceToSingleString(output, base, braces);
--}
--
--
--function formatPrimitive(ctx, value) {
-- if (isUndefined(value))
-- return ctx.stylize('undefined', 'undefined');
-- if (isString(value)) {
-- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
-- .replace(/'/g, "\\'")
-- .replace(/\\"/g, '"') + '\'';
-- return ctx.stylize(simple, 'string');
-- }
-- if (isNumber(value)) {
-- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0,
-- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 .
-- if (value === 0 && 1 / value < 0)
-- return ctx.stylize('-0', 'number');
-- return ctx.stylize('' + value, 'number');
-- }
-- if (isBoolean(value))
-- return ctx.stylize('' + value, 'boolean');
-- // For some reason typeof null is "object", so special case here.
-- if (isNull(value))
-- return ctx.stylize('null', 'null');
--}
--
--
--function formatError(value) {
-- return '[' + Error.prototype.toString.call(value) + ']';
--}
--
--
--function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
-- var output = [];
-- for (var i = 0, l = value.length; i < l; ++i) {
-- if (hasOwnProperty(value, String(i))) {
-- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
-- String(i), true));
-- } else {
-- output.push('');
-- }
-- }
-- keys.forEach(function(key) {
-- if (!key.match(/^\d+$/)) {
-- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
-- key, true));
-- }
-- });
-- return output;
--}
--
--
--function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
-- var name, str, desc;
-- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
-- if (desc.get) {
-- if (desc.set) {
-- str = ctx.stylize('[Getter/Setter]', 'special');
-- } else {
-- str = ctx.stylize('[Getter]', 'special');
-- }
-- } else {
-- if (desc.set) {
-- str = ctx.stylize('[Setter]', 'special');
-- }
-- }
-- if (!hasOwnProperty(visibleKeys, key)) {
-- name = '[' + key + ']';
-- }
-- if (!str) {
-- if (ctx.seen.indexOf(desc.value) < 0) {
-- if (isNull(recurseTimes)) {
-- str = formatValue(ctx, desc.value, null);
-- } else {
-- str = formatValue(ctx, desc.value, recurseTimes - 1);
-- }
-- if (str.indexOf('\n') > -1) {
-- if (array) {
-- str = str.split('\n').map(function(line) {
-- return ' ' + line;
-- }).join('\n').substr(2);
-- } else {
-- str = '\n' + str.split('\n').map(function(line) {
-- return ' ' + line;
-- }).join('\n');
-- }
-- }
-- } else {
-- str = ctx.stylize('[Circular]', 'special');
-- }
-- }
-- if (isUndefined(name)) {
-- if (array && key.match(/^\d+$/)) {
-- return str;
-- }
-- name = JSON.stringify('' + key);
-- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
-- name = name.substr(1, name.length - 2);
-- name = ctx.stylize(name, 'name');
-- } else {
-- name = name.replace(/'/g, "\\'")
-- .replace(/\\"/g, '"')
-- .replace(/(^"|"$)/g, "'");
-- name = ctx.stylize(name, 'string');
-- }
-- }
--
-- return name + ': ' + str;
--}
--
--
--function reduceToSingleString(output, base, braces) {
-- var numLinesEst = 0;
-- var length = output.reduce(function(prev, cur) {
-- numLinesEst++;
-- if (cur.indexOf('\n') >= 0) numLinesEst++;
-- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
-- }, 0);
--
-- if (length > 60) {
-- return braces[0] +
-- (base === '' ? '' : base + '\n ') +
-- ' ' +
-- output.join(',\n ') +
-- ' ' +
-- braces[1];
-- }
--
-- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
--}
--
--
- // NOTE: These type checking functions intentionally don't use `instanceof`
- // because it is fragile and can be easily faked with `Object.create()`.
- function isArray(ar) {
-@@ -522,166 +98,10 @@ function isPrimitive(arg) {
- exports.isPrimitive = isPrimitive;
-
- function isBuffer(arg) {
-- return arg instanceof Buffer;
-+ return Buffer.isBuffer(arg);
- }
- exports.isBuffer = isBuffer;
-
- function objectToString(o) {
- return Object.prototype.toString.call(o);
--}
--
--
--function pad(n) {
-- return n < 10 ? '0' + n.toString(10) : n.toString(10);
--}
--
--
--var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
-- 'Oct', 'Nov', 'Dec'];
--
--// 26 Feb 16:19:34
--function timestamp() {
-- var d = new Date();
-- var time = [pad(d.getHours()),
-- pad(d.getMinutes()),
-- pad(d.getSeconds())].join(':');
-- return [d.getDate(), months[d.getMonth()], time].join(' ');
--}
--
--
--// log is just a thin wrapper to console.log that prepends a timestamp
--exports.log = function() {
-- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
--};
--
--
--/**
-- * Inherit the prototype methods from one constructor into another.
-- *
-- * The Function.prototype.inherits from lang.js rewritten as a standalone
-- * function (not on Function.prototype). NOTE: If this file is to be loaded
-- * during bootstrapping this function needs to be rewritten using some native
-- * functions as prototype setup using normal JavaScript does not work as
-- * expected during bootstrapping (see mirror.js in r114903).
-- *
-- * @param {function} ctor Constructor function which needs to inherit the
-- * prototype.
-- * @param {function} superCtor Constructor function to inherit prototype from.
-- */
--exports.inherits = function(ctor, superCtor) {
-- ctor.super_ = superCtor;
-- ctor.prototype = Object.create(superCtor.prototype, {
-- constructor: {
-- value: ctor,
-- enumerable: false,
-- writable: true,
-- configurable: true
-- }
-- });
--};
--
--exports._extend = function(origin, add) {
-- // Don't do anything if add isn't an object
-- if (!add || !isObject(add)) return origin;
--
-- var keys = Object.keys(add);
-- var i = keys.length;
-- while (i--) {
-- origin[keys[i]] = add[keys[i]];
-- }
-- return origin;
--};
--
--function hasOwnProperty(obj, prop) {
-- return Object.prototype.hasOwnProperty.call(obj, prop);
--}
--
--
--// Deprecated old stuff.
--
--exports.p = exports.deprecate(function() {
-- for (var i = 0, len = arguments.length; i < len; ++i) {
-- console.error(exports.inspect(arguments[i]));
-- }
--}, 'util.p: Use console.error() instead');
--
--
--exports.exec = exports.deprecate(function() {
-- return require('child_process').exec.apply(this, arguments);
--}, 'util.exec is now called `child_process.exec`.');
--
--
--exports.print = exports.deprecate(function() {
-- for (var i = 0, len = arguments.length; i < len; ++i) {
-- process.stdout.write(String(arguments[i]));
-- }
--}, 'util.print: Use console.log instead');
--
--
--exports.puts = exports.deprecate(function() {
-- for (var i = 0, len = arguments.length; i < len; ++i) {
-- process.stdout.write(arguments[i] + '\n');
-- }
--}, 'util.puts: Use console.log instead');
--
--
--exports.debug = exports.deprecate(function(x) {
-- process.stderr.write('DEBUG: ' + x + '\n');
--}, 'util.debug: Use console.error instead');
--
--
--exports.error = exports.deprecate(function(x) {
-- for (var i = 0, len = arguments.length; i < len; ++i) {
-- process.stderr.write(arguments[i] + '\n');
-- }
--}, 'util.error: Use console.error instead');
--
--
--exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
-- var callbackCalled = false;
--
-- function call(a, b, c) {
-- if (callback && !callbackCalled) {
-- callback(a, b, c);
-- callbackCalled = true;
-- }
-- }
--
-- readStream.addListener('data', function(chunk) {
-- if (writeStream.write(chunk) === false) readStream.pause();
-- });
--
-- writeStream.addListener('drain', function() {
-- readStream.resume();
-- });
--
-- readStream.addListener('end', function() {
-- writeStream.end();
-- });
--
-- readStream.addListener('close', function() {
-- call();
-- });
--
-- readStream.addListener('error', function(err) {
-- writeStream.end();
-- call(err);
-- });
--
-- writeStream.addListener('error', function(err) {
-- readStream.destroy();
-- call(err);
-- });
--}, 'util.pump(): Use readableStream.pipe() instead');
--
--
--var uv;
--exports._errnoException = function(err, syscall) {
-- if (isUndefined(uv)) uv = process.binding('uv');
-- var errname = uv.errname(err);
-- var e = new Error(syscall + ' ' + errname);
-- e.code = errname;
-- e.errno = errname;
-- e.syscall = syscall;
-- return e;
--};
-+} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
deleted file mode 100644
index ff4c851c07..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
+++ /dev/null
@@ -1,107 +0,0 @@
-// 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.
-
-// NOTE: These type checking functions intentionally don't use `instanceof`
-// because it is fragile and can be easily faked with `Object.create()`.
-
-function isArray(arg) {
- if (Array.isArray) {
- return Array.isArray(arg);
- }
- return objectToString(arg) === '[object Array]';
-}
-exports.isArray = isArray;
-
-function isBoolean(arg) {
- return typeof arg === 'boolean';
-}
-exports.isBoolean = isBoolean;
-
-function isNull(arg) {
- return arg === null;
-}
-exports.isNull = isNull;
-
-function isNullOrUndefined(arg) {
- return arg == null;
-}
-exports.isNullOrUndefined = isNullOrUndefined;
-
-function isNumber(arg) {
- return typeof arg === 'number';
-}
-exports.isNumber = isNumber;
-
-function isString(arg) {
- return typeof arg === 'string';
-}
-exports.isString = isString;
-
-function isSymbol(arg) {
- return typeof arg === 'symbol';
-}
-exports.isSymbol = isSymbol;
-
-function isUndefined(arg) {
- return arg === void 0;
-}
-exports.isUndefined = isUndefined;
-
-function isRegExp(re) {
- return objectToString(re) === '[object RegExp]';
-}
-exports.isRegExp = isRegExp;
-
-function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
-}
-exports.isObject = isObject;
-
-function isDate(d) {
- return objectToString(d) === '[object Date]';
-}
-exports.isDate = isDate;
-
-function isError(e) {
- return (objectToString(e) === '[object Error]' || e instanceof Error);
-}
-exports.isError = isError;
-
-function isFunction(arg) {
- return typeof arg === 'function';
-}
-exports.isFunction = isFunction;
-
-function isPrimitive(arg) {
- return arg === null ||
- typeof arg === 'boolean' ||
- typeof arg === 'number' ||
- typeof arg === 'string' ||
- typeof arg === 'symbol' || // ES6 symbol
- typeof arg === 'undefined';
-}
-exports.isPrimitive = isPrimitive;
-
-exports.isBuffer = Buffer.isBuffer;
-
-function objectToString(o) {
- return Object.prototype.toString.call(o);
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json
deleted file mode 100644
index 14b70d3d29..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json
+++ /dev/null
@@ -1,95 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "core-util-is@~1.0.0",
- "scope": null,
- "escapedName": "core-util-is",
- "name": "core-util-is",
- "rawSpec": "~1.0.0",
- "spec": ">=1.0.0 <1.1.0",
- "type": "range"
- },
- "/Users/rebecca/code/npm/node_modules/request/node_modules/bl/node_modules/readable-stream"
- ]
- ],
- "_from": "core-util-is@>=1.0.0 <1.1.0",
- "_id": "core-util-is@1.0.2",
- "_inCache": true,
- "_installable": true,
- "_location": "/request/bl/readable-stream/core-util-is",
- "_nodeVersion": "4.0.0",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_npmVersion": "3.3.2",
- "_phantomChildren": {},
- "_requested": {
- "raw": "core-util-is@~1.0.0",
- "scope": null,
- "escapedName": "core-util-is",
- "name": "core-util-is",
- "rawSpec": "~1.0.0",
- "spec": ">=1.0.0 <1.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/request/bl/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
- "_shrinkwrap": null,
- "_spec": "core-util-is@~1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/bl/node_modules/readable-stream",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/isaacs/core-util-is/issues"
- },
- "dependencies": {},
- "description": "The `util.is*` functions introduced in Node v0.12.",
- "devDependencies": {
- "tap": "^2.3.0"
- },
- "directories": {},
- "dist": {
- "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
- "tarball": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
- },
- "gitHead": "a177da234df5638b363ddc15fa324619a38577c8",
- "homepage": "https://github.com/isaacs/core-util-is#readme",
- "keywords": [
- "util",
- "isBuffer",
- "isArray",
- "isNumber",
- "isString",
- "isRegExp",
- "isThis",
- "isThat",
- "polyfill"
- ],
- "license": "MIT",
- "main": "lib/util.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "name": "core-util-is",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/core-util-is.git"
- },
- "scripts": {
- "test": "tap test.js"
- },
- "version": "1.0.2"
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js
deleted file mode 100644
index 1a490c65ac..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var assert = require('tap');
-
-var t = require('./lib/util');
-
-assert.equal(t.isArray([]), true);
-assert.equal(t.isArray({}), false);
-
-assert.equal(t.isBoolean(null), false);
-assert.equal(t.isBoolean(true), true);
-assert.equal(t.isBoolean(false), true);
-
-assert.equal(t.isNull(null), true);
-assert.equal(t.isNull(undefined), false);
-assert.equal(t.isNull(false), false);
-assert.equal(t.isNull(), false);
-
-assert.equal(t.isNullOrUndefined(null), true);
-assert.equal(t.isNullOrUndefined(undefined), true);
-assert.equal(t.isNullOrUndefined(false), false);
-assert.equal(t.isNullOrUndefined(), true);
-
-assert.equal(t.isNumber(null), false);
-assert.equal(t.isNumber('1'), false);
-assert.equal(t.isNumber(1), true);
-
-assert.equal(t.isString(null), false);
-assert.equal(t.isString('1'), true);
-assert.equal(t.isString(1), false);
-
-assert.equal(t.isSymbol(null), false);
-assert.equal(t.isSymbol('1'), false);
-assert.equal(t.isSymbol(1), false);
-assert.equal(t.isSymbol(Symbol()), true);
-
-assert.equal(t.isUndefined(null), false);
-assert.equal(t.isUndefined(undefined), true);
-assert.equal(t.isUndefined(false), false);
-assert.equal(t.isUndefined(), true);
-
-assert.equal(t.isRegExp(null), false);
-assert.equal(t.isRegExp('1'), false);
-assert.equal(t.isRegExp(new RegExp()), true);
-
-assert.equal(t.isObject({}), true);
-assert.equal(t.isObject([]), true);
-assert.equal(t.isObject(new RegExp()), true);
-assert.equal(t.isObject(new Date()), true);
-
-assert.equal(t.isDate(null), false);
-assert.equal(t.isDate('1'), false);
-assert.equal(t.isDate(new Date()), true);
-
-assert.equal(t.isError(null), false);
-assert.equal(t.isError({ err: true }), false);
-assert.equal(t.isError(new Error()), true);
-
-assert.equal(t.isFunction(null), false);
-assert.equal(t.isFunction({ }), false);
-assert.equal(t.isFunction(function() {}), true);
-
-assert.equal(t.isPrimitive(null), true);
-assert.equal(t.isPrimitive(''), true);
-assert.equal(t.isPrimitive(0), true);
-assert.equal(t.isPrimitive(new Date()), false);
-
-assert.equal(t.isBuffer(null), false);
-assert.equal(t.isBuffer({}), false);
-assert.equal(t.isBuffer(new Buffer(0)), true);
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.npmignore b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.npmignore
deleted file mode 100644
index 3c3629e647..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.travis.yml b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.travis.yml
deleted file mode 100644
index cc4dba29d9..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/Makefile b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/Makefile
deleted file mode 100644
index 787d56e1e9..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-test:
- @node_modules/.bin/tape test.js
-
-.PHONY: test
-
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md
deleted file mode 100644
index 16d2c59c61..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md
+++ /dev/null
@@ -1,60 +0,0 @@
-
-# isarray
-
-`Array#isArray` for older browsers.
-
-[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)
-[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)
-
-[![browser support](https://ci.testling.com/juliangruber/isarray.png)
-](https://ci.testling.com/juliangruber/isarray)
-
-## Usage
-
-```js
-var isArray = require('isarray');
-
-console.log(isArray([])); // => true
-console.log(isArray({})); // => false
-```
-
-## Installation
-
-With [npm](http://npmjs.org) do
-
-```bash
-$ npm install isarray
-```
-
-Then bundle for the browser with
-[browserify](https://github.com/substack/browserify).
-
-With [component](http://component.io) do
-
-```bash
-$ component install juliangruber/isarray
-```
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&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/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json
deleted file mode 100644
index 9e31b68388..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name" : "isarray",
- "description" : "Array#isArray for older browsers",
- "version" : "0.0.1",
- "repository" : "juliangruber/isarray",
- "homepage": "https://github.com/juliangruber/isarray",
- "main" : "index.js",
- "scripts" : [
- "index.js"
- ],
- "dependencies" : {},
- "keywords": ["browser","isarray","array"],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT"
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js
deleted file mode 100644
index a57f634959..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var toString = {}.toString;
-
-module.exports = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
-};
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json
deleted file mode 100644
index 6510f4eef7..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json
+++ /dev/null
@@ -1,105 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "isarray@~1.0.0",
- "scope": null,
- "escapedName": "isarray",
- "name": "isarray",
- "rawSpec": "~1.0.0",
- "spec": ">=1.0.0 <1.1.0",
- "type": "range"
- },
- "/Users/rebecca/code/npm/node_modules/request/node_modules/bl/node_modules/readable-stream"
- ]
- ],
- "_from": "isarray@>=1.0.0 <1.1.0",
- "_id": "isarray@1.0.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/request/bl/readable-stream/isarray",
- "_nodeVersion": "5.1.0",
- "_npmUser": {
- "name": "juliangruber",
- "email": "julian@juliangruber.com"
- },
- "_npmVersion": "3.3.12",
- "_phantomChildren": {},
- "_requested": {
- "raw": "isarray@~1.0.0",
- "scope": null,
- "escapedName": "isarray",
- "name": "isarray",
- "rawSpec": "~1.0.0",
- "spec": ">=1.0.0 <1.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/request/bl/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "_shasum": "bb935d48582cba168c06834957a54a3e07124f11",
- "_shrinkwrap": null,
- "_spec": "isarray@~1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/bl/node_modules/readable-stream",
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "bugs": {
- "url": "https://github.com/juliangruber/isarray/issues"
- },
- "dependencies": {},
- "description": "Array#isArray for older browsers",
- "devDependencies": {
- "tape": "~2.13.4"
- },
- "directories": {},
- "dist": {
- "shasum": "bb935d48582cba168c06834957a54a3e07124f11",
- "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
- },
- "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33",
- "homepage": "https://github.com/juliangruber/isarray",
- "keywords": [
- "browser",
- "isarray",
- "array"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "juliangruber",
- "email": "julian@juliangruber.com"
- }
- ],
- "name": "isarray",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/isarray.git"
- },
- "scripts": {
- "test": "tape test.js"
- },
- "testling": {
- "files": "test.js",
- "browsers": [
- "ie/8..latest",
- "firefox/17..latest",
- "firefox/nightly",
- "chrome/22..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2..latest"
- ]
- },
- "version": "1.0.0"
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/test.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/test.js
deleted file mode 100644
index e0c3444d85..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/test.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var isArray = require('./');
-var test = require('tape');
-
-test('is array', function(t){
- t.ok(isArray([]));
- t.notOk(isArray({}));
- t.notOk(isArray(null));
- t.notOk(isArray(false));
-
- var obj = {};
- obj[0] = true;
- t.notOk(isArray(obj));
-
- var arr = [];
- arr.foo = 'bar';
- t.ok(isArray(arr));
-
- t.end();
-});
-
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
deleted file mode 100644
index 36201b1001..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.11"
- - "0.12"
- - "1.7.1"
- - 1
- - 2
- - 3
- - 4
- - 5
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js
deleted file mode 100644
index a4f40f845f..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict';
-
-if (!process.version ||
- process.version.indexOf('v0.') === 0 ||
- process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
- module.exports = nextTick;
-} else {
- module.exports = process.nextTick;
-}
-
-function nextTick(fn, arg1, arg2, arg3) {
- if (typeof fn !== 'function') {
- throw new TypeError('"callback" argument must be a function');
- }
- var len = arguments.length;
- var args, i;
- switch (len) {
- case 0:
- case 1:
- return process.nextTick(fn);
- case 2:
- return process.nextTick(function afterTickOne() {
- fn.call(null, arg1);
- });
- case 3:
- return process.nextTick(function afterTickTwo() {
- fn.call(null, arg1, arg2);
- });
- case 4:
- return process.nextTick(function afterTickThree() {
- fn.call(null, arg1, arg2, arg3);
- });
- default:
- args = new Array(len - 1);
- i = 0;
- while (i < args.length) {
- args[i++] = arguments[i];
- }
- return process.nextTick(function afterTick() {
- fn.apply(null, args);
- });
- }
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/license.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/license.md
deleted file mode 100644
index c67e3532b5..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/license.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (c) 2015 Calvin Metcalf
-
-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/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json
deleted file mode 100644
index e100c0e08f..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json
+++ /dev/null
@@ -1,84 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "process-nextick-args@~1.0.6",
- "scope": null,
- "escapedName": "process-nextick-args",
- "name": "process-nextick-args",
- "rawSpec": "~1.0.6",
- "spec": ">=1.0.6 <1.1.0",
- "type": "range"
- },
- "/Users/rebecca/code/npm/node_modules/request/node_modules/bl/node_modules/readable-stream"
- ]
- ],
- "_from": "process-nextick-args@>=1.0.6 <1.1.0",
- "_id": "process-nextick-args@1.0.7",
- "_inCache": true,
- "_installable": true,
- "_location": "/request/bl/readable-stream/process-nextick-args",
- "_nodeVersion": "5.11.0",
- "_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776"
- },
- "_npmUser": {
- "name": "cwmma",
- "email": "calvin.metcalf@gmail.com"
- },
- "_npmVersion": "3.8.6",
- "_phantomChildren": {},
- "_requested": {
- "raw": "process-nextick-args@~1.0.6",
- "scope": null,
- "escapedName": "process-nextick-args",
- "name": "process-nextick-args",
- "rawSpec": "~1.0.6",
- "spec": ">=1.0.6 <1.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/request/bl/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
- "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
- "_shrinkwrap": null,
- "_spec": "process-nextick-args@~1.0.6",
- "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/bl/node_modules/readable-stream",
- "author": "",
- "bugs": {
- "url": "https://github.com/calvinmetcalf/process-nextick-args/issues"
- },
- "dependencies": {},
- "description": "process.nextTick but always with args",
- "devDependencies": {
- "tap": "~0.2.6"
- },
- "directories": {},
- "dist": {
- "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
- "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz"
- },
- "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39",
- "homepage": "https://github.com/calvinmetcalf/process-nextick-args",
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "cwmma",
- "email": "calvin.metcalf@gmail.com"
- }
- ],
- "name": "process-nextick-args",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.0.7"
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/readme.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/readme.md
deleted file mode 100644
index 78e7cfaeb7..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/readme.md
+++ /dev/null
@@ -1,18 +0,0 @@
-process-nextick-args
-=====
-
-[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args)
-
-```bash
-npm install --save process-nextick-args
-```
-
-Always be able to pass arguments to process.nextTick, no matter the platform
-
-```js
-var nextTick = require('process-nextick-args');
-
-nextTick(function (a, b, c) {
- console.log(a, b, c);
-}, 'step', 3, 'profit');
-```
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js
deleted file mode 100644
index ef15721584..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var test = require("tap").test;
-var nextTick = require('./');
-
-test('should work', function (t) {
- t.plan(5);
- nextTick(function (a) {
- t.ok(a);
- nextTick(function (thing) {
- t.equals(thing, 7);
- }, 7);
- }, true);
- nextTick(function (a, b, c) {
- t.equals(a, 'step');
- t.equals(b, 3);
- t.equals(c, 'profit');
- }, 'step', 3, 'profit');
-});
-
-test('correct number of arguments', function (t) {
- t.plan(1);
- nextTick(function () {
- t.equals(2, arguments.length, 'correct number');
- }, 1, 2);
-});
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore
deleted file mode 100644
index 206320cc1d..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-build
-test
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md
deleted file mode 100644
index 4d2aa00150..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-**string_decoder.js** (`require('string_decoder')`) from Node.js core
-
-Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details.
-
-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. **Prefer the stable version over the unstable.**
-
-The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js
deleted file mode 100644
index b00e54fb79..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js
+++ /dev/null
@@ -1,221 +0,0 @@
-// 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.
-
-var Buffer = require('buffer').Buffer;
-
-var isBufferEncoding = Buffer.isEncoding
- || function(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 assertEncoding(encoding) {
- if (encoding && !isBufferEncoding(encoding)) {
- throw new Error('Unknown encoding: ' + encoding);
- }
-}
-
-// StringDecoder provides an interface for efficiently splitting a series of
-// buffers into a series of JS strings without breaking apart multi-byte
-// characters. CESU-8 is handled as part of the UTF-8 encoding.
-//
-// @TODO Handling all encodings inside a single object makes it very difficult
-// to reason about this code, so it should be split up in the future.
-// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
-// points as used by CESU-8.
-var StringDecoder = exports.StringDecoder = function(encoding) {
- this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
- assertEncoding(encoding);
- switch (this.encoding) {
- case 'utf8':
- // CESU-8 represents each of Surrogate Pair by 3-bytes
- this.surrogateSize = 3;
- break;
- case 'ucs2':
- case 'utf16le':
- // UTF-16 represents each of Surrogate Pair by 2-bytes
- this.surrogateSize = 2;
- this.detectIncompleteChar = utf16DetectIncompleteChar;
- break;
- case 'base64':
- // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
- this.surrogateSize = 3;
- this.detectIncompleteChar = base64DetectIncompleteChar;
- break;
- default:
- this.write = passThroughWrite;
- return;
- }
-
- // Enough space to store all bytes of a single character. UTF-8 needs 4
- // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
- this.charBuffer = new Buffer(6);
- // Number of bytes received for the current incomplete multi-byte character.
- this.charReceived = 0;
- // Number of bytes expected for the current incomplete multi-byte character.
- this.charLength = 0;
-};
-
-
-// write decodes the given buffer and returns it as JS string that is
-// guaranteed to not contain any partial multi-byte characters. Any partial
-// character found at the end of the buffer is buffered up, and will be
-// returned when calling write again with the remaining bytes.
-//
-// Note: Converting a Buffer containing an orphan surrogate to a String
-// currently works, but converting a String to a Buffer (via `new Buffer`, or
-// Buffer#write) will replace incomplete surrogates with the unicode
-// replacement character. See https://codereview.chromium.org/121173009/ .
-StringDecoder.prototype.write = function(buffer) {
- var charStr = '';
- // if our last write ended with an incomplete multibyte character
- while (this.charLength) {
- // determine how many remaining bytes this buffer has to offer for this char
- var available = (buffer.length >= this.charLength - this.charReceived) ?
- this.charLength - this.charReceived :
- buffer.length;
-
- // add the new bytes to the char buffer
- buffer.copy(this.charBuffer, this.charReceived, 0, available);
- this.charReceived += available;
-
- if (this.charReceived < this.charLength) {
- // still not enough chars in this buffer? wait for more ...
- return '';
- }
-
- // remove bytes belonging to the current character from the buffer
- buffer = buffer.slice(available, buffer.length);
-
- // get the character that was split
- charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
-
- // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
- var charCode = charStr.charCodeAt(charStr.length - 1);
- if (charCode >= 0xD800 && charCode <= 0xDBFF) {
- this.charLength += this.surrogateSize;
- charStr = '';
- continue;
- }
- this.charReceived = this.charLength = 0;
-
- // if there are no more bytes in this buffer, just emit our char
- if (buffer.length === 0) {
- return charStr;
- }
- break;
- }
-
- // determine and set charLength / charReceived
- this.detectIncompleteChar(buffer);
-
- var end = buffer.length;
- if (this.charLength) {
- // buffer the incomplete character bytes we got
- buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
- end -= this.charReceived;
- }
-
- charStr += buffer.toString(this.encoding, 0, end);
-
- var end = charStr.length - 1;
- var charCode = charStr.charCodeAt(end);
- // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
- if (charCode >= 0xD800 && charCode <= 0xDBFF) {
- var size = this.surrogateSize;
- this.charLength += size;
- this.charReceived += size;
- this.charBuffer.copy(this.charBuffer, size, 0, size);
- buffer.copy(this.charBuffer, 0, 0, size);
- return charStr.substring(0, end);
- }
-
- // or just emit the charStr
- return charStr;
-};
-
-// detectIncompleteChar determines if there is an incomplete UTF-8 character at
-// the end of the given buffer. If so, it sets this.charLength to the byte
-// length that character, and sets this.charReceived to the number of bytes
-// that are available for this character.
-StringDecoder.prototype.detectIncompleteChar = function(buffer) {
- // determine how many bytes we have to check at the end of this buffer
- var i = (buffer.length >= 3) ? 3 : buffer.length;
-
- // Figure out if one of the last i bytes of our buffer announces an
- // incomplete char.
- for (; i > 0; i--) {
- var c = buffer[buffer.length - i];
-
- // See http://en.wikipedia.org/wiki/UTF-8#Description
-
- // 110XXXXX
- if (i == 1 && c >> 5 == 0x06) {
- this.charLength = 2;
- break;
- }
-
- // 1110XXXX
- if (i <= 2 && c >> 4 == 0x0E) {
- this.charLength = 3;
- break;
- }
-
- // 11110XXX
- if (i <= 3 && c >> 3 == 0x1E) {
- this.charLength = 4;
- break;
- }
- }
- this.charReceived = i;
-};
-
-StringDecoder.prototype.end = function(buffer) {
- var res = '';
- if (buffer && buffer.length)
- res = this.write(buffer);
-
- if (this.charReceived) {
- var cr = this.charReceived;
- var buf = this.charBuffer;
- var enc = this.encoding;
- res += buf.slice(0, cr).toString(enc);
- }
-
- return res;
-};
-
-function passThroughWrite(buffer) {
- return buffer.toString(this.encoding);
-}
-
-function utf16DetectIncompleteChar(buffer) {
- this.charReceived = buffer.length % 2;
- this.charLength = this.charReceived ? 2 : 0;
-}
-
-function base64DetectIncompleteChar(buffer) {
- this.charReceived = buffer.length % 3;
- this.charLength = this.charReceived ? 3 : 0;
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json
deleted file mode 100644
index a4cb8bc4a9..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "string_decoder@~0.10.x",
- "scope": null,
- "escapedName": "string_decoder",
- "name": "string_decoder",
- "rawSpec": "~0.10.x",
- "spec": ">=0.10.0 <0.11.0",
- "type": "range"
- },
- "/Users/rebecca/code/npm/node_modules/request/node_modules/bl/node_modules/readable-stream"
- ]
- ],
- "_from": "string_decoder@>=0.10.0 <0.11.0",
- "_id": "string_decoder@0.10.31",
- "_inCache": true,
- "_installable": true,
- "_location": "/request/bl/readable-stream/string_decoder",
- "_npmUser": {
- "name": "rvagg",
- "email": "rod@vagg.org"
- },
- "_npmVersion": "1.4.23",
- "_phantomChildren": {},
- "_requested": {
- "raw": "string_decoder@~0.10.x",
- "scope": null,
- "escapedName": "string_decoder",
- "name": "string_decoder",
- "rawSpec": "~0.10.x",
- "spec": ">=0.10.0 <0.11.0",
- "type": "range"
- },
- "_requiredBy": [
- "/request/bl/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
- "_shrinkwrap": null,
- "_spec": "string_decoder@~0.10.x",
- "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/bl/node_modules/readable-stream",
- "bugs": {
- "url": "https://github.com/rvagg/string_decoder/issues"
- },
- "dependencies": {},
- "description": "The string_decoder module from Node core",
- "devDependencies": {
- "tap": "~0.4.8"
- },
- "directories": {},
- "dist": {
- "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
- "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
- },
- "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0",
- "homepage": "https://github.com/rvagg/string_decoder",
- "keywords": [
- "string",
- "decoder",
- "browser",
- "browserify"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- },
- {
- "name": "rvagg",
- "email": "rod@vagg.org"
- }
- ],
- "name": "string_decoder",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/rvagg/string_decoder.git"
- },
- "scripts": {
- "test": "tap test/simple/*.js"
- },
- "version": "0.10.31"
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/History.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/History.md
deleted file mode 100644
index acc8675372..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/History.md
+++ /dev/null
@@ -1,16 +0,0 @@
-
-1.0.2 / 2015-10-07
-==================
-
- * use try/catch when checking `localStorage` (#3, @kumavis)
-
-1.0.1 / 2014-11-25
-==================
-
- * browser: use `console.warn()` for deprecation calls
- * browser: more jsdocs
-
-1.0.0 / 2014-04-30
-==================
-
- * initial commit
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
deleted file mode 100644
index 6a60e8c225..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
-
-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/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/README.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/README.md
deleted file mode 100644
index 75622fa7c2..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-util-deprecate
-==============
-### The Node.js `util.deprecate()` function with browser support
-
-In Node.js, this module simply re-exports the `util.deprecate()` function.
-
-In the web browser (i.e. via browserify), a browser-specific implementation
-of the `util.deprecate()` function is used.
-
-
-## API
-
-A `deprecate()` function is the only thing exposed by this module.
-
-``` javascript
-// setup:
-exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');
-
-
-// users see:
-foo();
-// foo() is deprecated, use bar() instead
-foo();
-foo();
-```
-
-
-## License
-
-(The MIT License)
-
-Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
-
-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/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js
deleted file mode 100644
index 549ae2f065..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js
+++ /dev/null
@@ -1,67 +0,0 @@
-
-/**
- * Module exports.
- */
-
-module.exports = deprecate;
-
-/**
- * Mark that a method should not be used.
- * Returns a modified function which warns once by default.
- *
- * If `localStorage.noDeprecation = true` is set, then it is a no-op.
- *
- * If `localStorage.throwDeprecation = true` is set, then deprecated functions
- * will throw an Error when invoked.
- *
- * If `localStorage.traceDeprecation = true` is set, then deprecated functions
- * will invoke `console.trace()` instead of `console.error()`.
- *
- * @param {Function} fn - the function to deprecate
- * @param {String} msg - the string to print to the console when `fn` is invoked
- * @returns {Function} a new "deprecated" version of `fn`
- * @api public
- */
-
-function deprecate (fn, msg) {
- if (config('noDeprecation')) {
- return fn;
- }
-
- var warned = false;
- function deprecated() {
- if (!warned) {
- if (config('throwDeprecation')) {
- throw new Error(msg);
- } else if (config('traceDeprecation')) {
- console.trace(msg);
- } else {
- console.warn(msg);
- }
- warned = true;
- }
- return fn.apply(this, arguments);
- }
-
- return deprecated;
-}
-
-/**
- * Checks `localStorage` for boolean values for the given `name`.
- *
- * @param {String} name
- * @returns {Boolean}
- * @api private
- */
-
-function config (name) {
- // accessing global.localStorage can trigger a DOMException in sandboxed iframes
- try {
- if (!global.localStorage) return false;
- } catch (_) {
- return false;
- }
- var val = global.localStorage[name];
- if (null == val) return false;
- return String(val).toLowerCase() === 'true';
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js
deleted file mode 100644
index 5e6fcff5dd..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js
+++ /dev/null
@@ -1,6 +0,0 @@
-
-/**
- * For Node.js, simply re-export the core `util.deprecate` function.
- */
-
-module.exports = require('util').deprecate;
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json
deleted file mode 100644
index 14eb7c631c..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "util-deprecate@~1.0.1",
- "scope": null,
- "escapedName": "util-deprecate",
- "name": "util-deprecate",
- "rawSpec": "~1.0.1",
- "spec": ">=1.0.1 <1.1.0",
- "type": "range"
- },
- "/Users/rebecca/code/npm/node_modules/request/node_modules/bl/node_modules/readable-stream"
- ]
- ],
- "_from": "util-deprecate@>=1.0.1 <1.1.0",
- "_id": "util-deprecate@1.0.2",
- "_inCache": true,
- "_installable": true,
- "_location": "/request/bl/readable-stream/util-deprecate",
- "_nodeVersion": "4.1.2",
- "_npmUser": {
- "name": "tootallnate",
- "email": "nathan@tootallnate.net"
- },
- "_npmVersion": "2.14.4",
- "_phantomChildren": {},
- "_requested": {
- "raw": "util-deprecate@~1.0.1",
- "scope": null,
- "escapedName": "util-deprecate",
- "name": "util-deprecate",
- "rawSpec": "~1.0.1",
- "spec": ">=1.0.1 <1.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/request/bl/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
- "_shrinkwrap": null,
- "_spec": "util-deprecate@~1.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/bl/node_modules/readable-stream",
- "author": {
- "name": "Nathan Rajlich",
- "email": "nathan@tootallnate.net",
- "url": "http://n8.io/"
- },
- "browser": "browser.js",
- "bugs": {
- "url": "https://github.com/TooTallNate/util-deprecate/issues"
- },
- "dependencies": {},
- "description": "The Node.js `util.deprecate()` function with browser support",
- "devDependencies": {},
- "directories": {},
- "dist": {
- "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
- "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
- },
- "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4",
- "homepage": "https://github.com/TooTallNate/util-deprecate",
- "keywords": [
- "util",
- "deprecate",
- "browserify",
- "browser",
- "node"
- ],
- "license": "MIT",
- "main": "node.js",
- "maintainers": [
- {
- "name": "tootallnate",
- "email": "nathan@tootallnate.net"
- }
- ],
- "name": "util-deprecate",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/TooTallNate/util-deprecate.git"
- },
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "version": "1.0.2"
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json
deleted file mode 100644
index 27ef41cb1c..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json
+++ /dev/null
@@ -1,114 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "readable-stream@~2.0.5",
- "scope": null,
- "escapedName": "readable-stream",
- "name": "readable-stream",
- "rawSpec": "~2.0.5",
- "spec": ">=2.0.5 <2.1.0",
- "type": "range"
- },
- "/Users/rebecca/code/npm/node_modules/request/node_modules/bl"
- ]
- ],
- "_from": "readable-stream@>=2.0.5 <2.1.0",
- "_id": "readable-stream@2.0.6",
- "_inCache": true,
- "_installable": true,
- "_location": "/request/bl/readable-stream",
- "_nodeVersion": "5.7.0",
- "_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/readable-stream-2.0.6.tgz_1457893507709_0.369257491780445"
- },
- "_npmUser": {
- "name": "cwmma",
- "email": "calvin.metcalf@gmail.com"
- },
- "_npmVersion": "3.6.0",
- "_phantomChildren": {},
- "_requested": {
- "raw": "readable-stream@~2.0.5",
- "scope": null,
- "escapedName": "readable-stream",
- "name": "readable-stream",
- "rawSpec": "~2.0.5",
- "spec": ">=2.0.5 <2.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/request/bl"
- ],
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
- "_shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e",
- "_shrinkwrap": null,
- "_spec": "readable-stream@~2.0.5",
- "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/bl",
- "browser": {
- "util": false
- },
- "bugs": {
- "url": "https://github.com/nodejs/readable-stream/issues"
- },
- "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"
- },
- "description": "Streams3, a user-land copy of the stream library from Node.js",
- "devDependencies": {
- "tap": "~0.2.6",
- "tape": "~4.5.1",
- "zuul": "~3.9.0"
- },
- "directories": {},
- "dist": {
- "shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e",
- "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz"
- },
- "gitHead": "01fb5608a970b42c900b96746cadc13d27dd9d7e",
- "homepage": "https://github.com/nodejs/readable-stream#readme",
- "keywords": [
- "readable",
- "stream",
- "pipe"
- ],
- "license": "MIT",
- "main": "readable.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "isaacs@npmjs.com"
- },
- {
- "name": "tootallnate",
- "email": "nathan@tootallnate.net"
- },
- {
- "name": "rvagg",
- "email": "rod@vagg.org"
- },
- {
- "name": "cwmma",
- "email": "calvin.metcalf@gmail.com"
- }
- ],
- "name": "readable-stream",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/nodejs/readable-stream.git"
- },
- "scripts": {
- "browser": "npm run write-zuul && zuul -- test/browser.js",
- "test": "tap test/parallel/*.js test/ours/*.js",
- "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml"
- },
- "version": "2.0.6"
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js
deleted file mode 100644
index 27e8d8a551..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_passthrough.js")
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js
deleted file mode 100644
index 6222a57986..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var Stream = (function (){
- try {
- return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify
- } catch(_){}
-}());
-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/request/node_modules/bl/node_modules/readable-stream/transform.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js
deleted file mode 100644
index 5d482f0780..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_transform.js")
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js
deleted file mode 100644
index e1e9efdf3c..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_writable.js")
diff --git a/deps/npm/node_modules/request/node_modules/bl/package.json b/deps/npm/node_modules/request/node_modules/bl/package.json
deleted file mode 100644
index 47862b0b62..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/package.json
+++ /dev/null
@@ -1,100 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "bl@~1.1.2",
- "scope": null,
- "escapedName": "bl",
- "name": "bl",
- "rawSpec": "~1.1.2",
- "spec": ">=1.1.2 <1.2.0",
- "type": "range"
- },
- "/Users/rebecca/code/npm/node_modules/request"
- ]
- ],
- "_from": "bl@>=1.1.2 <1.2.0",
- "_id": "bl@1.1.2",
- "_inCache": true,
- "_installable": true,
- "_location": "/request/bl",
- "_nodeVersion": "5.3.0",
- "_npmOperationalInternal": {
- "host": "packages-9-west.internal.npmjs.com",
- "tmp": "tmp/bl-1.1.2.tgz_1455246621698_0.6300242957659066"
- },
- "_npmUser": {
- "name": "rvagg",
- "email": "rod@vagg.org"
- },
- "_npmVersion": "3.3.12",
- "_phantomChildren": {
- "inherits": "2.0.1"
- },
- "_requested": {
- "raw": "bl@~1.1.2",
- "scope": null,
- "escapedName": "bl",
- "name": "bl",
- "rawSpec": "~1.1.2",
- "spec": ">=1.1.2 <1.2.0",
- "type": "range"
- },
- "_requiredBy": [
- "/request"
- ],
- "_resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz",
- "_shasum": "fdca871a99713aa00d19e3bbba41c44787a65398",
- "_shrinkwrap": null,
- "_spec": "bl@~1.1.2",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
- "authors": [
- "Rod Vagg <rod@vagg.org> (https://github.com/rvagg)",
- "Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
- "Jarett Cruger <jcrugzz@gmail.com> (https://github.com/jcrugzz)"
- ],
- "bugs": {
- "url": "https://github.com/rvagg/bl/issues"
- },
- "dependencies": {
- "readable-stream": "~2.0.5"
- },
- "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
- "devDependencies": {
- "faucet": "0.0.1",
- "hash_file": "~0.1.1",
- "tape": "~4.4.0"
- },
- "directories": {},
- "dist": {
- "shasum": "fdca871a99713aa00d19e3bbba41c44787a65398",
- "tarball": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz"
- },
- "gitHead": "ea42021059dc65fc60d7f4b9217c73431f09d23d",
- "homepage": "https://github.com/rvagg/bl",
- "keywords": [
- "buffer",
- "buffers",
- "stream",
- "awesomesauce"
- ],
- "license": "MIT",
- "main": "bl.js",
- "maintainers": [
- {
- "name": "rvagg",
- "email": "rod@vagg.org"
- }
- ],
- "name": "bl",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/rvagg/bl.git"
- },
- "scripts": {
- "test": "node test/test.js | faucet"
- },
- "version": "1.1.2"
-}
diff --git a/deps/npm/node_modules/request/node_modules/bl/test/test.js b/deps/npm/node_modules/request/node_modules/bl/test/test.js
deleted file mode 100644
index c95b1ba484..0000000000
--- a/deps/npm/node_modules/request/node_modules/bl/test/test.js
+++ /dev/null
@@ -1,640 +0,0 @@
-var tape = require('tape')
- , crypto = require('crypto')
- , fs = require('fs')
- , hash = require('hash_file')
- , BufferList = require('../')
-
- , encodings =
- ('hex utf8 utf-8 ascii binary base64'
- + (process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ')
-
-tape('single bytes from single buffer', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('abcd'))
-
- t.equal(bl.length, 4)
-
- t.equal(bl.get(0), 97)
- t.equal(bl.get(1), 98)
- t.equal(bl.get(2), 99)
- t.equal(bl.get(3), 100)
-
- t.end()
-})
-
-tape('single bytes from multiple buffers', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('abcd'))
- bl.append(new Buffer('efg'))
- bl.append(new Buffer('hi'))
- bl.append(new Buffer('j'))
-
- t.equal(bl.length, 10)
-
- t.equal(bl.get(0), 97)
- t.equal(bl.get(1), 98)
- t.equal(bl.get(2), 99)
- t.equal(bl.get(3), 100)
- t.equal(bl.get(4), 101)
- t.equal(bl.get(5), 102)
- t.equal(bl.get(6), 103)
- t.equal(bl.get(7), 104)
- t.equal(bl.get(8), 105)
- t.equal(bl.get(9), 106)
- t.end()
-})
-
-tape('multi bytes from single buffer', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('abcd'))
-
- t.equal(bl.length, 4)
-
- t.equal(bl.slice(0, 4).toString('ascii'), 'abcd')
- t.equal(bl.slice(0, 3).toString('ascii'), 'abc')
- t.equal(bl.slice(1, 4).toString('ascii'), 'bcd')
-
- t.end()
-})
-
-tape('multiple bytes from multiple buffers', function (t) {
- var bl = new BufferList()
-
- bl.append(new Buffer('abcd'))
- bl.append(new Buffer('efg'))
- bl.append(new Buffer('hi'))
- bl.append(new Buffer('j'))
-
- t.equal(bl.length, 10)
-
- t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
- t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
- t.equal(bl.slice(3, 6).toString('ascii'), 'def')
- t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
- t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
-
- t.end()
-})
-
-tape('multiple bytes from multiple buffer lists', function (t) {
- var bl = new BufferList()
-
- bl.append(new BufferList([ new Buffer('abcd'), new Buffer('efg') ]))
- bl.append(new BufferList([ new Buffer('hi'), new Buffer('j') ]))
-
- t.equal(bl.length, 10)
-
- t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
-
- t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
- t.equal(bl.slice(3, 6).toString('ascii'), 'def')
- t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
- t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
-
- t.end()
-})
-
-// same data as previous test, just using nested constructors
-tape('multiple bytes from crazy nested buffer lists', function (t) {
- var bl = new BufferList()
-
- bl.append(new BufferList([
- new BufferList([
- new BufferList(new Buffer('abc'))
- , new Buffer('d')
- , new BufferList(new Buffer('efg'))
- ])
- , new BufferList([ new Buffer('hi') ])
- , new BufferList(new Buffer('j'))
- ]))
-
- t.equal(bl.length, 10)
-
- t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
-
- t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
- t.equal(bl.slice(3, 6).toString('ascii'), 'def')
- t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
- t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
-
- t.end()
-})
-
-tape('append accepts arrays of Buffers', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('abc'))
- bl.append([ new Buffer('def') ])
- bl.append([ new Buffer('ghi'), new Buffer('jkl') ])
- bl.append([ new Buffer('mnop'), new Buffer('qrstu'), new Buffer('vwxyz') ])
- t.equal(bl.length, 26)
- t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
- t.end()
-})
-
-tape('append accepts arrays of BufferLists', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('abc'))
- bl.append([ new BufferList('def') ])
- bl.append(new BufferList([ new Buffer('ghi'), new BufferList('jkl') ]))
- bl.append([ new Buffer('mnop'), new BufferList([ new Buffer('qrstu'), new Buffer('vwxyz') ]) ])
- t.equal(bl.length, 26)
- t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
- t.end()
-})
-
-tape('append chainable', function (t) {
- var bl = new BufferList()
- t.ok(bl.append(new Buffer('abcd')) === bl)
- t.ok(bl.append([ new Buffer('abcd') ]) === bl)
- t.ok(bl.append(new BufferList(new Buffer('abcd'))) === bl)
- t.ok(bl.append([ new BufferList(new Buffer('abcd')) ]) === bl)
- t.end()
-})
-
-tape('append chainable (test results)', function (t) {
- var bl = new BufferList('abc')
- .append([ new BufferList('def') ])
- .append(new BufferList([ new Buffer('ghi'), new BufferList('jkl') ]))
- .append([ new Buffer('mnop'), new BufferList([ new Buffer('qrstu'), new Buffer('vwxyz') ]) ])
-
- t.equal(bl.length, 26)
- t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
- t.end()
-})
-
-tape('consuming from multiple buffers', function (t) {
- var bl = new BufferList()
-
- bl.append(new Buffer('abcd'))
- bl.append(new Buffer('efg'))
- bl.append(new Buffer('hi'))
- bl.append(new Buffer('j'))
-
- t.equal(bl.length, 10)
-
- t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
-
- bl.consume(3)
- t.equal(bl.length, 7)
- t.equal(bl.slice(0, 7).toString('ascii'), 'defghij')
-
- bl.consume(2)
- t.equal(bl.length, 5)
- t.equal(bl.slice(0, 5).toString('ascii'), 'fghij')
-
- bl.consume(1)
- t.equal(bl.length, 4)
- t.equal(bl.slice(0, 4).toString('ascii'), 'ghij')
-
- bl.consume(1)
- t.equal(bl.length, 3)
- t.equal(bl.slice(0, 3).toString('ascii'), 'hij')
-
- bl.consume(2)
- t.equal(bl.length, 1)
- t.equal(bl.slice(0, 1).toString('ascii'), 'j')
-
- t.end()
-})
-
-tape('complete consumption', function (t) {
- var bl = new BufferList()
-
- bl.append(new Buffer('a'))
- bl.append(new Buffer('b'))
-
- bl.consume(2)
-
- t.equal(bl.length, 0)
- t.equal(bl._bufs.length, 0)
-
- t.end()
-})
-
-tape('test readUInt8 / readInt8', function (t) {
- var buf1 = new Buffer(1)
- , buf2 = new Buffer(3)
- , buf3 = new Buffer(3)
- , bl = new BufferList()
-
- buf2[1] = 0x3
- buf2[2] = 0x4
- buf3[0] = 0x23
- buf3[1] = 0x42
-
- bl.append(buf1)
- bl.append(buf2)
- bl.append(buf3)
-
- t.equal(bl.readUInt8(2), 0x3)
- t.equal(bl.readInt8(2), 0x3)
- t.equal(bl.readUInt8(3), 0x4)
- t.equal(bl.readInt8(3), 0x4)
- t.equal(bl.readUInt8(4), 0x23)
- t.equal(bl.readInt8(4), 0x23)
- t.equal(bl.readUInt8(5), 0x42)
- t.equal(bl.readInt8(5), 0x42)
- t.end()
-})
-
-tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) {
- var buf1 = new Buffer(1)
- , buf2 = new Buffer(3)
- , buf3 = new Buffer(3)
- , bl = new BufferList()
-
- buf2[1] = 0x3
- buf2[2] = 0x4
- buf3[0] = 0x23
- buf3[1] = 0x42
-
- bl.append(buf1)
- bl.append(buf2)
- bl.append(buf3)
-
- t.equal(bl.readUInt16BE(2), 0x0304)
- t.equal(bl.readUInt16LE(2), 0x0403)
- t.equal(bl.readInt16BE(2), 0x0304)
- t.equal(bl.readInt16LE(2), 0x0403)
- t.equal(bl.readUInt16BE(3), 0x0423)
- t.equal(bl.readUInt16LE(3), 0x2304)
- t.equal(bl.readInt16BE(3), 0x0423)
- t.equal(bl.readInt16LE(3), 0x2304)
- t.equal(bl.readUInt16BE(4), 0x2342)
- t.equal(bl.readUInt16LE(4), 0x4223)
- t.equal(bl.readInt16BE(4), 0x2342)
- t.equal(bl.readInt16LE(4), 0x4223)
- t.end()
-})
-
-tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) {
- var buf1 = new Buffer(1)
- , buf2 = new Buffer(3)
- , buf3 = new Buffer(3)
- , bl = new BufferList()
-
- buf2[1] = 0x3
- buf2[2] = 0x4
- buf3[0] = 0x23
- buf3[1] = 0x42
-
- bl.append(buf1)
- bl.append(buf2)
- bl.append(buf3)
-
- t.equal(bl.readUInt32BE(2), 0x03042342)
- t.equal(bl.readUInt32LE(2), 0x42230403)
- t.equal(bl.readInt32BE(2), 0x03042342)
- t.equal(bl.readInt32LE(2), 0x42230403)
- t.end()
-})
-
-tape('test readFloatLE / readFloatBE', function (t) {
- var buf1 = new Buffer(1)
- , buf2 = new Buffer(3)
- , buf3 = new Buffer(3)
- , bl = new BufferList()
-
- buf2[1] = 0x00
- buf2[2] = 0x00
- buf3[0] = 0x80
- buf3[1] = 0x3f
-
- bl.append(buf1)
- bl.append(buf2)
- bl.append(buf3)
-
- t.equal(bl.readFloatLE(2), 0x01)
- t.end()
-})
-
-tape('test readDoubleLE / readDoubleBE', function (t) {
- var buf1 = new Buffer(1)
- , buf2 = new Buffer(3)
- , buf3 = new Buffer(10)
- , bl = new BufferList()
-
- buf2[1] = 0x55
- buf2[2] = 0x55
- buf3[0] = 0x55
- buf3[1] = 0x55
- buf3[2] = 0x55
- buf3[3] = 0x55
- buf3[4] = 0xd5
- buf3[5] = 0x3f
-
- bl.append(buf1)
- bl.append(buf2)
- bl.append(buf3)
-
- t.equal(bl.readDoubleLE(2), 0.3333333333333333)
- t.end()
-})
-
-tape('test toString', function (t) {
- var bl = new BufferList()
-
- bl.append(new Buffer('abcd'))
- bl.append(new Buffer('efg'))
- bl.append(new Buffer('hi'))
- bl.append(new Buffer('j'))
-
- t.equal(bl.toString('ascii', 0, 10), 'abcdefghij')
- t.equal(bl.toString('ascii', 3, 10), 'defghij')
- t.equal(bl.toString('ascii', 3, 6), 'def')
- t.equal(bl.toString('ascii', 3, 8), 'defgh')
- t.equal(bl.toString('ascii', 5, 10), 'fghij')
-
- t.end()
-})
-
-tape('test toString encoding', function (t) {
- var bl = new BufferList()
- , b = new Buffer('abcdefghij\xff\x00')
-
- bl.append(new Buffer('abcd'))
- bl.append(new Buffer('efg'))
- bl.append(new Buffer('hi'))
- bl.append(new Buffer('j'))
- bl.append(new Buffer('\xff\x00'))
-
- encodings.forEach(function (enc) {
- t.equal(bl.toString(enc), b.toString(enc), enc)
- })
-
- t.end()
-})
-
-!process.browser && tape('test stream', function (t) {
- var random = crypto.randomBytes(65534)
- , rndhash = hash(random, 'md5')
- , md5sum = crypto.createHash('md5')
- , bl = new BufferList(function (err, buf) {
- t.ok(Buffer.isBuffer(buf))
- t.ok(err === null)
- t.equal(rndhash, hash(bl.slice(), 'md5'))
- t.equal(rndhash, hash(buf, 'md5'))
-
- bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat'))
- .on('close', function () {
- var s = fs.createReadStream('/tmp/bl_test_rnd_out.dat')
- s.on('data', md5sum.update.bind(md5sum))
- s.on('end', function() {
- t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!')
- t.end()
- })
- })
-
- })
-
- fs.writeFileSync('/tmp/bl_test_rnd.dat', random)
- fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl)
-})
-
-tape('instantiation with Buffer', function (t) {
- var buf = crypto.randomBytes(1024)
- , buf2 = crypto.randomBytes(1024)
- , b = BufferList(buf)
-
- t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer')
- b = BufferList([ buf, buf2 ])
- t.equal(b.slice().toString('hex'), Buffer.concat([ buf, buf2 ]).toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('test String appendage', function (t) {
- var bl = new BufferList()
- , b = new Buffer('abcdefghij\xff\x00')
-
- bl.append('abcd')
- bl.append('efg')
- bl.append('hi')
- bl.append('j')
- bl.append('\xff\x00')
-
- encodings.forEach(function (enc) {
- t.equal(bl.toString(enc), b.toString(enc))
- })
-
- t.end()
-})
-
-tape('test Number appendage', function (t) {
- var bl = new BufferList()
- , b = new Buffer('1234567890')
-
- bl.append(1234)
- bl.append(567)
- bl.append(89)
- bl.append(0)
-
- encodings.forEach(function (enc) {
- t.equal(bl.toString(enc), b.toString(enc))
- })
-
- t.end()
-})
-
-tape('write nothing, should get empty buffer', function (t) {
- t.plan(3)
- BufferList(function (err, data) {
- t.notOk(err, 'no error')
- t.ok(Buffer.isBuffer(data), 'got a buffer')
- t.equal(0, data.length, 'got a zero-length buffer')
- t.end()
- }).end()
-})
-
-tape('unicode string', function (t) {
- t.plan(2)
- var inp1 = '\u2600'
- , inp2 = '\u2603'
- , exp = inp1 + ' and ' + inp2
- , bl = BufferList()
- bl.write(inp1)
- bl.write(' and ')
- bl.write(inp2)
- t.equal(exp, bl.toString())
- t.equal(new Buffer(exp).toString('hex'), bl.toString('hex'))
-})
-
-tape('should emit finish', function (t) {
- var source = BufferList()
- , dest = BufferList()
-
- source.write('hello')
- source.pipe(dest)
-
- dest.on('finish', function () {
- t.equal(dest.toString('utf8'), 'hello')
- t.end()
- })
-})
-
-tape('basic copy', function (t) {
- var buf = crypto.randomBytes(1024)
- , buf2 = new Buffer(1024)
- , b = BufferList(buf)
-
- b.copy(buf2)
- t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('copy after many appends', function (t) {
- var buf = crypto.randomBytes(512)
- , buf2 = new Buffer(1024)
- , b = BufferList(buf)
-
- b.append(buf)
- b.copy(buf2)
- t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('copy at a precise position', function (t) {
- var buf = crypto.randomBytes(1004)
- , buf2 = new Buffer(1024)
- , b = BufferList(buf)
-
- b.copy(buf2, 20)
- t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('copy starting from a precise location', function (t) {
- var buf = crypto.randomBytes(10)
- , buf2 = new Buffer(5)
- , b = BufferList(buf)
-
- b.copy(buf2, 0, 5)
- t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('copy in an interval', function (t) {
- var rnd = crypto.randomBytes(10)
- , b = BufferList(rnd) // put the random bytes there
- , actual = new Buffer(3)
- , expected = new Buffer(3)
-
- rnd.copy(expected, 0, 5, 8)
- b.copy(actual, 0, 5, 8)
-
- t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('copy an interval between two buffers', function (t) {
- var buf = crypto.randomBytes(10)
- , buf2 = new Buffer(10)
- , b = BufferList(buf)
-
- b.append(buf)
- b.copy(buf2, 0, 5, 15)
-
- t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('duplicate', function (t) {
- t.plan(2)
-
- var bl = new BufferList('abcdefghij\xff\x00')
- , dup = bl.duplicate()
-
- t.equal(bl.prototype, dup.prototype)
- t.equal(bl.toString('hex'), dup.toString('hex'))
-})
-
-tape('destroy no pipe', function (t) {
- t.plan(2)
-
- var bl = new BufferList('alsdkfja;lsdkfja;lsdk')
- bl.destroy()
-
- t.equal(bl._bufs.length, 0)
- t.equal(bl.length, 0)
-})
-
-!process.browser && tape('destroy with pipe before read end', function (t) {
- t.plan(2)
-
- var bl = new BufferList()
- fs.createReadStream(__dirname + '/test.js')
- .pipe(bl)
-
- bl.destroy()
-
- t.equal(bl._bufs.length, 0)
- t.equal(bl.length, 0)
-
-})
-
-!process.browser && tape('destroy with pipe before read end with race', function (t) {
- t.plan(2)
-
- var bl = new BufferList()
- fs.createReadStream(__dirname + '/test.js')
- .pipe(bl)
-
- setTimeout(function () {
- bl.destroy()
- setTimeout(function () {
- t.equal(bl._bufs.length, 0)
- t.equal(bl.length, 0)
- }, 500)
- }, 500)
-})
-
-!process.browser && tape('destroy with pipe after read end', function (t) {
- t.plan(2)
-
- var bl = new BufferList()
- fs.createReadStream(__dirname + '/test.js')
- .on('end', onEnd)
- .pipe(bl)
-
- function onEnd () {
- bl.destroy()
-
- t.equal(bl._bufs.length, 0)
- t.equal(bl.length, 0)
- }
-})
-
-!process.browser && tape('destroy with pipe while writing to a destination', function (t) {
- t.plan(4)
-
- var bl = new BufferList()
- , ds = new BufferList()
-
- fs.createReadStream(__dirname + '/test.js')
- .on('end', onEnd)
- .pipe(bl)
-
- function onEnd () {
- bl.pipe(ds)
-
- setTimeout(function () {
- bl.destroy()
-
- t.equals(bl._bufs.length, 0)
- t.equals(bl.length, 0)
-
- ds.destroy()
-
- t.equals(bl._bufs.length, 0)
- t.equals(bl.length, 0)
-
- }, 100)
- }
-})
-
-!process.browser && tape('handle error', function (t) {
- t.plan(2)
- fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) {
- t.ok(err instanceof Error, 'has error')
- t.notOk(data, 'no data')
- }))
-})
diff --git a/deps/npm/node_modules/request/node_modules/form-data/Readme.md b/deps/npm/node_modules/request/node_modules/form-data/Readme.md
index 5864d82db5..642a9d14a8 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/Readme.md
+++ b/deps/npm/node_modules/request/node_modules/form-data/Readme.md
@@ -6,11 +6,11 @@ The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface]
[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
-[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.0.0.svg?label=linux:0.12-6.x)](https://travis-ci.org/form-data/form-data)
-[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.0.0.svg?label=macos:0.12-6.x)](https://travis-ci.org/form-data/form-data)
-[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.0.0.svg?label=windows:0.12-6.x)](https://ci.appveyor.com/project/alexindigo/form-data)
+[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.1.2.svg?label=linux:0.12-6.x)](https://travis-ci.org/form-data/form-data)
+[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.1.2.svg?label=macos:0.12-6.x)](https://travis-ci.org/form-data/form-data)
+[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.1.2.svg?label=windows:0.12-6.x)](https://ci.appveyor.com/project/alexindigo/form-data)
-[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.0.0.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)
+[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.1.2.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)
[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data)
[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data)
diff --git a/deps/npm/node_modules/request/node_modules/form-data/lib/browser.js b/deps/npm/node_modules/request/node_modules/form-data/lib/browser.js
index f42221cd63..09e7c70e6e 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/lib/browser.js
+++ b/deps/npm/node_modules/request/node_modules/form-data/lib/browser.js
@@ -1,2 +1,2 @@
/* eslint-env browser */
-module.exports = window.FormData;
+module.exports = typeof self == 'object' ? self.FormData : window.FormData;
diff --git a/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js b/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js
index 8252e6588d..d2cc924918 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js
+++ b/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js
@@ -325,7 +325,7 @@ FormData.prototype.getLengthSync = function() {
}
// https://github.com/form-data/form-data/issues/40
- if (this._valuesToMeasure.length) {
+ if (!this.hasKnownLength()) {
// Some async length retrievers are present
// therefore synchronous length calculation is false.
// Please use getLength(callback) to get proper length
@@ -335,6 +335,19 @@ FormData.prototype.getLengthSync = function() {
return knownLength;
};
+// Public API to check if length of added values is known
+// https://github.com/form-data/form-data/issues/196
+// https://github.com/form-data/form-data/issues/262
+FormData.prototype.hasKnownLength = function() {
+ var hasKnownLength = true;
+
+ if (this._valuesToMeasure.length) {
+ hasKnownLength = false;
+ }
+
+ return hasKnownLength;
+};
+
FormData.prototype.getLength = function(cb) {
var knownLength = this._overheadLength + this._valueLength;
diff --git a/deps/npm/node_modules/request/node_modules/form-data/package.json b/deps/npm/node_modules/request/node_modules/form-data/package.json
index a8b4839b7c..96fd69e80f 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/package.json
@@ -2,49 +2,49 @@
"_args": [
[
{
- "raw": "form-data@~2.0.0",
+ "raw": "form-data@~2.1.1",
"scope": null,
"escapedName": "form-data",
"name": "form-data",
- "rawSpec": "~2.0.0",
- "spec": ">=2.0.0 <2.1.0",
+ "rawSpec": "~2.1.1",
+ "spec": ">=2.1.1 <2.2.0",
"type": "range"
},
- "/Users/rebecca/code/npm/node_modules/request"
+ "/Users/zkat/Documents/code/npm/node_modules/request"
]
],
- "_from": "form-data@>=2.0.0 <2.1.0",
- "_id": "form-data@2.0.0",
+ "_from": "form-data@>=2.1.1 <2.2.0",
+ "_id": "form-data@2.1.2",
"_inCache": true,
"_location": "/request/form-data",
- "_nodeVersion": "4.5.0",
+ "_nodeVersion": "6.4.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/form-data-2.0.0.tgz_1474092617403_0.5404838663525879"
+ "tmp": "tmp/form-data-2.1.2.tgz_1478577739404_0.6574864208232611"
},
"_npmUser": {
"name": "alexindigo",
"email": "iam@alexindigo.com"
},
- "_npmVersion": "2.15.9",
+ "_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
- "raw": "form-data@~2.0.0",
+ "raw": "form-data@~2.1.1",
"scope": null,
"escapedName": "form-data",
"name": "form-data",
- "rawSpec": "~2.0.0",
- "spec": ">=2.0.0 <2.1.0",
+ "rawSpec": "~2.1.1",
+ "spec": ">=2.1.1 <2.2.0",
"type": "range"
},
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz",
- "_shasum": "6f0aebadcc5da16c13e1ecc11137d85f9b883b25",
+ "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz",
+ "_shasum": "89c3534008b97eada4cbb157d58f6f5df025eae4",
"_shrinkwrap": null,
- "_spec": "form-data@~2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_spec": "form-data@~2.1.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/request",
"author": {
"name": "Felix Geisendörfer",
"email": "felix@debuggable.com",
@@ -57,33 +57,38 @@
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.5",
- "mime-types": "^2.1.11"
+ "mime-types": "^2.1.12"
},
"description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
"devDependencies": {
- "coveralls": "^2.11.13",
- "cross-spawn": "^4.0.0",
- "eslint": "^3.5.0",
+ "browserify": "^13.1.1",
+ "browserify-istanbul": "^2.0.0",
+ "coveralls": "^2.11.14",
+ "cross-spawn": "^4.0.2",
+ "eslint": "^3.9.1",
"fake": "^0.2.2",
"far": "^0.0.7",
"formidable": "^1.0.17",
"in-publish": "^2.0.0",
"is-node-modern": "^1.0.0",
"istanbul": "^0.4.5",
+ "obake": "^0.1.2",
+ "phantomjs-prebuilt": "^2.1.13",
"pkgfiles": "^2.3.0",
"pre-commit": "^1.1.3",
- "request": "^2.74.0",
- "rimraf": "^2.5.4"
+ "request": "2.76.0",
+ "rimraf": "^2.5.4",
+ "tape": "^4.6.2"
},
"directories": {},
"dist": {
- "shasum": "6f0aebadcc5da16c13e1ecc11137d85f9b883b25",
- "tarball": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz"
+ "shasum": "89c3534008b97eada4cbb157d58f6f5df025eae4",
+ "tarball": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz"
},
"engines": {
"node": ">= 0.12"
},
- "gitHead": "652b16ff5b9077bdf65eb66b67286c823c2a1040",
+ "gitHead": "03444d21961a7a44cdc2eae11ee3630f6969023d",
"homepage": "https://github.com/form-data/form-data#readme",
"license": "MIT",
"main": "./lib/form_data",
@@ -109,7 +114,7 @@
"optionalDependencies": {},
"pre-commit": [
"lint",
- "test",
+ "ci-test",
"check"
],
"readme": "ERROR: No README data found!",
@@ -118,8 +123,10 @@
"url": "git://github.com/form-data/form-data.git"
},
"scripts": {
+ "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage",
"check": "istanbul check-coverage coverage/coverage*.json",
- "ci-lint": "is-node-modern && npm run lint || is-node-not-modern",
+ "ci-lint": "is-node-modern 6 && npm run lint || is-node-not-modern 6",
+ "ci-test": "npm run test && npm run browser && npm run report",
"debug": "verbose=1 ./test/run.js",
"files": "pkgfiles --sort=name",
"get-version": "node -e \"console.log(require('./package.json').version)\"",
@@ -129,9 +136,10 @@
"predebug": "rimraf coverage test/tmp",
"prepublish": "in-publish && npm run update-readme || not-in-publish",
"pretest": "rimraf coverage test/tmp",
+ "report": "istanbul report lcov text",
"restore-readme": "mv README.md.bak README.md",
"test": "istanbul cover test/run.js",
"update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md"
},
- "version": "2.0.0"
+ "version": "2.1.2"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/CHANGES.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/CHANGES.md
new file mode 100644
index 0000000000..d7c8f4ebe1
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/CHANGES.md
@@ -0,0 +1,364 @@
+# node-dashdash changelog
+
+## not yet released
+
+(nothing yet)
+
+## 1.14.1
+
+- [issue #30] Change the output used by dashdash's Bash completion support to
+ indicate "there are no completions for this argument" to cope with different
+ sorting rules on different Bash/platforms. For example:
+
+ $ triton -v -p test2 package get <TAB> # before
+ ##-no -tritonpackage- completions-##
+
+ $ triton -v -p test2 package get <TAB> # after
+ ##-no-completion- -results-##
+
+## 1.14.0
+
+- New `synopsisFromOpt(<option spec>)` function. This will be used by
+ [node-cmdln](https://github.com/trentm/node-cmdln) to put together a synopsis
+ of options for a command. Some examples:
+
+ > synopsisFromOpt({names: ['help', 'h'], type: 'bool'});
+ '[ --help | -h ]'
+ > synopsisFromOpt({name: 'file', type: 'string', helpArg: 'FILE'});
+ '[ --file=FILE ]'
+
+
+## 1.13.1
+
+- [issue #20] `bashCompletionSpecFromOptions` breaks on an options array with
+ an empty-string group.
+
+
+## 1.13.0
+
+- Update assert-plus dep to 1.x to get recent fixes (particularly for
+ `assert.optional*`).
+
+- Drop testing (and official support in packages.json#engines) for node 0.8.x.
+ Add testing against node 5.x and 4.x with `make testall`.
+
+- [pull #16] Change the `positiveInteger` type to NOT accept zero (0).
+ For those who might need the old behaviour, see
+ "examples/custom-option-intGteZero.js". (By Dave Pacheco.)
+
+
+## 1.12.2
+
+- Bash completion: Add `argtypes` to specify the types of positional args.
+ E.g. this would allow you to have an `ssh` command with `argtypes = ['host',
+ 'cmd']` for bash completion. You then have to provide Bash functions to
+ handle completing those types via the `specExtra` arg. See
+ "[examples/ddcompletion.js](examples/ddcompletion.js)" for an example.
+
+- Bash completion: Tweak so that options or only offered as completions when
+ there is a leading '-'. E.g. `mytool <TAB>` does NOT offer options, `mytool
+ -<TAB>` *does*. Without this, a tool with options would never be able to
+ fallback to Bash's "default" completion. For example `ls <TAB>` wouldn't
+ result in filename completion. Now it will.
+
+- Bash completion: A workaround for not being able to explicitly have *no*
+ completion results. Because dashdash's completion uses `complete -o default`,
+ we fallback to Bash's "default" completion (typically for filename
+ completion). Before this change, an attempt to explicitly say "there are
+ no completions that match" would unintentionally trigger filename completion.
+ Instead as a workaround we return:
+
+ $ ddcompletion --none <TAB> # the 'none' argtype
+ ##-no completions-##
+
+ $ ddcompletion # a custom 'fruit' argtype
+ apple banana orange
+ $ ddcompletion z
+ ##-no -fruit- completions-##
+
+ This is a bit of a hack, but IMO a better experience than the surprise
+ of matching a local filename beginning with 'z', which isn't, in this
+ case, a "fruit".
+
+## 1.12.1
+
+- Bash completion: Document `<option spec>.completionType`. Add `includeHidden`
+ option to `bashCompletionSpecFromOptions()`. Add support for dealing with
+ hidden subcmds.
+
+
+## 1.12.0
+
+- Support for generating Bash completion files. See the "Bash completion"
+ section of the README.md and "examples/ddcompletion.js" for an example.
+
+
+## 1.11.0
+
+- Add the `arrayFlatten` boolean option to `dashdash.addOptionType` used for
+ custom option types. This allows one to create an `arrayOf...` option type
+ where each usage of the option can return multiple results. For example:
+
+ node mytool.js --foo a,b --foo c
+
+ We could define an option type for `--foo` such that
+ `opts.foo = ['a', 'b', 'c']`. See
+ "[examples/custom-option-arrayOfCommaSepString.js](examples/custom-option-arrayOfCommaSepString.js)"
+ for an example.
+
+
+## 1.10.1
+
+- Trim the published package to the minimal bits. Before: 24K tarball, 144K unpacked.
+ After: 12K tarball, 48K unpacked. `npm` won't let me drop the README.md. :)
+
+
+## 1.10.0
+
+- [issue #9] Support `includeDefault` in help config (similar to `includeEnv`) to have a
+ note of an option's default value, if any, in help output.
+- [issue #11] Fix option group breakage introduced in v1.9.0.
+
+
+## 1.9.0
+
+- [issue #10] Custom option types added with `addOptionType` can specify a
+ "default" value. See "examples/custom-option-fruit.js".
+
+
+## 1.8.0
+
+- Support `hidden: true` in an option spec to have help output exclude this
+ option.
+
+
+## 1.7.3
+
+- [issue #8] Fix parsing of a short option group when one of the
+ option takes an argument. For example, consider `tail` with
+ a `-f` boolean option and a `-n` option that takes a number
+ argument. This should parse:
+
+ tail -fn5
+
+ Before this change, that would not parse correctly.
+ It is suspected that this was introduced in version 1.4.0
+ (with commit 656fa8bc71c372ebddad0a7026bd71611e2ec99a).
+
+
+## 1.7.2
+
+- Known issues: #8
+
+- Exclude 'tools/' dir in packages published to npm.
+
+
+## 1.7.1
+
+- Known issues: #8
+
+- Support an option group *empty string* value:
+
+ ...
+ { group: '' },
+ ...
+
+ to render as a blank line in option help. This can help separate loosely
+ related sets of options without resorting to a title for option groups.
+
+
+## 1.7.0
+
+- Known issues: #8
+
+- [pull #7] Support for `<parser>.help({helpWrap: false, ...})` option to be able
+ to fully control the formatting for option help (by Patrick Mooney) `helpWrap:
+ false` can also be set on individual options in the option objects, e.g.:
+
+ var options = [
+ {
+ names: ['foo'],
+ type: 'string',
+ helpWrap: false,
+ help: 'long help with\n newlines' +
+ '\n spaces\n and such\nwill render correctly'
+ },
+ ...
+ ];
+
+
+## 1.6.0
+
+- Known issues: #8
+
+- [pull #6] Support headings between groups of options (by Joshua M. Clulow)
+ so that this code:
+
+ var options = [
+ { group: 'Armament Options' },
+ { names: [ 'weapon', 'w' ], type: 'string' },
+ { group: 'General Options' },
+ { names: [ 'help', 'h' ], type: 'bool' }
+ ];
+ ...
+
+ will give you this help output:
+
+ ...
+ Armament Options:
+ -w, --weapon
+
+ General Options:
+ -h, --help
+ ...
+
+
+## 1.5.0
+
+- Known issues: #8
+
+- Add support for adding custom option types. "examples/custom-option-duration.js"
+ shows an example adding a "duration" option type.
+
+ $ node custom-option-duration.js -t 1h
+ duration: 3600000 ms
+ $ node custom-option-duration.js -t 1s
+ duration: 1000 ms
+ $ node custom-option-duration.js -t 5d
+ duration: 432000000 ms
+ $ node custom-option-duration.js -t bogus
+ custom-option-duration.js: error: arg for "-t" is not a valid duration: "bogus"
+
+ A custom option type is added via:
+
+ var dashdash = require('dashdash');
+ dashdash.addOptionType({
+ name: '...',
+ takesArg: true,
+ helpArg: '...',
+ parseArg: function (option, optstr, arg) {
+ ...
+ }
+ });
+
+- [issue #4] Add `date` and `arrayOfDate` option types. They accept these date
+ formats: epoch second times (e.g. 1396031701) and ISO 8601 format:
+ `YYYY-MM-DD[THH:MM:SS[.sss][Z]]` (e.g. "2014-03-28",
+ "2014-03-28T18:35:01.489Z"). See "examples/date.js" for an example usage.
+
+ $ node examples/date.js -s 2014-01-01 -e $(date +%s)
+ start at 2014-01-01T00:00:00.000Z
+ end at 2014-03-29T04:26:18.000Z
+
+
+## 1.4.0
+
+- Known issues: #8
+
+- [pull #2, pull #3] Add a `allowUnknown: true` option on `createParser` to
+ allow unknown options to be passed through as `opts._args` instead of parsing
+ throwing an exception (by https://github.com/isaacs).
+
+ See 'allowUnknown' in the README for a subtle caveat.
+
+
+## 1.3.2
+
+- Fix a subtlety where a *bool* option using both `env` and `default` didn't
+ work exactly correctly. If `default: false` then all was fine (by luck).
+ However, if you had an option like this:
+
+ options: [ {
+ names: ['verbose', 'v'],
+ env: 'FOO_VERBOSE',
+ 'default': true, // <--- this
+ type: 'bool'
+ } ],
+
+ wanted `FOO_VERBOSE=0` to make the option false, then you need the fix
+ in this version of dashdash.
+
+
+## 1.3.1
+
+- [issue #1] Fix an envvar not winning over an option 'default'. Previously
+ an option with both `default` and `env` would never take a value from the
+ environment variable. E.g. `FOO_FILE` would never work here:
+
+ options: [ {
+ names: ['file', 'f'],
+ env: 'FOO_FILE',
+ 'default': 'default.file',
+ type: 'string'
+ } ],
+
+
+## 1.3.0
+
+- [Backward incompatible change for boolean envvars] Change the
+ interpretation of environment variables for boolean options to consider '0'
+ to be false. Previous to this *any* value to the envvar was considered
+ true -- which was quite misleading. Example:
+
+ $ FOO_VERBOSE=0 node examples/foo.js
+ # opts: { verbose: [ false ],
+ _order: [ { key: 'verbose', value: false, from: 'env' } ],
+ _args: [] }
+ # args: []
+
+
+## 1.2.1
+
+- Fix for `parse.help({includeEnv: true, ...})` handling to ensure that an
+ option with an `env` **but no `help`** still has the "Environment: ..."
+ output. E.g.:
+
+ { names: ['foo'], type: 'string', env: 'FOO' }
+
+ ...
+
+ --foo=ARG Environment: FOO=ARG
+
+
+## 1.2.0
+
+- Transform the option key on the `opts` object returned from
+ `<parser>.parse()` for convenience. Currently this is just
+ `s/-/_/g`, e.g. '--dry-run' -> `opts.dry_run`. This allow one to use hyphen
+ in option names (common) but not have to do silly things like
+ `opt["dry-run"]` to access the parsed results.
+
+
+## 1.1.0
+
+- Environment variable integration. Envvars can be associated with an option,
+ then option processing will fallback to using that envvar if defined and
+ if the option isn't specified in argv. See the "Environment variable
+ integration" section in the README.
+
+- Change the `<parser>.parse()` signature to take a single object with keys
+ for arguments. The old signature is still supported.
+
+- `dashdash.createParser(CONFIG)` alternative to `new dashdash.Parser(CONFIG)`
+ a la many node-land APIs.
+
+
+## 1.0.2
+
+- Add "positiveInteger" and "arrayOfPositiveInteger" option types that only
+ accept positive integers.
+
+- Add "integer" and "arrayOfInteger" option types that accepts only integers.
+ Note that, for better or worse, these do NOT accept: "0x42" (hex), "1e2"
+ (with exponent) or "1.", "3.0" (floats).
+
+
+## 1.0.1
+
+- Fix not modifying the given option spec objects (which breaks creating
+ a Parser with them more than once).
+
+
+## 1.0.0
+
+First release.
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/LICENSE.txt
index 6de584a48f..b09f304539 100644
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/LICENSE.txt
@@ -1,20 +1,23 @@
-Copyright Joyent, Inc. and other Node contributors.
+# This is the MIT license
+
+Copyright (c) 2013 Trent Mick. All rights reserved.
+Copyright (c) 2013 Joyent Inc. 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:
+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.
+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/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/etc/dashdash.bash_completion.in b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/etc/dashdash.bash_completion.in
index 50b7d6e0e3..dc333096c8 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/etc/dashdash.bash_completion.in
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/etc/dashdash.bash_completion.in
@@ -264,7 +264,7 @@ function _{{name}}_completer {
# We want *no* completions, i.e. some way to get the active
# 'complete -o default' to not do filename completion.
trace " completing 'none' (hack to imply no completions)"
- echo "##-no completions-##"
+ echo "##-no-completion- -results-##"
elif [[ $argtype == "file" ]]; then
# 'complete -o default' gives the best filename completion, at least
# on Mac.
@@ -278,8 +278,9 @@ function _{{name}}_completer {
completions=$(complete_$argtype "$word")
if [[ -z "$completions" ]]; then
trace " no custom '$argtype' completions"
- # These are in alpha order so they show up correctly.
- echo "##-no -$argtype- completions-##"
+ # These are in ascii and "dictionary" order so they sort
+ # correctly.
+ echo "##-no-completion- -results-##"
else
echo $completions
fi
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
index 03c284deca..9af42e86ac 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
@@ -10,23 +10,23 @@
"spec": ">=1.12.0 <2.0.0",
"type": "range"
},
- "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
+ "/Users/zkat/Documents/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
"_from": "dashdash@>=1.12.0 <2.0.0",
- "_id": "dashdash@1.14.0",
+ "_id": "dashdash@1.14.1",
"_inCache": true,
- "_installable": true,
"_location": "/request/http-signature/sshpk/dashdash",
+ "_nodeVersion": "4.6.1",
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/dashdash-1.14.0.tgz_1464847169030_0.07120498712174594"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/dashdash-1.14.1.tgz_1479854020349_0.731718891998753"
},
"_npmUser": {
"name": "trentm",
"email": "trentm@gmail.com"
},
- "_npmVersion": "1.4.29",
+ "_npmVersion": "2.15.9",
"_phantomChildren": {},
"_requested": {
"raw": "dashdash@^1.12.0",
@@ -40,11 +40,11 @@
"_requiredBy": [
"/request/http-signature/sshpk"
],
- "_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.0.tgz",
- "_shasum": "29e486c5418bf0f356034a993d51686a33e84141",
+ "_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+ "_shasum": "853cfa0f7cbe2fed5de20326b8dd581035f6e2f0",
"_shrinkwrap": null,
"_spec": "dashdash@^1.12.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
"name": "Trent Mick",
"email": "trentm@gmail.com",
@@ -85,14 +85,14 @@
},
"directories": {},
"dist": {
- "shasum": "29e486c5418bf0f356034a993d51686a33e84141",
- "tarball": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.0.tgz"
+ "shasum": "853cfa0f7cbe2fed5de20326b8dd581035f6e2f0",
+ "tarball": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz"
},
"engines": {
"node": ">=0.10"
},
- "gitHead": "2f70d248a509418e4473922ee034faf9cd91b3f8",
- "homepage": "https://github.com/trentm/node-dashdash",
+ "gitHead": "1dd7379640462a21ca6d92502803de830b4acfa2",
+ "homepage": "https://github.com/trentm/node-dashdash#readme",
"keywords": [
"option",
"parser",
@@ -121,5 +121,5 @@
"scripts": {
"test": "nodeunit test/*.test.js"
},
- "version": "1.14.0"
+ "version": "1.14.1"
}
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md b/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md
index 8c0383a61b..31b24e0f4d 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md
+++ b/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md
@@ -1,3 +1,9 @@
+2.1.13 / 2016-11-18
+===================
+
+ * deps: mime-db@~1.25.0
+ - Add new mime types
+
2.1.12 / 2016-09-18
===================
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
index d4796b55ee..01fa85c28e 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
+++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -1,3 +1,13 @@
+1.25.0 / 2016-11-11
+===================
+
+ * Add `application/dicom+json`
+ * Add `application/dicom+xml`
+ * Add `application/vnd.openstreetmap.data+xml`
+ * Add `application/vnd.tri.onesource`
+ * Add `application/yang-data+json`
+ * Add `application/yang-data+xml`
+
1.24.0 / 2016-09-18
===================
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
index 63b226f9c4..94384d313d 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
+++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
@@ -244,6 +244,13 @@
"application/dicom": {
"source": "iana"
},
+ "application/dicom+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/dicom+xml": {
+ "source": "iana"
+ },
"application/dii": {
"source": "iana"
},
@@ -3206,6 +3213,9 @@
"source": "apache",
"extensions": ["oxt"]
},
+ "application/vnd.openstreetmap.data+xml": {
+ "source": "iana"
+ },
"application/vnd.openxmlformats-officedocument.custom-properties+xml": {
"source": "iana"
},
@@ -3949,6 +3959,9 @@
"source": "iana",
"extensions": ["tmo"]
},
+ "application/vnd.tri.onesource": {
+ "source": "iana"
+ },
"application/vnd.trid.tpt": {
"source": "iana",
"extensions": ["tpt"]
@@ -4872,6 +4885,13 @@
"source": "iana",
"extensions": ["yang"]
},
+ "application/yang-data+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/yang-data+xml": {
+ "source": "iana"
+ },
"application/yin+xml": {
"source": "iana",
"extensions": ["yin"]
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
index 658681becd..03b2895e10 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
+++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
@@ -2,49 +2,48 @@
"_args": [
[
{
- "raw": "mime-db@~1.24.0",
+ "raw": "mime-db@~1.25.0",
"scope": null,
"escapedName": "mime-db",
"name": "mime-db",
- "rawSpec": "~1.24.0",
- "spec": ">=1.24.0 <1.25.0",
+ "rawSpec": "~1.25.0",
+ "spec": ">=1.25.0 <1.26.0",
"type": "range"
},
- "/Users/rebecca/code/npm/node_modules/request/node_modules/mime-types"
+ "/Users/zkat/Documents/code/npm/node_modules/request/node_modules/mime-types"
]
],
- "_from": "mime-db@>=1.24.0 <1.25.0",
- "_id": "mime-db@1.24.0",
+ "_from": "mime-db@>=1.25.0 <1.26.0",
+ "_id": "mime-db@1.25.0",
"_inCache": true,
"_location": "/request/mime-types/mime-db",
- "_nodeVersion": "4.5.0",
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/mime-db-1.24.0.tgz_1474198792761_0.7161959335207939"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/mime-db-1.25.0.tgz_1478915345127_0.22604371700435877"
},
"_npmUser": {
"name": "dougwilson",
"email": "doug@somethingdoug.com"
},
- "_npmVersion": "2.15.9",
+ "_npmVersion": "1.4.28",
"_phantomChildren": {},
"_requested": {
- "raw": "mime-db@~1.24.0",
+ "raw": "mime-db@~1.25.0",
"scope": null,
"escapedName": "mime-db",
"name": "mime-db",
- "rawSpec": "~1.24.0",
- "spec": ">=1.24.0 <1.25.0",
+ "rawSpec": "~1.25.0",
+ "spec": ">=1.25.0 <1.26.0",
"type": "range"
},
"_requiredBy": [
"/request/mime-types"
],
- "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.24.0.tgz",
- "_shasum": "e2d13f939f0016c6e4e9ad25a8652f126c467f0c",
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz",
+ "_shasum": "c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392",
"_shrinkwrap": null,
- "_spec": "mime-db@~1.24.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/mime-types",
+ "_spec": "mime-db@~1.25.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/request/node_modules/mime-types",
"bugs": {
"url": "https://github.com/jshttp/mime-db/issues"
},
@@ -71,6 +70,10 @@
"co": "4.6.0",
"cogent": "1.0.1",
"csv-parse": "1.1.7",
+ "eslint": "3.9.1",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.3.0",
+ "eslint-plugin-standard": "2.0.1",
"gnode": "0.1.2",
"istanbul": "0.4.5",
"mocha": "1.21.5",
@@ -79,8 +82,8 @@
},
"directories": {},
"dist": {
- "shasum": "e2d13f939f0016c6e4e9ad25a8652f126c467f0c",
- "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.24.0.tgz"
+ "shasum": "c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392",
+ "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz"
},
"engines": {
"node": ">= 0.6"
@@ -92,8 +95,8 @@
"db.json",
"index.js"
],
- "gitHead": "9dd00b34556a8cdd6f3385f09d4989298c4b86e1",
- "homepage": "https://github.com/jshttp/mime-db#readme",
+ "gitHead": "9a2c710e347b4a7f030aae0d15afc0a06d1c8a37",
+ "homepage": "https://github.com/jshttp/mime-db",
"keywords": [
"mime",
"db",
@@ -124,10 +127,11 @@
"scripts": {
"build": "node scripts/build",
"fetch": "gnode scripts/fetch-apache && gnode scripts/fetch-iana && gnode scripts/fetch-nginx",
+ "lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
"update": "npm run fetch && npm run build"
},
- "version": "1.24.0"
+ "version": "1.25.0"
}
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/package.json b/deps/npm/node_modules/request/node_modules/mime-types/package.json
index 140951c792..75c788f4e1 100644
--- a/deps/npm/node_modules/request/node_modules/mime-types/package.json
+++ b/deps/npm/node_modules/request/node_modules/mime-types/package.json
@@ -10,23 +10,22 @@
"spec": ">=2.1.7 <2.2.0",
"type": "range"
},
- "/Users/rebecca/code/npm/node_modules/request"
+ "/Users/zkat/Documents/code/npm/node_modules/request"
]
],
"_from": "mime-types@>=2.1.7 <2.2.0",
- "_id": "mime-types@2.1.12",
+ "_id": "mime-types@2.1.13",
"_inCache": true,
"_location": "/request/mime-types",
- "_nodeVersion": "4.5.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/mime-types-2.1.12.tgz_1474237415119_0.03028594213537872"
+ "tmp": "tmp/mime-types-2.1.13.tgz_1479505166253_0.5666956284549087"
},
"_npmUser": {
"name": "dougwilson",
"email": "doug@somethingdoug.com"
},
- "_npmVersion": "2.15.9",
+ "_npmVersion": "1.4.28",
"_phantomChildren": {},
"_requested": {
"raw": "mime-types@~2.1.7",
@@ -41,11 +40,11 @@
"/request",
"/request/form-data"
],
- "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.12.tgz",
- "_shasum": "152ba256777020dd4663f54c2e7bc26381e71729",
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz",
+ "_shasum": "e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88",
"_shrinkwrap": null,
"_spec": "mime-types@~2.1.7",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/request",
"bugs": {
"url": "https://github.com/jshttp/mime-types/issues"
},
@@ -66,21 +65,21 @@
}
],
"dependencies": {
- "mime-db": "~1.24.0"
+ "mime-db": "~1.25.0"
},
"description": "The ultimate javascript content-type utility.",
"devDependencies": {
- "eslint": "3.5.0",
- "eslint-config-standard": "6.0.1",
- "eslint-plugin-promise": "2.0.1",
- "eslint-plugin-standard": "2.0.0",
+ "eslint": "3.10.2",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.4.0",
+ "eslint-plugin-standard": "2.0.1",
"istanbul": "0.4.5",
"mocha": "1.21.5"
},
"directories": {},
"dist": {
- "shasum": "152ba256777020dd4663f54c2e7bc26381e71729",
- "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.12.tgz"
+ "shasum": "e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88",
+ "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz"
},
"engines": {
"node": ">= 0.6"
@@ -90,8 +89,8 @@
"LICENSE",
"index.js"
],
- "gitHead": "7193a9094e2efe31da93988350bb0b32ab18b1ea",
- "homepage": "https://github.com/jshttp/mime-types#readme",
+ "gitHead": "83e91a5aea93858bc95ec95a99309592cba0ffe3",
+ "homepage": "https://github.com/jshttp/mime-types",
"keywords": [
"mime",
"types"
@@ -119,10 +118,10 @@
"url": "git+https://github.com/jshttp/mime-types.git"
},
"scripts": {
- "lint": "eslint **/*.js",
+ "lint": "eslint .",
"test": "mocha --reporter spec test/test.js",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
},
- "version": "2.1.12"
+ "version": "2.1.13"
}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/.npmignore b/deps/npm/node_modules/request/node_modules/node-uuid/.npmignore
deleted file mode 100644
index 8886139386..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules
-.DS_Store
-.nyc_output
-coverage
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/README.md b/deps/npm/node_modules/request/node_modules/node-uuid/README.md
deleted file mode 100644
index 5cd8555087..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/README.md
+++ /dev/null
@@ -1,254 +0,0 @@
-# node-uuid
-
-Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
-
-Features:
-
-* Generate RFC4122 version 1 or version 4 UUIDs
-* Runs in node.js and all browsers.
-* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').
-* Cryptographically strong random # generation
- * `crypto.randomBytes(n)` in node.js
- * `window.crypto.getRandomValues(ta)` in [supported browsers](https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues#Browser_Compatibility)
-* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )
-* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)
-* Comes with a Command Line Interface for generating uuids on the command line
-
-## Getting Started
-
-Install it in your browser:
-
-```html
-<script src="uuid.js"></script>
-```
-
-Or in node.js:
-
-```
-npm install node-uuid
-```
-
-```javascript
-var uuid = require('node-uuid');
-```
-
-Then create some ids ...
-
-```javascript
-// Generate a v1 (time-based) id
-uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
-
-// Generate a v4 (random) id
-uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
-```
-
-## API
-
-### uuid.v1([`options` [, `buffer` [, `offset`]]])
-
-Generate and return a RFC4122 v1 (timestamp-based) UUID.
-
-* `options` - (Object) Optional uuid state to apply. Properties may include:
-
- * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.
- * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
- * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.
- * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
-
-* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
-* `offset` - (Number) Starting index in `buffer` at which to begin writing.
-
-Returns `buffer`, if specified, otherwise the string form of the UUID
-
-Notes:
-
-1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
-
-Example: Generate string UUID with fully-specified options
-
-```javascript
-uuid.v1({
- node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
- clockseq: 0x1234,
- msecs: new Date('2011-11-01').getTime(),
- nsecs: 5678
-}); // -> "710b962e-041c-11e1-9234-0123456789ab"
-```
-
-Example: In-place generation of two binary IDs
-
-```javascript
-// Generate two ids in an array
-var arr = new Array(32); // -> []
-uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
-uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
-
-// Optionally use uuid.unparse() to get stringify the ids
-uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'
-uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'
-```
-
-### uuid.v4([`options` [, `buffer` [, `offset`]]])
-
-Generate and return a RFC4122 v4 UUID.
-
-* `options` - (Object) Optional uuid state to apply. Properties may include:
-
- * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
- * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.
-
-* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
-* `offset` - (Number) Starting index in `buffer` at which to begin writing.
-
-Returns `buffer`, if specified, otherwise the string form of the UUID
-
-Example: Generate string UUID with fully-specified options
-
-```javascript
-uuid.v4({
- random: [
- 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
- 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
- ]
-});
-// -> "109156be-c4fb-41ea-b1b4-efe1671c5836"
-```
-
-Example: Generate two IDs in a single buffer
-
-```javascript
-var buffer = new Array(32); // (or 'new Buffer' in node.js)
-uuid.v4(null, buffer, 0);
-uuid.v4(null, buffer, 16);
-```
-
-### uuid.parse(id[, buffer[, offset]])
-### uuid.unparse(buffer[, offset])
-
-Parse and unparse UUIDs
-
- * `id` - (String) UUID(-like) string
- * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used
- * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0
-
-Example parsing and unparsing a UUID string
-
-```javascript
-var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>
-var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'
-```
-
-### uuid.noConflict()
-
-(Browsers only) Set `uuid` property back to it's previous value.
-
-Returns the node-uuid object.
-
-Example:
-
-```javascript
-var myUuid = uuid.noConflict();
-myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
-```
-
-## Deprecated APIs
-
-Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.
-
-### uuid([format [, buffer [, offset]]])
-
-uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).
-
-### uuid.BufferClass
-
-The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.
-
-## Command Line Interface
-
-To use the executable, it's probably best to install this library globally.
-
-`npm install -g node-uuid`
-
-Usage:
-
-```
-USAGE: uuid [version] [options]
-
-
-options:
-
---help Display this message and exit
-```
-
-`version` must be an RFC4122 version that is supported by this library, which is currently version 1 and version 4 (denoted by "v1" and "v4", respectively). `version` defaults to version 4 when not supplied.
-
-### Examples
-
-```
-> uuid
-3a91f950-dec8-4688-ba14-5b7bbfc7a563
-```
-
-```
-> uuid v1
-9d0b43e0-7696-11e3-964b-250efa37a98e
-```
-
-```
-> uuid v4
-6790ac7c-24ac-4f98-8464-42f6d98a53ae
-```
-
-## Testing
-
-In node.js
-
-```
-npm test
-```
-
-In Browser
-
-```
-open test/test.html
-```
-
-### Benchmarking
-
-Requires node.js
-
-```
-npm install uuid uuid-js
-node benchmark/benchmark.js
-```
-
-For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)
-
-For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).
-
-## Release notes
-
-### 1.4.6
-
-* Properly detect node crypto and whatwg crypto
-* Workaround phantomjs/browserify bug
-* Explicit check for `window` rather implicit this-global
-* Issue warning if Math.random() is being used
-* "use strict";
-* A few jshint / stylistic updates (=== and such)
-
-### 1.4.0
-
-* Improved module context detection
-* Removed public RNG functions
-
-### 1.3.2
-
-* Improve tests and handling of v1() options (Issue #24)
-* Expose RNG option to allow for perf testing with different generators
-
-### 1.3.0
-
-* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
-* Support for node.js crypto API
-* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/README.md b/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/README.md
deleted file mode 100644
index aaeb2ea013..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# node-uuid Benchmarks
-
-### Results
-
-To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark
-
-### Run them yourself
-
-node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`.
-
-To prepare and run the benchmark issue;
-
-```
-npm install uuid uuid-js
-node benchmark/benchmark.js
-```
-
-You'll see an output like this one:
-
-```
-# v4
-nodeuuid.v4(): 854700 uuids/second
-nodeuuid.v4('binary'): 788643 uuids/second
-nodeuuid.v4('binary', buffer): 1336898 uuids/second
-uuid(): 479386 uuids/second
-uuid('binary'): 582072 uuids/second
-uuidjs.create(4): 312304 uuids/second
-
-# v1
-nodeuuid.v1(): 938086 uuids/second
-nodeuuid.v1('binary'): 683060 uuids/second
-nodeuuid.v1('binary', buffer): 1644736 uuids/second
-uuidjs.create(1): 190621 uuids/second
-```
-
-* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library.
-* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK.
-
-If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file:
-
-```
-for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done;
-```
-
-If you're interested in how performance varies between different node versions, you can issue the above command multiple times.
-
-You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot:
-
-```
-(cd benchmark/ && ./bench.sh)
-```
-
-This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then.
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu b/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu
deleted file mode 100644
index a342fbbe04..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/opt/local/bin/gnuplot -persist
-#
-#
-# G N U P L O T
-# Version 4.4 patchlevel 3
-# last modified March 2011
-# System: Darwin 10.8.0
-#
-# Copyright (C) 1986-1993, 1998, 2004, 2007-2010
-# Thomas Williams, Colin Kelley and many others
-#
-# gnuplot home: http://www.gnuplot.info
-# faq, bugs, etc: type "help seeking-assistance"
-# immediate help: type "help"
-# plot window: hit 'h'
-set terminal postscript eps noenhanced defaultplex \
- leveldefault color colortext \
- solid linewidth 1.2 butt noclip \
- palfuncparam 2000,0.003 \
- "Helvetica" 14
-set output 'bench.eps'
-unset clip points
-set clip one
-unset clip two
-set bar 1.000000 front
-set border 31 front linetype -1 linewidth 1.000
-set xdata
-set ydata
-set zdata
-set x2data
-set y2data
-set timefmt x "%d/%m/%y,%H:%M"
-set timefmt y "%d/%m/%y,%H:%M"
-set timefmt z "%d/%m/%y,%H:%M"
-set timefmt x2 "%d/%m/%y,%H:%M"
-set timefmt y2 "%d/%m/%y,%H:%M"
-set timefmt cb "%d/%m/%y,%H:%M"
-set boxwidth
-set style fill empty border
-set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1
-set style circle radius graph 0.02, first 0, 0
-set dummy x,y
-set format x "% g"
-set format y "% g"
-set format x2 "% g"
-set format y2 "% g"
-set format z "% g"
-set format cb "% g"
-set angles radians
-unset grid
-set key title ""
-set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox
-set key noinvert samplen 4 spacing 1 width 0 height 0
-set key maxcolumns 2 maxrows 0
-unset label
-unset arrow
-set style increment default
-unset style line
-set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0
-unset style arrow
-set style histogram clustered gap 2 title offset character 0, 0, 0
-unset logscale
-set offsets graph 0.05, 0.15, 0, 0
-set pointsize 1.5
-set pointintervalbox 1
-set encoding default
-unset polar
-unset parametric
-unset decimalsign
-set view 60, 30, 1, 1
-set samples 100, 100
-set isosamples 10, 10
-set surface
-unset contour
-set clabel '%8.3g'
-set mapping cartesian
-set datafile separator whitespace
-unset hidden3d
-set cntrparam order 4
-set cntrparam linear
-set cntrparam levels auto 5
-set cntrparam points 5
-set size ratio 0 1,1
-set origin 0,0
-set style data points
-set style function lines
-set xzeroaxis linetype -2 linewidth 1.000
-set yzeroaxis linetype -2 linewidth 1.000
-set zzeroaxis linetype -2 linewidth 1.000
-set x2zeroaxis linetype -2 linewidth 1.000
-set y2zeroaxis linetype -2 linewidth 1.000
-set ticslevel 0.5
-set mxtics default
-set mytics default
-set mztics default
-set mx2tics default
-set my2tics default
-set mcbtics default
-set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
-set xtics norangelimit
-set xtics ()
-set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
-set ytics autofreq norangelimit
-set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0
-set ztics autofreq norangelimit
-set nox2tics
-set noy2tics
-set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
-set cbtics autofreq norangelimit
-set title ""
-set title offset character 0, 0, 0 font "" norotate
-set timestamp bottom
-set timestamp ""
-set timestamp offset character 0, 0, 0 font "" norotate
-set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] )
-set autoscale rfixmin
-set autoscale rfixmax
-set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
-set autoscale tfixmin
-set autoscale tfixmax
-set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
-set autoscale ufixmin
-set autoscale ufixmax
-set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
-set autoscale vfixmin
-set autoscale vfixmax
-set xlabel ""
-set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
-set x2label ""
-set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate
-set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] )
-set autoscale xfixmin
-set autoscale xfixmax
-set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] )
-set autoscale x2fixmin
-set autoscale x2fixmax
-set ylabel ""
-set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
-set y2label ""
-set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
-set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] )
-set autoscale yfixmin
-set autoscale yfixmax
-set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] )
-set autoscale y2fixmin
-set autoscale y2fixmax
-set zlabel ""
-set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
-set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
-set autoscale zfixmin
-set autoscale zfixmax
-set cblabel ""
-set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
-set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] )
-set autoscale cbfixmin
-set autoscale cbfixmax
-set zero 1e-08
-set lmargin -1
-set bmargin -1
-set rmargin -1
-set tmargin -1
-set pm3d explicit at s
-set pm3d scansautomatic
-set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean
-set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB
-set palette rgbformulae 7, 5, 15
-set colorbox default
-set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault
-set loadpath
-set fontpath
-set fit noerrorvariables
-GNUTERM = "aqua"
-plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2
-# EOF
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.sh b/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.sh
deleted file mode 100755
index d870a0cb09..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# for a given node version run:
-# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done;
-
-PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte')
-FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es)
-INDICES=(2 3 2 3 2 2 2 2 2)
-VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " )
-TMPJOIN="tmp_join"
-OUTPUT="bench_results.txt"
-
-for I in ${!FILES[*]}; do
- F=${FILES[$I]}
- P=${PATTERNS[$I]}
- INDEX=${INDICES[$I]}
- echo "version $F" > $F
- for V in $VERSIONS; do
- (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F
- done
- if [ $I == 0 ]; then
- cat $F > $TMPJOIN
- else
- join $TMPJOIN $F > $OUTPUT
- cp $OUTPUT $TMPJOIN
- fi
- rm $F
-done
-
-rm $TMPJOIN
-
-gnuplot bench.gnu
-convert -density 200 -resize 800x560 -flatten bench.eps bench.png
-rm bench.eps
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c b/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c
deleted file mode 100644
index dbfc75f6d7..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Test performance of native C UUID generation
-
-To Compile: cc -luuid benchmark-native.c -o benchmark-native
-*/
-
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/time.h>
-#include <uuid/uuid.h>
-
-int main() {
- uuid_t myid;
- char buf[36+1];
- int i;
- struct timeval t;
- double start, finish;
-
- gettimeofday(&t, NULL);
- start = t.tv_sec + t.tv_usec/1e6;
-
- int n = 2e5;
- for (i = 0; i < n; i++) {
- uuid_generate(myid);
- uuid_unparse(myid, buf);
- }
-
- gettimeofday(&t, NULL);
- finish = t.tv_sec + t.tv_usec/1e6;
- double dur = finish - start;
-
- printf("%d uuids/sec", (int)(n/dur));
- return 0;
-}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js b/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js
deleted file mode 100644
index 40e6efbe76..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js
+++ /dev/null
@@ -1,84 +0,0 @@
-try {
- var nodeuuid = require('../uuid');
-} catch (e) {
- console.error('node-uuid require failed - skipping tests');
-}
-
-try {
- var uuid = require('uuid');
-} catch (e) {
- console.error('uuid require failed - skipping tests');
-}
-
-try {
- var uuidjs = require('uuid-js');
-} catch (e) {
- console.error('uuid-js require failed - skipping tests');
-}
-
-var N = 5e5;
-
-function rate(msg, t) {
- console.log(msg + ': ' +
- (N / (Date.now() - t) * 1e3 | 0) +
- ' uuids/second');
-}
-
-console.log('# v4');
-
-// node-uuid - string form
-if (nodeuuid) {
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4();
- rate('nodeuuid.v4() - using node.js crypto RNG', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG});
- rate('nodeuuid.v4() - using Math.random() RNG', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary');
- rate('nodeuuid.v4(\'binary\')', t);
-
- var buffer = new nodeuuid.BufferClass(16);
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer);
- rate('nodeuuid.v4(\'binary\', buffer)', t);
-}
-
-// libuuid - string form
-if (uuid) {
- for (var i = 0, t = Date.now(); i < N; i++) uuid();
- rate('uuid()', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) uuid('binary');
- rate('uuid(\'binary\')', t);
-}
-
-// uuid-js - string form
-if (uuidjs) {
- for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4);
- rate('uuidjs.create(4)', t);
-}
-
-// 140byte.es
-for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)});
-rate('140byte.es_v4', t);
-
-console.log('');
-console.log('# v1');
-
-// node-uuid - v1 string form
-if (nodeuuid) {
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1();
- rate('nodeuuid.v1()', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary');
- rate('nodeuuid.v1(\'binary\')', t);
-
- var buffer = new nodeuuid.BufferClass(16);
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer);
- rate('nodeuuid.v1(\'binary\', buffer)', t);
-}
-
-// uuid-js - v1 string form
-if (uuidjs) {
- for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1);
- rate('uuidjs.create(1)', t);
-}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/bower.json b/deps/npm/node_modules/request/node_modules/node-uuid/bower.json
deleted file mode 100644
index c0925e1906..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/bower.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "node-uuid",
- "version": "1.4.7",
- "homepage": "https://github.com/broofa/node-uuid",
- "authors": [
- "Robert Kieffer <robert@broofa.com>"
- ],
- "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
- "main": "uuid.js",
- "keywords": [
- "uuid",
- "gid",
- "rfc4122"
- ],
- "license": "MIT",
- "ignore": [
- "**/.*",
- "node_modules",
- "bower_components",
- "test",
- "tests"
- ]
-}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/component.json b/deps/npm/node_modules/request/node_modules/node-uuid/component.json
deleted file mode 100644
index 3ff463366e..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/component.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "node-uuid",
- "repo": "broofa/node-uuid",
- "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
- "version": "1.4.7",
- "author": "Robert Kieffer <robert@broofa.com>",
- "contributors": [
- {
- "name": "Christoph Tavan <dev@tavan.de>",
- "github": "https://github.com/ctavan"
- }
- ],
- "keywords": [
- "uuid",
- "guid",
- "rfc4122"
- ],
- "dependencies": {},
- "development": {},
- "main": "uuid.js",
- "scripts": [
- "uuid.js"
- ],
- "license": "MIT"
-} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/package.json b/deps/npm/node_modules/request/node_modules/node-uuid/package.json
deleted file mode 100644
index a3a391590c..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/package.json
+++ /dev/null
@@ -1,114 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "node-uuid@~1.4.7",
- "scope": null,
- "escapedName": "node-uuid",
- "name": "node-uuid",
- "rawSpec": "~1.4.7",
- "spec": ">=1.4.7 <1.5.0",
- "type": "range"
- },
- "/Users/rebecca/code/npm/node_modules/request"
- ]
- ],
- "_from": "node-uuid@>=1.4.7 <1.5.0",
- "_id": "node-uuid@1.4.7",
- "_inCache": true,
- "_installable": true,
- "_location": "/request/node-uuid",
- "_nodeVersion": "5.0.0",
- "_npmUser": {
- "name": "coolaj86",
- "email": "coolaj86@gmail.com"
- },
- "_npmVersion": "3.3.6",
- "_phantomChildren": {},
- "_requested": {
- "raw": "node-uuid@~1.4.7",
- "scope": null,
- "escapedName": "node-uuid",
- "name": "node-uuid",
- "rawSpec": "~1.4.7",
- "spec": ">=1.4.7 <1.5.0",
- "type": "range"
- },
- "_requiredBy": [
- "/request"
- ],
- "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz",
- "_shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f",
- "_shrinkwrap": null,
- "_spec": "node-uuid@~1.4.7",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
- "author": {
- "name": "Robert Kieffer",
- "email": "robert@broofa.com"
- },
- "bin": {
- "uuid": "./bin/uuid"
- },
- "bugs": {
- "url": "https://github.com/broofa/node-uuid/issues"
- },
- "contributors": [
- {
- "name": "AJ ONeal",
- "email": "coolaj86@gmail.com"
- },
- {
- "name": "Christoph Tavan",
- "email": "dev@tavan.de"
- }
- ],
- "dependencies": {},
- "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
- "devDependencies": {
- "nyc": "^2.2.0"
- },
- "directories": {},
- "dist": {
- "shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f",
- "tarball": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz"
- },
- "gitHead": "309512573ec1c60143c257157479a20f7f1f51cd",
- "homepage": "https://github.com/broofa/node-uuid",
- "installable": true,
- "keywords": [
- "guid",
- "rfc4122",
- "uuid"
- ],
- "lib": ".",
- "licenses": [
- {
- "type": "MIT",
- "url": "https://raw.github.com/broofa/node-uuid/master/LICENSE.md"
- }
- ],
- "main": "./uuid.js",
- "maintainers": [
- {
- "name": "broofa",
- "email": "robert@broofa.com"
- },
- {
- "name": "coolaj86",
- "email": "coolaj86@gmail.com"
- }
- ],
- "name": "node-uuid",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/broofa/node-uuid.git"
- },
- "scripts": {
- "coverage": "nyc npm test && nyc report",
- "test": "node test/test.js"
- },
- "url": "http://github.com/broofa/node-uuid",
- "version": "1.4.7"
-}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/test/compare_v1.js b/deps/npm/node_modules/request/node_modules/node-uuid/test/compare_v1.js
deleted file mode 100644
index 05af82215f..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/test/compare_v1.js
+++ /dev/null
@@ -1,63 +0,0 @@
-var assert = require('assert'),
- nodeuuid = require('../uuid'),
- uuidjs = require('uuid-js'),
- libuuid = require('uuid').generate,
- util = require('util'),
- exec = require('child_process').exec,
- os = require('os');
-
-// On Mac Os X / macports there's only the ossp-uuid package that provides uuid
-// On Linux there's uuid-runtime which provides uuidgen
-var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t';
-
-function compare(ids) {
- console.log(ids);
- for (var i = 0; i < ids.length; i++) {
- var id = ids[i].split('-');
- id = [id[2], id[1], id[0]].join('');
- ids[i] = id;
- }
- var sorted = ([].concat(ids)).sort();
-
- if (sorted.toString() !== ids.toString()) {
- console.log('Warning: sorted !== ids');
- } else {
- console.log('everything in order!');
- }
-}
-
-// Test time order of v1 uuids
-var ids = [];
-while (ids.length < 10e3) ids.push(nodeuuid.v1());
-
-var max = 10;
-console.log('node-uuid:');
-ids = [];
-for (var i = 0; i < max; i++) ids.push(nodeuuid.v1());
-compare(ids);
-
-console.log('');
-console.log('uuidjs:');
-ids = [];
-for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString());
-compare(ids);
-
-console.log('');
-console.log('libuuid:');
-ids = [];
-var count = 0;
-var last = function() {
- compare(ids);
-}
-var cb = function(err, stdout, stderr) {
- ids.push(stdout.substring(0, stdout.length-1));
- count++;
- if (count < max) {
- return next();
- }
- last();
-};
-var next = function() {
- exec(uuidCmd, cb);
-};
-next();
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/test/test.html b/deps/npm/node_modules/request/node_modules/node-uuid/test/test.html
deleted file mode 100644
index d80326ec5a..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/test/test.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
- <head>
- <style>
- div {
- font-family: monospace;
- font-size: 8pt;
- }
- div.log {color: #444;}
- div.warn {color: #550;}
- div.error {color: #800; font-weight: bold;}
- </style>
- <script src="../uuid.js"></script>
- </head>
- <body>
- <script src="./test.js"></script>
- </body>
-</html>
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/test/test.js b/deps/npm/node_modules/request/node_modules/node-uuid/test/test.js
deleted file mode 100644
index 5f1113d857..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/test/test.js
+++ /dev/null
@@ -1,231 +0,0 @@
-if (!this.uuid) {
- // node.js
- uuid = require('../uuid');
- if (!/_rb/.test(uuid._rng.toString())) {
- throw new Error("should use crypto for node.js");
- }
-}
-
-//
-// x-platform log/assert shims
-//
-
-function _log(msg, type) {
- type = type || 'log';
-
- if (typeof(document) != 'undefined') {
- document.write('<div class="' + type + '">' + msg.replace(/\n/g, '<br />') + '</div>');
- }
- if (typeof(console) != 'undefined') {
- var color = {
- log: '\033[39m',
- warn: '\033[33m',
- error: '\033[31m'
- };
- console[type](color[type] + msg + color.log);
- }
-}
-
-function log(msg) {_log(msg, 'log');}
-function warn(msg) {_log(msg, 'warn');}
-function error(msg) {_log(msg, 'error');}
-
-function assert(res, msg) {
- if (!res) {
- error('FAIL: ' + msg);
- } else {
- log('Pass: ' + msg);
- }
-}
-
-//
-// Unit tests
-//
-
-// Verify ordering of v1 ids created with explicit times
-var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00
-
-function compare(name, ids) {
- ids = ids.map(function(id) {
- return id.split('-').reverse().join('-');
- }).sort();
- var sorted = ([].concat(ids)).sort();
-
- assert(sorted.toString() == ids.toString(), name + ' have expected order');
-}
-
-// Verify ordering of v1 ids created using default behavior
-compare('uuids with current time', [
- uuid.v1(),
- uuid.v1(),
- uuid.v1(),
- uuid.v1(),
- uuid.v1()
-]);
-
-// Verify ordering of v1 ids created with explicit times
-compare('uuids with time option', [
- uuid.v1({msecs: TIME - 10*3600*1000}),
- uuid.v1({msecs: TIME - 1}),
- uuid.v1({msecs: TIME}),
- uuid.v1({msecs: TIME + 1}),
- uuid.v1({msecs: TIME + 28*24*3600*1000})
-]);
-
-assert(
- uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}),
- 'IDs created at same msec are different'
-);
-
-// Verify throw if too many ids created
-var thrown = false;
-try {
- uuid.v1({msecs: TIME, nsecs: 10000});
-} catch (e) {
- thrown = true;
-}
-assert(thrown, 'Exception thrown when > 10K ids created in 1 ms');
-
-// Verify clock regression bumps clockseq
-var uidt = uuid.v1({msecs: TIME});
-var uidtb = uuid.v1({msecs: TIME - 1});
-assert(
- parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1,
- 'Clock regression by msec increments the clockseq'
-);
-
-// Verify clock regression bumps clockseq
-var uidtn = uuid.v1({msecs: TIME, nsecs: 10});
-var uidtnb = uuid.v1({msecs: TIME, nsecs: 9});
-assert(
- parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1,
- 'Clock regression by nsec increments the clockseq'
-);
-
-// Verify explicit options produce expected id
-var id = uuid.v1({
- msecs: 1321651533573,
- nsecs: 5432,
- clockseq: 0x385c,
- node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ]
-});
-assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id');
-
-// Verify adjacent ids across a msec boundary are 1 time unit apart
-var u0 = uuid.v1({msecs: TIME, nsecs: 9999});
-var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0});
-
-var before = u0.split('-')[0], after = u1.split('-')[0];
-var dt = parseInt(after, 16) - parseInt(before, 16);
-assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart');
-
-//
-// Test parse/unparse
-//
-
-id = '00112233445566778899aabbccddeeff';
-assert(uuid.unparse(uuid.parse(id.substr(0,10))) ==
- '00112233-4400-0000-0000-000000000000', 'Short parse');
-assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) ==
- '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse');
-
-//
-// Perf tests
-//
-
-var generators = {
- v1: uuid.v1,
- v4: uuid.v4
-};
-
-var UUID_FORMAT = {
- v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i,
- v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i
-};
-
-var N = 1e4;
-
-// Get %'age an actual value differs from the ideal value
-function divergence(actual, ideal) {
- return Math.round(100*100*(actual - ideal)/ideal)/100;
-}
-
-function rate(msg, t) {
- log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second');
-}
-
-for (var version in generators) {
- var counts = {}, max = 0;
- var generator = generators[version];
- var format = UUID_FORMAT[version];
-
- log('\nSanity check ' + N + ' ' + version + ' uuids');
- for (var i = 0, ok = 0; i < N; i++) {
- id = generator();
- if (!format.test(id)) {
- throw Error(id + ' is not a valid UUID string');
- }
-
- if (id != uuid.unparse(uuid.parse(id))) {
- assert(fail, id + ' is not a valid id');
- }
-
- // Count digits for our randomness check
- if (version == 'v4') {
- var digits = id.replace(/-/g, '').split('');
- for (var j = digits.length-1; j >= 0; j--) {
- var c = digits[j];
- max = Math.max(max, counts[c] = (counts[c] || 0) + 1);
- }
- }
- }
-
- // Check randomness for v4 UUIDs
- if (version == 'v4') {
- // Limit that we get worried about randomness. (Purely empirical choice, this!)
- var limit = 2*100*Math.sqrt(1/N);
-
- log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)');
-
- for (var i = 0; i < 16; i++) {
- var c = i.toString(16);
- var bar = '', n = counts[c], p = Math.round(n/max*100|0);
-
- // 1-3,5-8, and D-F: 1:16 odds over 30 digits
- var ideal = N*30/16;
- if (i == 4) {
- // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits
- ideal = N*(1 + 30/16);
- } else if (i >= 8 && i <= 11) {
- // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits
- ideal = N*(1/4 + 30/16);
- } else {
- // Otherwise: 1:16 odds on 30 digits
- ideal = N*30/16;
- }
- var d = divergence(n, ideal);
-
- // Draw bar using UTF squares (just for grins)
- var s = n/max*50 | 0;
- while (s--) bar += '=';
-
- assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)');
- }
- }
-}
-
-// Perf tests
-for (var version in generators) {
- log('\nPerformance testing ' + version + ' UUIDs');
- var generator = generators[version];
- var buf = new uuid.BufferClass(16);
-
- for (var i = 0, t = Date.now(); i < N; i++) generator();
- rate('uuid.' + version + '()', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) generator('binary');
- rate('uuid.' + version + '(\'binary\')', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf);
- rate('uuid.' + version + '(\'binary\', buffer)', t);
-}
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js b/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js
deleted file mode 100644
index 89c5b8fb61..0000000000
--- a/deps/npm/node_modules/request/node_modules/node-uuid/uuid.js
+++ /dev/null
@@ -1,272 +0,0 @@
-// uuid.js
-//
-// Copyright (c) 2010-2012 Robert Kieffer
-// MIT License - http://opensource.org/licenses/mit-license.php
-
-/*global window, require, define */
-(function(_window) {
- 'use strict';
-
- // Unique ID creation requires a high quality random # generator. We feature
- // detect to determine the best RNG source, normalizing to a function that
- // returns 128-bits of randomness, since that's what's usually required
- var _rng, _mathRNG, _nodeRNG, _whatwgRNG, _previousRoot;
-
- function setupBrowser() {
- // Allow for MSIE11 msCrypto
- var _crypto = _window.crypto || _window.msCrypto;
-
- if (!_rng && _crypto && _crypto.getRandomValues) {
- // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
- //
- // Moderately fast, high quality
- try {
- var _rnds8 = new Uint8Array(16);
- _whatwgRNG = _rng = function whatwgRNG() {
- _crypto.getRandomValues(_rnds8);
- return _rnds8;
- };
- _rng();
- } catch(e) {}
- }
-
- if (!_rng) {
- // Math.random()-based (RNG)
- //
- // If all else fails, use Math.random(). It's fast, but is of unspecified
- // quality.
- var _rnds = new Array(16);
- _mathRNG = _rng = function() {
- for (var i = 0, r; i < 16; i++) {
- if ((i & 0x03) === 0) { r = Math.random() * 0x100000000; }
- _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
- }
-
- return _rnds;
- };
- if ('undefined' !== typeof console && console.warn) {
- console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()");
- }
- }
- }
-
- function setupNode() {
- // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html
- //
- // Moderately fast, high quality
- if ('function' === typeof require) {
- try {
- var _rb = require('crypto').randomBytes;
- _nodeRNG = _rng = _rb && function() {return _rb(16);};
- _rng();
- } catch(e) {}
- }
- }
-
- if (_window) {
- setupBrowser();
- } else {
- setupNode();
- }
-
- // Buffer class to use
- var BufferClass = ('function' === typeof Buffer) ? Buffer : Array;
-
- // Maps for number <-> hex string conversion
- var _byteToHex = [];
- var _hexToByte = {};
- for (var i = 0; i < 256; i++) {
- _byteToHex[i] = (i + 0x100).toString(16).substr(1);
- _hexToByte[_byteToHex[i]] = i;
- }
-
- // **`parse()` - Parse a UUID into it's component bytes**
- function parse(s, buf, offset) {
- var i = (buf && offset) || 0, ii = 0;
-
- buf = buf || [];
- s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {
- if (ii < 16) { // Don't overflow!
- buf[i + ii++] = _hexToByte[oct];
- }
- });
-
- // Zero out remaining bytes if string was short
- while (ii < 16) {
- buf[i + ii++] = 0;
- }
-
- return buf;
- }
-
- // **`unparse()` - Convert UUID byte array (ala parse()) into a string**
- function unparse(buf, offset) {
- var i = offset || 0, bth = _byteToHex;
- return bth[buf[i++]] + bth[buf[i++]] +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] +
- bth[buf[i++]] + bth[buf[i++]] +
- bth[buf[i++]] + bth[buf[i++]];
- }
-
- // **`v1()` - Generate time-based UUID**
- //
- // Inspired by https://github.com/LiosK/UUID.js
- // and http://docs.python.org/library/uuid.html
-
- // random #'s we need to init node and clockseq
- var _seedBytes = _rng();
-
- // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
- var _nodeId = [
- _seedBytes[0] | 0x01,
- _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
- ];
-
- // Per 4.2.2, randomize (14 bit) clockseq
- var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
-
- // Previous uuid creation time
- var _lastMSecs = 0, _lastNSecs = 0;
-
- // See https://github.com/broofa/node-uuid for API details
- function v1(options, buf, offset) {
- var i = buf && offset || 0;
- var b = buf || [];
-
- options = options || {};
-
- var clockseq = (options.clockseq != null) ? options.clockseq : _clockseq;
-
- // UUID timestamps are 100 nano-second units since the Gregorian epoch,
- // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
- // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
- // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
- var msecs = (options.msecs != null) ? options.msecs : new Date().getTime();
-
- // Per 4.2.1.2, use count of uuid's generated during the current clock
- // cycle to simulate higher resolution clock
- var nsecs = (options.nsecs != null) ? options.nsecs : _lastNSecs + 1;
-
- // Time since last uuid creation (in msecs)
- var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
-
- // Per 4.2.1.2, Bump clockseq on clock regression
- if (dt < 0 && options.clockseq == null) {
- clockseq = clockseq + 1 & 0x3fff;
- }
-
- // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
- // time interval
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) {
- nsecs = 0;
- }
-
- // Per 4.2.1.2 Throw error if too many uuids are requested
- if (nsecs >= 10000) {
- throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
- }
-
- _lastMSecs = msecs;
- _lastNSecs = nsecs;
- _clockseq = clockseq;
-
- // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
- msecs += 12219292800000;
-
- // `time_low`
- var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
- b[i++] = tl >>> 24 & 0xff;
- b[i++] = tl >>> 16 & 0xff;
- b[i++] = tl >>> 8 & 0xff;
- b[i++] = tl & 0xff;
-
- // `time_mid`
- var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
- b[i++] = tmh >>> 8 & 0xff;
- b[i++] = tmh & 0xff;
-
- // `time_high_and_version`
- b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
- b[i++] = tmh >>> 16 & 0xff;
-
- // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
- b[i++] = clockseq >>> 8 | 0x80;
-
- // `clock_seq_low`
- b[i++] = clockseq & 0xff;
-
- // `node`
- var node = options.node || _nodeId;
- for (var n = 0; n < 6; n++) {
- b[i + n] = node[n];
- }
-
- return buf ? buf : unparse(b);
- }
-
- // **`v4()` - Generate random UUID**
-
- // See https://github.com/broofa/node-uuid for API details
- function v4(options, buf, offset) {
- // Deprecated - 'format' argument, as supported in v1.2
- var i = buf && offset || 0;
-
- if (typeof(options) === 'string') {
- buf = (options === 'binary') ? new BufferClass(16) : null;
- options = null;
- }
- options = options || {};
-
- var rnds = options.random || (options.rng || _rng)();
-
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
- rnds[6] = (rnds[6] & 0x0f) | 0x40;
- rnds[8] = (rnds[8] & 0x3f) | 0x80;
-
- // Copy bytes to buffer, if provided
- if (buf) {
- for (var ii = 0; ii < 16; ii++) {
- buf[i + ii] = rnds[ii];
- }
- }
-
- return buf || unparse(rnds);
- }
-
- // Export public API
- var uuid = v4;
- uuid.v1 = v1;
- uuid.v4 = v4;
- uuid.parse = parse;
- uuid.unparse = unparse;
- uuid.BufferClass = BufferClass;
- uuid._rng = _rng;
- uuid._mathRNG = _mathRNG;
- uuid._nodeRNG = _nodeRNG;
- uuid._whatwgRNG = _whatwgRNG;
-
- if (('undefined' !== typeof module) && module.exports) {
- // Publish as node.js module
- module.exports = uuid;
- } else if (typeof define === 'function' && define.amd) {
- // Publish as AMD module
- define(function() {return uuid;});
-
-
- } else {
- // Publish as global (in browsers)
- _previousRoot = _window.uuid;
-
- // **`noConflict()` - (browser only) to reset global 'uuid' var**
- uuid.noConflict = function() {
- _window.uuid = _previousRoot;
- return uuid;
- };
-
- _window.uuid = uuid;
- }
-})('undefined' !== typeof window ? window : null);
diff --git a/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md b/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md
index 86bea76388..351edd4e6a 100644
--- a/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md
+++ b/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md
@@ -1,3 +1,17 @@
+## **6.3.0**
+- [New] Add support for RFC 1738 (#174, #173)
+- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159)
+- [Fix] ensure `utils.merge` handles merging two arrays
+- [Refactor] only constructors should be capitalized
+- [Refactor] capitalized var names are for constructors only
+- [Refactor] avoid using a sparse array
+- [Robustness] `formats`: cache `String#replace`
+- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest`
+- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix
+- [Tests] flesh out arrayLimit/arrayFormat tests (#107)
+- [Tests] skip Object.create tests when null objects are not available
+- [Tests] Turn on eslint for test files (#175)
+
## **6.2.1**
- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call`
diff --git a/deps/npm/node_modules/request/node_modules/qs/README.md b/deps/npm/node_modules/request/node_modules/qs/README.md
index 97e390796c..ac1e7f1670 100644
--- a/deps/npm/node_modules/request/node_modules/qs/README.md
+++ b/deps/npm/node_modules/request/node_modules/qs/README.md
@@ -39,11 +39,11 @@ assert.deepEqual(qs.parse('foo[bar]=baz'), {
});
```
-When using the `plainObjects` option the parsed value is returned as a plain object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like:
+When using the `plainObjects` option the parsed value is returned as a null object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like:
```javascript
-var plainObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true });
-assert.deepEqual(plainObject, { a: { hasOwnProperty: 'b' } });
+var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true });
+assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } });
```
By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option.
@@ -290,6 +290,17 @@ The delimiter may be overridden with stringify as well:
assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');
```
+If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option:
+
+```javascript
+var date = new Date(7);
+assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A'));
+assert.equal(
+ qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }),
+ 'a=7'
+);
+```
+
Finally, you can use the `filter` option to restrict which keys will be included in the stringified output.
If you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you
pass an array, it will be used to select properties and array indices for stringification:
@@ -374,3 +385,14 @@ var decoder = require('qs-iconv/decoder')('shift_jis');
var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });
assert.deepEqual(obj, { a: 'こんにちは!' });
```
+
+### RFC 3986 and RFC 1738 space encoding
+
+RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible.
+In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'.
+
+```
+assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
+assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c');
+assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c');
+```
diff --git a/deps/npm/node_modules/request/node_modules/qs/dist/qs.js b/deps/npm/node_modules/request/node_modules/qs/dist/qs.js
index fcf825b584..1a80d2d8bf 100644
--- a/deps/npm/node_modules/request/node_modules/qs/dist/qs.js
+++ b/deps/npm/node_modules/request/node_modules/qs/dist/qs.js
@@ -1,31 +1,53 @@
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';
-var Stringify = require('./stringify');
-var Parse = require('./parse');
+var replace = String.prototype.replace;
+var percentTwenties = /%20/g;
module.exports = {
- stringify: Stringify,
- parse: Parse
+ 'default': 'RFC3986',
+ formatters: {
+ RFC1738: function (value) {
+ return replace.call(value, percentTwenties, '+');
+ },
+ RFC3986: function (value) {
+ return value;
+ }
+ },
+ RFC1738: 'RFC1738',
+ RFC3986: 'RFC3986'
+};
+
+},{}],2:[function(require,module,exports){
+'use strict';
+
+var stringify = require('./stringify');
+var parse = require('./parse');
+var formats = require('./formats');
+
+module.exports = {
+ formats: formats,
+ parse: parse,
+ stringify: stringify
};
-},{"./parse":2,"./stringify":3}],2:[function(require,module,exports){
+},{"./formats":1,"./parse":3,"./stringify":4}],3:[function(require,module,exports){
'use strict';
-var Utils = require('./utils');
+var utils = require('./utils');
var has = Object.prototype.hasOwnProperty;
var defaults = {
+ allowDots: false,
+ allowPrototypes: false,
+ arrayLimit: 20,
+ decoder: utils.decode,
delimiter: '&',
depth: 5,
- arrayLimit: 20,
parameterLimit: 1000,
- strictNullHandling: false,
plainObjects: false,
- allowPrototypes: false,
- allowDots: false,
- decoder: Utils.decode
+ strictNullHandling: false
};
var parseValues = function parseValues(str, options) {
@@ -147,7 +169,7 @@ module.exports = function (str, opts) {
throw new TypeError('Decoder has to be a function.');
}
- options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
+ options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
options.parseArrays = options.parseArrays !== false;
@@ -171,16 +193,17 @@ module.exports = function (str, opts) {
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
var newObj = parseKeys(key, tempObj[key], options);
- obj = Utils.merge(obj, newObj, options);
+ obj = utils.merge(obj, newObj, options);
}
- return Utils.compact(obj);
+ return utils.compact(obj);
};
-},{"./utils":4}],3:[function(require,module,exports){
+},{"./utils":5}],4:[function(require,module,exports){
'use strict';
-var Utils = require('./utils');
+var utils = require('./utils');
+var formats = require('./formats');
var arrayPrefixGenerators = {
brackets: function brackets(prefix) {
@@ -194,20 +217,25 @@ var arrayPrefixGenerators = {
}
};
+var toISO = Date.prototype.toISOString;
+
var defaults = {
delimiter: '&',
- strictNullHandling: false,
- skipNulls: false,
encode: true,
- encoder: Utils.encode
+ encoder: utils.encode,
+ serializeDate: function serializeDate(date) {
+ return toISO.call(date);
+ },
+ skipNulls: false,
+ strictNullHandling: false
};
-var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) {
+var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter) {
var obj = object;
if (typeof filter === 'function') {
obj = filter(prefix, obj);
} else if (obj instanceof Date) {
- obj = obj.toISOString();
+ obj = serializeDate(obj);
} else if (obj === null) {
if (strictNullHandling) {
return encoder ? encoder(prefix) : prefix;
@@ -216,11 +244,11 @@ var stringify = function stringify(object, prefix, generateArrayPrefix, strictNu
obj = '';
}
- if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) {
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
if (encoder) {
- return [encoder(prefix) + '=' + encoder(obj)];
+ return [formatter(encoder(prefix)) + '=' + formatter(encoder(obj))];
}
- return [prefix + '=' + String(obj)];
+ return [formatter(prefix) + '=' + formatter(String(obj))];
}
var values = [];
@@ -245,9 +273,33 @@ var stringify = function stringify(object, prefix, generateArrayPrefix, strictNu
}
if (Array.isArray(obj)) {
- values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ values = values.concat(stringify(
+ obj[key],
+ generateArrayPrefix(prefix, key),
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter
+ ));
} else {
- values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ values = values.concat(stringify(
+ obj[key],
+ prefix + (allowDots ? '.' + key : '[' + key + ']'),
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter
+ ));
}
}
@@ -264,6 +316,13 @@ module.exports = function (object, opts) {
var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null;
var sort = typeof options.sort === 'function' ? options.sort : null;
var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
+ var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
+ if (typeof options.format === 'undefined') {
+ options.format = formats.default;
+ } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
+ throw new TypeError('Unknown format option provided.');
+ }
+ var formatter = formats.formatters[options.format];
var objKeys;
var filter;
@@ -275,7 +334,8 @@ module.exports = function (object, opts) {
filter = options.filter;
obj = filter('', obj);
} else if (Array.isArray(options.filter)) {
- objKeys = filter = options.filter;
+ filter = options.filter;
+ objKeys = filter;
}
var keys = [];
@@ -310,26 +370,40 @@ module.exports = function (object, opts) {
continue;
}
- keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ keys = keys.concat(stringify(
+ obj[key],
+ key,
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter
+ ));
}
return keys.join(delimiter);
};
-},{"./utils":4}],4:[function(require,module,exports){
+},{"./formats":1,"./utils":5}],5:[function(require,module,exports){
'use strict';
+var has = Object.prototype.hasOwnProperty;
+
var hexTable = (function () {
- var array = new Array(256);
+ var array = [];
for (var i = 0; i < 256; ++i) {
- array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
}
return array;
}());
exports.arrayToObject = function (source, options) {
- var obj = options.plainObjects ? Object.create(null) : {};
+ var obj = options && options.plainObjects ? Object.create(null) : {};
for (var i = 0; i < source.length; ++i) {
if (typeof source[i] !== 'undefined') {
obj[i] = source[i];
@@ -365,6 +439,21 @@ exports.merge = function (target, source, options) {
mergeTarget = exports.arrayToObject(target, options);
}
+ if (Array.isArray(target) && Array.isArray(source)) {
+ source.forEach(function (item, i) {
+ if (has.call(target, i)) {
+ if (target[i] && typeof target[i] === 'object') {
+ target[i] = exports.merge(target[i], item, options);
+ } else {
+ target.push(item);
+ }
+ } else {
+ target[i] = item;
+ }
+ });
+ return target;
+ }
+
return Object.keys(source).reduce(function (acc, key) {
var value = source[key];
@@ -462,10 +551,9 @@ exports.compact = function (obj, references) {
}
var keys = Object.keys(obj);
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
+ keys.forEach(function (key) {
obj[key] = exports.compact(obj[key], refs);
- }
+ });
return obj;
};
@@ -482,5 +570,5 @@ exports.isBuffer = function (obj) {
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
};
-},{}]},{},[1])(1)
+},{}]},{},[2])(2)
}); \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/formats.js b/deps/npm/node_modules/request/node_modules/qs/lib/formats.js
new file mode 100644
index 0000000000..df45997529
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/qs/lib/formats.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var replace = String.prototype.replace;
+var percentTwenties = /%20/g;
+
+module.exports = {
+ 'default': 'RFC3986',
+ formatters: {
+ RFC1738: function (value) {
+ return replace.call(value, percentTwenties, '+');
+ },
+ RFC3986: function (value) {
+ return value;
+ }
+ },
+ RFC1738: 'RFC1738',
+ RFC3986: 'RFC3986'
+};
diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/index.js b/deps/npm/node_modules/request/node_modules/qs/lib/index.js
index 190195902a..0d6a97dcf0 100755
--- a/deps/npm/node_modules/request/node_modules/qs/lib/index.js
+++ b/deps/npm/node_modules/request/node_modules/qs/lib/index.js
@@ -1,9 +1,11 @@
'use strict';
-var Stringify = require('./stringify');
-var Parse = require('./parse');
+var stringify = require('./stringify');
+var parse = require('./parse');
+var formats = require('./formats');
module.exports = {
- stringify: Stringify,
- parse: Parse
+ formats: formats,
+ parse: parse,
+ stringify: stringify
};
diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/parse.js b/deps/npm/node_modules/request/node_modules/qs/lib/parse.js
index 8b37cb3b29..97387a6a26 100755
--- a/deps/npm/node_modules/request/node_modules/qs/lib/parse.js
+++ b/deps/npm/node_modules/request/node_modules/qs/lib/parse.js
@@ -1,19 +1,19 @@
'use strict';
-var Utils = require('./utils');
+var utils = require('./utils');
var has = Object.prototype.hasOwnProperty;
var defaults = {
+ allowDots: false,
+ allowPrototypes: false,
+ arrayLimit: 20,
+ decoder: utils.decode,
delimiter: '&',
depth: 5,
- arrayLimit: 20,
parameterLimit: 1000,
- strictNullHandling: false,
plainObjects: false,
- allowPrototypes: false,
- allowDots: false,
- decoder: Utils.decode
+ strictNullHandling: false
};
var parseValues = function parseValues(str, options) {
@@ -135,7 +135,7 @@ module.exports = function (str, opts) {
throw new TypeError('Decoder has to be a function.');
}
- options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
+ options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
options.parseArrays = options.parseArrays !== false;
@@ -159,8 +159,8 @@ module.exports = function (str, opts) {
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
var newObj = parseKeys(key, tempObj[key], options);
- obj = Utils.merge(obj, newObj, options);
+ obj = utils.merge(obj, newObj, options);
}
- return Utils.compact(obj);
+ return utils.compact(obj);
};
diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js b/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js
index 6e1c9a263c..88cd791064 100755
--- a/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js
+++ b/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js
@@ -1,6 +1,7 @@
'use strict';
-var Utils = require('./utils');
+var utils = require('./utils');
+var formats = require('./formats');
var arrayPrefixGenerators = {
brackets: function brackets(prefix) {
@@ -14,20 +15,25 @@ var arrayPrefixGenerators = {
}
};
+var toISO = Date.prototype.toISOString;
+
var defaults = {
delimiter: '&',
- strictNullHandling: false,
- skipNulls: false,
encode: true,
- encoder: Utils.encode
+ encoder: utils.encode,
+ serializeDate: function serializeDate(date) {
+ return toISO.call(date);
+ },
+ skipNulls: false,
+ strictNullHandling: false
};
-var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) {
+var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter) {
var obj = object;
if (typeof filter === 'function') {
obj = filter(prefix, obj);
} else if (obj instanceof Date) {
- obj = obj.toISOString();
+ obj = serializeDate(obj);
} else if (obj === null) {
if (strictNullHandling) {
return encoder ? encoder(prefix) : prefix;
@@ -36,11 +42,11 @@ var stringify = function stringify(object, prefix, generateArrayPrefix, strictNu
obj = '';
}
- if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) {
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
if (encoder) {
- return [encoder(prefix) + '=' + encoder(obj)];
+ return [formatter(encoder(prefix)) + '=' + formatter(encoder(obj))];
}
- return [prefix + '=' + String(obj)];
+ return [formatter(prefix) + '=' + formatter(String(obj))];
}
var values = [];
@@ -65,9 +71,33 @@ var stringify = function stringify(object, prefix, generateArrayPrefix, strictNu
}
if (Array.isArray(obj)) {
- values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ values = values.concat(stringify(
+ obj[key],
+ generateArrayPrefix(prefix, key),
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter
+ ));
} else {
- values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ values = values.concat(stringify(
+ obj[key],
+ prefix + (allowDots ? '.' + key : '[' + key + ']'),
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter
+ ));
}
}
@@ -84,6 +114,13 @@ module.exports = function (object, opts) {
var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null;
var sort = typeof options.sort === 'function' ? options.sort : null;
var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
+ var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
+ if (typeof options.format === 'undefined') {
+ options.format = formats.default;
+ } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
+ throw new TypeError('Unknown format option provided.');
+ }
+ var formatter = formats.formatters[options.format];
var objKeys;
var filter;
@@ -95,7 +132,8 @@ module.exports = function (object, opts) {
filter = options.filter;
obj = filter('', obj);
} else if (Array.isArray(options.filter)) {
- objKeys = filter = options.filter;
+ filter = options.filter;
+ objKeys = filter;
}
var keys = [];
@@ -130,7 +168,19 @@ module.exports = function (object, opts) {
continue;
}
- keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ keys = keys.concat(stringify(
+ obj[key],
+ key,
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter
+ ));
}
return keys.join(delimiter);
diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/utils.js b/deps/npm/node_modules/request/node_modules/qs/lib/utils.js
index 2c5c8ee503..33c01c000d 100755
--- a/deps/npm/node_modules/request/node_modules/qs/lib/utils.js
+++ b/deps/npm/node_modules/request/node_modules/qs/lib/utils.js
@@ -1,16 +1,18 @@
'use strict';
+var has = Object.prototype.hasOwnProperty;
+
var hexTable = (function () {
- var array = new Array(256);
+ var array = [];
for (var i = 0; i < 256; ++i) {
- array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
}
return array;
}());
exports.arrayToObject = function (source, options) {
- var obj = options.plainObjects ? Object.create(null) : {};
+ var obj = options && options.plainObjects ? Object.create(null) : {};
for (var i = 0; i < source.length; ++i) {
if (typeof source[i] !== 'undefined') {
obj[i] = source[i];
@@ -46,6 +48,21 @@ exports.merge = function (target, source, options) {
mergeTarget = exports.arrayToObject(target, options);
}
+ if (Array.isArray(target) && Array.isArray(source)) {
+ source.forEach(function (item, i) {
+ if (has.call(target, i)) {
+ if (target[i] && typeof target[i] === 'object') {
+ target[i] = exports.merge(target[i], item, options);
+ } else {
+ target.push(item);
+ }
+ } else {
+ target[i] = item;
+ }
+ });
+ return target;
+ }
+
return Object.keys(source).reduce(function (acc, key) {
var value = source[key];
@@ -143,10 +160,9 @@ exports.compact = function (obj, references) {
}
var keys = Object.keys(obj);
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
+ keys.forEach(function (key) {
obj[key] = exports.compact(obj[key], refs);
- }
+ });
return obj;
};
diff --git a/deps/npm/node_modules/request/node_modules/qs/package.json b/deps/npm/node_modules/request/node_modules/qs/package.json
index 64853dbde4..c33dcd0b58 100644
--- a/deps/npm/node_modules/request/node_modules/qs/package.json
+++ b/deps/npm/node_modules/request/node_modules/qs/package.json
@@ -2,26 +2,25 @@
"_args": [
[
{
- "raw": "qs@~6.2.0",
+ "raw": "qs@~6.3.0",
"scope": null,
"escapedName": "qs",
"name": "qs",
- "rawSpec": "~6.2.0",
- "spec": ">=6.2.0 <6.3.0",
+ "rawSpec": "~6.3.0",
+ "spec": ">=6.3.0 <6.4.0",
"type": "range"
},
- "/Users/rebecca/code/npm/node_modules/request"
+ "/Users/ogd/Documents/projects/npm/npm/node_modules/request"
]
],
- "_from": "qs@>=6.2.0 <6.3.0",
- "_id": "qs@6.2.1",
+ "_from": "qs@>=6.3.0 <6.4.0",
+ "_id": "qs@6.3.0",
"_inCache": true,
- "_installable": true,
"_location": "/request/qs",
- "_nodeVersion": "6.3.0",
+ "_nodeVersion": "6.6.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/qs-6.2.1.tgz_1469044929716_0.06957711698487401"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/qs-6.3.0.tgz_1476663988179_0.7400497454218566"
},
"_npmUser": {
"name": "ljharb",
@@ -30,22 +29,22 @@
"_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
- "raw": "qs@~6.2.0",
+ "raw": "qs@~6.3.0",
"scope": null,
"escapedName": "qs",
"name": "qs",
- "rawSpec": "~6.2.0",
- "spec": ">=6.2.0 <6.3.0",
+ "rawSpec": "~6.3.0",
+ "spec": ">=6.3.0 <6.4.0",
"type": "range"
},
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz",
- "_shasum": "ce03c5ff0935bc1d9d69a9f14cbd18e568d67625",
+ "_resolved": "https://registry.npmjs.org/qs/-/qs-6.3.0.tgz",
+ "_shasum": "f403b264f23bc01228c74131b407f18d5ea5d442",
"_shrinkwrap": null,
- "_spec": "qs@~6.2.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_spec": "qs@~6.3.0",
+ "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request",
"bugs": {
"url": "https://github.com/ljharb/qs/issues"
},
@@ -59,26 +58,27 @@
"dependencies": {},
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
"devDependencies": {
- "@ljharb/eslint-config": "^6.0.0",
- "browserify": "^13.0.1",
+ "@ljharb/eslint-config": "^8.0.0",
+ "browserify": "^13.1.0",
"covert": "^1.1.0",
- "eslint": "^3.1.0",
+ "eslint": "^3.8.0",
"evalmd": "^0.0.17",
"iconv-lite": "^0.4.13",
"mkdirp": "^0.5.1",
"parallelshell": "^2.0.0",
"qs-iconv": "^1.0.3",
- "tape": "^4.6.0"
+ "safe-publish-latest": "^1.1.1",
+ "tape": "^4.6.2"
},
"directories": {},
"dist": {
- "shasum": "ce03c5ff0935bc1d9d69a9f14cbd18e568d67625",
- "tarball": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz"
+ "shasum": "f403b264f23bc01228c74131b407f18d5ea5d442",
+ "tarball": "https://registry.npmjs.org/qs/-/qs-6.3.0.tgz"
},
"engines": {
"node": ">=0.6"
},
- "gitHead": "335f839142e6c2c69f5302c4940d92acb0e77561",
+ "gitHead": "8aa9c26f90335b5483a4f456dea9acbada8a881c",
"homepage": "https://github.com/ljharb/qs",
"keywords": [
"querystring",
@@ -110,12 +110,12 @@
"scripts": {
"coverage": "covert test",
"dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js",
- "lint": "eslint lib/*.js text/*.js",
- "prepublish": "npm run dist",
+ "lint": "eslint lib/*.js test/*.js",
+ "prepublish": "safe-publish-latest && npm run dist",
"pretest": "npm run --silent readme && npm run --silent lint",
"readme": "evalmd README.md",
"test": "npm run --silent coverage",
"tests-only": "node test"
},
- "version": "6.2.1"
+ "version": "6.3.0"
}
diff --git a/deps/npm/node_modules/request/node_modules/qs/test/index.js b/deps/npm/node_modules/request/node_modules/qs/test/index.js
index b6a7d9526a..5e6bc8fbd9 100644
--- a/deps/npm/node_modules/request/node_modules/qs/test/index.js
+++ b/deps/npm/node_modules/request/node_modules/qs/test/index.js
@@ -1,3 +1,5 @@
+'use strict';
+
require('./parse');
require('./stringify');
diff --git a/deps/npm/node_modules/request/node_modules/qs/test/parse.js b/deps/npm/node_modules/request/node_modules/qs/test/parse.js
index ccf8c8c4c5..3a9611ed99 100755
--- a/deps/npm/node_modules/request/node_modules/qs/test/parse.js
+++ b/deps/npm/node_modules/request/node_modules/qs/test/parse.js
@@ -6,7 +6,7 @@ var iconv = require('iconv-lite');
test('parse()', function (t) {
t.test('parses a simple string', function (st) {
- st.deepEqual(qs.parse('0=foo'), { '0': 'foo' });
+ st.deepEqual(qs.parse('0=foo'), { 0: 'foo' });
st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' });
st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } });
st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } });
@@ -64,8 +64,15 @@ test('parse()', function (t) {
st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] });
st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] });
st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a[1]=b&a=c'), { a: ['b', 'c'] });
- st.deepEqual(qs.parse('a=b&a[1]=c'), { a: ['b', 'c'] });
+
+ st.deepEqual(qs.parse('a[1]=b&a=c', { arrayLimit: 20 }), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[]=b&a=c', { arrayLimit: 0 }), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] });
+
+ st.deepEqual(qs.parse('a=b&a[1]=c', { arrayLimit: 20 }), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a=b&a[]=c', { arrayLimit: 0 }), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] });
+
st.end();
});
@@ -78,13 +85,15 @@ test('parse()', function (t) {
t.test('allows to specify array indices', function (st) {
st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] });
st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 20 }), { a: ['c'] });
+ st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 0 }), { a: { 1: 'c' } });
st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] });
st.end();
});
- t.test('limits specific array indices to 20', function (st) {
- st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] });
- st.deepEqual(qs.parse('a[21]=a'), { a: { '21': 'a' } });
+ t.test('limits specific array indices to arrayLimit', function (st) {
+ st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: ['a'] });
+ st.deepEqual(qs.parse('a[21]=a', { arrayLimit: 20 }), { a: { 21: 'a' } });
st.end();
});
@@ -115,17 +124,17 @@ test('parse()', function (t) {
});
t.test('transforms arrays to objects', function (st) {
- st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } });
- st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', '0': 'bar' } });
- st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', '0': 'bar' } });
- st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } });
- st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
+ st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', 0: 'bar' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', 0: 'bar' } });
+ st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } });
st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
- st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { '0': 'b', c: true, t: 'u' } });
- st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { '0': 'b', t: 'u', hasOwnProperty: 'c' } });
- st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { '0': 'b', '1': 'c', x: 'y' } });
- st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { '0': 'b', hasOwnProperty: 'c', x: 'y' } });
+ st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { 0: 'b', c: true, t: 'u' } });
+ st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { 0: 'b', t: 'u', hasOwnProperty: 'c' } });
+ st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { 0: 'b', 1: 'c', x: 'y' } });
+ st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { 0: 'b', hasOwnProperty: 'c', x: 'y' } });
st.end();
});
@@ -135,10 +144,10 @@ test('parse()', function (t) {
st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } });
st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] });
st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] });
- st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } });
- st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } });
- st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { '0': 'bar', bad: 'baz' } });
- st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } });
+ st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { 0: 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } });
st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
st.end();
});
@@ -146,7 +155,7 @@ test('parse()', function (t) {
t.deepEqual(qs.parse('a[b]=c&a=d'), { a: { b: 'c', d: true } }, 'can add keys to objects');
t.test('correctly prunes undefined values when converting an array to an object', function (st) {
- st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { '2': 'b', '99999999': 'c' } });
+ st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { 2: 'b', 99999999: 'c' } });
st.end();
});
@@ -158,7 +167,7 @@ test('parse()', function (t) {
});
t.test('doesn\'t produce empty keys', function (st) {
- st.deepEqual(qs.parse('_r=1&'), { '_r': '1' });
+ st.deepEqual(qs.parse('_r=1&'), { _r: '1' });
st.end();
});
@@ -209,10 +218,10 @@ test('parse()', function (t) {
});
t.test('compacts sparse arrays', function (st) {
- st.deepEqual(qs.parse('a[10]=1&a[2]=2'), { a: ['2', '1'] });
- st.deepEqual(qs.parse('a[1][b][2][c]=1'), { a: [{ b: [{ c: '1' }] }] });
- st.deepEqual(qs.parse('a[1][2][3][c]=1'), { a: [[[{ c: '1' }]]] });
- st.deepEqual(qs.parse('a[1][2][3][c][1]=1'), { a: [[[{ c: ['1'] }]]] });
+ st.deepEqual(qs.parse('a[10]=1&a[2]=2', { arrayLimit: 20 }), { a: ['2', '1'] });
+ st.deepEqual(qs.parse('a[1][b][2][c]=1', { arrayLimit: 20 }), { a: [{ b: [{ c: '1' }] }] });
+ st.deepEqual(qs.parse('a[1][2][3][c]=1', { arrayLimit: 20 }), { a: [[[{ c: '1' }]]] });
+ st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { arrayLimit: 20 }), { a: [[[{ c: ['1'] }]]] });
st.end();
});
@@ -229,8 +238,8 @@ test('parse()', function (t) {
});
t.test('continues parsing when no parent is found', function (st) {
- st.deepEqual(qs.parse('[]=&a=b'), { '0': '', a: 'b' });
- st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { '0': null, a: 'b' });
+ st.deepEqual(qs.parse('[]=&a=b'), { 0: '', a: 'b' });
+ st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { 0: null, a: 'b' });
st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' });
st.end();
});
@@ -241,7 +250,9 @@ test('parse()', function (t) {
str = str + '&' + str;
}
- st.doesNotThrow(function () { qs.parse(str); });
+ st.doesNotThrow(function () {
+ qs.parse(str);
+ });
st.end();
});
@@ -284,14 +295,14 @@ test('parse()', function (t) {
});
t.test('allows overriding array limit', function (st) {
- st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { '0': 'b' } });
+ st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { 0: 'b' } });
st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } });
- st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { '0': 'b', '1': 'c' } });
+ st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } });
st.end();
});
t.test('allows disabling array parsing', function (st) {
- st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { '0': 'b', '1': 'c' } });
+ st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { 0: 'b', 1: 'c' } });
st.end();
});
@@ -335,13 +346,13 @@ test('parse()', function (t) {
t.test('parses an object and not child values', function (st) {
var input = {
- 'user[name]': { 'pop[bob]': { 'test': 3 } },
+ 'user[name]': { 'pop[bob]': { test: 3 } },
'user[email]': null
};
var expected = {
user: {
- name: { 'pop[bob]': { 'test': 3 } },
+ name: { 'pop[bob]': { test: 3 } },
email: null
}
};
@@ -379,7 +390,7 @@ test('parse()', function (t) {
st.end();
});
- t.test('parses plain objects correctly', function (st) {
+ t.test('parses null objects correctly', { skip: !Object.create }, function (st) {
var a = Object.create(null);
a.b = 'c';
@@ -408,7 +419,7 @@ test('parse()', function (t) {
st.end();
});
- t.test('can return plain objects', function (st) {
+ t.test('can return null objects', { skip: !Object.create }, function (st) {
var expected = Object.create(null);
expected.a = Object.create(null);
expected.a.b = 'c';
@@ -417,7 +428,7 @@ test('parse()', function (t) {
st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null));
var expectedArray = Object.create(null);
expectedArray.a = Object.create(null);
- expectedArray.a['0'] = 'b';
+ expectedArray.a[0] = 'b';
expectedArray.a.c = 'd';
st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray);
st.end();
@@ -426,13 +437,12 @@ test('parse()', function (t) {
t.test('can parse with custom encoding', function (st) {
st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', {
decoder: function (str) {
- var reg = /\%([0-9A-F]{2})/ig;
+ var reg = /%([0-9A-F]{2})/ig;
var result = [];
- var parts;
- var last = 0;
- while (parts = reg.exec(str)) {
+ var parts = reg.exec(str);
+ while (parts) {
result.push(parseInt(parts[1], 16));
- last = parts.index + parts[0].length;
+ parts = reg.exec(str);
}
return iconv.decode(new Buffer(result), 'shift_jis').toString();
}
@@ -442,9 +452,7 @@ test('parse()', function (t) {
t.test('throws error with wrong decoder', function (st) {
st.throws(function () {
- qs.parse({}, {
- decoder: 'string'
- });
+ qs.parse({}, { decoder: 'string' });
}, new TypeError('Decoder has to be a function.'));
st.end();
});
diff --git a/deps/npm/node_modules/request/node_modules/qs/test/stringify.js b/deps/npm/node_modules/request/node_modules/qs/test/stringify.js
index 699397e334..8818eaca84 100755
--- a/deps/npm/node_modules/request/node_modules/qs/test/stringify.js
+++ b/deps/npm/node_modules/request/node_modules/qs/test/stringify.js
@@ -30,7 +30,21 @@ test('stringify()', function (t) {
});
t.test('stringifies an array value', function (st) {
- st.equal(qs.stringify({ a: ['b', 'c', 'd'] }), 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d');
+ st.equal(
+ qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'indices' }),
+ 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d',
+ 'indices => indices'
+ );
+ st.equal(
+ qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'brackets' }),
+ 'a%5B%5D=b&a%5B%5D=c&a%5B%5D=d',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify({ a: ['b', 'c', 'd'] }),
+ 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d',
+ 'default => indices'
+ );
st.end();
});
@@ -39,7 +53,6 @@ test('stringify()', function (t) {
st.end();
});
-
t.test('omits nested nulls when asked', function (st) {
st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c');
st.end();
@@ -51,29 +64,149 @@ test('stringify()', function (t) {
});
t.test('stringifies a nested array value', function (st) {
+ st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'indices' }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
+ st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'brackets' }), 'a%5Bb%5D%5B%5D=c&a%5Bb%5D%5B%5D=d');
st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
st.end();
});
t.test('stringifies a nested array value with dots notation', function (st) {
- st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { allowDots: true, encode: false }), 'a.b[0]=c&a.b[1]=d');
+ st.equal(
+ qs.stringify(
+ { a: { b: ['c', 'd'] } },
+ { allowDots: true, encode: false, arrayFormat: 'indices' }
+ ),
+ 'a.b[0]=c&a.b[1]=d',
+ 'indices: stringifies with dots + indices'
+ );
+ st.equal(
+ qs.stringify(
+ { a: { b: ['c', 'd'] } },
+ { allowDots: true, encode: false, arrayFormat: 'brackets' }
+ ),
+ 'a.b[]=c&a.b[]=d',
+ 'brackets: stringifies with dots + brackets'
+ );
+ st.equal(
+ qs.stringify(
+ { a: { b: ['c', 'd'] } },
+ { allowDots: true, encode: false }
+ ),
+ 'a.b[0]=c&a.b[1]=d',
+ 'default: stringifies with dots + indices'
+ );
st.end();
});
t.test('stringifies an object inside an array', function (st) {
- st.equal(qs.stringify({ a: [{ b: 'c' }] }), 'a%5B0%5D%5Bb%5D=c');
- st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }), 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1');
+ st.equal(
+ qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'indices' }),
+ 'a%5B0%5D%5Bb%5D=c',
+ 'indices => brackets'
+ );
+ st.equal(
+ qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'brackets' }),
+ 'a%5B%5D%5Bb%5D=c',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify({ a: [{ b: 'c' }] }),
+ 'a%5B0%5D%5Bb%5D=c',
+ 'default => indices'
+ );
+
+ st.equal(
+ qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'indices' }),
+ 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1',
+ 'indices => indices'
+ );
+
+ st.equal(
+ qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'brackets' }),
+ 'a%5B%5D%5Bb%5D%5Bc%5D%5B%5D=1',
+ 'brackets => brackets'
+ );
+
+ st.equal(
+ qs.stringify({ a: [{ b: { c: [1] } }] }),
+ 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1',
+ 'default => indices'
+ );
+
st.end();
});
t.test('stringifies an array with mixed objects and primitives', function (st) {
- st.equal(qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }), 'a[0][b]=1&a[1]=2&a[2]=3');
+ st.equal(
+ qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false, arrayFormat: 'indices' }),
+ 'a[0][b]=1&a[1]=2&a[2]=3',
+ 'indices => indices'
+ );
+ st.equal(
+ qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false, arrayFormat: 'brackets' }),
+ 'a[][b]=1&a[]=2&a[]=3',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }),
+ 'a[0][b]=1&a[1]=2&a[2]=3',
+ 'default => indices'
+ );
+
st.end();
});
t.test('stringifies an object inside an array with dots notation', function (st) {
- st.equal(qs.stringify({ a: [{ b: 'c' }] }, { allowDots: true, encode: false }), 'a[0].b=c');
- st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }, { allowDots: true, encode: false }), 'a[0].b.c[0]=1');
+ st.equal(
+ qs.stringify(
+ { a: [{ b: 'c' }] },
+ { allowDots: true, encode: false, arrayFormat: 'indices' }
+ ),
+ 'a[0].b=c',
+ 'indices => indices'
+ );
+ st.equal(
+ qs.stringify(
+ { a: [{ b: 'c' }] },
+ { allowDots: true, encode: false, arrayFormat: 'brackets' }
+ ),
+ 'a[].b=c',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify(
+ { a: [{ b: 'c' }] },
+ { allowDots: true, encode: false }
+ ),
+ 'a[0].b=c',
+ 'default => indices'
+ );
+
+ st.equal(
+ qs.stringify(
+ { a: [{ b: { c: [1] } }] },
+ { allowDots: true, encode: false, arrayFormat: 'indices' }
+ ),
+ 'a[0].b.c[0]=1',
+ 'indices => indices'
+ );
+ st.equal(
+ qs.stringify(
+ { a: [{ b: { c: [1] } }] },
+ { allowDots: true, encode: false, arrayFormat: 'brackets' }
+ ),
+ 'a[].b.c[]=1',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify(
+ { a: [{ b: { c: [1] } }] },
+ { allowDots: true, encode: false }
+ ),
+ 'a[0].b.c[0]=1',
+ 'default => indices'
+ );
+
st.end();
});
@@ -126,7 +259,7 @@ test('stringify()', function (t) {
st.end();
});
- t.test('stringifies an empty object', function (st) {
+ t.test('stringifies a null object', { skip: !Object.create }, function (st) {
var obj = Object.create(null);
obj.a = 'b';
st.equal(qs.stringify(obj), 'a=b');
@@ -141,10 +274,8 @@ test('stringify()', function (t) {
st.end();
});
- t.test('stringifies an object with an empty object as a child', function (st) {
- var obj = {
- a: Object.create(null)
- };
+ t.test('stringifies an object with a null object as a child', { skip: !Object.create }, function (st) {
+ var obj = { a: Object.create(null) };
obj.a.b = 'c';
st.equal(qs.stringify(obj), 'a%5Bb%5D=c');
@@ -216,7 +347,32 @@ test('stringify()', function (t) {
t.test('selects properties when filter=array', function (st) {
st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b');
st.equal(qs.stringify({ a: 1 }, { filter: [] }), '');
- st.equal(qs.stringify({ a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, { filter: ['a', 'b', 0, 2] }), 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3');
+
+ st.equal(
+ qs.stringify(
+ { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' },
+ { filter: ['a', 'b', 0, 2], arrayFormat: 'indices' }
+ ),
+ 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3',
+ 'indices => indices'
+ );
+ st.equal(
+ qs.stringify(
+ { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' },
+ { filter: ['a', 'b', 0, 2], arrayFormat: 'brackets' }
+ ),
+ 'a%5Bb%5D%5B%5D=1&a%5Bb%5D%5B%5D=3',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify(
+ { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' },
+ { filter: ['a', 'b', 0, 2] }
+ ),
+ 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3',
+ 'default => indices'
+ );
+
st.end();
});
@@ -224,7 +380,7 @@ test('stringify()', function (t) {
var calls = 0;
var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } };
var filterFunc = function (prefix, value) {
- calls++;
+ calls += 1;
if (calls === 1) {
st.equal(prefix, '', 'prefix is empty');
st.equal(value, obj);
@@ -250,28 +406,44 @@ test('stringify()', function (t) {
});
t.test('can sort the keys', function (st) {
- var sort = function (a, b) { return a.localeCompare(b); };
+ var sort = function (a, b) {
+ return a.localeCompare(b);
+ };
st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y');
st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a');
st.end();
});
t.test('can sort the keys at depth 3 or more too', function (st) {
- var sort = function (a, b) { return a.localeCompare(b); };
- st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: sort, encode: false }), 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb');
- st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: null, encode: false }), 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b');
+ var sort = function (a, b) {
+ return a.localeCompare(b);
+ };
+ st.equal(
+ qs.stringify(
+ { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' },
+ { sort: sort, encode: false }
+ ),
+ 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb'
+ );
+ st.equal(
+ qs.stringify(
+ { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' },
+ { sort: null, encode: false }
+ ),
+ 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b'
+ );
st.end();
});
t.test('can stringify with custom encoding', function (st) {
- st.equal(qs.stringify({ 県: '大阪府', '': ''}, {
+ st.equal(qs.stringify({ 県: '大阪府', '': '' }, {
encoder: function (str) {
if (str.length === 0) {
return '';
}
var buf = iconv.encode(str, 'shiftjis');
var result = [];
- for (var i=0; i < buf.length; ++i) {
+ for (var i = 0; i < buf.length; ++i) {
result.push(buf.readUInt8(i).toString(16));
}
return '%' + result.join('%');
@@ -282,16 +454,12 @@ test('stringify()', function (t) {
t.test('throws error with wrong encoder', function (st) {
st.throws(function () {
- qs.stringify({}, {
- encoder: 'string'
- });
+ qs.stringify({}, { encoder: 'string' });
}, new TypeError('Encoder has to be a function.'));
st.end();
});
- t.test('can use custom encoder for a buffer object', {
- skip: typeof Buffer === 'undefined'
- }, function (st) {
+ t.test('can use custom encoder for a buffer object', { skip: typeof Buffer === 'undefined' }, function (st) {
st.equal(qs.stringify({ a: new Buffer([1]) }, {
encoder: function (buffer) {
if (typeof buffer === 'string') {
@@ -302,4 +470,69 @@ test('stringify()', function (t) {
}), 'a=b');
st.end();
});
+
+ t.test('serializeDate option', function (st) {
+ var date = new Date();
+ st.equal(
+ qs.stringify({ a: date }),
+ 'a=' + date.toISOString().replace(/:/g, '%3A'),
+ 'default is toISOString'
+ );
+
+ var mutatedDate = new Date();
+ mutatedDate.toISOString = function () {
+ throw new SyntaxError();
+ };
+ st.throws(function () {
+ mutatedDate.toISOString();
+ }, SyntaxError);
+ st.equal(
+ qs.stringify({ a: mutatedDate }),
+ 'a=' + Date.prototype.toISOString.call(mutatedDate).replace(/:/g, '%3A'),
+ 'toISOString works even when method is not locally present'
+ );
+
+ var specificDate = new Date(6);
+ st.equal(
+ qs.stringify(
+ { a: specificDate },
+ { serializeDate: function (d) { return d.getTime() * 7; } }
+ ),
+ 'a=42',
+ 'custom serializeDate function called'
+ );
+
+ st.end();
+ });
+
+ t.test('RFC 1738 spaces serialization', function (st) {
+ st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c');
+ st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d');
+ st.end();
+ });
+
+ t.test('RFC 3986 spaces serialization', function (st) {
+ st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c');
+ st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d');
+ st.end();
+ });
+
+ t.test('Backward compatibility to RFC 3986', function (st) {
+ st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
+ st.end();
+ });
+
+ t.test('Edge cases and unknown formats', function (st) {
+ ['UFO1234', false, 1234, null, {}, []].forEach(
+ function (format) {
+ st.throws(
+ function () {
+ qs.stringify({ a: 'b c' }, { format: format });
+ },
+ new TypeError('Unknown format option provided.')
+ );
+ }
+ );
+ st.end();
+ });
});
diff --git a/deps/npm/node_modules/request/node_modules/qs/test/utils.js b/deps/npm/node_modules/request/node_modules/qs/test/utils.js
index 4a8d8246c9..0721dd8ec6 100755
--- a/deps/npm/node_modules/request/node_modules/qs/test/utils.js
+++ b/deps/npm/node_modules/request/node_modules/qs/test/utils.js
@@ -5,5 +5,18 @@ var utils = require('../lib/utils');
test('merge()', function (t) {
t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key');
+
+ var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } });
+ t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array');
+
+ var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } });
+ t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array');
+
+ var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' });
+ t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array');
+
+ var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] });
+ t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] });
+
t.end();
});
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/README.md b/deps/npm/node_modules/request/node_modules/tough-cookie/README.md
index 126f222b90..ba2bdbbc38 100644
--- a/deps/npm/node_modules/request/node_modules/tough-cookie/README.md
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/README.md
@@ -2,7 +2,7 @@
[![npm package](https://nodei.co/npm/tough-cookie.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/tough-cookie/)
-[![Build Status](https://travis-ci.org/SalesforceEng/tough-cookie.png?branch=master)](https://travis-ci.org/SalesforceEng/tough-cookie)
+[![Build Status](https://travis-ci.org/salesforce/tough-cookie.png?branch=master)](https://travis-ci.org/salesforce/tough-cookie)
# Synopsis
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt
new file mode 100644
index 0000000000..a41e0a7ef9
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt
@@ -0,0 +1,20 @@
+Copyright Mathias Bynens <https://mathiasbynens.be/>
+
+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/request/node_modules/tough-cookie/node_modules/punycode/README.md b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md
new file mode 100644
index 0000000000..7ad7d1faaa
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md
@@ -0,0 +1,176 @@
+# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/coveralls/bestiejs/punycode.js/master.svg)](https://coveralls.io/r/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js)
+
+A robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms.
+
+This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm:
+
+* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C)
+* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c)
+* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c)
+* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287)
+* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072))
+
+This project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) and [io.js v1.0.0+](https://github.com/iojs/io.js/blob/v1.x/lib/punycode.js).
+
+## Installation
+
+Via [npm](https://www.npmjs.com/) (only required for Node.js releases older than v0.6.2):
+
+```bash
+npm install punycode
+```
+
+Via [Bower](http://bower.io/):
+
+```bash
+bower install punycode
+```
+
+Via [Component](https://github.com/component/component):
+
+```bash
+component install bestiejs/punycode.js
+```
+
+In a browser:
+
+```html
+<script src="punycode.js"></script>
+```
+
+In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), [Narwhal](http://narwhaljs.org/), and [RingoJS](http://ringojs.org/):
+
+```js
+var punycode = require('punycode');
+```
+
+In [Rhino](http://www.mozilla.org/rhino/):
+
+```js
+load('punycode.js');
+```
+
+Using an AMD loader like [RequireJS](http://requirejs.org/):
+
+```js
+require(
+ {
+ 'paths': {
+ 'punycode': 'path/to/punycode'
+ }
+ },
+ ['punycode'],
+ function(punycode) {
+ console.log(punycode);
+ }
+);
+```
+
+## API
+
+### `punycode.decode(string)`
+
+Converts a Punycode string of ASCII symbols to a string of Unicode symbols.
+
+```js
+// decode domain name parts
+punycode.decode('maana-pta'); // 'mañana'
+punycode.decode('--dqo34k'); // '☃-⌘'
+```
+
+### `punycode.encode(string)`
+
+Converts a string of Unicode symbols to a Punycode string of ASCII symbols.
+
+```js
+// encode domain name parts
+punycode.encode('mañana'); // 'maana-pta'
+punycode.encode('☃-⌘'); // '--dqo34k'
+```
+
+### `punycode.toUnicode(input)`
+
+Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode.
+
+```js
+// decode domain names
+punycode.toUnicode('xn--maana-pta.com');
+// → 'mañana.com'
+punycode.toUnicode('xn----dqo34k.com');
+// → '☃-⌘.com'
+
+// decode email addresses
+punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq');
+// → 'джумла@джpумлатест.bрфa'
+```
+
+### `punycode.toASCII(input)`
+
+Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII.
+
+```js
+// encode domain names
+punycode.toASCII('mañana.com');
+// → 'xn--maana-pta.com'
+punycode.toASCII('☃-⌘.com');
+// → 'xn----dqo34k.com'
+
+// encode email addresses
+punycode.toASCII('джумла@джpумлатест.bрфa');
+// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'
+```
+
+### `punycode.ucs2`
+
+#### `punycode.ucs2.decode(string)`
+
+Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16.
+
+```js
+punycode.ucs2.decode('abc');
+// → [0x61, 0x62, 0x63]
+// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE:
+punycode.ucs2.decode('\uD834\uDF06');
+// → [0x1D306]
+```
+
+#### `punycode.ucs2.encode(codePoints)`
+
+Creates a string based on an array of numeric code point values.
+
+```js
+punycode.ucs2.encode([0x61, 0x62, 0x63]);
+// → 'abc'
+punycode.ucs2.encode([0x1D306]);
+// → '\uD834\uDF06'
+```
+
+### `punycode.version`
+
+A string representing the current Punycode.js version number.
+
+## Unit tests & code coverage
+
+After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`.
+
+Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`.
+
+To generate the code coverage report, use `grunt cover`.
+
+Feel free to fork if you see possible improvements!
+
+## Author
+
+| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
+|---|
+| [Mathias Bynens](https://mathiasbynens.be/) |
+
+## Contributors
+
+| [![twitter/jdalton](https://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
+|---|
+| [John-David Dalton](http://allyoucanleet.com/) |
+
+## License
+
+Punycode.js is available under the [MIT](https://mths.be/mit) license.
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
new file mode 100644
index 0000000000..c09556394b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
@@ -0,0 +1,127 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "punycode@^1.4.1",
+ "scope": null,
+ "escapedName": "punycode",
+ "name": "punycode",
+ "rawSpec": "^1.4.1",
+ "spec": ">=1.4.1 <2.0.0",
+ "type": "range"
+ },
+ "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/tough-cookie"
+ ]
+ ],
+ "_from": "punycode@>=1.4.1 <2.0.0",
+ "_id": "punycode@1.4.1",
+ "_inCache": true,
+ "_location": "/request/tough-cookie/punycode",
+ "_nodeVersion": "5.2.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/punycode-1.4.1.tgz_1458437236261_0.07678767060860991"
+ },
+ "_npmUser": {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ "_npmVersion": "3.8.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "punycode@^1.4.1",
+ "scope": null,
+ "escapedName": "punycode",
+ "name": "punycode",
+ "rawSpec": "^1.4.1",
+ "spec": ">=1.4.1 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/request/tough-cookie"
+ ],
+ "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "_shasum": "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e",
+ "_shrinkwrap": null,
+ "_spec": "punycode@^1.4.1",
+ "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/tough-cookie",
+ "author": {
+ "name": "Mathias Bynens",
+ "url": "https://mathiasbynens.be/"
+ },
+ "bugs": {
+ "url": "https://github.com/bestiejs/punycode.js/issues"
+ },
+ "contributors": [
+ {
+ "name": "Mathias Bynens",
+ "url": "https://mathiasbynens.be/"
+ },
+ {
+ "name": "John-David Dalton",
+ "url": "http://allyoucanleet.com/"
+ }
+ ],
+ "dependencies": {},
+ "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.",
+ "devDependencies": {
+ "coveralls": "^2.11.4",
+ "grunt": "^0.4.5",
+ "grunt-contrib-uglify": "^0.11.0",
+ "grunt-shell": "^1.1.2",
+ "istanbul": "^0.4.1",
+ "qunit-extras": "^1.4.4",
+ "qunitjs": "~1.11.0",
+ "requirejs": "^2.1.22"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e",
+ "tarball": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz"
+ },
+ "files": [
+ "LICENSE-MIT.txt",
+ "punycode.js"
+ ],
+ "gitHead": "0fbadd6e81f3a0ce06c38998040d6db6bdfbc5c9",
+ "homepage": "https://mths.be/punycode",
+ "jspm": {
+ "map": {
+ "./punycode.js": {
+ "node": "@node/punycode"
+ }
+ }
+ },
+ "keywords": [
+ "punycode",
+ "unicode",
+ "idn",
+ "idna",
+ "dns",
+ "url",
+ "domain"
+ ],
+ "license": "MIT",
+ "main": "punycode.js",
+ "maintainers": [
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "reconbot",
+ "email": "wizard@roborooter.com"
+ }
+ ],
+ "name": "punycode",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/bestiejs/punycode.js.git"
+ },
+ "scripts": {
+ "test": "node tests/tests.js"
+ },
+ "version": "1.4.1"
+}
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js
new file mode 100644
index 0000000000..2c87f6cc48
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js
@@ -0,0 +1,533 @@
+/*! https://mths.be/punycode v1.4.1 by @mathias */
+;(function(root) {
+
+ /** Detect free variables */
+ var freeExports = typeof exports == 'object' && exports &&
+ !exports.nodeType && exports;
+ var freeModule = typeof module == 'object' && module &&
+ !module.nodeType && module;
+ var freeGlobal = typeof global == 'object' && global;
+ if (
+ freeGlobal.global === freeGlobal ||
+ freeGlobal.window === freeGlobal ||
+ freeGlobal.self === freeGlobal
+ ) {
+ root = freeGlobal;
+ }
+
+ /**
+ * The `punycode` object.
+ * @name punycode
+ * @type Object
+ */
+ var punycode,
+
+ /** Highest positive signed 32-bit float value */
+ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
+
+ /** Bootstring parameters */
+ base = 36,
+ tMin = 1,
+ tMax = 26,
+ skew = 38,
+ damp = 700,
+ initialBias = 72,
+ initialN = 128, // 0x80
+ delimiter = '-', // '\x2D'
+
+ /** Regular expressions */
+ regexPunycode = /^xn--/,
+ regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
+ regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
+
+ /** Error messages */
+ errors = {
+ 'overflow': 'Overflow: input needs wider integers to process',
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+ 'invalid-input': 'Invalid input'
+ },
+
+ /** Convenience shortcuts */
+ baseMinusTMin = base - tMin,
+ floor = Math.floor,
+ stringFromCharCode = String.fromCharCode,
+
+ /** Temporary variable */
+ key;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+ function error(type) {
+ throw new RangeError(errors[type]);
+ }
+
+ /**
+ * A generic `Array#map` utility function.
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} callback The function that gets called for every array
+ * item.
+ * @returns {Array} A new array of values returned by the callback function.
+ */
+ function map(array, fn) {
+ var length = array.length;
+ var result = [];
+ while (length--) {
+ result[length] = fn(array[length]);
+ }
+ return result;
+ }
+
+ /**
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
+ * addresses.
+ * @private
+ * @param {String} domain The domain name or email address.
+ * @param {Function} callback The function that gets called for every
+ * character.
+ * @returns {Array} A new string of characters returned by the callback
+ * function.
+ */
+ function mapDomain(string, fn) {
+ var parts = string.split('@');
+ var result = '';
+ if (parts.length > 1) {
+ // In email addresses, only the domain name should be punycoded. Leave
+ // the local part (i.e. everything up to `@`) intact.
+ result = parts[0] + '@';
+ string = parts[1];
+ }
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ string = string.replace(regexSeparators, '\x2E');
+ var labels = string.split('.');
+ var encoded = map(labels, fn).join('.');
+ return result + encoded;
+ }
+
+ /**
+ * Creates an array containing the numeric code points of each Unicode
+ * character in the string. While JavaScript uses UCS-2 internally,
+ * this function will convert a pair of surrogate halves (each of which
+ * UCS-2 exposes as separate characters) into a single code point,
+ * matching UTF-16.
+ * @see `punycode.ucs2.encode`
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode.ucs2
+ * @name decode
+ * @param {String} string The Unicode input string (UCS-2).
+ * @returns {Array} The new array of code points.
+ */
+ function ucs2decode(string) {
+ var output = [],
+ counter = 0,
+ length = string.length,
+ value,
+ extra;
+ while (counter < length) {
+ value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // high surrogate, and there is a next character
+ extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) { // low surrogate
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // unmatched surrogate; only append this code unit, in case the next
+ // code unit is the high surrogate of a surrogate pair
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+ }
+
+ /**
+ * Creates a string based on an array of numeric code points.
+ * @see `punycode.ucs2.decode`
+ * @memberOf punycode.ucs2
+ * @name encode
+ * @param {Array} codePoints The array of numeric code points.
+ * @returns {String} The new Unicode string (UCS-2).
+ */
+ function ucs2encode(array) {
+ return map(array, function(value) {
+ var output = '';
+ if (value > 0xFFFF) {
+ value -= 0x10000;
+ output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
+ value = 0xDC00 | value & 0x3FF;
+ }
+ output += stringFromCharCode(value);
+ return output;
+ }).join('');
+ }
+
+ /**
+ * Converts a basic code point into a digit/integer.
+ * @see `digitToBasic()`
+ * @private
+ * @param {Number} codePoint The basic numeric code point value.
+ * @returns {Number} The numeric value of a basic code point (for use in
+ * representing integers) in the range `0` to `base - 1`, or `base` if
+ * the code point does not represent a value.
+ */
+ function basicToDigit(codePoint) {
+ if (codePoint - 48 < 10) {
+ return codePoint - 22;
+ }
+ if (codePoint - 65 < 26) {
+ return codePoint - 65;
+ }
+ if (codePoint - 97 < 26) {
+ return codePoint - 97;
+ }
+ return base;
+ }
+
+ /**
+ * Converts a digit/integer into a basic code point.
+ * @see `basicToDigit()`
+ * @private
+ * @param {Number} digit The numeric value of a basic code point.
+ * @returns {Number} The basic code point whose value (when used for
+ * representing integers) is `digit`, which needs to be in the range
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+ * used; else, the lowercase form is used. The behavior is undefined
+ * if `flag` is non-zero and `digit` has no uppercase form.
+ */
+ function digitToBasic(digit, flag) {
+ // 0..25 map to ASCII a..z or A..Z
+ // 26..35 map to ASCII 0..9
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+ }
+
+ /**
+ * Bias adaptation function as per section 3.4 of RFC 3492.
+ * https://tools.ietf.org/html/rfc3492#section-3.4
+ * @private
+ */
+ function adapt(delta, numPoints, firstTime) {
+ var k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+ }
+
+ /**
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+ * symbols.
+ * @memberOf punycode
+ * @param {String} input The Punycode string of ASCII-only symbols.
+ * @returns {String} The resulting string of Unicode symbols.
+ */
+ function decode(input) {
+ // Don't use UCS-2
+ var output = [],
+ inputLength = input.length,
+ out,
+ i = 0,
+ n = initialN,
+ bias = initialBias,
+ basic,
+ j,
+ index,
+ oldi,
+ w,
+ k,
+ digit,
+ t,
+ /** Cached calculation results */
+ baseMinusT;
+
+ // Handle the basic code points: let `basic` be the number of input code
+ // points before the last delimiter, or `0` if there is none, then copy
+ // the first basic code points to the output.
+
+ basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error('not-basic');
+ }
+ output.push(input.charCodeAt(j));
+ }
+
+ // Main decoding loop: start just after the last delimiter if any basic code
+ // points were copied; start at the beginning otherwise.
+
+ for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
+
+ // `index` is the index of the next character to be consumed.
+ // Decode a generalized variable-length integer into `delta`,
+ // which gets added to `i`. The overflow checking is easier
+ // if we increase `i` as we go, then subtract off its starting
+ // value at the end to obtain `delta`.
+ for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
+
+ if (index >= inputLength) {
+ error('invalid-input');
+ }
+
+ digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error('overflow');
+ }
+
+ i += digit * w;
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+
+ if (digit < t) {
+ break;
+ }
+
+ baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error('overflow');
+ }
+
+ w *= baseMinusT;
+
+ }
+
+ out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+
+ // `i` was supposed to wrap around from `out` to `0`,
+ // incrementing `n` each time, so we'll fix that now:
+ if (floor(i / out) > maxInt - n) {
+ error('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output
+ output.splice(i++, 0, n);
+
+ }
+
+ return ucs2encode(output);
+ }
+
+ /**
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
+ * Punycode string of ASCII-only symbols.
+ * @memberOf punycode
+ * @param {String} input The string of Unicode symbols.
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
+ */
+ function encode(input) {
+ var n,
+ delta,
+ handledCPCount,
+ basicLength,
+ bias,
+ j,
+ m,
+ q,
+ k,
+ t,
+ currentValue,
+ output = [],
+ /** `inputLength` will hold the number of code points in `input`. */
+ inputLength,
+ /** Cached calculation results */
+ handledCPCountPlusOne,
+ baseMinusT,
+ qMinusT;
+
+ // Convert the input in UCS-2 to Unicode
+ input = ucs2decode(input);
+
+ // Cache the length
+ inputLength = input.length;
+
+ // Initialize the state
+ n = initialN;
+ delta = 0;
+ bias = initialBias;
+
+ // Handle the basic code points
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue < 0x80) {
+ output.push(stringFromCharCode(currentValue));
+ }
+ }
+
+ handledCPCount = basicLength = output.length;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string - if it is not empty - with a delimiter
+ if (basicLength) {
+ output.push(delimiter);
+ }
+
+ // Main encoding loop:
+ while (handledCPCount < inputLength) {
+
+ // All non-basic code points < n have been handled already. Find the next
+ // larger one:
+ for (m = maxInt, j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
+ // but guard against overflow
+ handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+
+ if (currentValue < n && ++delta > maxInt) {
+ error('overflow');
+ }
+
+ if (currentValue == n) {
+ // Represent delta as a generalized variable-length integer
+ for (q = delta, k = base; /* no condition */; k += base) {
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+ if (q < t) {
+ break;
+ }
+ qMinusT = q - t;
+ baseMinusT = base - t;
+ output.push(
+ stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
+ );
+ q = floor(qMinusT / baseMinusT);
+ }
+
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+
+ ++delta;
+ ++n;
+
+ }
+ return output.join('');
+ }
+
+ /**
+ * Converts a Punycode string representing a domain name or an email address
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+ * it doesn't matter if you call it on a string that has already been
+ * converted to Unicode.
+ * @memberOf punycode
+ * @param {String} input The Punycoded domain name or email address to
+ * convert to Unicode.
+ * @returns {String} The Unicode representation of the given Punycode
+ * string.
+ */
+ function toUnicode(input) {
+ return mapDomain(input, function(string) {
+ return regexPunycode.test(string)
+ ? decode(string.slice(4).toLowerCase())
+ : string;
+ });
+ }
+
+ /**
+ * Converts a Unicode string representing a domain name or an email address to
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
+ * i.e. it doesn't matter if you call it with a domain that's already in
+ * ASCII.
+ * @memberOf punycode
+ * @param {String} input The domain name or email address to convert, as a
+ * Unicode string.
+ * @returns {String} The Punycode representation of the given domain name or
+ * email address.
+ */
+ function toASCII(input) {
+ return mapDomain(input, function(string) {
+ return regexNonASCII.test(string)
+ ? 'xn--' + encode(string)
+ : string;
+ });
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Define the public API */
+ punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '1.4.1',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+ };
+
+ /** Expose `punycode` */
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
+ // like the following:
+ if (
+ typeof define == 'function' &&
+ typeof define.amd == 'object' &&
+ define.amd
+ ) {
+ define('punycode', function() {
+ return punycode;
+ });
+ } else if (freeExports && freeModule) {
+ if (module.exports == freeExports) {
+ // in Node.js, io.js, or RingoJS v0.8.0+
+ freeModule.exports = punycode;
+ } else {
+ // in Narwhal or RingoJS v0.7.0-
+ for (key in punycode) {
+ punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
+ }
+ }
+ } else {
+ // in Rhino or a web browser
+ root.punycode = punycode;
+ }
+
+}(this));
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/package.json b/deps/npm/node_modules/request/node_modules/tough-cookie/package.json
index ca65ee5216..27097310e4 100644
--- a/deps/npm/node_modules/request/node_modules/tough-cookie/package.json
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/package.json
@@ -10,24 +10,23 @@
"spec": ">=2.3.0 <2.4.0",
"type": "range"
},
- "/Users/rebecca/code/npm/node_modules/request"
+ "/Users/ogd/Documents/projects/npm/npm/node_modules/request"
]
],
"_from": "tough-cookie@>=2.3.0 <2.4.0",
- "_id": "tough-cookie@2.3.1",
+ "_id": "tough-cookie@2.3.2",
"_inCache": true,
- "_installable": true,
"_location": "/request/tough-cookie",
- "_nodeVersion": "6.3.1",
+ "_nodeVersion": "7.0.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/tough-cookie-2.3.1.tgz_1469494891088_0.8524557144846767"
+ "tmp": "tmp/tough-cookie-2.3.2.tgz_1477415232912_0.6133609430398792"
},
"_npmUser": {
"name": "jstash",
"email": "jstash@gmail.com"
},
- "_npmVersion": "3.10.3",
+ "_npmVersion": "3.10.8",
"_phantomChildren": {},
"_requested": {
"raw": "tough-cookie@~2.3.0",
@@ -41,17 +40,17 @@
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.1.tgz",
- "_shasum": "99c77dfbb7d804249e8a299d4cb0fd81fef083fd",
+ "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
+ "_shasum": "f081f76e4c85720e6c37a5faced737150d84072a",
"_shrinkwrap": null,
"_spec": "tough-cookie@~2.3.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request",
"author": {
"name": "Jeremy Stashewsky",
"email": "jstashewsky@salesforce.com"
},
"bugs": {
- "url": "https://github.com/SalesforceEng/tough-cookie/issues"
+ "url": "https://github.com/salesforce/tough-cookie/issues"
},
"contributors": [
{
@@ -73,7 +72,9 @@
"name": "Sebastian Mayr"
}
],
- "dependencies": {},
+ "dependencies": {
+ "punycode": "^1.4.1"
+ },
"description": "RFC6265 Cookies and Cookie Jar for node.js",
"devDependencies": {
"async": "^1.4.2",
@@ -82,8 +83,8 @@
},
"directories": {},
"dist": {
- "shasum": "99c77dfbb7d804249e8a299d4cb0fd81fef083fd",
- "tarball": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.1.tgz"
+ "shasum": "f081f76e4c85720e6c37a5faced737150d84072a",
+ "tarball": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz"
},
"engines": {
"node": ">=0.8"
@@ -91,8 +92,8 @@
"files": [
"lib"
],
- "gitHead": "c11a2d11d12348a35ef595c809e30e641a804a7d",
- "homepage": "https://github.com/SalesforceEng/tough-cookie",
+ "gitHead": "2610df5dc8ef7373a483d509006e5887572a4076",
+ "homepage": "https://github.com/salesforce/tough-cookie",
"keywords": [
"HTTP",
"cookie",
@@ -107,6 +108,10 @@
"main": "./lib/cookie",
"maintainers": [
{
+ "name": "awaterma",
+ "email": "awaterma@awaterma.net"
+ },
+ {
"name": "jstash",
"email": "jstash@gmail.com"
},
@@ -120,11 +125,11 @@
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
- "url": "git://github.com/SalesforceEng/tough-cookie.git"
+ "url": "git://github.com/salesforce/tough-cookie.git"
},
"scripts": {
"suffixup": "curl -o public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat && ./generate-pubsuffix.js",
"test": "vows test/*_test.js"
},
- "version": "2.3.1"
+ "version": "2.3.2"
}
diff --git a/deps/npm/node_modules/request/node_modules/uuid/.npmignore b/deps/npm/node_modules/request/node_modules/uuid/.npmignore
new file mode 100644
index 0000000000..67b88724db
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/.npmignore
@@ -0,0 +1,8 @@
+node_modules
+.DS_Store
+
+# VIM temp files
+*.sw*
+
+# Mac desktop services store
+.DS_Store
diff --git a/deps/npm/node_modules/request/node_modules/uuid/.travis.yml b/deps/npm/node_modules/request/node_modules/uuid/.travis.yml
new file mode 100644
index 0000000000..8a2c585ee9
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/request/node_modules/uuid/AUTHORS b/deps/npm/node_modules/request/node_modules/uuid/AUTHORS
new file mode 100644
index 0000000000..5a10523062
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/AUTHORS
@@ -0,0 +1,5 @@
+Robert Kieffer <robert@broofa.com>
+Christoph Tavan <dev@tavan.de>
+AJ ONeal <coolaj86@gmail.com>
+Vincent Voyer <vincent@zeroload.net>
+Roman Shtylman <shtylman@gmail.com>
diff --git a/deps/npm/node_modules/request/node_modules/uuid/HISTORY.md b/deps/npm/node_modules/request/node_modules/uuid/HISTORY.md
new file mode 100644
index 0000000000..02daad3f61
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/HISTORY.md
@@ -0,0 +1,27 @@
+# 3.0.1 (2016-11-28)
+
+ * split uuid versions into separate files
+
+# 3.0.0 (2016-11-17)
+
+ * remove .parse and .unparse
+
+# 2.0.0
+
+ * Removed uuid.BufferClass
+
+# 1.4.0
+
+ * Improved module context detection
+ * Removed public RNG functions
+
+# 1.3.2
+
+ * Improve tests and handling of v1() options (Issue #24)
+ * Expose RNG option to allow for perf testing with different generators
+
+# 1.3.0
+
+ * Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
+ * Support for node.js crypto API
+ * De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md b/deps/npm/node_modules/request/node_modules/uuid/LICENSE.md
index 652609b37e..8c84e39866 100644
--- a/deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md
+++ b/deps/npm/node_modules/request/node_modules/uuid/LICENSE.md
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2010-2012 Robert Kieffer
+Copyright (c) 2010-2016 Robert Kieffer and other 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
diff --git a/deps/npm/node_modules/request/node_modules/uuid/README.md b/deps/npm/node_modules/request/node_modules/uuid/README.md
new file mode 100644
index 0000000000..82a79eb33a
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/README.md
@@ -0,0 +1,132 @@
+# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) #
+
+Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
+
+Features:
+
+* Generate RFC4122 version 1 or version 4 UUIDs
+* Runs in node.js and browsers
+* Cryptographically strong random number generation on supporting platforms
+* Small footprint (Want something smaller? [Check this out](https://gist.github.com/982883)!)
+
+## Quickstart - CommonJS (Recommended)
+
+```shell
+npm install uuid
+```
+
+```javascript
+// Generate a v1 UUID (time-based)
+const uuidV1 = require('uuid/v1');
+uuidV1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
+
+// Generate a v4 UUID (random)
+const uuidV4 = require('uuid/v4');
+uuidV4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
+```
+
+## Quickstart - Pre-packaged for browsers (Not recommended)
+
+Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in).
+
+```html
+<script src="http://wzrd.in/standalone/uuid@latest"></script>
+
+<script>
+uuid.v1(); // -> v1 UUID
+uuid.v4(); // -> v4 UUID
+</script>
+```
+
+(Note: Do not do this in production. Just don't. wzrd.in is a great service, but if you're deploying a "real" service you should be using a packaging tool like browserify or webpack. If you do go this route you would be well advised to link to a specific version instead of `uuid@latest` to avoid having your code break when we roll out breaking changes.)
+
+
+## API
+
+### uuid(...)
+
+Generate a V4 uuid. See uuid.v4 documentation below.
+
+### uuid.v1([`options` [, `buffer` [, `offset`]]])
+
+Generate and return a RFC4122 v1 (timestamp-based) UUID.
+
+* `options` - (Object) Optional uuid state to apply. Properties may include:
+
+ * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.
+ * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
+ * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.
+ * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
+
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing.
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Notes:
+
+1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
+
+Example: Generate string UUID with fully-specified options
+
+```javascript
+uuid.v1({
+ node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
+ clockseq: 0x1234,
+ msecs: new Date('2011-11-01').getTime(),
+ nsecs: 5678
+}); // -> "710b962e-041c-11e1-9234-0123456789ab"
+```
+
+Example: In-place generation of two binary IDs
+
+```javascript
+// Generate two ids in an array
+const arr = new Array(32); // -> []
+uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
+uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
+```
+
+### uuid.v4([`options` [, `buffer` [, `offset`]]])
+
+Generate and return a RFC4122 v4 UUID.
+
+* `options` - (Object) Optional uuid state to apply. Properties may include:
+
+ * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
+ * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.
+
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing.
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Example: Generate string UUID with fully-specified options
+
+```javascript
+uuid.v4({
+ random: [
+ 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
+ 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
+ ]
+});
+// -> "109156be-c4fb-41ea-b1b4-efe1671c5836"
+```
+
+Example: Generate two IDs in a single buffer
+
+```javascript
+const buffer = new Array(32); // (or 'new Buffer' in node.js)
+uuid.v4(null, buffer, 0);
+uuid.v4(null, buffer, 16);
+```
+
+## Testing
+
+```
+npm test
+```
+
+## Legacy node-uuid package
+
+The code for the legacy node-uuid package is available in the `node-uuid` branch.
diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/bin/uuid b/deps/npm/node_modules/request/node_modules/uuid/bin/uuid
index f732e9918e..f732e9918e 100755
--- a/deps/npm/node_modules/request/node_modules/node-uuid/bin/uuid
+++ b/deps/npm/node_modules/request/node_modules/uuid/bin/uuid
diff --git a/deps/npm/node_modules/request/node_modules/uuid/index.js b/deps/npm/node_modules/request/node_modules/uuid/index.js
new file mode 100644
index 0000000000..e96791ab4b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/index.js
@@ -0,0 +1,8 @@
+var v1 = require('./v1');
+var v4 = require('./v4');
+
+var uuid = v4;
+uuid.v1 = v1;
+uuid.v4 = v4;
+
+module.exports = uuid;
diff --git a/deps/npm/node_modules/request/node_modules/uuid/lib/bytesToUuid.js b/deps/npm/node_modules/request/node_modules/uuid/lib/bytesToUuid.js
new file mode 100644
index 0000000000..9ee989cb9b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/lib/bytesToUuid.js
@@ -0,0 +1,23 @@
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+var byteToHex = [];
+for (var i = 0; i < 256; ++i) {
+ byteToHex[i] = (i + 0x100).toString(16).substr(1);
+}
+
+function bytesToUuid(buf, offset) {
+ var i = offset || 0;
+ var bth = byteToHex;
+ return bth[buf[i++]] + bth[buf[i++]] +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] +
+ bth[buf[i++]] + bth[buf[i++]] +
+ bth[buf[i++]] + bth[buf[i++]];
+}
+
+module.exports = bytesToUuid;
diff --git a/deps/npm/node_modules/request/node_modules/uuid/lib/rng-browser.js b/deps/npm/node_modules/request/node_modules/uuid/lib/rng-browser.js
new file mode 100644
index 0000000000..88b7dfb68a
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/lib/rng-browser.js
@@ -0,0 +1,33 @@
+// Unique ID creation requires a high quality random # generator. In the
+// browser this is a little complicated due to unknown quality of Math.random()
+// and inconsistent support for the `crypto` API. We do the best we can via
+// feature-detection
+var rng;
+
+var crypto = global.crypto || global.msCrypto; // for IE 11
+if (crypto && crypto.getRandomValues) {
+ // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
+ var rnds8 = new Uint8Array(16);
+ rng = function whatwgRNG() {
+ crypto.getRandomValues(rnds8);
+ return rnds8;
+ };
+}
+
+if (!rng) {
+ // Math.random()-based (RNG)
+ //
+ // If all else fails, use Math.random(). It's fast, but is of unspecified
+ // quality.
+ var rnds = new Array(16);
+ rng = function() {
+ for (var i = 0, r; i < 16; i++) {
+ if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
+ rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
+ }
+
+ return rnds;
+ };
+}
+
+module.exports = rng;
diff --git a/deps/npm/node_modules/request/node_modules/uuid/lib/rng.js b/deps/npm/node_modules/request/node_modules/uuid/lib/rng.js
new file mode 100644
index 0000000000..5624d9123b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/lib/rng.js
@@ -0,0 +1,10 @@
+// Unique ID creation requires a high quality random # generator. In node.js
+// this is prett straight-forward - we use the crypto API.
+
+var rb = require('crypto').randomBytes;
+
+function rng() {
+ return rb(16);
+};
+
+module.exports = rng;
diff --git a/deps/npm/node_modules/request/node_modules/uuid/package.json b/deps/npm/node_modules/request/node_modules/uuid/package.json
new file mode 100644
index 0000000000..57626b794d
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/package.json
@@ -0,0 +1,122 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "uuid@^3.0.0",
+ "scope": null,
+ "escapedName": "uuid",
+ "name": "uuid",
+ "rawSpec": "^3.0.0",
+ "spec": ">=3.0.0 <4.0.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/request"
+ ]
+ ],
+ "_from": "uuid@>=3.0.0 <4.0.0",
+ "_id": "uuid@3.0.1",
+ "_inCache": true,
+ "_location": "/request/uuid",
+ "_nodeVersion": "6.7.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/uuid-3.0.1.tgz_1480403886767_0.2584113120101392"
+ },
+ "_npmUser": {
+ "name": "defunctzombie",
+ "email": "shtylman@gmail.com"
+ },
+ "_npmVersion": "3.10.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "uuid@^3.0.0",
+ "scope": null,
+ "escapedName": "uuid",
+ "name": "uuid",
+ "rawSpec": "^3.0.0",
+ "spec": ">=3.0.0 <4.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/request"
+ ],
+ "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
+ "_shasum": "6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1",
+ "_shrinkwrap": null,
+ "_spec": "uuid@^3.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/request",
+ "bin": {
+ "uuid": "./bin/uuid"
+ },
+ "browser": {
+ "./lib/rng.js": "./lib/rng-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/kelektiv/node-uuid/issues"
+ },
+ "contributors": [
+ {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com"
+ },
+ {
+ "name": "Christoph Tavan",
+ "email": "dev@tavan.de"
+ },
+ {
+ "name": "AJ ONeal",
+ "email": "coolaj86@gmail.com"
+ },
+ {
+ "name": "Vincent Voyer",
+ "email": "vincent@zeroload.net"
+ },
+ {
+ "name": "Roman Shtylman",
+ "email": "shtylman@gmail.com"
+ }
+ ],
+ "dependencies": {},
+ "description": "RFC4122 (v1 and v4) generator",
+ "devDependencies": {
+ "mocha": "3.1.2"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1",
+ "tarball": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz"
+ },
+ "gitHead": "374de826de71d8997f71b4641f65552e48956ced",
+ "homepage": "https://github.com/kelektiv/node-uuid#readme",
+ "keywords": [
+ "uuid",
+ "guid",
+ "rfc4122"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "broofa",
+ "email": "robert@broofa.com"
+ },
+ {
+ "name": "defunctzombie",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "vvo",
+ "email": "vincent.voyer@gmail.com"
+ }
+ ],
+ "name": "uuid",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/kelektiv/node-uuid.git"
+ },
+ "scripts": {
+ "test": "mocha test/test.js"
+ },
+ "version": "3.0.1"
+}
diff --git a/deps/npm/node_modules/request/node_modules/uuid/test/mocha.opts b/deps/npm/node_modules/request/node_modules/uuid/test/mocha.opts
new file mode 100644
index 0000000000..5d6a3113b1
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/test/mocha.opts
@@ -0,0 +1,3 @@
+--ui qunit
+--reporter spec
+--check-leaks
diff --git a/deps/npm/node_modules/request/node_modules/uuid/test/test.js b/deps/npm/node_modules/request/node_modules/uuid/test/test.js
new file mode 100644
index 0000000000..ec33bec013
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/test/test.js
@@ -0,0 +1,96 @@
+var assert = require('assert');
+
+var uuid = require('../');
+
+// Verify ordering of v1 ids created with explicit times
+var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00
+
+function compare(name, ids) {
+ test(name, function() {
+ // avoid .map for older browsers
+ for (var i=0 ; i<ids.length ; ++i) {
+ ids[i] = ids[i].split('-').reverse().join('-');
+ }
+ ids = ids.sort();
+ var sorted = ([].concat(ids)).sort();
+
+ assert(sorted.toString() == ids.toString(), name + ' have expected order');
+ });
+}
+
+// Verify ordering of v1 ids created using default behavior
+compare('uuids with current time', [
+ uuid.v1(),
+ uuid.v1(),
+ uuid.v1(),
+ uuid.v1(),
+ uuid.v1()
+]);
+
+// Verify ordering of v1 ids created with explicit times
+compare('uuids with time option', [
+ uuid.v1({msecs: TIME - 10*3600*1000}),
+ uuid.v1({msecs: TIME - 1}),
+ uuid.v1({msecs: TIME}),
+ uuid.v1({msecs: TIME + 1}),
+ uuid.v1({msecs: TIME + 28*24*3600*1000})
+]);
+
+test('msec', function() {
+ assert(
+ uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}),
+ 'IDs created at same msec are different'
+ );
+});
+
+test('exception thrown when > 10k ids created in 1ms', function() {
+ // Verify throw if too many ids created
+ var thrown = false;
+ try {
+ uuid.v1({msecs: TIME, nsecs: 10000});
+ } catch (e) {
+ thrown = true;
+ }
+ assert(thrown, 'Exception thrown when > 10K ids created in 1 ms');
+});
+
+test('clock regression by msec', function() {
+ // Verify clock regression bumps clockseq
+ var uidt = uuid.v1({msecs: TIME});
+ var uidtb = uuid.v1({msecs: TIME - 1});
+ assert(
+ parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1,
+ 'Clock regression by msec increments the clockseq'
+ );
+});
+
+test('clock regression by nsec', function() {
+ // Verify clock regression bumps clockseq
+ var uidtn = uuid.v1({msecs: TIME, nsecs: 10});
+ var uidtnb = uuid.v1({msecs: TIME, nsecs: 9});
+ assert(
+ parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1,
+ 'Clock regression by nsec increments the clockseq'
+ );
+});
+
+test('explicit options product expected id', function() {
+ // Verify explicit options produce expected id
+ var id = uuid.v1({
+ msecs: 1321651533573,
+ nsecs: 5432,
+ clockseq: 0x385c,
+ node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ]
+ });
+ assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id');
+});
+
+test('ids spanning 1ms boundary are 100ns apart', function() {
+ // Verify adjacent ids across a msec boundary are 1 time unit apart
+ var u0 = uuid.v1({msecs: TIME, nsecs: 9999});
+ var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0});
+
+ var before = u0.split('-')[0], after = u1.split('-')[0];
+ var dt = parseInt(after, 16) - parseInt(before, 16);
+ assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart');
+});
diff --git a/deps/npm/node_modules/request/node_modules/uuid/v1.js b/deps/npm/node_modules/request/node_modules/uuid/v1.js
new file mode 100644
index 0000000000..315bd4cd65
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/v1.js
@@ -0,0 +1,103 @@
+// Unique ID creation requires a high quality random # generator. We feature
+// detect to determine the best RNG source, normalizing to a function that
+// returns 128-bits of randomness, since that's what's usually required
+var rng = require('./lib/rng');
+var bytesToUuid = require('./lib/bytesToUuid');
+
+// **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+// random #'s we need to init node and clockseq
+var _seedBytes = rng();
+
+// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
+var _nodeId = [
+ _seedBytes[0] | 0x01,
+ _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
+];
+
+// Per 4.2.2, randomize (14 bit) clockseq
+var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
+
+// Previous uuid creation time
+var _lastMSecs = 0, _lastNSecs = 0;
+
+// See https://github.com/broofa/node-uuid for API details
+function v1(options, buf, offset) {
+ var i = buf && offset || 0;
+ var b = buf || [];
+
+ options = options || {};
+
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
+
+ // UUID timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+ var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
+
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
+
+ // Time since last uuid creation (in msecs)
+ var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
+
+ // Per 4.2.1.2, Bump clockseq on clock regression
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ }
+
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ }
+
+ // Per 4.2.1.2 Throw error if too many uuids are requested
+ if (nsecs >= 10000) {
+ throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
+ }
+
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq;
+
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+ msecs += 12219292800000;
+
+ // `time_low`
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff;
+
+ // `time_mid`
+ var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff;
+
+ // `time_high_and_version`
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+ b[i++] = tmh >>> 16 & 0xff;
+
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+ b[i++] = clockseq >>> 8 | 0x80;
+
+ // `clock_seq_low`
+ b[i++] = clockseq & 0xff;
+
+ // `node`
+ var node = options.node || _nodeId;
+ for (var n = 0; n < 6; ++n) {
+ b[i + n] = node[n];
+ }
+
+ return buf ? buf : bytesToUuid(b);
+}
+
+module.exports = v1;
diff --git a/deps/npm/node_modules/request/node_modules/uuid/v4.js b/deps/npm/node_modules/request/node_modules/uuid/v4.js
new file mode 100644
index 0000000000..38b6f76a98
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/uuid/v4.js
@@ -0,0 +1,29 @@
+var rng = require('./lib/rng');
+var bytesToUuid = require('./lib/bytesToUuid');
+
+function v4(options, buf, offset) {
+ var i = buf && offset || 0;
+
+ if (typeof(options) == 'string') {
+ buf = options == 'binary' ? new Array(16) : null;
+ options = null;
+ }
+ options = options || {};
+
+ var rnds = options.random || (options.rng || rng)();
+
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
+
+ // Copy bytes to buffer, if provided
+ if (buf) {
+ for (var ii = 0; ii < 16; ++ii) {
+ buf[i + ii] = rnds[ii];
+ }
+ }
+
+ return buf || bytesToUuid(rnds);
+}
+
+module.exports = v4;
diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json
index 8224997366..cf438a5350 100644
--- a/deps/npm/node_modules/request/package.json
+++ b/deps/npm/node_modules/request/package.json
@@ -2,25 +2,25 @@
"_args": [
[
{
- "raw": "request@2.75.0",
+ "raw": "request@2.79.0",
"scope": null,
"escapedName": "request",
"name": "request",
- "rawSpec": "2.75.0",
- "spec": "2.75.0",
+ "rawSpec": "2.79.0",
+ "spec": "2.79.0",
"type": "version"
},
- "/Users/rebecca/code/npm"
+ "/Users/zkat/Documents/code/npm"
]
],
- "_from": "request@2.75.0",
- "_id": "request@2.75.0",
+ "_from": "request@2.79.0",
+ "_id": "request@2.79.0",
"_inCache": true,
"_location": "/request",
- "_nodeVersion": "6.5.0",
+ "_nodeVersion": "6.3.1",
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/request-2.75.0.tgz_1474151606844_0.8052814984694123"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/request-2.79.0.tgz_1479489666177_0.7806831058114767"
},
"_npmUser": {
"name": "simov",
@@ -29,29 +29,30 @@
"_npmVersion": "2.15.9",
"_phantomChildren": {
"ansi-regex": "2.0.0",
- "inherits": "2.0.3",
"strip-ansi": "3.0.1"
},
"_requested": {
- "raw": "request@2.75.0",
+ "raw": "request@2.79.0",
"scope": null,
"escapedName": "request",
"name": "request",
- "rawSpec": "2.75.0",
- "spec": "2.75.0",
+ "rawSpec": "2.79.0",
+ "spec": "2.79.0",
"type": "version"
},
"_requiredBy": [
"#USER",
"/",
"/node-gyp",
- "/npm-registry-client"
+ "/npm-registry-client",
+ "/npm-registry-couchapp/couchapp",
+ "/npm-registry-couchapp/couchapp/nano"
],
- "_resolved": "https://registry.npmjs.org/request/-/request-2.75.0.tgz",
- "_shasum": "d2b8268a286da13eaa5d01adf5d18cc90f657d93",
+ "_resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
+ "_shasum": "4dfe5bf6be8b8cdc37fcf93e04b65577722710de",
"_shrinkwrap": null,
- "_spec": "request@2.75.0",
- "_where": "/Users/rebecca/code/npm",
+ "_spec": "request@2.79.0",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
@@ -62,12 +63,11 @@
"dependencies": {
"aws-sign2": "~0.6.0",
"aws4": "^1.2.1",
- "bl": "~1.1.2",
"caseless": "~0.11.0",
"combined-stream": "~1.0.5",
"extend": "~3.0.0",
"forever-agent": "~0.6.1",
- "form-data": "~2.0.0",
+ "form-data": "~2.1.1",
"har-validator": "~2.0.6",
"hawk": "~3.1.3",
"http-signature": "~1.1.0",
@@ -75,12 +75,12 @@
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.7",
- "node-uuid": "~1.4.7",
"oauth-sign": "~0.8.1",
- "qs": "~6.2.0",
+ "qs": "~6.3.0",
"stringstream": "~0.0.4",
"tough-cookie": "~2.3.0",
- "tunnel-agent": "~0.4.1"
+ "tunnel-agent": "~0.4.1",
+ "uuid": "^3.0.0"
},
"description": "Simplified HTTP request client.",
"devDependencies": {
@@ -103,17 +103,22 @@
"rimraf": "^2.2.8",
"server-destroy": "^1.0.1",
"tape": "^4.6.0",
- "taper": "^0.4.0"
+ "taper": "^0.5.0"
},
"directories": {},
"dist": {
- "shasum": "d2b8268a286da13eaa5d01adf5d18cc90f657d93",
- "tarball": "https://registry.npmjs.org/request/-/request-2.75.0.tgz"
+ "shasum": "4dfe5bf6be8b8cdc37fcf93e04b65577722710de",
+ "tarball": "https://registry.npmjs.org/request/-/request-2.79.0.tgz"
},
"engines": {
- "node": ">=0.8.0"
+ "node": ">= 4"
},
- "gitHead": "e9f09c2832073858d6d988ba82a2895f36efa92d",
+ "files": [
+ "lib/",
+ "index.js",
+ "request.js"
+ ],
+ "gitHead": "ff729c6f1a87237060d075908563ce13386395ac",
"greenkeeper": {
"ignore": [
"eslint",
@@ -162,5 +167,5 @@
"util",
"utility"
],
- "version": "2.75.0"
+ "version": "2.79.0"
}
diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js
index 96a71b6ed5..26f70c2084 100644
--- a/deps/npm/node_modules/request/request.js
+++ b/deps/npm/node_modules/request/request.js
@@ -6,7 +6,6 @@ var http = require('http')
, util = require('util')
, stream = require('stream')
, zlib = require('zlib')
- , bl = require('bl')
, hawk = require('hawk')
, aws2 = require('aws-sign2')
, aws4 = require('aws4')
@@ -736,6 +735,11 @@ Request.prototype.start = function () {
debug('make request', self.uri.href)
+ // node v6.8.0 now supports a `timeout` value in `http.request()`, but we
+ // should delete it for now since we handle timeouts manually for better
+ // consistency with node versions before v6.8.0
+ delete reqOptions.timeout
+
try {
self.req = self.httpModule.request(reqOptions)
} catch (err) {
@@ -747,32 +751,30 @@ Request.prototype.start = function () {
self.startTime = new Date().getTime()
}
+ var timeout
if (self.timeout && !self.timeoutTimer) {
- var timeout = self.timeout < 0 ? 0 : self.timeout
- // Set a timeout in memory - this block will throw if the server takes more
- // than `timeout` to write the HTTP status and headers (corresponding to
- // the on('response') event on the client). NB: this measures wall-clock
- // time, not the time between bytes sent by the server.
- self.timeoutTimer = setTimeout(function () {
- var connectTimeout = self.req.socket && self.req.socket.readable === false
- self.abort()
- var e = new Error('ETIMEDOUT')
- e.code = 'ETIMEDOUT'
- e.connect = connectTimeout
- self.emit('error', e)
- }, timeout)
+ if (self.timeout < 0) {
+ timeout = 0
+ } else if (typeof self.timeout === 'number' && isFinite(self.timeout)) {
+ timeout = self.timeout
+ }
+ }
- if (self.req.setTimeout) { // only works on node 0.6+
- // Set an additional timeout on the socket, via the `setsockopt` syscall.
+ self.req.on('response', self.onRequestResponse.bind(self))
+ self.req.on('error', self.onRequestError.bind(self))
+ self.req.on('drain', function() {
+ self.emit('drain')
+ })
+ self.req.on('socket', function(socket) {
+ var setReqTimeout = function() {
// This timeout sets the amount of time to wait *between* bytes sent
- // from the server, and may or may not correspond to the wall-clock time
- // elapsed from the start of the request.
+ // from the server once connected.
//
// In particular, it's useful for erroring if the server fails to send
// data halfway through streaming a response.
self.req.setTimeout(timeout, function () {
if (self.req) {
- self.req.abort()
+ self.abort()
var e = new Error('ESOCKETTIMEDOUT')
e.code = 'ESOCKETTIMEDOUT'
e.connect = false
@@ -780,14 +782,44 @@ Request.prototype.start = function () {
}
})
}
- }
+ // `._connecting` was the old property which was made public in node v6.1.0
+ var isConnecting = socket._connecting || socket.connecting
+ if (timeout !== undefined) {
+ // Only start the connection timer if we're actually connecting a new
+ // socket, otherwise if we're already connected (because this is a
+ // keep-alive connection) do not bother. This is important since we won't
+ // get a 'connect' event for an already connected socket.
+ if (isConnecting) {
+ var onReqSockConnect = function() {
+ socket.removeListener('connect', onReqSockConnect)
+ clearTimeout(self.timeoutTimer)
+ self.timeoutTimer = null
+ setReqTimeout()
+ }
- self.req.on('response', self.onRequestResponse.bind(self))
- self.req.on('error', self.onRequestError.bind(self))
- self.req.on('drain', function() {
- self.emit('drain')
- })
- self.req.on('socket', function(socket) {
+ socket.on('connect', onReqSockConnect)
+
+ self.req.on('error', function(err) {
+ socket.removeListener('connect', onReqSockConnect)
+ })
+
+ // Set a timeout in memory - this block will throw if the server takes more
+ // than `timeout` to write the HTTP status and headers (corresponding to
+ // the on('response') event on the client). NB: this measures wall-clock
+ // time, not the time between bytes sent by the server.
+ self.timeoutTimer = setTimeout(function () {
+ socket.removeListener('connect', onReqSockConnect)
+ self.abort()
+ var e = new Error('ETIMEDOUT')
+ e.code = 'ETIMEDOUT'
+ e.connect = true
+ self.emit('error', e)
+ }, timeout)
+ } else {
+ // We're already connected
+ setReqTimeout()
+ }
+ }
self.emit('socket', socket)
})
@@ -893,7 +925,7 @@ Request.prototype.onRequestResponse = function (response) {
}
})
- response.on('end', function () {
+ response.once('end', function () {
self._ended = true
})
@@ -965,7 +997,7 @@ Request.prototype.onRequestResponse = function (response) {
self._destdata = true
self.emit('data', chunk)
})
- responseContent.on('end', function (chunk) {
+ responseContent.once('end', function (chunk) {
self.emit('end', chunk)
})
responseContent.on('error', function (error) {
@@ -993,14 +1025,16 @@ Request.prototype.onRequestResponse = function (response) {
Request.prototype.readResponseBody = function (response) {
var self = this
debug('reading response\'s body')
- var buffer = bl()
+ var buffers = []
+ , bufferLength = 0
, strings = []
self.on('data', function (chunk) {
- if (Buffer.isBuffer(chunk)) {
- buffer.append(chunk)
- } else {
+ if (!Buffer.isBuffer(chunk)) {
strings.push(chunk)
+ } else if (chunk.length) {
+ bufferLength += chunk.length
+ buffers.push(chunk)
}
})
self.on('end', function () {
@@ -1009,22 +1043,21 @@ Request.prototype.readResponseBody = function (response) {
debug('aborted', self.uri.href)
// `buffer` is defined in the parent scope and used in a closure it exists for the life of the request.
// This can lead to leaky behavior if the user retains a reference to the request object.
- buffer.destroy()
+ buffers = []
+ bufferLength = 0
return
}
- if (buffer.length) {
- debug('has body', self.uri.href, buffer.length)
- if (self.encoding === null) {
- // response.body = buffer
- // can't move to this until https://github.com/rvagg/bl/issues/13
- response.body = buffer.slice()
- } else {
- response.body = buffer.toString(self.encoding)
+ if (bufferLength) {
+ debug('has body', self.uri.href, bufferLength)
+ response.body = Buffer.concat(buffers, bufferLength)
+ if (self.encoding !== null) {
+ response.body = response.body.toString(self.encoding)
}
// `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request.
// This can lead to leaky behavior if the user retains a reference to the request object.
- buffer.destroy()
+ buffers = []
+ bufferLength = 0
} else if (strings.length) {
// The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation.
// Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse().
@@ -1259,10 +1292,14 @@ Request.prototype.aws = function (opts, now) {
}
var signRes = aws4.sign(options, {
accessKeyId: opts.key,
- secretAccessKey: opts.secret
+ secretAccessKey: opts.secret,
+ sessionToken: opts.session
})
self.setHeader('authorization', signRes.headers.Authorization)
self.setHeader('x-amz-date', signRes.headers['X-Amz-Date'])
+ if (signRes.headers['X-Amz-Security-Token']) {
+ self.setHeader('x-amz-security-token', signRes.headers['X-Amz-Security-Token'])
+ }
}
else {
// default: use aws-sign2