Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix socket info in fetch response #555

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/BaseAgent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import {
Agent,
Dispatcher,
} from 'undici';
import { AsyncLocalStorage } from 'node:async_hooks';
import { FetchOpaque } from './FetchOpaqueInterceptor.js';

export interface BaseAgentOptions extends Agent.Options {
opaqueLocalStorage: AsyncLocalStorage<FetchOpaque>;
}

export class BaseAgent extends Agent {
#opaqueLocalStorage: AsyncLocalStorage<FetchOpaque>;

constructor(options: BaseAgentOptions) {
super(options);
this.#opaqueLocalStorage = options.opaqueLocalStorage;
}

dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean {
const opaque = this.#opaqueLocalStorage.getStore();

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.287, keepAliveSocket: true, requestUrls: [ 'http://localhost:46867/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.135, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.166, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:46867/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.133, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:46867/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.234, keepAliveSocket: true, requestUrls: [ 'http://localhost:37319/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.114, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.139, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:37319/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.105, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:37319/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.251, keepAliveSocket: true, requestUrls: [ 'http://localhost:40029/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.099, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.077, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:40029/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.133, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:40029/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.185, keepAliveSocket: true, requestUrls: [ 'http://localhost:49196/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.072, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.035, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:49196/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.053, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:49196/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.29, keepAliveSocket: true, requestUrls: [ 'http://localhost:44961/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.23, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.135, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:44961/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.159, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:44961/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.218, keepAliveSocket: true, requestUrls: [ 'http://localhost:42193/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.129, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.092, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:42193/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.116, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:42193/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.121, keepAliveSocket: true, requestUrls: [ 'http://localhost:49196/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.091, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.068, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:49196/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.081, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:49196/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.207, keepAliveSocket: true, requestUrls: [ 'http://localhost:49199/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.135, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.066, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:49199/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.09, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:49199/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.195, keepAliveSocket: true, requestUrls: [ 'http://localhost:49310/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.096, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.076, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:49310/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.301, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:49310/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.259, keepAliveSocket: true, requestUrls: [ 'http://localhost:60329/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.123, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.102, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:60329/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18.19.0)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.122, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:60329/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.376, keepAliveSocket: true, requestUrls: [ 'http://localhost:53715/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.146, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.108, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:53715/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.165, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:53715/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.347, keepAliveSocket: true, requestUrls: [ 'http://localhost:57217/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.267, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.141, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:57217/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 20)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.151, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:57217/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.284, keepAliveSocket: true, requestUrls: [ 'http://localhost:53467/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.182, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.107, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:53467/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 23)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.122, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:53467/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.465, keepAliveSocket: true, requestUrls: [ 'http://localhost:49195/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.14, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.132, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:49195/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.472, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:49195/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:255:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.379, keepAliveSocket: true, requestUrls: [ 'http://localhost:56530/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:279:39 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.135, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:382:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.109, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:56530/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

Check failure on line 21 in src/BaseAgent.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 22)

test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check

TypeError: Cannot read properties of undefined (reading 'getStore') ❯ HttpAgent.dispatch src/BaseAgent.ts:21:45 ❯ HttpAgent.dispatch src/HttpAgent.ts:90:18 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10 ❯ node_modules/undici/lib/api/api-request.js:179:15 ❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12 ❯ Proxy.<anonymous> node_modules/undici/index.js:109:15 ❯ HttpClient.#requestInternal src/HttpClient.ts:581:28 ❯ HttpClient.request src/HttpClient.ts:245:23 ❯ test/HttpClient.test.ts:472:41 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.115, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:56530/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }
(handler as any).opaque = opaque;
return super.dispatch(options, handler);
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical Issue: Handle Undefined opaqueLocalStorage

If opaqueLocalStorage is not provided in options, accessing this.#opaqueLocalStorage.getStore() will result in a TypeError. To prevent this, you should provide a default value or handle the case where opaqueLocalStorage is undefined.

Apply this diff to provide a default value for opaqueLocalStorage:

export interface BaseAgentOptions extends Agent.Options {
- opaqueLocalStorage: AsyncLocalStorage<FetchOpaque>;
+ opaqueLocalStorage?: AsyncLocalStorage<FetchOpaque>;
}

export class BaseAgent extends Agent {
  #opaqueLocalStorage: AsyncLocalStorage<FetchOpaque>;

  constructor(options: BaseAgentOptions) {
    super(options);
-   this.#opaqueLocalStorage = options.opaqueLocalStorage;
+   this.#opaqueLocalStorage = options.opaqueLocalStorage ?? new AsyncLocalStorage<FetchOpaque>();
  }

  dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean {
-   const opaque = this.#opaqueLocalStorage.getStore();
+   const opaque = this.#opaqueLocalStorage?.getStore();
    (handler as any).opaque = opaque;
    return super.dispatch(options, handler);
  }
}

This modification ensures that opaqueLocalStorage has a default value and gracefully handles cases where it's not provided.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export interface BaseAgentOptions extends Agent.Options {
opaqueLocalStorage: AsyncLocalStorage<FetchOpaque>;
}
export class BaseAgent extends Agent {
#opaqueLocalStorage: AsyncLocalStorage<FetchOpaque>;
constructor(options: BaseAgentOptions) {
super(options);
this.#opaqueLocalStorage = options.opaqueLocalStorage;
}
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean {
const opaque = this.#opaqueLocalStorage.getStore();
(handler as any).opaque = opaque;
return super.dispatch(options, handler);
}
}
export interface BaseAgentOptions extends Agent.Options {
opaqueLocalStorage?: AsyncLocalStorage<FetchOpaque>;
}
export class BaseAgent extends Agent {
#opaqueLocalStorage: AsyncLocalStorage<FetchOpaque>;
constructor(options: BaseAgentOptions) {
super(options);
this.#opaqueLocalStorage = options.opaqueLocalStorage ?? new AsyncLocalStorage<FetchOpaque>();
}
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean {
const opaque = this.#opaqueLocalStorage?.getStore();
(handler as any).opaque = opaque;
return super.dispatch(options, handler);
}
}
🧰 Tools
🪛 GitHub Check: Node.js / Test (ubuntu-latest, 23)

[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:255:39

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.234, keepAliveSocket: true, requestUrls: [ 'http://localhost:37319/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:279:39

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.114, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:382:41

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.139, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:37319/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:472:41

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.105, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:37319/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

🪛 GitHub Check: Node.js / Test (ubuntu-latest, 22)

[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:255:39

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.251, keepAliveSocket: true, requestUrls: [ 'http://localhost:40029/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:279:39

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.099, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:382:41

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.077, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:40029/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:472:41

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.133, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:40029/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

🪛 GitHub Check: Node.js / Test (ubuntu-latest, 20)

[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:255:39

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.287, keepAliveSocket: true, requestUrls: [ 'http://localhost:46867/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:279:39

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.135, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:382:41

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.166, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:46867/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:472:41

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.133, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:46867/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

🪛 GitHub Check: Node.js / Test (macos-latest, 22)

[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTP protol
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:255:39

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.185, keepAliveSocket: true, requestUrls: [ 'http://localhost:49196/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.lookup > should work with custom lookup on HTTPS protol
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:279:39

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.072, keepAliveSocket: true, requestUrls: [ 'https://registry.npmmirror.com/urllib' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should check ip hostname
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:382:41

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.035, keepAliveSocket: true, requestUrls: [ 'http://127.0.0.1:49196/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }


[failure] 21-21: test/HttpClient.test.ts > HttpClient.test.ts > clientOptions.checkAddress > should allow hostname check
TypeError: Cannot read properties of undefined (reading 'getStore')
❯ HttpAgent.dispatch src/BaseAgent.ts:21:45
❯ HttpAgent.dispatch src/HttpAgent.ts:90:18
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:188:10
❯ node_modules/undici/lib/api/api-request.js:179:15
❯ HttpAgent.request node_modules/undici/lib/api/api-request.js:178:12
❯ Proxy. node_modules/undici/index.js:109:15
❯ HttpClient.#requestInternal src/HttpClient.ts:581:28
❯ HttpClient.request src/HttpClient.ts:245:23
❯ test/HttpClient.test.ts:472:41

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { opaque: undefined, status: -1, headers: {}, res: { status: -1, statusCode: -1, statusText: '', statusMessage: '', headers: {}, size: +0, aborted: false, rt: 0.053, keepAliveSocket: true, requestUrls: [ 'http://check-host-ssrf.com:49196/' ], timing: { queuing: +0, connected: +0, requestHeadersSent: +0, requestSent: +0, waiting: +0, contentDownload: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 }, retries: +0, socketErrorRetries: +0 }, socket: { id: +0, localAddress: '', localPort: +0, remoteAddress: '', remotePort: +0, remoteFamily: '', bytesWritten: +0, bytesRead: +0, handledRequests: +0, handledResponses: +0 } }

12 changes: 0 additions & 12 deletions src/FetchOpaqueInterceptor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// const { AsyncLocalStorage } = require('node:async_hooks');
import { AsyncLocalStorage } from 'node:async_hooks';
import symbols from './symbols.js';
import { Dispatcher } from 'undici';

// const RedirectHandler = require('../handler/redirect-handler')

Expand All @@ -28,14 +27,3 @@ export interface FetchOpaque {
export interface OpaqueInterceptorOptions {
opaqueLocalStorage: AsyncLocalStorage<FetchOpaque>;
}

export function fetchOpaqueInterceptor(opts: OpaqueInterceptorOptions) {
const opaqueLocalStorage = opts?.opaqueLocalStorage;
return (dispatch: Dispatcher['dispatch']): Dispatcher['dispatch'] => {
return function redirectInterceptor(opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler) {
const opaque = opaqueLocalStorage?.getStore();
(handler as any).opaque = opaque;
return dispatch(opts, handler);
};
};
}
5 changes: 3 additions & 2 deletions src/HttpAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import {
Dispatcher,
buildConnector,
} from 'undici';
import { BaseAgent, BaseAgentOptions } from './BaseAgent.js';

export type CheckAddressFunction = (ip: string, family: number | string, hostname: string) => boolean;

export interface HttpAgentOptions extends Agent.Options {
export interface HttpAgentOptions extends BaseAgentOptions {
lookup?: LookupFunction;
checkAddress?: CheckAddressFunction;
connect?: buildConnector.BuildOptions,
Expand All @@ -31,7 +32,7 @@ class IllegalAddressError extends Error {
}
}

export class HttpAgent extends Agent {
export class HttpAgent extends BaseAgent {
#checkAddress?: CheckAddressFunction;

constructor(options: HttpAgentOptions) {
Expand Down
25 changes: 10 additions & 15 deletions src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Agent,
getGlobalDispatcher,
Pool,
Dispatcher,
} from 'undici';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Expand Down Expand Up @@ -35,9 +36,10 @@ import {
HttpMethod,
RequestMeta,
} from './Request.js';
import { FetchOpaque, fetchOpaqueInterceptor } from './FetchOpaqueInterceptor.js';
import { FetchOpaque } from './FetchOpaqueInterceptor.js';
import { RawResponseWithMeta, SocketInfo } from './Response.js';
import { IncomingHttpHeaders } from './IncomingHttpHeaders.js';
import { BaseAgent, BaseAgentOptions } from './BaseAgent.js';

export interface UrllibRequestInit extends RequestInit {
// default is true
Expand All @@ -56,7 +58,7 @@ export type FetchResponseDiagnosticsMessage = {
};

export class FetchFactory {
static #dispatcher: Agent;
static #dispatcher: Dispatcher.ComposedDispatcher;
static #opaqueLocalStorage = new AsyncLocalStorage<FetchOpaque>();

static getDispatcher() {
Expand All @@ -68,17 +70,10 @@ export class FetchFactory {
}

static setClientOptions(clientOptions: ClientOptions) {
let dispatcherOption: Agent.Options = {
interceptors: {
Agent: [
fetchOpaqueInterceptor({
opaqueLocalStorage: FetchFactory.#opaqueLocalStorage,
}),
],
Client: [],
},
let dispatcherOption: BaseAgentOptions = {
opaqueLocalStorage: FetchFactory.#opaqueLocalStorage,
};
let dispatcherClazz: new (options: Agent.Options) => Agent = Agent;
let dispatcherClazz: new (options: BaseAgentOptions) => BaseAgent = BaseAgent;
if (clientOptions?.lookup || clientOptions?.checkAddress) {
dispatcherOption = {
...dispatcherOption,
Expand All @@ -87,21 +82,21 @@ export class FetchFactory {
connect: clientOptions.connect,
allowH2: clientOptions.allowH2,
} as HttpAgentOptions;
dispatcherClazz = HttpAgent as unknown as new (options: Agent.Options) => Agent;
dispatcherClazz = HttpAgent as unknown as new (options: BaseAgentOptions) => BaseAgent;
} else if (clientOptions?.connect) {
dispatcherOption = {
...dispatcherOption,
connect: clientOptions.connect,
allowH2: clientOptions.allowH2,
} as HttpAgentOptions;
dispatcherClazz = Agent;
dispatcherClazz = BaseAgent;
} else if (clientOptions?.allowH2) {
// Support HTTP2
dispatcherOption = {
...dispatcherOption,
allowH2: clientOptions.allowH2,
} as HttpAgentOptions;
dispatcherClazz = Agent;
dispatcherClazz = BaseAgent;
}
FetchFactory.#dispatcher = new dispatcherClazz(dispatcherOption);
initDiagnosticsChannel();
Expand Down
1 change: 1 addition & 0 deletions test/fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
assert(requestDiagnosticsMessage!.request);
assert(responseDiagnosticsMessage!.request);
assert(responseDiagnosticsMessage!.response);
assert.equal(responseDiagnosticsMessage!.response.socket.localAddress, '127.0.0.1');

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 20)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 23)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: '::1' !== '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 22)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 22)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18.19.0)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 20)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 23)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: '::1' !== '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18.19.0)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18.19.0)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 20)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 23)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: '::1' !== '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12

Check failure on line 49 in test/fetch.test.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 22)

test/fetch.test.ts > fetch.test.ts > fetch should work

AssertionError: Expected values to be strictly equal: + actual - expected + '::1' - '127.0.0.1' Expected: "127.0.0.1" Received: "::1" ❯ test/fetch.test.ts:49:12
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix Test Assertion to Support IPv6 Loopback Address

The test is failing because the localAddress is '::1' (IPv6 loopback) instead of '127.0.0.1' (IPv4 loopback). This can happen in environments where IPv6 is preferred. To make the test more robust, adjust the assertion to accept both IPv4 and IPv6 loopback addresses.

Apply this diff to update the assertion:

assert.equal(responseDiagnosticsMessage!.response.socket.localAddress, '127.0.0.1');
+ assert(['127.0.0.1', '::1'].includes(responseDiagnosticsMessage!.response.socket.localAddress));

Alternatively, use a regular expression to match any loopback address:

+ assert(/^(127\.0\.0\.1|::1)$/.test(responseDiagnosticsMessage!.response.socket.localAddress));

This adjustment ensures the test passes regardless of whether the environment uses IPv4 or IPv6 for loopback addresses.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 GitHub Check: Node.js / Test (ubuntu-latest, 23)

[failure] 49-49: test/fetch.test.ts > fetch.test.ts > fetch should work
AssertionError: Expected values to be strictly equal:

'::1' !== '127.0.0.1'

Expected: "127.0.0.1"
Received: "::1"

❯ test/fetch.test.ts:49:12

🪛 GitHub Check: Node.js / Test (ubuntu-latest, 22)

[failure] 49-49: test/fetch.test.ts > fetch.test.ts > fetch should work
AssertionError: Expected values to be strictly equal:

  • actual - expected

  • '::1'

  • '127.0.0.1'

Expected: "127.0.0.1"
Received: "::1"

❯ test/fetch.test.ts:49:12

🪛 GitHub Check: Node.js / Test (ubuntu-latest, 20)

[failure] 49-49: test/fetch.test.ts > fetch.test.ts > fetch should work
AssertionError: Expected values to be strictly equal:

  • actual - expected

  • '::1'

  • '127.0.0.1'

Expected: "127.0.0.1"
Received: "::1"

❯ test/fetch.test.ts:49:12

🪛 GitHub Check: Node.js / Test (macos-latest, 22)

[failure] 49-49: test/fetch.test.ts > fetch.test.ts > fetch should work
AssertionError: Expected values to be strictly equal:

  • actual - expected

  • '::1'

  • '127.0.0.1'

Expected: "127.0.0.1"
Received: "::1"

❯ test/fetch.test.ts:49:12


assert(fetchDiagnosticsMessage!.fetch);
assert(fetchResponseDiagnosticsMessage!.fetch);
Expand Down
Loading