Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2016-11-04 01:59:48 +0300
committerForrest L Norvell <forrest@npmjs.com>2016-11-04 05:18:08 +0300
commit1d9159440364d2fe21e8bc15e08e284aaa118347 (patch)
treec38faf71bbe97a58ec12323598d7e07e87004f8e /node_modules/request
parente0023c089ded9161fbcbe544f12b07e12e3e5729 (diff)
request@2.78.0
Reviewed-By: @othiym23
Diffstat (limited to 'node_modules/request')
-rw-r--r--node_modules/request/.travis.yml1
-rw-r--r--node_modules/request/CHANGELOG.md32
-rw-r--r--node_modules/request/README.md1
-rwxr-xr-xnode_modules/request/index.js5
-rw-r--r--node_modules/request/lib/helpers.js17
-rw-r--r--node_modules/request/lib/redirect.js6
-rw-r--r--node_modules/request/node_modules/aws4/README.md9
-rw-r--r--node_modules/request/node_modules/aws4/aws4.js11
-rw-r--r--node_modules/request/node_modules/aws4/package.json27
-rw-r--r--node_modules/request/node_modules/bl/.jshintrc59
-rw-r--r--node_modules/request/node_modules/bl/.npmignore1
-rw-r--r--node_modules/request/node_modules/bl/.travis.yml13
-rw-r--r--node_modules/request/node_modules/bl/LICENSE.md13
-rw-r--r--node_modules/request/node_modules/bl/README.md200
-rw-r--r--node_modules/request/node_modules/bl/bl.js243
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore5
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml52
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml1
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE18
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/README.md36
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown1760
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md60
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js1
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js75
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js26
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js880
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js180
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js516
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE19
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md3
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch604
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js107
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json95
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js68
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.npmignore1
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.travis.yml4
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/Makefile6
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md60
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json19
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js5
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json105
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/test.js20
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml12
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js43
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/license.md19
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json84
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/readme.md18
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js24
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore2
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE20
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md7
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js221
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json88
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/History.md16
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE24
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/README.md53
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js67
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js6
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json90
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/package.json114
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js1
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js12
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js1
-rw-r--r--node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js1
-rw-r--r--node_modules/request/node_modules/bl/package.json100
-rw-r--r--node_modules/request/node_modules/bl/test/test.js640
-rw-r--r--node_modules/request/node_modules/form-data/README.md8
-rw-r--r--node_modules/request/node_modules/form-data/lib/browser.js2
-rw-r--r--node_modules/request/node_modules/form-data/lib/form_data.js15
-rw-r--r--node_modules/request/node_modules/form-data/package.json46
-rw-r--r--node_modules/request/node_modules/qs/CHANGELOG.md14
-rw-r--r--node_modules/request/node_modules/qs/README.md28
-rw-r--r--node_modules/request/node_modules/qs/dist/qs.js160
-rw-r--r--node_modules/request/node_modules/qs/lib/formats.js18
-rwxr-xr-xnode_modules/request/node_modules/qs/lib/index.js10
-rwxr-xr-xnode_modules/request/node_modules/qs/lib/parse.js18
-rwxr-xr-xnode_modules/request/node_modules/qs/lib/stringify.js76
-rwxr-xr-xnode_modules/request/node_modules/qs/lib/utils.js28
-rw-r--r--node_modules/request/node_modules/qs/package.json54
-rw-r--r--node_modules/request/node_modules/qs/test/index.js2
-rwxr-xr-xnode_modules/request/node_modules/qs/test/parse.js96
-rwxr-xr-xnode_modules/request/node_modules/qs/test/stringify.js287
-rwxr-xr-xnode_modules/request/node_modules/qs/test/utils.js13
-rw-r--r--node_modules/request/node_modules/tough-cookie/README.md2
-rw-r--r--node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt20
-rw-r--r--node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md176
-rw-r--r--node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json127
-rw-r--r--node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js533
-rw-r--r--node_modules/request/node_modules/tough-cookie/package.json39
-rw-r--r--node_modules/request/package.json54
-rw-r--r--node_modules/request/request.js117
91 files changed, 1723 insertions, 7247 deletions
diff --git a/node_modules/request/.travis.yml b/node_modules/request/.travis.yml
index 9be8247c7..643e6551b 100644
--- a/node_modules/request/.travis.yml
+++ b/node_modules/request/.travis.yml
@@ -5,7 +5,6 @@ node_js:
- node
- 6
- 4
- - 0.12
after_script:
- npm run test-cov
diff --git a/node_modules/request/CHANGELOG.md b/node_modules/request/CHANGELOG.md
index 042c6e526..be7949cea 100644
--- a/node_modules/request/CHANGELOG.md
+++ b/node_modules/request/CHANGELOG.md
@@ -1,5 +1,25 @@
## Change Log
+### 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)
@@ -493,15 +513,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 +588,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 +606,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/node_modules/request/README.md b/node_modules/request/README.md
index 6eaaa0547..a0b6c84d0 100644
--- a/node_modules/request/README.md
+++ b/node_modules/request/README.md
@@ -762,6 +762,7 @@ The first argument can be either a `url` or an `options` object. The only requir
- `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/node_modules/request/index.js b/node_modules/request/index.js
index 911a90dbb..9ec65ea26 100755
--- a/node_modules/request/index.js
+++ b/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/node_modules/request/lib/helpers.js b/node_modules/request/lib/helpers.js
index 356ff748e..f9d727e38 100644
--- a/node_modules/request/lib/helpers.js
+++ b/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/node_modules/request/lib/redirect.js b/node_modules/request/lib/redirect.js
index 040dfe0e0..f8604491f 100644
--- a/node_modules/request/lib/redirect.js
+++ b/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/node_modules/request/node_modules/aws4/README.md b/node_modules/request/node_modules/aws4/README.md
index 6c55da805..6b002d02f 100644
--- a/node_modules/request/node_modules/aws4/README.md
+++ b/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/node_modules/request/node_modules/aws4/aws4.js b/node_modules/request/node_modules/aws4/aws4.js
index cbe5dc904..a54318065 100644
--- a/node_modules/request/node_modules/aws4/aws4.js
+++ b/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/node_modules/request/node_modules/aws4/package.json b/node_modules/request/node_modules/aws4/package.json
index 7151d7aae..4e7caf0d3 100644
--- a/node_modules/request/node_modules/aws4/package.json
+++ b/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/node_modules/request/node_modules/bl/.jshintrc b/node_modules/request/node_modules/bl/.jshintrc
deleted file mode 100644
index c8ef3ca40..000000000
--- a/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/node_modules/request/node_modules/bl/.npmignore b/node_modules/request/node_modules/bl/.npmignore
deleted file mode 100644
index 40b878db5..000000000
--- a/node_modules/request/node_modules/bl/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules/ \ No newline at end of file
diff --git a/node_modules/request/node_modules/bl/.travis.yml b/node_modules/request/node_modules/bl/.travis.yml
deleted file mode 100644
index 5cb0480b4..000000000
--- a/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/node_modules/request/node_modules/bl/LICENSE.md b/node_modules/request/node_modules/bl/LICENSE.md
deleted file mode 100644
index ccb24797c..000000000
--- a/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/node_modules/request/node_modules/bl/README.md b/node_modules/request/node_modules/bl/README.md
deleted file mode 100644
index f7044db26..000000000
--- a/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/node_modules/request/node_modules/bl/bl.js b/node_modules/request/node_modules/bl/bl.js
deleted file mode 100644
index f585df172..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore b/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore
deleted file mode 100644
index 38344f87a..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml b/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml
deleted file mode 100644
index 1b8211846..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml b/node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml
deleted file mode 100644
index 96d9cfbd3..000000000
--- a/node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml
+++ /dev/null
@@ -1 +0,0 @@
-ui: tape
diff --git a/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE b/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE
deleted file mode 100644
index e3d4e695a..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md b/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md
deleted file mode 100644
index 86b95a3bf..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown b/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown
deleted file mode 100644
index 0bc3819e6..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
deleted file mode 100644
index 83275f192..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js
deleted file mode 100644
index ca807af87..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js
deleted file mode 100644
index 736693b84..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js
deleted file mode 100644
index d06f71f18..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
deleted file mode 100644
index 54a9d5c55..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js
deleted file mode 100644
index 625cdc176..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
deleted file mode 100644
index 95916c992..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE
deleted file mode 100644
index d8d7f9437..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md
deleted file mode 100644
index 5a76b4149..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch
deleted file mode 100644
index a06d5c05f..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
deleted file mode 100644
index ff4c851c0..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json
deleted file mode 100644
index 14b70d3d2..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js
deleted file mode 100644
index 1a490c65a..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.npmignore b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.npmignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.travis.yml b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/.travis.yml
deleted file mode 100644
index cc4dba29d..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/Makefile b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/Makefile
deleted file mode 100644
index 787d56e1e..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md
deleted file mode 100644
index 16d2c59c6..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json
deleted file mode 100644
index 9e31b6838..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js
deleted file mode 100644
index a57f63495..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json
deleted file mode 100644
index 6510f4eef..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/test.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/test.js
deleted file mode 100644
index e0c3444d8..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
deleted file mode 100644
index 36201b100..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js
deleted file mode 100644
index a4f40f845..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/license.md b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/license.md
deleted file mode 100644
index c67e3532b..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json
deleted file mode 100644
index e100c0e08..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/readme.md b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/readme.md
deleted file mode 100644
index 78e7cfaeb..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js
deleted file mode 100644
index ef1572158..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore
deleted file mode 100644
index 206320cc1..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE
deleted file mode 100644
index 6de584a48..000000000
--- a/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE
+++ /dev/null
@@ -1,20 +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.
diff --git a/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md
deleted file mode 100644
index 4d2aa0015..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js
deleted file mode 100644
index b00e54fb7..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json
deleted file mode 100644
index a4cb8bc4a..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/History.md b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/History.md
deleted file mode 100644
index acc867537..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
deleted file mode 100644
index 6a60e8c22..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/README.md b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/README.md
deleted file mode 100644
index 75622fa7c..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js
deleted file mode 100644
index 549ae2f06..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js
deleted file mode 100644
index 5e6fcff5d..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json b/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json
deleted file mode 100644
index 14eb7c631..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json b/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json
deleted file mode 100644
index 27ef41cb1..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js
deleted file mode 100644
index 27e8d8a55..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js
deleted file mode 100644
index 6222a5798..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js
deleted file mode 100644
index 5d482f078..000000000
--- a/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/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js b/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js
deleted file mode 100644
index e1e9efdf3..000000000
--- a/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/node_modules/request/node_modules/bl/package.json b/node_modules/request/node_modules/bl/package.json
deleted file mode 100644
index 47862b0b6..000000000
--- a/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/node_modules/request/node_modules/bl/test/test.js b/node_modules/request/node_modules/bl/test/test.js
deleted file mode 100644
index c95b1ba48..000000000
--- a/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/node_modules/request/node_modules/form-data/README.md b/node_modules/request/node_modules/form-data/README.md
index 5864d82db..38d6d9f68 100644
--- a/node_modules/request/node_modules/form-data/README.md
+++ b/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.1.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.1.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.1.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.1.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/node_modules/request/node_modules/form-data/lib/browser.js b/node_modules/request/node_modules/form-data/lib/browser.js
index f42221cd6..f683b05a6 100644
--- a/node_modules/request/node_modules/form-data/lib/browser.js
+++ b/node_modules/request/node_modules/form-data/lib/browser.js
@@ -1,2 +1,2 @@
/* eslint-env browser */
-module.exports = window.FormData;
+module.exports = self.FormData;
diff --git a/node_modules/request/node_modules/form-data/lib/form_data.js b/node_modules/request/node_modules/form-data/lib/form_data.js
index 8252e6588..d2cc92491 100644
--- a/node_modules/request/node_modules/form-data/lib/form_data.js
+++ b/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/node_modules/request/node_modules/form-data/package.json b/node_modules/request/node_modules/form-data/package.json
index a8b4839b7..426ec665d 100644
--- a/node_modules/request/node_modules/form-data/package.json
+++ b/node_modules/request/node_modules/form-data/package.json
@@ -2,25 +2,25 @@
"_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/ogd/Documents/projects/npm/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.1",
"_inCache": true,
"_location": "/request/form-data",
"_nodeVersion": "4.5.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.1.tgz_1475562797683_0.23411617754027247"
},
"_npmUser": {
"name": "alexindigo",
@@ -29,22 +29,22 @@
"_npmVersion": "2.15.9",
"_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.1.tgz",
+ "_shasum": "4adf0342e1a79afa1e84c8c320a9ffc82392a1f3",
"_shrinkwrap": null,
- "_spec": "form-data@~2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request",
+ "_spec": "form-data@~2.1.1",
+ "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request",
"author": {
"name": "Felix Geisendörfer",
"email": "felix@debuggable.com",
@@ -57,13 +57,13 @@
"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",
+ "coveralls": "^2.11.14",
+ "cross-spawn": "^4.0.2",
+ "eslint": "^3.7.1",
"fake": "^0.2.2",
"far": "^0.0.7",
"formidable": "^1.0.17",
@@ -72,18 +72,18 @@
"istanbul": "^0.4.5",
"pkgfiles": "^2.3.0",
"pre-commit": "^1.1.3",
- "request": "^2.74.0",
+ "request": "^2.75.0",
"rimraf": "^2.5.4"
},
"directories": {},
"dist": {
- "shasum": "6f0aebadcc5da16c13e1ecc11137d85f9b883b25",
- "tarball": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz"
+ "shasum": "4adf0342e1a79afa1e84c8c320a9ffc82392a1f3",
+ "tarball": "https://registry.npmjs.org/form-data/-/form-data-2.1.1.tgz"
},
"engines": {
"node": ">= 0.12"
},
- "gitHead": "652b16ff5b9077bdf65eb66b67286c823c2a1040",
+ "gitHead": "ebee8412f79798b87fd3ebed44748c1ca06fc1ac",
"homepage": "https://github.com/form-data/form-data#readme",
"license": "MIT",
"main": "./lib/form_data",
@@ -133,5 +133,5 @@
"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.1"
}
diff --git a/node_modules/request/node_modules/qs/CHANGELOG.md b/node_modules/request/node_modules/qs/CHANGELOG.md
index 86bea7638..351edd4e6 100644
--- a/node_modules/request/node_modules/qs/CHANGELOG.md
+++ b/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/node_modules/request/node_modules/qs/README.md b/node_modules/request/node_modules/qs/README.md
index 97e390796..ac1e7f167 100644
--- a/node_modules/request/node_modules/qs/README.md
+++ b/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/node_modules/request/node_modules/qs/dist/qs.js b/node_modules/request/node_modules/qs/dist/qs.js
index fcf825b58..1a80d2d8b 100644
--- a/node_modules/request/node_modules/qs/dist/qs.js
+++ b/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/node_modules/request/node_modules/qs/lib/formats.js b/node_modules/request/node_modules/qs/lib/formats.js
new file mode 100644
index 000000000..df4599752
--- /dev/null
+++ b/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/node_modules/request/node_modules/qs/lib/index.js b/node_modules/request/node_modules/qs/lib/index.js
index 190195902..0d6a97dcf 100755
--- a/node_modules/request/node_modules/qs/lib/index.js
+++ b/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/node_modules/request/node_modules/qs/lib/parse.js b/node_modules/request/node_modules/qs/lib/parse.js
index 8b37cb3b2..97387a6a2 100755
--- a/node_modules/request/node_modules/qs/lib/parse.js
+++ b/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/node_modules/request/node_modules/qs/lib/stringify.js b/node_modules/request/node_modules/qs/lib/stringify.js
index 6e1c9a263..88cd79106 100755
--- a/node_modules/request/node_modules/qs/lib/stringify.js
+++ b/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/node_modules/request/node_modules/qs/lib/utils.js b/node_modules/request/node_modules/qs/lib/utils.js
index 2c5c8ee50..33c01c000 100755
--- a/node_modules/request/node_modules/qs/lib/utils.js
+++ b/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/node_modules/request/node_modules/qs/package.json b/node_modules/request/node_modules/qs/package.json
index 64853dbde..c33dcd0b5 100644
--- a/node_modules/request/node_modules/qs/package.json
+++ b/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/node_modules/request/node_modules/qs/test/index.js b/node_modules/request/node_modules/qs/test/index.js
index b6a7d9526..5e6bc8fbd 100644
--- a/node_modules/request/node_modules/qs/test/index.js
+++ b/node_modules/request/node_modules/qs/test/index.js
@@ -1,3 +1,5 @@
+'use strict';
+
require('./parse');
require('./stringify');
diff --git a/node_modules/request/node_modules/qs/test/parse.js b/node_modules/request/node_modules/qs/test/parse.js
index ccf8c8c4c..3a9611ed9 100755
--- a/node_modules/request/node_modules/qs/test/parse.js
+++ b/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/node_modules/request/node_modules/qs/test/stringify.js b/node_modules/request/node_modules/qs/test/stringify.js
index 699397e33..8818eaca8 100755
--- a/node_modules/request/node_modules/qs/test/stringify.js
+++ b/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/node_modules/request/node_modules/qs/test/utils.js b/node_modules/request/node_modules/qs/test/utils.js
index 4a8d8246c..0721dd8ec 100755
--- a/node_modules/request/node_modules/qs/test/utils.js
+++ b/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/node_modules/request/node_modules/tough-cookie/README.md b/node_modules/request/node_modules/tough-cookie/README.md
index 126f222b9..ba2bdbbc3 100644
--- a/node_modules/request/node_modules/tough-cookie/README.md
+++ b/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/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt
new file mode 100644
index 000000000..a41e0a7ef
--- /dev/null
+++ b/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/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md b/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md
new file mode 100644
index 000000000..7ad7d1faa
--- /dev/null
+++ b/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/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
new file mode 100644
index 000000000..c09556394
--- /dev/null
+++ b/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/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js
new file mode 100644
index 000000000..2c87f6cc4
--- /dev/null
+++ b/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/node_modules/request/node_modules/tough-cookie/package.json b/node_modules/request/node_modules/tough-cookie/package.json
index ca65ee521..27097310e 100644
--- a/node_modules/request/node_modules/tough-cookie/package.json
+++ b/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/node_modules/request/package.json b/node_modules/request/package.json
index 822499736..e009f341f 100644
--- a/node_modules/request/package.json
+++ b/node_modules/request/package.json
@@ -2,25 +2,25 @@
"_args": [
[
{
- "raw": "request@2.75.0",
+ "raw": "request@~2.78.0",
"scope": null,
"escapedName": "request",
"name": "request",
- "rawSpec": "2.75.0",
- "spec": "2.75.0",
- "type": "version"
+ "rawSpec": "~2.78.0",
+ "spec": ">=2.78.0 <2.79.0",
+ "type": "range"
},
- "/Users/rebecca/code/npm"
+ "/Users/ogd/Documents/projects/npm/npm"
]
],
- "_from": "request@2.75.0",
- "_id": "request@2.75.0",
+ "_from": "request@>=2.78.0 <2.79.0",
+ "_id": "request@2.78.0",
"_inCache": true,
"_location": "/request",
"_nodeVersion": "6.5.0",
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/request-2.75.0.tgz_1474151606844_0.8052814984694123"
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/request-2.78.0.tgz_1478180284881_0.7387848466169089"
},
"_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.78.0",
"scope": null,
"escapedName": "request",
"name": "request",
- "rawSpec": "2.75.0",
- "spec": "2.75.0",
- "type": "version"
+ "rawSpec": "~2.78.0",
+ "spec": ">=2.78.0 <2.79.0",
+ "type": "range"
},
"_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.78.0.tgz",
+ "_shasum": "e1c8dec346e1c81923b24acdb337f11decabe9cc",
"_shrinkwrap": null,
- "_spec": "request@2.75.0",
- "_where": "/Users/rebecca/code/npm",
+ "_spec": "request@~2.78.0",
+ "_where": "/Users/ogd/Documents/projects/npm/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",
@@ -77,7 +77,7 @@
"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"
@@ -107,13 +107,13 @@
},
"directories": {},
"dist": {
- "shasum": "d2b8268a286da13eaa5d01adf5d18cc90f657d93",
- "tarball": "https://registry.npmjs.org/request/-/request-2.75.0.tgz"
+ "shasum": "e1c8dec346e1c81923b24acdb337f11decabe9cc",
+ "tarball": "https://registry.npmjs.org/request/-/request-2.78.0.tgz"
},
"engines": {
- "node": ">=0.8.0"
+ "node": ">= 4"
},
- "gitHead": "e9f09c2832073858d6d988ba82a2895f36efa92d",
+ "gitHead": "d4a68e9b64979f388c204f5d957e366878262340",
"greenkeeper": {
"ignore": [
"eslint",
@@ -162,5 +162,5 @@
"util",
"utility"
],
- "version": "2.75.0"
+ "version": "2.78.0"
}
diff --git a/node_modules/request/request.js b/node_modules/request/request.js
index 96a71b6ed..9528b5662 100644
--- a/node_modules/request/request.js
+++ b/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().