recker 1.0.15 → 1.0.17-next.316500c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -97
- package/dist/ai/providers/anthropic.d.ts.map +1 -1
- package/dist/ai/providers/anthropic.js +4 -1
- package/dist/ai/providers/base.d.ts.map +1 -1
- package/dist/ai/providers/base.js +7 -2
- package/dist/ai/rate-limiter.d.ts.map +1 -1
- package/dist/ai/rate-limiter.js +4 -1
- package/dist/bench/generator.d.ts.map +1 -1
- package/dist/bench/generator.js +8 -3
- package/dist/bench/stats.d.ts +15 -1
- package/dist/bench/stats.d.ts.map +1 -1
- package/dist/bench/stats.js +117 -5
- package/dist/cache/memory-storage.d.ts.map +1 -1
- package/dist/cache/memory-storage.js +3 -2
- package/dist/cli/handler.js +14 -14
- package/dist/cli/index.js +602 -48
- package/dist/cli/presets.js +5 -5
- package/dist/cli/tui/ai-chat.js +10 -10
- package/dist/cli/tui/load-dashboard.d.ts.map +1 -1
- package/dist/cli/tui/load-dashboard.js +127 -32
- package/dist/cli/tui/scroll-buffer.d.ts +43 -0
- package/dist/cli/tui/scroll-buffer.d.ts.map +1 -0
- package/dist/cli/tui/scroll-buffer.js +162 -0
- package/dist/cli/tui/search-panel.d.ts +41 -0
- package/dist/cli/tui/search-panel.d.ts.map +1 -0
- package/dist/cli/tui/search-panel.js +420 -0
- package/dist/cli/tui/shell.d.ts +14 -0
- package/dist/cli/tui/shell.d.ts.map +1 -1
- package/dist/cli/tui/shell.js +424 -46
- package/dist/cli/tui/websocket.js +17 -17
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +3 -2
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +18 -26
- package/dist/core/errors.d.ts +109 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +214 -1
- package/dist/core/request-promise.d.ts.map +1 -1
- package/dist/core/request-promise.js +5 -6
- package/dist/core/response.d.ts.map +1 -1
- package/dist/core/response.js +5 -6
- package/dist/dns/index.d.ts +1 -0
- package/dist/dns/index.d.ts.map +1 -1
- package/dist/dns/index.js +1 -0
- package/dist/dns/propagation.d.ts +21 -0
- package/dist/dns/propagation.d.ts.map +1 -0
- package/dist/dns/propagation.js +169 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/mcp/client.d.ts.map +1 -1
- package/dist/mcp/client.js +10 -11
- package/dist/mcp/embeddings-loader.d.ts +18 -0
- package/dist/mcp/embeddings-loader.d.ts.map +1 -0
- package/dist/mcp/embeddings-loader.js +162 -0
- package/dist/mcp/geoip-loader.d.ts +11 -0
- package/dist/mcp/geoip-loader.d.ts.map +1 -0
- package/dist/mcp/geoip-loader.js +107 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/ip-intel.d.ts +28 -0
- package/dist/mcp/ip-intel.d.ts.map +1 -0
- package/dist/mcp/ip-intel.js +209 -0
- package/dist/mcp/search/hybrid-search.d.ts.map +1 -1
- package/dist/mcp/search/hybrid-search.js +59 -38
- package/dist/mcp/search/math.d.ts.map +1 -1
- package/dist/mcp/search/math.js +5 -1
- package/dist/mcp/server.d.ts +6 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +122 -2
- package/dist/plugins/compression.js +4 -2
- package/dist/plugins/har-player.d.ts.map +1 -1
- package/dist/plugins/har-player.js +8 -11
- package/dist/plugins/odata.d.ts.map +1 -1
- package/dist/plugins/odata.js +5 -2
- package/dist/presets/aws.d.ts +20 -0
- package/dist/presets/aws.d.ts.map +1 -0
- package/dist/presets/aws.js +68 -0
- package/dist/presets/azure.d.ts +42 -0
- package/dist/presets/azure.d.ts.map +1 -0
- package/dist/presets/azure.js +104 -0
- package/dist/presets/gcp.d.ts +35 -0
- package/dist/presets/gcp.d.ts.map +1 -0
- package/dist/presets/gcp.js +91 -0
- package/dist/presets/index.d.ts +10 -0
- package/dist/presets/index.d.ts.map +1 -1
- package/dist/presets/index.js +10 -0
- package/dist/presets/mailgun.d.ts +8 -0
- package/dist/presets/mailgun.d.ts.map +1 -0
- package/dist/presets/mailgun.js +20 -0
- package/dist/presets/meta.d.ts +11 -0
- package/dist/presets/meta.d.ts.map +1 -0
- package/dist/presets/meta.js +33 -0
- package/dist/presets/oracle.d.ts +20 -0
- package/dist/presets/oracle.d.ts.map +1 -0
- package/dist/presets/oracle.js +117 -0
- package/dist/presets/registry.d.ts.map +1 -1
- package/dist/presets/registry.js +100 -0
- package/dist/presets/sinch.d.ts +10 -0
- package/dist/presets/sinch.d.ts.map +1 -0
- package/dist/presets/sinch.js +39 -0
- package/dist/presets/tiktok.d.ts +11 -0
- package/dist/presets/tiktok.d.ts.map +1 -0
- package/dist/presets/tiktok.js +38 -0
- package/dist/presets/vultr.d.ts +6 -0
- package/dist/presets/vultr.d.ts.map +1 -0
- package/dist/presets/vultr.js +16 -0
- package/dist/presets/youtube.d.ts +6 -0
- package/dist/presets/youtube.d.ts.map +1 -0
- package/dist/presets/youtube.js +20 -0
- package/dist/protocols/ftp.d.ts.map +1 -1
- package/dist/protocols/ftp.js +69 -16
- package/dist/protocols/sftp.d.ts.map +1 -1
- package/dist/protocols/sftp.js +13 -3
- package/dist/protocols/telnet.d.ts.map +1 -1
- package/dist/protocols/telnet.js +25 -6
- package/dist/recker.d.ts +47 -0
- package/dist/recker.d.ts.map +1 -0
- package/dist/recker.js +99 -0
- package/dist/transport/base-udp.d.ts.map +1 -1
- package/dist/transport/base-udp.js +7 -4
- package/dist/transport/udp-response.d.ts.map +1 -1
- package/dist/transport/udp-response.js +10 -3
- package/dist/transport/udp.d.ts.map +1 -1
- package/dist/transport/udp.js +5 -1
- package/dist/transport/undici.d.ts.map +1 -1
- package/dist/transport/undici.js +75 -63
- package/dist/utils/agent-manager.d.ts +1 -0
- package/dist/utils/agent-manager.d.ts.map +1 -1
- package/dist/utils/agent-manager.js +11 -0
- package/dist/utils/client-pool.d.ts.map +1 -1
- package/dist/utils/client-pool.js +4 -1
- package/dist/utils/colors.d.ts +16 -0
- package/dist/utils/colors.d.ts.map +1 -1
- package/dist/utils/colors.js +16 -0
- package/dist/utils/dns-toolkit.d.ts +88 -1
- package/dist/utils/dns-toolkit.d.ts.map +1 -1
- package/dist/utils/dns-toolkit.js +704 -6
- package/dist/utils/doh.d.ts.map +1 -1
- package/dist/utils/doh.js +13 -16
- package/dist/utils/download.d.ts.map +1 -1
- package/dist/utils/download.js +10 -11
- package/dist/utils/rdap.d.ts +9 -0
- package/dist/utils/rdap.d.ts.map +1 -1
- package/dist/utils/rdap.js +78 -9
- package/dist/utils/security-grader.d.ts +47 -0
- package/dist/utils/security-grader.d.ts.map +1 -0
- package/dist/utils/security-grader.js +637 -0
- package/dist/utils/sparkline.d.ts +18 -0
- package/dist/utils/sparkline.d.ts.map +1 -0
- package/dist/utils/sparkline.js +55 -0
- package/dist/utils/sse.d.ts.map +1 -1
- package/dist/utils/sse.js +5 -6
- package/dist/utils/system-metrics.d.ts +26 -0
- package/dist/utils/system-metrics.d.ts.map +1 -0
- package/dist/utils/system-metrics.js +81 -0
- package/dist/utils/tls-inspector.d.ts +6 -0
- package/dist/utils/tls-inspector.d.ts.map +1 -1
- package/dist/utils/tls-inspector.js +35 -1
- package/dist/webrtc/index.d.ts.map +1 -1
- package/dist/webrtc/index.js +21 -7
- package/dist/websocket/client.d.ts.map +1 -1
- package/dist/websocket/client.js +13 -16
- package/package.json +4 -3
- package/dist/mcp/data/embeddings.json +0 -1
package/dist/protocols/sftp.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { requireOptional } from '../utils/optional-require.js';
|
|
2
|
+
import { StateError, ConnectionError } from '../core/errors.js';
|
|
2
3
|
async function loadSFTP() {
|
|
3
4
|
return requireOptional('ssh2-sftp-client', 'recker/protocols/sftp');
|
|
4
5
|
}
|
|
@@ -320,13 +321,19 @@ export class SFTP {
|
|
|
320
321
|
}
|
|
321
322
|
getClient() {
|
|
322
323
|
if (!this.initialized) {
|
|
323
|
-
throw new
|
|
324
|
+
throw new StateError('Client not initialized. Call connect() first.', {
|
|
325
|
+
expectedState: 'initialized',
|
|
326
|
+
actualState: 'not-initialized',
|
|
327
|
+
});
|
|
324
328
|
}
|
|
325
329
|
return this.client;
|
|
326
330
|
}
|
|
327
331
|
ensureConnected() {
|
|
328
332
|
if (!this.connected) {
|
|
329
|
-
throw new
|
|
333
|
+
throw new StateError('Not connected to SFTP server. Call connect() first.', {
|
|
334
|
+
expectedState: 'connected',
|
|
335
|
+
actualState: 'disconnected',
|
|
336
|
+
});
|
|
330
337
|
}
|
|
331
338
|
}
|
|
332
339
|
mapFileType(type) {
|
|
@@ -350,7 +357,10 @@ export async function sftp(config, operation) {
|
|
|
350
357
|
try {
|
|
351
358
|
const result = await client.connect();
|
|
352
359
|
if (!result.success) {
|
|
353
|
-
throw new
|
|
360
|
+
throw new ConnectionError(result.message || 'Failed to connect to SFTP server', {
|
|
361
|
+
host: config.host,
|
|
362
|
+
port: config.port,
|
|
363
|
+
});
|
|
354
364
|
}
|
|
355
365
|
return await operation(client);
|
|
356
366
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telnet.d.ts","sourceRoot":"","sources":["../../src/protocols/telnet.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"telnet.d.ts","sourceRoot":"","sources":["../../src/protocols/telnet.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAwI3C,MAAM,WAAW,YAAY;IAE3B,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,OAAO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AK;IAgBb,OAAO,CAAC,cAAc;IA6BtB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,WAAW;IA2BnB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,OAAO;IAaf,OAAO,CAAC,KAAK;CAKd;AAiBD,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAEzD;AAsBD,wBAAsB,MAAM,CAAC,CAAC,EAC5B,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GACxC,OAAO,CAAC,CAAC,CAAC,CAgBZ"}
|
package/dist/protocols/telnet.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Socket } from 'node:net';
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
|
+
import { StateError, TimeoutError, ConnectionError } from '../core/errors.js';
|
|
3
4
|
const IAC = 255;
|
|
4
5
|
const CMD = {
|
|
5
6
|
SE: 240,
|
|
@@ -209,7 +210,10 @@ export class Telnet extends EventEmitter {
|
|
|
209
210
|
}
|
|
210
211
|
getSocket() {
|
|
211
212
|
if (!this.socket) {
|
|
212
|
-
throw new
|
|
213
|
+
throw new StateError('Not connected. Call connect() first.', {
|
|
214
|
+
expectedState: 'connected',
|
|
215
|
+
actualState: 'disconnected',
|
|
216
|
+
});
|
|
213
217
|
}
|
|
214
218
|
return this.socket;
|
|
215
219
|
}
|
|
@@ -414,7 +418,10 @@ export class Telnet extends EventEmitter {
|
|
|
414
418
|
return new Promise((resolve, reject) => {
|
|
415
419
|
const check = () => {
|
|
416
420
|
if (Date.now() - start > timeout) {
|
|
417
|
-
reject(new
|
|
421
|
+
reject(new TimeoutError(undefined, {
|
|
422
|
+
phase: 'response',
|
|
423
|
+
timeout,
|
|
424
|
+
}));
|
|
418
425
|
return;
|
|
419
426
|
}
|
|
420
427
|
if (this.matchPattern(this.dataBuffer, this.config.shellPrompt)) {
|
|
@@ -429,7 +436,10 @@ export class Telnet extends EventEmitter {
|
|
|
429
436
|
}
|
|
430
437
|
write(data) {
|
|
431
438
|
if (!this.socket || !this.connected) {
|
|
432
|
-
throw new
|
|
439
|
+
throw new StateError('Not connected', {
|
|
440
|
+
expectedState: 'connected',
|
|
441
|
+
actualState: 'disconnected',
|
|
442
|
+
});
|
|
433
443
|
}
|
|
434
444
|
const buffer = typeof data === 'string' ? Buffer.from(data) : data;
|
|
435
445
|
this.debug('Sending: %s', buffer.toString().replace(/\r\n/g, '\\r\\n'));
|
|
@@ -441,7 +451,10 @@ export class Telnet extends EventEmitter {
|
|
|
441
451
|
const startBuffer = this.dataBuffer;
|
|
442
452
|
const check = () => {
|
|
443
453
|
if (Date.now() - start > timeout) {
|
|
444
|
-
reject(new
|
|
454
|
+
reject(new TimeoutError(undefined, {
|
|
455
|
+
phase: 'response',
|
|
456
|
+
timeout,
|
|
457
|
+
}));
|
|
445
458
|
return;
|
|
446
459
|
}
|
|
447
460
|
if (this.matchPattern(this.dataBuffer, pattern)) {
|
|
@@ -479,7 +492,10 @@ export class Telnet extends EventEmitter {
|
|
|
479
492
|
}
|
|
480
493
|
ensureConnected() {
|
|
481
494
|
if (!this.connected || !this.socket) {
|
|
482
|
-
throw new
|
|
495
|
+
throw new StateError('Not connected to Telnet server. Call connect() first.', {
|
|
496
|
+
expectedState: 'connected',
|
|
497
|
+
actualState: 'disconnected',
|
|
498
|
+
});
|
|
483
499
|
}
|
|
484
500
|
}
|
|
485
501
|
cmdName(cmd) {
|
|
@@ -505,7 +521,10 @@ export async function telnet(config, operation) {
|
|
|
505
521
|
try {
|
|
506
522
|
const result = await client.connect();
|
|
507
523
|
if (!result.success) {
|
|
508
|
-
throw new
|
|
524
|
+
throw new ConnectionError(result.message || 'Failed to connect to Telnet server', {
|
|
525
|
+
host: config.host,
|
|
526
|
+
port: config.port,
|
|
527
|
+
});
|
|
509
528
|
}
|
|
510
529
|
return await operation(client);
|
|
511
530
|
}
|
package/dist/recker.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Client, type ExtendedClientOptions } from './core/client.js';
|
|
2
|
+
import { type RequestPromise } from './core/request-promise.js';
|
|
3
|
+
import type { RequestOptions } from './types/index.js';
|
|
4
|
+
import { type WebSocketOptions, type ReckerWebSocket } from './websocket/client.js';
|
|
5
|
+
import { createWhois, type WhoisResult, type WhoisOptions } from './utils/whois.js';
|
|
6
|
+
import { type DNSClientOptions, type DNSClient } from './dns/index.js';
|
|
7
|
+
import type { AIClientConfig } from './types/ai.js';
|
|
8
|
+
export declare function get(url: string, options?: RequestOptions): RequestPromise;
|
|
9
|
+
export declare function post(url: string, options?: RequestOptions): RequestPromise;
|
|
10
|
+
export declare function put(url: string, options?: RequestOptions): RequestPromise;
|
|
11
|
+
export declare function patch(url: string, options?: RequestOptions): RequestPromise;
|
|
12
|
+
export declare function del(url: string, options?: RequestOptions): RequestPromise;
|
|
13
|
+
export declare function head(url: string, options?: RequestOptions): RequestPromise;
|
|
14
|
+
export declare function options(url: string, options?: RequestOptions): RequestPromise;
|
|
15
|
+
export declare function whois(query: string, options?: WhoisOptions): Promise<WhoisResult>;
|
|
16
|
+
export declare function whoisAvailable(domain: string): Promise<boolean>;
|
|
17
|
+
export declare function dns(hostname: string, type?: 'A' | 'AAAA' | 'MX' | 'TXT' | 'NS' | 'CNAME'): Promise<string[]>;
|
|
18
|
+
export declare function dnsSecurity(domain: string): Promise<import("./utils/dns-toolkit.js").DnsSecurityRecords>;
|
|
19
|
+
export declare function ws(url: string, options?: WebSocketOptions): ReckerWebSocket;
|
|
20
|
+
export declare const recker: {
|
|
21
|
+
get: typeof get;
|
|
22
|
+
post: typeof post;
|
|
23
|
+
put: typeof put;
|
|
24
|
+
patch: typeof patch;
|
|
25
|
+
delete: typeof del;
|
|
26
|
+
head: typeof head;
|
|
27
|
+
options: typeof options;
|
|
28
|
+
whois: typeof whois;
|
|
29
|
+
whoisAvailable: typeof whoisAvailable;
|
|
30
|
+
dns: typeof dns;
|
|
31
|
+
dnsSecurity: typeof dnsSecurity;
|
|
32
|
+
ws: typeof ws;
|
|
33
|
+
ai: {
|
|
34
|
+
chat: (optionsOrPrompt: string | import("./types/ai.js").ChatOptions) => Promise<import("./types/ai.js").AIResponse<string>>;
|
|
35
|
+
stream: (options: import("./types/ai.js").ChatOptions) => Promise<import("./types/ai.js").AIStream>;
|
|
36
|
+
embed: (options: import("./types/ai.js").EmbedOptions) => Promise<import("./types/ai.js").EmbedResponse>;
|
|
37
|
+
extend: (defaults: Partial<import("./types/ai.js").ChatOptions>) => import("./types/ai.js").AIClient;
|
|
38
|
+
readonly metrics: import("./types/ai.js").AIMetrics;
|
|
39
|
+
};
|
|
40
|
+
client: (options?: ExtendedClientOptions) => Client;
|
|
41
|
+
dnsClient: (options?: DNSClientOptions) => DNSClient;
|
|
42
|
+
whoisClient: typeof createWhois;
|
|
43
|
+
aiClient: (options?: AIClientConfig) => import("./types/ai.js").AIClient;
|
|
44
|
+
reset: () => void;
|
|
45
|
+
};
|
|
46
|
+
export default recker;
|
|
47
|
+
//# sourceMappingURL=recker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recker.d.ts","sourceRoot":"","sources":["../src/recker.ts"],"names":[],"mappings":"AAwCA,OAAO,EAAE,MAAM,EAAgB,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACrG,OAAO,EAA2C,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7H,OAAO,EAAa,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAElF,OAAO,KA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,MAAM;;;;;;;;;;;;;;;;;;;;uBAgDE,qBAAqB;0BAKlB,gBAAgB;;yBAUjB,cAAc;;CAUpC,CAAC;AAGF,eAAe,MAAM,CAAC"}
|
package/dist/recker.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { createClient } from './core/client.js';
|
|
2
|
+
import { FetchTransport } from './transport/fetch.js';
|
|
3
|
+
import { createWebSocket } from './websocket/client.js';
|
|
4
|
+
import { whois as whoisLookup, isDomainAvailable, createWhois } from './utils/whois.js';
|
|
5
|
+
import { createDNS } from './dns/index.js';
|
|
6
|
+
import { createAI } from './ai/index.js';
|
|
7
|
+
let _defaultClient = null;
|
|
8
|
+
let _defaultDns = null;
|
|
9
|
+
let _defaultAi = null;
|
|
10
|
+
function getDefaultClient() {
|
|
11
|
+
if (!_defaultClient) {
|
|
12
|
+
_defaultClient = createClient({
|
|
13
|
+
transport: new FetchTransport(),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return _defaultClient;
|
|
17
|
+
}
|
|
18
|
+
function getDefaultDns() {
|
|
19
|
+
if (!_defaultDns) {
|
|
20
|
+
_defaultDns = createDNS();
|
|
21
|
+
}
|
|
22
|
+
return _defaultDns;
|
|
23
|
+
}
|
|
24
|
+
function getDefaultAi() {
|
|
25
|
+
if (!_defaultAi) {
|
|
26
|
+
_defaultAi = createAI();
|
|
27
|
+
}
|
|
28
|
+
return _defaultAi;
|
|
29
|
+
}
|
|
30
|
+
export function get(url, options) {
|
|
31
|
+
return getDefaultClient().get(url, options);
|
|
32
|
+
}
|
|
33
|
+
export function post(url, options) {
|
|
34
|
+
return getDefaultClient().post(url, options);
|
|
35
|
+
}
|
|
36
|
+
export function put(url, options) {
|
|
37
|
+
return getDefaultClient().put(url, options);
|
|
38
|
+
}
|
|
39
|
+
export function patch(url, options) {
|
|
40
|
+
return getDefaultClient().patch(url, options);
|
|
41
|
+
}
|
|
42
|
+
export function del(url, options) {
|
|
43
|
+
return getDefaultClient().delete(url, options);
|
|
44
|
+
}
|
|
45
|
+
export function head(url, options) {
|
|
46
|
+
return getDefaultClient().head(url, options);
|
|
47
|
+
}
|
|
48
|
+
export function options(url, options) {
|
|
49
|
+
return getDefaultClient().options(url, options);
|
|
50
|
+
}
|
|
51
|
+
export async function whois(query, options) {
|
|
52
|
+
return whoisLookup(query, options);
|
|
53
|
+
}
|
|
54
|
+
export async function whoisAvailable(domain) {
|
|
55
|
+
return isDomainAvailable(domain);
|
|
56
|
+
}
|
|
57
|
+
export async function dns(hostname, type = 'A') {
|
|
58
|
+
return getDefaultDns().resolve(hostname, type);
|
|
59
|
+
}
|
|
60
|
+
export async function dnsSecurity(domain) {
|
|
61
|
+
return getDefaultDns().getSecurityRecords(domain);
|
|
62
|
+
}
|
|
63
|
+
export function ws(url, options) {
|
|
64
|
+
return createWebSocket(url, options);
|
|
65
|
+
}
|
|
66
|
+
const aiNamespace = {
|
|
67
|
+
chat: (...args) => getDefaultAi().chat(...args),
|
|
68
|
+
stream: (...args) => getDefaultAi().stream(...args),
|
|
69
|
+
embed: (...args) => getDefaultAi().embed(...args),
|
|
70
|
+
extend: (...args) => getDefaultAi().extend(...args),
|
|
71
|
+
get metrics() {
|
|
72
|
+
return getDefaultAi().metrics;
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
export const recker = {
|
|
76
|
+
get,
|
|
77
|
+
post,
|
|
78
|
+
put,
|
|
79
|
+
patch,
|
|
80
|
+
delete: del,
|
|
81
|
+
head,
|
|
82
|
+
options,
|
|
83
|
+
whois,
|
|
84
|
+
whoisAvailable,
|
|
85
|
+
dns,
|
|
86
|
+
dnsSecurity,
|
|
87
|
+
ws,
|
|
88
|
+
ai: aiNamespace,
|
|
89
|
+
client: (options) => createClient(options),
|
|
90
|
+
dnsClient: (options) => createDNS(options),
|
|
91
|
+
whoisClient: createWhois,
|
|
92
|
+
aiClient: (options) => createAI(options),
|
|
93
|
+
reset: () => {
|
|
94
|
+
_defaultClient = null;
|
|
95
|
+
_defaultDns = null;
|
|
96
|
+
_defaultAi = null;
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
export default recker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-udp.d.ts","sourceRoot":"","sources":["../../src/transport/base-udp.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EACV,uBAAuB,EACvB,UAAU,EACV,aAAa,EACd,MAAM,iBAAiB,CAAC;AAMzB,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAKD,eAAO,MAAM,iBAAiB,sCAA6C,CAAC;AAK5E,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,uBAAuB,CAQjE,CAAC;AAKF,8BAAsB,gBAAgB;IACpC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,uBAAuB,CAAC,CAAC;gBAEzC,OAAO,GAAE,uBAA4B;IAUjD,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAK9D,SAAS,CAAC,YAAY,CAAC,IAAI,GAAE,MAAM,GAAG,MAAe,GAAG,KAAK,CAAC,MAAM;cAiBpD,aAAa,CAC3B,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,IAAI,EA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AM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOpC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dgram from 'node:dgram';
|
|
2
2
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
|
-
import { TimeoutError, NetworkError } from '../core/errors.js';
|
|
3
|
+
import { TimeoutError, NetworkError, AbortError, ValidationError } from '../core/errors.js';
|
|
4
4
|
export const udpRequestStorage = new AsyncLocalStorage();
|
|
5
5
|
export const DEFAULT_UDP_OPTIONS = {
|
|
6
6
|
timeout: 5000,
|
|
@@ -36,7 +36,7 @@ export class BaseUDPTransport {
|
|
|
36
36
|
while (attempts < maxAttempts) {
|
|
37
37
|
try {
|
|
38
38
|
if (signal?.aborted) {
|
|
39
|
-
throw new
|
|
39
|
+
throw new AbortError('Request aborted');
|
|
40
40
|
}
|
|
41
41
|
const response = await this.sendOnce(socket, data, port, address, signal);
|
|
42
42
|
return response;
|
|
@@ -102,7 +102,7 @@ export class BaseUDPTransport {
|
|
|
102
102
|
return;
|
|
103
103
|
resolved = true;
|
|
104
104
|
cleanup();
|
|
105
|
-
reject(new
|
|
105
|
+
reject(new AbortError('Request aborted'));
|
|
106
106
|
}, { once: true });
|
|
107
107
|
}
|
|
108
108
|
socket.on('message', onMessage);
|
|
@@ -178,7 +178,10 @@ export class BaseUDPTransport {
|
|
|
178
178
|
}
|
|
179
179
|
validatePacketSize(data) {
|
|
180
180
|
if (data.length > this.options.maxPacketSize) {
|
|
181
|
-
throw new
|
|
181
|
+
throw new ValidationError(`Packet size ${data.length} exceeds maximum ${this.options.maxPacketSize} bytes`, {
|
|
182
|
+
field: 'packetSize',
|
|
183
|
+
value: data.length,
|
|
184
|
+
});
|
|
182
185
|
}
|
|
183
186
|
}
|
|
184
187
|
sleep(ms) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"udp-response.d.ts","sourceRoot":"","sources":["../../src/transport/ud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M,CAAC;IAKvB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAQ5B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,IAAI,IAAI,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI;IAczC,KAAK,IAAI,oBAAoB;IAWtB,GAAG,IAAI,cAAc,CAAC,QAAQ,CAAC;IAM/B,QAAQ,IAAI,cAAc,CAAC,aAAa,CAAC;IAezC,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC;IA6BjC,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,cAAc,CAAC,UAAU,CAAC;CAK5D"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UnsupportedError, StreamError } from '../core/errors.js';
|
|
1
2
|
export class UDPResponseWrapper {
|
|
2
3
|
_buffer;
|
|
3
4
|
_timings;
|
|
@@ -92,7 +93,9 @@ export class UDPResponseWrapper {
|
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
95
|
async *sse() {
|
|
95
|
-
throw new
|
|
96
|
+
throw new UnsupportedError('SSE is not supported for UDP responses', {
|
|
97
|
+
feature: 'SSE',
|
|
98
|
+
});
|
|
96
99
|
}
|
|
97
100
|
async *download() {
|
|
98
101
|
yield {
|
|
@@ -160,7 +163,9 @@ export class StreamingUDPResponse {
|
|
|
160
163
|
}
|
|
161
164
|
pushPacket(packet) {
|
|
162
165
|
if (this._complete) {
|
|
163
|
-
throw new
|
|
166
|
+
throw new StreamError('Cannot push to completed stream', {
|
|
167
|
+
streamType: 'udp',
|
|
168
|
+
});
|
|
164
169
|
}
|
|
165
170
|
const waiter = this._waiters.shift();
|
|
166
171
|
if (waiter) {
|
|
@@ -227,7 +232,9 @@ export class StreamingUDPResponse {
|
|
|
227
232
|
return cloned;
|
|
228
233
|
}
|
|
229
234
|
async *sse() {
|
|
230
|
-
throw new
|
|
235
|
+
throw new UnsupportedError('SSE is not supported for UDP responses', {
|
|
236
|
+
feature: 'SSE',
|
|
237
|
+
});
|
|
231
238
|
}
|
|
232
239
|
async *download() {
|
|
233
240
|
let loaded = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"udp.d.ts","sourceRoot":"","sources":["../../src/transport/udp.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EACV,mBAAmB,EAInB,YAAY,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAwC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"udp.d.ts","sourceRoot":"","sources":["../../src/transport/udp.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EACV,mBAAmB,EAInB,YAAY,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAwC,MAAM,eAAe,CAAC;AA4CvF,qBAAa,SAAU,SAAQ,gBAAgB;IAC7C,OAAO,CAAC,MAAM,CAA6B;IAC3C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,eAAe,CAA0B;gBAErC,OAAO,GAAE,MAAW,EAAE,OAAO,GAAE,mBAAwB;IAuBnE,OAAO,CAAC,GAAG;IASX,OAAO,CAAC,SAAS;IA0CjB,OAAO,CAAC,YAAY,CAAkB;IAKhC,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IA2FrD,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB7D,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB1D,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAWlC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAW7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAqB7B;AAsBD,wBAAgB,SAAS,CAAC,OAAO,GAAE,mBAAwB,GAAG,SAAS,CAEtE;AAKD,eAAO,MAAM,GAAG,EAAE,YAuGjB,CAAC;AAGF,OAAO,EAAE,SAAS,IAAI,YAAY,EAAE,CAAC"}
|
package/dist/transport/udp.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import dgram from 'node:dgram';
|
|
2
2
|
import { BaseUDPTransport, udpRequestStorage } from './base-udp.js';
|
|
3
3
|
import { UDPResponseWrapper } from './udp-response.js';
|
|
4
|
+
import { ValidationError } from '../core/errors.js';
|
|
4
5
|
const DEFAULT_OPTIONS = {
|
|
5
6
|
timeout: 5000,
|
|
6
7
|
retransmissions: 3,
|
|
@@ -84,7 +85,10 @@ export class UDPClient extends BaseUDPTransport {
|
|
|
84
85
|
const { host, port, path } = this.parseUrl(fullUrl);
|
|
85
86
|
this.log(`Dispatch to ${fullUrl}`);
|
|
86
87
|
if (!host || !port) {
|
|
87
|
-
throw new
|
|
88
|
+
throw new ValidationError(`Invalid UDP URL: ${fullUrl}. Expected format: udp://host:port/path`, {
|
|
89
|
+
field: 'url',
|
|
90
|
+
value: fullUrl,
|
|
91
|
+
});
|
|
88
92
|
}
|
|
89
93
|
let body;
|
|
90
94
|
if (req.body === null || req.body === undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"undici.d.ts","sourceRoot":"","sources":["../../src/transport/undici.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,aAAa,EAAE,cAAc,EAAW,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAgB,UAAU,EAAkD,MAAM,mBAAmB,CAAC;AAOxN,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAwNzD,UAAU,sBAAsB;IAC9B,cAAc,CAAC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ChC,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,aAAa,CAAU;gBAEnB,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B;IAmG3D,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;YA+U7C,YAAY;CAoQ3B"}
|
package/dist/transport/undici.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { request as undiciRequest, errors as undiciErrors, ProxyAgent, Agent, Client } from 'undici';
|
|
2
2
|
import { HttpResponse } from '../core/response.js';
|
|
3
|
-
import { NetworkError, TimeoutError,
|
|
3
|
+
import { NetworkError, TimeoutError, MaxSizeExceededError } from '../core/errors.js';
|
|
4
4
|
import { performance } from 'perf_hooks';
|
|
5
5
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
6
6
|
import { channel } from 'node:diagnostics_channel';
|
|
@@ -303,7 +303,7 @@ export class UndiciTransport {
|
|
|
303
303
|
connectTimeout: timeouts.connectTimeout,
|
|
304
304
|
headersTimeout: timeouts.headersTimeout,
|
|
305
305
|
bodyTimeout: timeouts.bodyTimeout,
|
|
306
|
-
maxRedirections:
|
|
306
|
+
maxRedirections: 0,
|
|
307
307
|
};
|
|
308
308
|
if (finalBody && (finalBody instanceof ReadableStream ||
|
|
309
309
|
(typeof finalBody.pipe === 'function') ||
|
|
@@ -347,39 +347,49 @@ export class UndiciTransport {
|
|
|
347
347
|
}
|
|
348
348
|
const statusCode = undiciResponse.statusCode;
|
|
349
349
|
const isRedirect = statusCode >= 300 && statusCode < 400;
|
|
350
|
-
if (
|
|
350
|
+
if (isRedirect && followRedirects && redirectCount < maxRedirects) {
|
|
351
351
|
const locationHeader = undiciResponse.headers['location'];
|
|
352
352
|
const location = Array.isArray(locationHeader) ? locationHeader[0] : locationHeader;
|
|
353
353
|
if (location) {
|
|
354
354
|
const nextUrl = new URL(location, currentUrl).toString();
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
if (
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
355
|
+
if (handleRedirectsManually) {
|
|
356
|
+
const responseHeaders = new Headers();
|
|
357
|
+
for (const [key, value] of Object.entries(undiciResponse.headers)) {
|
|
358
|
+
if (value !== undefined) {
|
|
359
|
+
if (Array.isArray(value)) {
|
|
360
|
+
value.forEach(v => responseHeaders.append(key, v));
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
responseHeaders.set(key, value);
|
|
364
|
+
}
|
|
363
365
|
}
|
|
364
366
|
}
|
|
367
|
+
const redirectInfo = {
|
|
368
|
+
from: currentUrl,
|
|
369
|
+
to: nextUrl,
|
|
370
|
+
status: statusCode,
|
|
371
|
+
headers: responseHeaders,
|
|
372
|
+
};
|
|
373
|
+
const hookResult = await req.beforeRedirect(redirectInfo);
|
|
374
|
+
if (hookResult === false) {
|
|
375
|
+
const finalResponse = req.onDownloadProgress
|
|
376
|
+
? wrapDownloadResponse(undiciResponse, req.onDownloadProgress)
|
|
377
|
+
: undiciResponse;
|
|
378
|
+
return new HttpResponse(finalResponse, {
|
|
379
|
+
timings: requestContext.timings,
|
|
380
|
+
connection: requestContext.connection
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
if (typeof hookResult === 'string') {
|
|
384
|
+
currentUrl = hookResult;
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
currentUrl = nextUrl;
|
|
388
|
+
}
|
|
365
389
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
to: nextUrl,
|
|
369
|
-
status: statusCode,
|
|
370
|
-
headers: responseHeaders,
|
|
371
|
-
};
|
|
372
|
-
const hookResult = await req.beforeRedirect(redirectInfo);
|
|
373
|
-
if (hookResult === false) {
|
|
374
|
-
const finalResponse = req.onDownloadProgress
|
|
375
|
-
? wrapDownloadResponse(undiciResponse, req.onDownloadProgress)
|
|
376
|
-
: undiciResponse;
|
|
377
|
-
return new HttpResponse(finalResponse, {
|
|
378
|
-
timings: requestContext.timings,
|
|
379
|
-
connection: requestContext.connection
|
|
380
|
-
});
|
|
390
|
+
else {
|
|
391
|
+
currentUrl = nextUrl;
|
|
381
392
|
}
|
|
382
|
-
currentUrl = typeof hookResult === 'string' ? hookResult : nextUrl;
|
|
383
393
|
if (statusCode === 303 || ((statusCode === 301 || statusCode === 302) && currentMethod !== 'GET' && currentMethod !== 'HEAD')) {
|
|
384
394
|
currentMethod = 'GET';
|
|
385
395
|
currentBody = null;
|
|
@@ -437,11 +447,7 @@ export class UndiciTransport {
|
|
|
437
447
|
}
|
|
438
448
|
const code = error.code || error?.cause?.code;
|
|
439
449
|
if (code === 'UND_ERR_HEADERS_OVERFLOW') {
|
|
440
|
-
throw new
|
|
441
|
-
'Reduce response header size or adjust maxHeaderSize in agent configuration.',
|
|
442
|
-
'Check for runaway set-cookie or debug headers.',
|
|
443
|
-
'Verify upstream is not sending excessive headers.'
|
|
444
|
-
], false);
|
|
450
|
+
throw new MaxSizeExceededError(16 * 1024, undefined, req);
|
|
445
451
|
}
|
|
446
452
|
throw new NetworkError(error.message, code, req);
|
|
447
453
|
}
|
|
@@ -518,7 +524,7 @@ export class UndiciTransport {
|
|
|
518
524
|
connectTimeout: timeouts.connectTimeout,
|
|
519
525
|
headersTimeout: timeouts.headersTimeout,
|
|
520
526
|
bodyTimeout: timeouts.bodyTimeout,
|
|
521
|
-
maxRedirections:
|
|
527
|
+
maxRedirections: 0,
|
|
522
528
|
};
|
|
523
529
|
if (finalBody && (finalBody instanceof ReadableStream ||
|
|
524
530
|
(typeof finalBody.pipe === 'function') ||
|
|
@@ -562,39 +568,49 @@ export class UndiciTransport {
|
|
|
562
568
|
}
|
|
563
569
|
const statusCode = undiciResponse.statusCode;
|
|
564
570
|
const isRedirect = statusCode >= 300 && statusCode < 400;
|
|
565
|
-
if (
|
|
571
|
+
if (isRedirect && followRedirects && redirectCount < maxRedirects) {
|
|
566
572
|
const locationHeader = undiciResponse.headers['location'];
|
|
567
573
|
const location = Array.isArray(locationHeader) ? locationHeader[0] : locationHeader;
|
|
568
574
|
if (location) {
|
|
569
575
|
const nextUrl = new URL(location, currentUrl).toString();
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
if (
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
576
|
+
if (handleRedirectsManually) {
|
|
577
|
+
const responseHeaders = new Headers();
|
|
578
|
+
for (const [key, value] of Object.entries(undiciResponse.headers)) {
|
|
579
|
+
if (value !== undefined) {
|
|
580
|
+
if (Array.isArray(value)) {
|
|
581
|
+
value.forEach(v => responseHeaders.append(key, v));
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
responseHeaders.set(key, value);
|
|
585
|
+
}
|
|
578
586
|
}
|
|
579
587
|
}
|
|
588
|
+
const redirectInfo = {
|
|
589
|
+
from: currentUrl,
|
|
590
|
+
to: nextUrl,
|
|
591
|
+
status: statusCode,
|
|
592
|
+
headers: responseHeaders,
|
|
593
|
+
};
|
|
594
|
+
const hookResult = await req.beforeRedirect(redirectInfo);
|
|
595
|
+
if (hookResult === false) {
|
|
596
|
+
const finalResponse = req.onDownloadProgress
|
|
597
|
+
? wrapDownloadResponse(undiciResponse, req.onDownloadProgress)
|
|
598
|
+
: undiciResponse;
|
|
599
|
+
return new HttpResponse(finalResponse, {
|
|
600
|
+
timings: {},
|
|
601
|
+
connection: {}
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
if (typeof hookResult === 'string') {
|
|
605
|
+
currentUrl = hookResult;
|
|
606
|
+
}
|
|
607
|
+
else {
|
|
608
|
+
currentUrl = nextUrl;
|
|
609
|
+
}
|
|
580
610
|
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
to: nextUrl,
|
|
584
|
-
status: statusCode,
|
|
585
|
-
headers: responseHeaders,
|
|
586
|
-
};
|
|
587
|
-
const hookResult = await req.beforeRedirect(redirectInfo);
|
|
588
|
-
if (hookResult === false) {
|
|
589
|
-
const finalResponse = req.onDownloadProgress
|
|
590
|
-
? wrapDownloadResponse(undiciResponse, req.onDownloadProgress)
|
|
591
|
-
: undiciResponse;
|
|
592
|
-
return new HttpResponse(finalResponse, {
|
|
593
|
-
timings: {},
|
|
594
|
-
connection: {}
|
|
595
|
-
});
|
|
611
|
+
else {
|
|
612
|
+
currentUrl = nextUrl;
|
|
596
613
|
}
|
|
597
|
-
currentUrl = typeof hookResult === 'string' ? hookResult : nextUrl;
|
|
598
614
|
if (statusCode === 303 || ((statusCode === 301 || statusCode === 302) && currentMethod !== 'GET' && currentMethod !== 'HEAD')) {
|
|
599
615
|
currentMethod = 'GET';
|
|
600
616
|
currentBody = null;
|
|
@@ -644,11 +660,7 @@ export class UndiciTransport {
|
|
|
644
660
|
}
|
|
645
661
|
const code = error.code || error?.cause?.code;
|
|
646
662
|
if (code === 'UND_ERR_HEADERS_OVERFLOW') {
|
|
647
|
-
throw new
|
|
648
|
-
'Reduce response header size or adjust maxHeaderSize in agent configuration.',
|
|
649
|
-
'Check for runaway set-cookie or debug headers.',
|
|
650
|
-
'Verify upstream is not sending excessive headers.'
|
|
651
|
-
], false);
|
|
663
|
+
throw new MaxSizeExceededError(16 * 1024, undefined, req);
|
|
652
664
|
}
|
|
653
665
|
throw new NetworkError(error.message, code, req);
|
|
654
666
|
}
|
|
@@ -14,6 +14,7 @@ export declare class AgentManager {
|
|
|
14
14
|
getAgentForDomain(domain: string, options?: Partial<AgentOptions>): Agent;
|
|
15
15
|
getAgentForUrl(url: string): Agent;
|
|
16
16
|
createBatchAgent(concurrency: number, requestCount: number, options?: Partial<AgentOptions>): Agent;
|
|
17
|
+
createStressTestAgent(concurrency: number): Agent;
|
|
17
18
|
private createAgent;
|
|
18
19
|
getStats(): AgentStats;
|
|
19
20
|
closeDomainAgent(domain: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-manager.d.ts","sourceRoot":"","sources":["../../src/utils/agent-manager.ts"],"names":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