@trivikr-test/node-http-handler
Advanced tools
Comparing version 3.170.0-es2019 to 3.170.0-es2020
@@ -38,5 +38,4 @@ import { HttpResponse } from "@trivikr-test/protocol-http"; | ||
destroy() { | ||
var _a, _b, _c, _d; | ||
(_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.httpAgent) === null || _b === void 0 ? void 0 : _b.destroy(); | ||
(_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.httpsAgent) === null || _d === void 0 ? void 0 : _d.destroy(); | ||
this.config?.httpAgent?.destroy(); | ||
this.config?.httpsAgent?.destroy(); | ||
} | ||
@@ -51,3 +50,3 @@ async handle(request, { abortSignal } = {}) { | ||
} | ||
if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { | ||
if (abortSignal?.aborted) { | ||
const abortError = new Error("Request aborted"); | ||
@@ -54,0 +53,0 @@ abortError.name = "AbortError"; |
@@ -36,3 +36,3 @@ import { HttpResponse } from "@trivikr-test/protocol-http"; | ||
let fulfilled = false; | ||
if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { | ||
if (abortSignal?.aborted) { | ||
fulfilled = true; | ||
@@ -110,3 +110,2 @@ const abortError = new Error("Request aborted"); | ||
getSession(authority, disableConcurrentStreams) { | ||
var _a; | ||
const sessionCache = this.sessionCache; | ||
@@ -126,3 +125,3 @@ const existingSessions = sessionCache.get(authority) || []; | ||
newSession.on("close", () => this.deleteSessionFromCache(authority, newSession)); | ||
if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.sessionTimeout) { | ||
if (this.config?.sessionTimeout) { | ||
newSession.setTimeout(this.config.sessionTimeout, destroySessionCb); | ||
@@ -129,0 +128,0 @@ } |
{ | ||
"name": "@trivikr-test/node-http-handler", | ||
"version": "3.170.0-es2019", | ||
"version": "3.170.0-es2020", | ||
"description": "Provides a way to make requests", | ||
@@ -25,6 +25,6 @@ "scripts": { | ||
"dependencies": { | ||
"@trivikr-test/abort-controller": "3.170.0-es2019", | ||
"@trivikr-test/protocol-http": "3.170.0-es2019", | ||
"@trivikr-test/querystring-builder": "3.170.0-es2019", | ||
"@trivikr-test/types": "3.170.0-es2019", | ||
"@trivikr-test/abort-controller": "3.170.0-es2020", | ||
"@trivikr-test/protocol-http": "3.170.0-es2020", | ||
"@trivikr-test/querystring-builder": "3.170.0-es2020", | ||
"@trivikr-test/types": "3.170.0-es2020", | ||
"tslib": "^2.3.1" | ||
@@ -31,0 +31,0 @@ }, |
58987
1179
+ Added@trivikr-test/abort-controller@3.170.0-es2020(transitive)
+ Added@trivikr-test/protocol-http@3.170.0-es2020(transitive)
+ Added@trivikr-test/querystring-builder@3.170.0-es2020(transitive)
+ Added@trivikr-test/types@3.170.0-es2020(transitive)
+ Added@trivikr-test/util-uri-escape@3.170.0-es2020(transitive)
- Removed@trivikr-test/abort-controller@3.170.0-es2019(transitive)
- Removed@trivikr-test/protocol-http@3.170.0-es2019(transitive)
- Removed@trivikr-test/querystring-builder@3.170.0-es2019(transitive)
- Removed@trivikr-test/types@3.170.0-es2019(transitive)
- Removed@trivikr-test/util-uri-escape@3.170.0-es2019(transitive)