fix(core): update

This commit is contained in:
Philipp Kunz 2022-08-06 22:29:12 +02:00
parent e2845c9992
commit 6600a23a00
4 changed files with 606 additions and 1836 deletions

2416
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -26,16 +26,16 @@
"homepage": "https://gitlab.com/pushrocks/smartrequest#README",
"dependencies": {
"@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smarturl": "^3.0.2",
"@pushrocks/smarturl": "^3.0.3",
"agentkeepalive": "^4.2.1",
"form-data": "^4.0.0"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.63",
"@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsrun": "^1.2.37",
"@gitzone/tstest": "^1.0.72",
"@gitzone/tstest": "^1.0.73",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.6.2"
"@types/node": "^18.6.4"
},
"files": [
"ts/**/*",

View File

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

View File

@ -135,16 +135,16 @@ export let request = async (
// lets determine the request module to use
const requestModule = (() => {
switch (true) {
case parsedUrl.protocol === 'https' && optionsArg.keepAlive:
case parsedUrl.protocol === 'https:' && optionsArg.keepAlive:
optionsArg.agent = httpsAgent;
return plugins.https;
case parsedUrl.protocol === 'https' && !optionsArg.keepAlive:
case parsedUrl.protocol === 'https:' && !optionsArg.keepAlive:
optionsArg.agent = httpsAgentKeepAliveFalse;
return plugins.https;
case parsedUrl.protocol === 'http' && optionsArg.keepAlive:
case parsedUrl.protocol === 'http:' && optionsArg.keepAlive:
optionsArg.agent = httpAgent;
return plugins.http;
case parsedUrl.protocol === 'http' && !optionsArg.keepAlive:
case parsedUrl.protocol === 'http:' && !optionsArg.keepAlive:
optionsArg.agent = httpAgentKeepAliveFalse;
return plugins.http;
}