Compare commits

...

4 Commits

Author SHA1 Message Date
cd2d7b2525 2.0.1 2022-07-29 15:41:33 +02:00
2d4a75c9cd fix(core): update 2022-07-29 15:41:32 +02:00
557fec0386 2.0.0 2022-07-29 01:20:25 +02:00
e803f9e48d BREAKING CHANGE(core): switch to esm 2022-07-29 01:20:24 +02:00
5 changed files with 13 additions and 10 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@pushrocks/smartrequest", "name": "@pushrocks/smartrequest",
"version": "1.1.57", "version": "2.0.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@pushrocks/smartrequest", "name": "@pushrocks/smartrequest",
"version": "1.1.57", "version": "2.0.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@pushrocks/smartpromise": "^3.1.7", "@pushrocks/smartpromise": "^3.1.7",

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartrequest", "name": "@pushrocks/smartrequest",
"version": "1.1.57", "version": "2.0.1",
"private": false, "private": false,
"description": "dropin replacement for request", "description": "dropin replacement for request",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

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

View File

@ -13,7 +13,6 @@ 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 { agentkeepalive, formData }; export { formData };

View File

@ -57,9 +57,8 @@ 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.agentkeepalive({ const httpAgent = new plugins.http.Agent({
keepAlive: true, keepAlive: true,
freeSocketTimeout: 4000,
maxFreeSockets: 1, maxFreeSockets: 1,
maxSockets: 100, maxSockets: 100,
maxTotalSockets: 1000, maxTotalSockets: 1000,
@ -68,7 +67,7 @@ const httpAgent = new plugins.agentkeepalive({
/** /**
* 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 httpAgentKeepAliveFalse = new plugins.agentkeepalive({ const httpAgentKeepAliveFalse = new plugins.https.Agent({
maxFreeSockets: 0, maxFreeSockets: 0,
keepAlive: false, keepAlive: false,
keepAliveMsecs: 0, keepAliveMsecs: 0,
@ -77,7 +76,12 @@ const httpAgentKeepAliveFalse = new plugins.agentkeepalive({
/** /**
* 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.agentkeepalive.HttpsAgent(); const httpsAgent = new plugins.https.Agent({
keepAlive: true,
maxFreeSockets: 1,
maxSockets: 100,
maxTotalSockets: 1000,
});
/** /**
* 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