fix(core): update

This commit is contained in:
Philipp Kunz 2022-07-30 01:52:04 +02:00
parent 306dd7c366
commit 43710c930e
5 changed files with 11 additions and 19 deletions

15
package-lock.json generated
View File

@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"@pushrocks/smartpromise": "^3.1.7", "@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smarturl": "^3.0.2", "@pushrocks/smarturl": "^3.0.2",
"agentkeepalive": "^4.2.1",
"form-data": "^4.0.0" "form-data": "^4.0.0"
}, },
"devDependencies": { "devDependencies": {
@ -2593,7 +2594,6 @@
"version": "4.2.1", "version": "4.2.1",
"resolved": "https://verdaccio.lossless.one/agentkeepalive/-/agentkeepalive-4.2.1.tgz", "resolved": "https://verdaccio.lossless.one/agentkeepalive/-/agentkeepalive-4.2.1.tgz",
"integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"debug": "^4.1.0", "debug": "^4.1.0",
@ -3663,7 +3663,6 @@
"version": "4.3.3", "version": "4.3.3",
"resolved": "https://verdaccio.lossless.one/debug/-/debug-4.3.3.tgz", "resolved": "https://verdaccio.lossless.one/debug/-/debug-4.3.3.tgz",
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"ms": "2.1.2" "ms": "2.1.2"
@ -3756,7 +3755,6 @@
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://verdaccio.lossless.one/depd/-/depd-1.1.2.tgz", "resolved": "https://verdaccio.lossless.one/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">= 0.6" "node": ">= 0.6"
@ -5284,7 +5282,6 @@
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://verdaccio.lossless.one/humanize-ms/-/humanize-ms-1.2.1.tgz", "resolved": "https://verdaccio.lossless.one/humanize-ms/-/humanize-ms-1.2.1.tgz",
"integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"ms": "^2.0.0" "ms": "^2.0.0"
@ -6396,7 +6393,6 @@
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://verdaccio.lossless.one/ms/-/ms-2.1.2.tgz", "resolved": "https://verdaccio.lossless.one/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/nan": { "node_modules/nan": {
@ -10863,7 +10859,6 @@
"version": "4.2.1", "version": "4.2.1",
"resolved": "https://verdaccio.lossless.one/agentkeepalive/-/agentkeepalive-4.2.1.tgz", "resolved": "https://verdaccio.lossless.one/agentkeepalive/-/agentkeepalive-4.2.1.tgz",
"integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==",
"dev": true,
"requires": { "requires": {
"debug": "^4.1.0", "debug": "^4.1.0",
"depd": "^1.1.2", "depd": "^1.1.2",
@ -11618,7 +11613,6 @@
"version": "4.3.3", "version": "4.3.3",
"resolved": "https://verdaccio.lossless.one/debug/-/debug-4.3.3.tgz", "resolved": "https://verdaccio.lossless.one/debug/-/debug-4.3.3.tgz",
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"dev": true,
"requires": { "requires": {
"ms": "2.1.2" "ms": "2.1.2"
} }
@ -11678,8 +11672,7 @@
"depd": { "depd": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://verdaccio.lossless.one/depd/-/depd-1.1.2.tgz", "resolved": "https://verdaccio.lossless.one/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
"dev": true
}, },
"dependency-graph": { "dependency-graph": {
"version": "0.11.0", "version": "0.11.0",
@ -12652,7 +12645,6 @@
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://verdaccio.lossless.one/humanize-ms/-/humanize-ms-1.2.1.tgz", "resolved": "https://verdaccio.lossless.one/humanize-ms/-/humanize-ms-1.2.1.tgz",
"integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=",
"dev": true,
"requires": { "requires": {
"ms": "^2.0.0" "ms": "^2.0.0"
} }
@ -13461,8 +13453,7 @@
"ms": { "ms": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://verdaccio.lossless.one/ms/-/ms-2.1.2.tgz", "resolved": "https://verdaccio.lossless.one/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
"dev": true
}, },
"nan": { "nan": {
"version": "2.14.2", "version": "2.14.2",

View File

@ -27,6 +27,7 @@
"dependencies": { "dependencies": {
"@pushrocks/smartpromise": "^3.1.7", "@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smarturl": "^3.0.2", "@pushrocks/smarturl": "^3.0.2",
"agentkeepalive": "^4.2.1",
"form-data": "^4.0.0" "form-data": "^4.0.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@pushrocks/smartrequest', name: '@pushrocks/smartrequest',
version: '2.0.3', version: '2.0.4',
description: 'dropin replacement for request' description: 'dropin replacement for request'
} }

View File

@ -13,6 +13,7 @@ import * as smarturl from '@pushrocks/smarturl';
export { smartpromise, smarturl }; export { smartpromise, smarturl };
// third party scope // third party scope
import agentkeepalive from 'agentkeepalive';
import formData from 'form-data'; import formData from 'form-data';
export { formData }; export { agentkeepalive, formData };

View File

@ -57,7 +57,7 @@ const parseSocketPathAndRoute = (stringToParseArg: string) => {
/** /**
* a custom http agent to make sure we can set custom keepAlive options for speedy subsequent calls * a custom http agent to make sure we can set custom keepAlive options for speedy subsequent calls
*/ */
const httpAgent = new plugins.http.Agent({ const httpAgent = new plugins.agentkeepalive({
keepAlive: true, keepAlive: true,
maxFreeSockets: 1, maxFreeSockets: 1,
maxSockets: 100, maxSockets: 100,
@ -75,7 +75,7 @@ const httpAgentKeepAliveFalse = new plugins.https.Agent({
/** /**
* a custom https agent to make sure we can set custom keepAlive options for speedy subsequent calls * a custom https agent to make sure we can set custom keepAlive options for speedy subsequent calls
*/ */
const httpsAgent = new plugins.https.Agent({ const httpsAgent = new plugins.agentkeepalive.HttpsAgent({
keepAlive: true, keepAlive: true,
maxFreeSockets: 1, maxFreeSockets: 1,
maxSockets: 100, maxSockets: 100,
@ -85,10 +85,9 @@ const httpsAgent = new plugins.https.Agent({
/** /**
* a custom https agent to make sure we can set custom keepAlive options for speedy subsequent calls * a custom https agent to make sure we can set custom keepAlive options for speedy subsequent calls
*/ */
const httpsAgentKeepAliveFalse = new plugins.https.Agent({ const httpsAgentKeepAliveFalse = new plugins.agentkeepalive.HttpsAgent({
maxFreeSockets: 0, maxFreeSockets: 0,
keepAlive: false, keepAlive: false
keepAliveMsecs: 0,
}); });
export let request = async ( export let request = async (