glynnbird closed pull request #128: Pass request agent to cloudant-follow
URL: https://github.com/apache/couchdb-nano/pull/128
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/lib/nano.js b/lib/nano.js
index 572c9d9..cb3ddc8 100644
--- a/lib/nano.js
+++ b/lib/nano.js
@@ -376,6 +376,7 @@ module.exports = exports = function dbScope (cfg) {
function followDb (dbName, qs0, callback0) {
const {opts, callback} = getCallback(qs0, callback0)
opts.db = urlResolveFix(cfg.url, encodeURIComponent(dbName))
+ opts.httpAgent = httpAgent;
if (typeof callback === 'function') {
return followAgent(opts, callback)
} else {
diff --git a/package-lock.json b/package-lock.json
index 2a2788b..fe86077 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -429,22 +429,27 @@
}
},
"cloudant-follow": {
- "version": "0.17.0",
- "resolved":
"https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.17.0.tgz",
- "integrity":
"sha512-JQ1xvKAHh8rsnSVBjATLCjz/vQw1sWBGadxr2H69yFMwD7hShUGDwwEefdypaxroUJ/w6t1cSwilp/hRUxEW8w==",
+ "version": "0.18.0",
+ "resolved":
"https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.0.tgz",
+ "integrity":
"sha512-jsplCsI0EpJvTrlgeuuYFrmrKGxm8TlSkyKzOLZa6fc6p+FNT8UDPAwYeh0yaT8IdI+sxT5DTdCD2G45HWpSaw==",
"requires": {
"browser-request": "~0.3.0",
- "debug": "^3.0.0",
- "request": "^2.83.0"
+ "debug": "^4.0.1",
+ "request": "^2.88.0"
},
"dependencies": {
"debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity":
"sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz",
+ "integrity":
"sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==",
"requires": {
- "ms": "2.0.0"
+ "ms": "^2.1.1"
}
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity":
"sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
diff --git a/package.json b/package.json
index 253cf57..bb7fe86 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
],
"dependencies": {
"@types/request": "^2.47.1",
- "cloudant-follow": "~0.17.0",
+ "cloudant-follow": "^0.18.0",
"debug": "^2.2.0",
"errs": "^0.3.2",
"lodash.isempty": "^4.4.0",
diff --git a/tests/helpers/unit.js b/tests/helpers/unit.js
index 57441fe..4016c6f 100644
--- a/tests/helpers/unit.js
+++ b/tests/helpers/unit.js
@@ -89,6 +89,11 @@ helpers.unit = function (method, error) {
stub.db = helpers.couch + stub.db
}
+ if (method[1] === 'follow' || method[1] === 'followUpdates') {
+ assert.ok(typeof req.httpAgent, 'object');
+ delete req.httpAgent; // ignore 'httpAgent' in deep equal assert
+ }
+
assert.deepEqual(req, stub)
assert.end()
})
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services