fix(core): update

This commit is contained in:
Philipp Kunz 2019-09-28 22:50:35 +02:00
parent 03d884ed59
commit 9960aff219
4 changed files with 46 additions and 8 deletions

36
package-lock.json generated
View File

@ -407,6 +407,16 @@
"integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw==",
"dev": true
},
"agentkeepalive": {
"version": "4.0.2",
"resolved": "https://verdaccio.lossless.one/agentkeepalive/-/agentkeepalive-4.0.2.tgz",
"integrity": "sha512-A5gSniD4xMCYtSD4ilUHpQRB9ZbNjtIPittKUv7bA0j0UCwbT3EJBUYLKPJ/dtmaXRYWI2mG4/O90xbi7oahNw==",
"requires": {
"debug": "^4.1.0",
"depd": "^1.1.2",
"humanize-ms": "^1.2.1"
}
},
"ansi-256-colors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz",
@ -658,6 +668,14 @@
"which": "^1.2.9"
}
},
"debug": {
"version": "4.1.1",
"resolved": "https://verdaccio.lossless.one/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
@ -695,6 +713,11 @@
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"depd": {
"version": "1.1.2",
"resolved": "https://verdaccio.lossless.one/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"diff": {
"version": "4.0.1",
"resolved": "https://verdaccio.lossless.one/diff/-/diff-4.0.1.tgz",
@ -844,6 +867,14 @@
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"humanize-ms": {
"version": "1.2.1",
"resolved": "https://verdaccio.lossless.one/humanize-ms/-/humanize-ms-1.2.1.tgz",
"integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=",
"requires": {
"ms": "^2.0.0"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@ -1045,6 +1076,11 @@
"moment": ">= 2.9.0"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://verdaccio.lossless.one/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",

View File

@ -25,6 +25,7 @@
"dependencies": {
"@pushrocks/smartpromise": "^3.0.5",
"@types/form-data": "^2.5.0",
"agentkeepalive": "^4.0.2",
"form-data": "^2.5.1"
},
"devDependencies": {

View File

@ -8,3 +8,10 @@ import * as url from 'url';
import * as smartpromise from '@pushrocks/smartpromise';
export { formData, http, https, fs, path, url, smartpromise };
// third party scope
import * as agentkeepalive from 'agentkeepalive';
export {
agentkeepalive
};

View File

@ -57,10 +57,7 @@ const parseSocketPathAndRoute = (stringToParseArg: string) => {
/**
* a custom http agent to make sure we can set custom keepAlive options for speedy subsequent calls
*/
const httpAgent = new plugins.http.Agent({
keepAlive: true,
keepAliveMsecs: 600000
});
const httpAgent = new plugins.agentkeepalive.default();
/**
* a custom http agent to make sure we can set custom keepAlive options for speedy subsequent calls
@ -74,10 +71,7 @@ const httpAgentKeepAliveFalse = new plugins.http.Agent({
/**
* a custom https agent to make sure we can set custom keepAlive options for speedy subsequent calls
*/
const httpsAgent = new plugins.https.Agent({
keepAlive: true,
keepAliveMsecs: 600000
});
const httpsAgent = new plugins.agentkeepalive.HttpsAgent();
/**
* a custom https agent to make sure we can set custom keepAlive options for speedy subsequent calls