@hyperttp/core 1.1.12 → 1.2.5
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/Core/HyperCore.d.ts +21 -9
- package/Core/HyperCore.d.ts.map +1 -1
- package/Core/HyperCore.js +187 -116
- package/Core/HyperCore.js.map +1 -1
- package/Core/index.d.ts +0 -1
- package/Core/index.d.ts.map +1 -1
- package/Core/index.js +0 -1
- package/Core/index.js.map +1 -1
- package/LICENSE +21 -0
- package/README.md +178 -0
- package/defaultConfig.d.ts +1 -1
- package/defaultConfig.d.ts.map +1 -1
- package/defaultConfig.js +0 -1
- package/defaultConfig.js.map +1 -1
- package/index.d.ts +1 -4
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +19 -6
- package/transports/node.d.ts +11 -7
- package/transports/node.d.ts.map +1 -1
- package/transports/node.js +367 -135
- package/transports/node.js.map +1 -1
- package/utils/errors.d.ts +49 -0
- package/utils/errors.d.ts.map +1 -0
- package/utils/errors.js +63 -0
- package/utils/errors.js.map +1 -0
- package/utils/merge.d.ts +8 -1
- package/utils/merge.d.ts.map +1 -1
- package/utils/merge.js +27 -13
- package/utils/merge.js.map +1 -1
- package/utils/pipeline.d.ts +42 -0
- package/utils/pipeline.d.ts.map +1 -0
- package/utils/pipeline.js +86 -0
- package/utils/pipeline.js.map +1 -0
- package/utils/response.d.ts +44 -0
- package/utils/response.d.ts.map +1 -0
- package/utils/response.js +86 -0
- package/utils/response.js.map +1 -0
- package/utils/retryUtils.d.ts +5 -0
- package/utils/retryUtils.d.ts.map +1 -0
- package/utils/retryUtils.js +35 -0
- package/utils/retryUtils.js.map +1 -0
- package/Core/RequestExecutor.d.ts +0 -64
- package/Core/RequestExecutor.d.ts.map +0 -1
- package/Core/RequestExecutor.js +0 -213
- package/Core/RequestExecutor.js.map +0 -1
- package/transports/bun.d.ts +0 -16
- package/transports/bun.d.ts.map +0 -1
- package/transports/bun.js +0 -181
- package/transports/bun.js.map +0 -1
- package/types/errors.d.ts +0 -20
- package/types/errors.d.ts.map +0 -1
- package/types/errors.js +0 -28
- package/types/errors.js.map +0 -1
- package/types/http.d.ts +0 -5
- package/types/http.d.ts.map +0 -1
- package/types/http.js +0 -2
- package/types/http.js.map +0 -1
- package/types/hyper.d.ts +0 -34
- package/types/hyper.d.ts.map +0 -1
- package/types/hyper.js +0 -2
- package/types/hyper.js.map +0 -1
- package/types/index.d.ts +0 -12
- package/types/index.d.ts.map +0 -1
- package/types/index.js +0 -12
- package/types/index.js.map +0 -1
- package/types/metrics.d.ts +0 -65
- package/types/metrics.d.ts.map +0 -1
- package/types/metrics.js +0 -2
- package/types/metrics.js.map +0 -1
- package/types/network.d.ts +0 -65
- package/types/network.d.ts.map +0 -1
- package/types/network.js +0 -2
- package/types/network.js.map +0 -1
- package/types/options.d.ts +0 -51
- package/types/options.d.ts.map +0 -1
- package/types/options.js +0 -2
- package/types/options.js.map +0 -1
- package/types/plugins.d.ts +0 -47
- package/types/plugins.d.ts.map +0 -1
- package/types/plugins.js +0 -2
- package/types/plugins.js.map +0 -1
- package/types/request.d.ts +0 -114
- package/types/request.d.ts.map +0 -1
- package/types/request.js +0 -2
- package/types/request.js.map +0 -1
- package/types/retry.d.ts +0 -28
- package/types/retry.d.ts.map +0 -1
- package/types/retry.js +0 -2
- package/types/retry.js.map +0 -1
- package/types/stream.d.ts +0 -39
- package/types/stream.d.ts.map +0 -1
- package/types/stream.js +0 -2
- package/types/stream.js.map +0 -1
- package/types/transport.d.ts +0 -25
- package/types/transport.d.ts.map +0 -1
- package/types/transport.js +0 -2
- package/types/transport.js.map +0 -1
package/Core/RequestExecutor.js
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { request } from "undici";
|
|
2
|
-
import { HttpClientError, TimeoutError } from "../types/errors.js";
|
|
3
|
-
/**
|
|
4
|
-
* @private
|
|
5
|
-
* Статический интерцептор-заглушка. Исключает аллокацию объекта на каждый запрос.
|
|
6
|
-
*/
|
|
7
|
-
const defaultInterceptorManager = {
|
|
8
|
-
applyRequest: (config) => Promise.resolve(config),
|
|
9
|
-
applyResponse: (response) => Promise.resolve(response),
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
* Статический парсер тела ответа. Исключает создание замыканий внутри execute().
|
|
14
|
-
*/
|
|
15
|
-
const defaultBodyParser = (res) => Promise.resolve(res.body);
|
|
16
|
-
/**
|
|
17
|
-
* @en Low-level request executor responsible for handling the actual HTTP lifecycle.
|
|
18
|
-
* @ru Низкоуровневый исполнитель запросов, отвечающий за полный цикл HTTP-жизни.
|
|
19
|
-
*/
|
|
20
|
-
export class RequestExecutor {
|
|
21
|
-
agent;
|
|
22
|
-
options;
|
|
23
|
-
redirectStatusCodes = new Set([301, 302, 303, 307, 308]);
|
|
24
|
-
constructor(agent, options) {
|
|
25
|
-
this.agent = agent;
|
|
26
|
-
this.options = options;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @en Executes a raw HTTP request.
|
|
30
|
-
* @ru Выполняет "сырой" HTTP-запрос.
|
|
31
|
-
*/
|
|
32
|
-
async execute(method, url, headers, body, signal, metrics, interceptors, meta) {
|
|
33
|
-
return this.executeCore(method, url, headers, body, metrics, signal, defaultBodyParser, interceptors, meta?.responseType === "stream");
|
|
34
|
-
}
|
|
35
|
-
get verbose() {
|
|
36
|
-
return this.options.verbose ?? false;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @en Calculates the delay for the next retry attempt using exponential backoff.
|
|
40
|
-
* @ru Вычисляет задержку для следующей попытки повтора.
|
|
41
|
-
*/
|
|
42
|
-
calcDelay(attempt) {
|
|
43
|
-
const { baseDelay = 1000, maxDelay = 10000, jitter = true, } = this.options.retryOptions;
|
|
44
|
-
const base = Math.min(baseDelay * Math.pow(2, attempt), maxDelay);
|
|
45
|
-
return jitter ? base * (0.75 + Math.random() * 0.5) : base;
|
|
46
|
-
}
|
|
47
|
-
sleep(ms) {
|
|
48
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @en Ensures that the response body stream is properly closed to prevent memory leaks.
|
|
52
|
-
* @ru Гарантирует, что поток тела ответа корректно закрыт.
|
|
53
|
-
*/
|
|
54
|
-
async drainBody(body) {
|
|
55
|
-
if (!body || typeof body !== "object")
|
|
56
|
-
return;
|
|
57
|
-
try {
|
|
58
|
-
const stream = body;
|
|
59
|
-
if (typeof stream.dump === "function") {
|
|
60
|
-
await stream.dump();
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (typeof stream.resume === "function") {
|
|
64
|
-
stream.resume();
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (typeof stream.destroy === "function") {
|
|
68
|
-
stream.destroy();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
catch {
|
|
72
|
-
/* ignore */
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* @en Checks if the status code should trigger a retry attempt.
|
|
77
|
-
* @ru Проверяет, должен ли данный статус-код вызывать повтор запроса.
|
|
78
|
-
*/
|
|
79
|
-
shouldRetry(status) {
|
|
80
|
-
const codes = this.options.retryOptions.retryStatusCodes;
|
|
81
|
-
if (codes && codes.length > 0) {
|
|
82
|
-
return codes.includes(status);
|
|
83
|
-
}
|
|
84
|
-
return status === 502 || status === 503 || status === 504;
|
|
85
|
-
}
|
|
86
|
-
async executeCore(method, url, headers, body, metrics, signal, parser, interceptors, isStreaming = false) {
|
|
87
|
-
let currentUrl = url;
|
|
88
|
-
let currentMethod = method;
|
|
89
|
-
let currentHeaders = headers;
|
|
90
|
-
let currentBody = body;
|
|
91
|
-
let redirects = 0;
|
|
92
|
-
let attempt = 0;
|
|
93
|
-
const manager = interceptors ?? defaultInterceptorManager;
|
|
94
|
-
const timeoutValue = isStreaming ? 0 : this.options.timeout;
|
|
95
|
-
let timeoutController = undefined;
|
|
96
|
-
let timer = undefined;
|
|
97
|
-
let combinedSignal = signal;
|
|
98
|
-
if (timeoutValue > 0) {
|
|
99
|
-
timeoutController = new AbortController();
|
|
100
|
-
timer = setTimeout(() => timeoutController?.abort(), timeoutValue);
|
|
101
|
-
combinedSignal = signal
|
|
102
|
-
? AbortSignal.any([signal, timeoutController.signal])
|
|
103
|
-
: timeoutController.signal;
|
|
104
|
-
}
|
|
105
|
-
try {
|
|
106
|
-
while (true) {
|
|
107
|
-
try {
|
|
108
|
-
const config = await manager.applyRequest({
|
|
109
|
-
url: currentUrl,
|
|
110
|
-
method: currentMethod,
|
|
111
|
-
headers: currentHeaders,
|
|
112
|
-
body: currentBody,
|
|
113
|
-
});
|
|
114
|
-
const res = await request(config.url, {
|
|
115
|
-
method: config.method,
|
|
116
|
-
headers: config.headers,
|
|
117
|
-
body: config.body,
|
|
118
|
-
dispatcher: this.agent,
|
|
119
|
-
signal: combinedSignal,
|
|
120
|
-
});
|
|
121
|
-
const status = res.statusCode;
|
|
122
|
-
const resHeaders = res.headers;
|
|
123
|
-
if (this.options.followRedirects &&
|
|
124
|
-
this.redirectStatusCodes.has(status)) {
|
|
125
|
-
if (redirects >= this.options.maxRedirects) {
|
|
126
|
-
await this.drainBody(res.body);
|
|
127
|
-
throw new HttpClientError("Too many redirects", "TOO_MANY_REDIRECTS", status);
|
|
128
|
-
}
|
|
129
|
-
const location = resHeaders.location;
|
|
130
|
-
if (location) {
|
|
131
|
-
await this.drainBody(res.body);
|
|
132
|
-
const nextUrl = new URL(location, config.url).toString();
|
|
133
|
-
let nextMethod = currentMethod;
|
|
134
|
-
if (status === 303 ||
|
|
135
|
-
((status === 301 || status === 302) && currentMethod === "POST")) {
|
|
136
|
-
nextMethod = "GET";
|
|
137
|
-
}
|
|
138
|
-
currentUrl = nextUrl;
|
|
139
|
-
currentMethod = nextMethod;
|
|
140
|
-
currentBody = nextMethod === "GET" ? undefined : currentBody;
|
|
141
|
-
if (nextMethod === "GET") {
|
|
142
|
-
const nextHeaders = { ...currentHeaders };
|
|
143
|
-
delete nextHeaders["content-type"];
|
|
144
|
-
delete nextHeaders["Content-Type"];
|
|
145
|
-
delete nextHeaders["content-length"];
|
|
146
|
-
delete nextHeaders["Content-Length"];
|
|
147
|
-
currentHeaders = nextHeaders;
|
|
148
|
-
}
|
|
149
|
-
redirects++;
|
|
150
|
-
continue;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
if (this.shouldRetry(status)) {
|
|
154
|
-
if (attempt < this.options.maxRetries) {
|
|
155
|
-
if (metrics)
|
|
156
|
-
metrics.retries += 1;
|
|
157
|
-
await this.drainBody(res.body);
|
|
158
|
-
await this.sleep(this.calcDelay(attempt));
|
|
159
|
-
attempt++;
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
throw new HttpClientError(`HTTP ${status}`, "HTTP_ERROR", status, undefined, config.url, currentMethod);
|
|
163
|
-
}
|
|
164
|
-
const transformed = await manager.applyResponse({
|
|
165
|
-
status,
|
|
166
|
-
headers: resHeaders,
|
|
167
|
-
body: res.body,
|
|
168
|
-
url: config.url,
|
|
169
|
-
});
|
|
170
|
-
const parsed = await parser(transformed);
|
|
171
|
-
return {
|
|
172
|
-
status: transformed.status,
|
|
173
|
-
headers: transformed.headers,
|
|
174
|
-
body: parsed,
|
|
175
|
-
url: transformed.url,
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
catch (err) {
|
|
179
|
-
const errorTarget = err;
|
|
180
|
-
const errorName = errorTarget?.name;
|
|
181
|
-
const errorCode = errorTarget?.code;
|
|
182
|
-
if (errorName === "AbortError") {
|
|
183
|
-
if (signal?.aborted) {
|
|
184
|
-
throw new HttpClientError("Request aborted by user", "ABORTED", 0, err instanceof Error ? err : undefined, url, method);
|
|
185
|
-
}
|
|
186
|
-
if (timeoutController?.signal.aborted) {
|
|
187
|
-
throw new TimeoutError(url, this.options.timeout);
|
|
188
|
-
}
|
|
189
|
-
throw new HttpClientError("Request aborted due to transport closure or internal state reset", "TRANSPORT_CLOSED", 0, err instanceof Error ? err : undefined, url, method);
|
|
190
|
-
}
|
|
191
|
-
if (attempt < this.options.maxRetries &&
|
|
192
|
-
(errorCode === "ECONNREFUSED" ||
|
|
193
|
-
errorCode === "ETIMEDOUT" ||
|
|
194
|
-
errorCode === "ECONNRESET" ||
|
|
195
|
-
errorCode === "EPIPE" ||
|
|
196
|
-
errorCode === "UND_ERR_SOCKET")) {
|
|
197
|
-
if (metrics)
|
|
198
|
-
metrics.retries += 1;
|
|
199
|
-
await this.sleep(this.calcDelay(attempt));
|
|
200
|
-
attempt++;
|
|
201
|
-
continue;
|
|
202
|
-
}
|
|
203
|
-
throw err;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
finally {
|
|
208
|
-
if (timer)
|
|
209
|
-
clearTimeout(timer);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
//# sourceMappingURL=RequestExecutor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RequestExecutor.js","sourceRoot":"","sources":["../../src/Core/RequestExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,QAAQ,CAAC;AAIxC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAuBnE;;;GAGG;AACH,MAAM,yBAAyB,GAAuB;IACpD,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;IACjD,aAAa,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC;CACvD,CAAC;AAEF;;;GAGG;AACH,MAAM,iBAAiB,GAAG,CAAC,GAAqB,EAAoB,EAAE,CACpE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAE5B;;;GAGG;AACH,MAAM,OAAO,e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K;gBAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF"}
|
package/transports/bun.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { HttpClientOptions } from "../types/options.js";
|
|
2
|
-
import type { HyperTransport, TransportRequest, TransportResponse } from "../types/transport.js";
|
|
3
|
-
export declare class BunTransport implements HyperTransport {
|
|
4
|
-
private cookieJar;
|
|
5
|
-
private config;
|
|
6
|
-
private cookieCache;
|
|
7
|
-
private activeRequests;
|
|
8
|
-
private concurrencyQueue;
|
|
9
|
-
constructor(config: HttpClientOptions);
|
|
10
|
-
execute(req: TransportRequest): Promise<TransportResponse>;
|
|
11
|
-
private getCookiesForDomain;
|
|
12
|
-
private updateCookies;
|
|
13
|
-
close(): Promise<void>;
|
|
14
|
-
destroy(): Promise<void>;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=bun.d.ts.map
|
package/transports/bun.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../../src/transports/bun.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAc/B,qBAAa,YAAa,YAAW,cAAc;IACjD,OAAO,CAAC,SAAS,CAA0C;IAC3D,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,WAAW,CAA6B;IAEhD,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,gBAAgB,CAAsB;gBAElC,MAAM,EAAE,iBAAiB;IAIxB,OAAO,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA2GvE,OAAO,CAAC,mBAAmB;IAwB3B,OAAO,CAAC,aAAa;IAqCR,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAGtC"}
|
package/transports/bun.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
function fastGetHostname(url) {
|
|
2
|
-
const start = url.indexOf("//") + 2;
|
|
3
|
-
if (start === 1)
|
|
4
|
-
return "localhost";
|
|
5
|
-
let end = url.indexOf("/", start);
|
|
6
|
-
if (end === -1)
|
|
7
|
-
end = url.indexOf("?", start);
|
|
8
|
-
if (end === -1)
|
|
9
|
-
end = url.length;
|
|
10
|
-
const host = url.slice(start, end);
|
|
11
|
-
const portIdx = host.indexOf(":");
|
|
12
|
-
return portIdx !== -1 ? host.slice(0, portIdx) : host;
|
|
13
|
-
}
|
|
14
|
-
export class BunTransport {
|
|
15
|
-
cookieJar = new Map();
|
|
16
|
-
config;
|
|
17
|
-
cookieCache = new Map();
|
|
18
|
-
activeRequests = 0;
|
|
19
|
-
concurrencyQueue = [];
|
|
20
|
-
constructor(config) {
|
|
21
|
-
this.config = config;
|
|
22
|
-
}
|
|
23
|
-
async execute(req) {
|
|
24
|
-
const netConfig = this.config.network;
|
|
25
|
-
const maxConcurrent = netConfig?.maxConcurrent ?? 0;
|
|
26
|
-
if (maxConcurrent > 0 && this.activeRequests >= maxConcurrent) {
|
|
27
|
-
await new Promise((resolve) => {
|
|
28
|
-
this.concurrencyQueue.push(resolve);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
this.activeRequests++;
|
|
32
|
-
try {
|
|
33
|
-
const domain = fastGetHostname(req.url);
|
|
34
|
-
let headers = req.headers;
|
|
35
|
-
let hasCloned = false;
|
|
36
|
-
if (netConfig?.userAgent &&
|
|
37
|
-
!headers["User-Agent"] &&
|
|
38
|
-
!headers["user-agent"]) {
|
|
39
|
-
headers = { ...headers, "User-Agent": netConfig.userAgent };
|
|
40
|
-
hasCloned = true;
|
|
41
|
-
}
|
|
42
|
-
const savedCookies = this.getCookiesForDomain(domain);
|
|
43
|
-
if (savedCookies) {
|
|
44
|
-
if (!hasCloned)
|
|
45
|
-
headers = { ...headers };
|
|
46
|
-
const currentCookie = headers["Cookie"];
|
|
47
|
-
headers["Cookie"] = currentCookie
|
|
48
|
-
? `${Array.isArray(currentCookie) ? currentCookie.join("; ") : currentCookie}; ${savedCookies}`
|
|
49
|
-
: savedCookies;
|
|
50
|
-
}
|
|
51
|
-
let signal = req.signal;
|
|
52
|
-
if (netConfig?.timeout && netConfig.timeout > 0) {
|
|
53
|
-
const timeoutSignal = AbortSignal.timeout(netConfig.timeout);
|
|
54
|
-
signal = req.signal
|
|
55
|
-
? AbortSignal.any([req.signal, timeoutSignal])
|
|
56
|
-
: timeoutSignal;
|
|
57
|
-
}
|
|
58
|
-
const fetchHeaders = {};
|
|
59
|
-
for (const key in headers) {
|
|
60
|
-
const val = headers[key];
|
|
61
|
-
if (val !== undefined) {
|
|
62
|
-
fetchHeaders[key] = Array.isArray(val) ? val.join(", ") : val;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const response = await fetch(req.url, {
|
|
66
|
-
method: req.method,
|
|
67
|
-
headers: fetchHeaders,
|
|
68
|
-
body: req.body,
|
|
69
|
-
signal: signal,
|
|
70
|
-
keepalive: !!netConfig?.keepAliveTimeout,
|
|
71
|
-
redirect: "manual",
|
|
72
|
-
});
|
|
73
|
-
const setCookies = response.headers.getSetCookie();
|
|
74
|
-
if (setCookies && setCookies.length > 0) {
|
|
75
|
-
this.updateCookies(domain, setCookies);
|
|
76
|
-
}
|
|
77
|
-
const responseHeaders = {};
|
|
78
|
-
response.headers.forEach((value, key) => {
|
|
79
|
-
responseHeaders[key] = value;
|
|
80
|
-
});
|
|
81
|
-
const body = response.body;
|
|
82
|
-
if (body) {
|
|
83
|
-
Object.defineProperty(body, "dump", {
|
|
84
|
-
value: async function () {
|
|
85
|
-
if (this.locked)
|
|
86
|
-
return;
|
|
87
|
-
const reader = this.getReader();
|
|
88
|
-
try {
|
|
89
|
-
while (!(await reader.read()).done) {
|
|
90
|
-
for await (const chunk of this) {
|
|
91
|
-
void chunk;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
catch {
|
|
96
|
-
// ignore
|
|
97
|
-
}
|
|
98
|
-
finally {
|
|
99
|
-
await reader.cancel();
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
writable: true,
|
|
103
|
-
configurable: true,
|
|
104
|
-
enumerable: false,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return {
|
|
108
|
-
status: response.status,
|
|
109
|
-
headers: responseHeaders,
|
|
110
|
-
body: body,
|
|
111
|
-
url: response.url,
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
finally {
|
|
115
|
-
this.activeRequests--;
|
|
116
|
-
const nextResolver = this.concurrencyQueue.shift();
|
|
117
|
-
if (nextResolver)
|
|
118
|
-
nextResolver();
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
getCookiesForDomain(requestDomain) {
|
|
122
|
-
if (this.cookieCache.has(requestDomain)) {
|
|
123
|
-
return this.cookieCache.get(requestDomain);
|
|
124
|
-
}
|
|
125
|
-
const matchedCookies = [];
|
|
126
|
-
for (const [storedDomain, cookiesMap] of this.cookieJar) {
|
|
127
|
-
if (requestDomain === storedDomain ||
|
|
128
|
-
requestDomain.endsWith("." + storedDomain)) {
|
|
129
|
-
for (const [key, val] of cookiesMap) {
|
|
130
|
-
matchedCookies.push(`${key}=${val}`);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
const result = matchedCookies.length > 0 ? matchedCookies.join("; ") : "";
|
|
135
|
-
this.cookieCache.set(requestDomain, result);
|
|
136
|
-
return result;
|
|
137
|
-
}
|
|
138
|
-
updateCookies(requestDomain, setCookies) {
|
|
139
|
-
for (let i = 0; i < setCookies.length; i++) {
|
|
140
|
-
const cookieStr = setCookies[i];
|
|
141
|
-
const parts = cookieStr.split(";");
|
|
142
|
-
const rawPair = parts[0];
|
|
143
|
-
const equalIdx = rawPair.indexOf("=");
|
|
144
|
-
if (equalIdx === -1)
|
|
145
|
-
continue;
|
|
146
|
-
const key = rawPair.slice(0, equalIdx).trim();
|
|
147
|
-
const val = rawPair.slice(equalIdx + 1).trim();
|
|
148
|
-
if (!key)
|
|
149
|
-
continue;
|
|
150
|
-
let targetDomain = requestDomain;
|
|
151
|
-
for (let j = 1; j < parts.length; j++) {
|
|
152
|
-
const attr = parts[j].trim();
|
|
153
|
-
if (attr.toLowerCase().startsWith("domain=")) {
|
|
154
|
-
let domVal = attr.slice(7).trim();
|
|
155
|
-
if (domVal.startsWith(".")) {
|
|
156
|
-
domVal = domVal.slice(1);
|
|
157
|
-
}
|
|
158
|
-
if (domVal)
|
|
159
|
-
targetDomain = domVal;
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
let domainMap = this.cookieJar.get(targetDomain);
|
|
164
|
-
if (!domainMap) {
|
|
165
|
-
domainMap = new Map();
|
|
166
|
-
this.cookieJar.set(targetDomain, domainMap);
|
|
167
|
-
}
|
|
168
|
-
domainMap.set(key, val);
|
|
169
|
-
this.cookieCache.clear();
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
async close() {
|
|
173
|
-
this.concurrencyQueue = [];
|
|
174
|
-
this.cookieJar.clear();
|
|
175
|
-
this.cookieCache.clear();
|
|
176
|
-
}
|
|
177
|
-
async destroy() {
|
|
178
|
-
await this.close();
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
//# sourceMappingURL=bun.js.map
|
package/transports/bun.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bun.js","sourceRoot":"","sources":["../../src/transports/bun.ts"],"names":[],"mappings":"AAOA,SAAS,eAAe,CAAC,GAAW;IAClC,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,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/errors.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare class HttpClientError extends Error {
|
|
2
|
-
code: string;
|
|
3
|
-
statusCode?: number | undefined;
|
|
4
|
-
originalError?: Error | undefined;
|
|
5
|
-
url?: string | undefined;
|
|
6
|
-
method?: string | undefined;
|
|
7
|
-
constructor(message: string, code?: string, statusCode?: number | undefined, originalError?: Error | undefined, url?: string | undefined, method?: string | undefined);
|
|
8
|
-
}
|
|
9
|
-
export declare class TimeoutError extends HttpClientError {
|
|
10
|
-
constructor(url: string, timeout: number);
|
|
11
|
-
}
|
|
12
|
-
export declare class RateLimitError extends HttpClientError {
|
|
13
|
-
constructor(url: string, retryAfter?: number);
|
|
14
|
-
}
|
|
15
|
-
export interface HyperttpError extends Error {
|
|
16
|
-
code?: string;
|
|
17
|
-
status?: number;
|
|
18
|
-
statusCode?: number;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/types/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAgB,SAAQ,KAAK;IAG/B,IAAI,EAAE,MAAM;IACZ,UAAU,CAAC,EAAE,MAAM;IACnB,aAAa,CAAC,EAAE,KAAK;IACrB,GAAG,CAAC,EAAE,MAAM;IACZ,MAAM,CAAC,EAAE,MAAM;gBALtB,OAAO,EAAE,MAAM,EACR,IAAI,GAAE,MAAqB,EAC3B,UAAU,CAAC,EAAE,MAAM,YAAA,EACnB,aAAa,CAAC,EAAE,KAAK,YAAA,EACrB,GAAG,CAAC,EAAE,MAAM,YAAA,EACZ,MAAM,CAAC,EAAE,MAAM,YAAA;CAKzB;AAED,qBAAa,YAAa,SAAQ,eAAe;gBACnC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAIzC;AAED,qBAAa,cAAe,SAAQ,eAAe;gBACrC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;CAS7C;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
package/types/errors.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export class HttpClientError extends Error {
|
|
2
|
-
code;
|
|
3
|
-
statusCode;
|
|
4
|
-
originalError;
|
|
5
|
-
url;
|
|
6
|
-
method;
|
|
7
|
-
constructor(message, code = "HTTP_ERROR", statusCode, originalError, url, method) {
|
|
8
|
-
super(message);
|
|
9
|
-
this.code = code;
|
|
10
|
-
this.statusCode = statusCode;
|
|
11
|
-
this.originalError = originalError;
|
|
12
|
-
this.url = url;
|
|
13
|
-
this.method = method;
|
|
14
|
-
this.name = "HttpClientError";
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export class TimeoutError extends HttpClientError {
|
|
18
|
-
constructor(url, timeout) {
|
|
19
|
-
super(`Timeout after ${timeout}ms`, "TIMEOUT", 408, undefined, url);
|
|
20
|
-
this.name = "TimeoutError";
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export class RateLimitError extends HttpClientError {
|
|
24
|
-
constructor(url, retryAfter) {
|
|
25
|
-
super(`Rate limited${retryAfter ? ` retry in ${retryAfter}ms` : ""}`, "RATE_LIMIT", 429, undefined, url);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=errors.js.map
|
package/types/errors.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAG/B;IACA;IACA;IACA;IACA;IANT,YACE,OAAe,EACR,OAAe,YAAY,EAC3B,UAAmB,EACnB,aAAqB,EACrB,GAAY,EACZ,MAAe;QAEtB,KAAK,CAAC,OAAO,CAAC,CAAC;QANR,SAAI,GAAJ,IAAI,CAAuB;QAC3B,eAAU,GAAV,UAAU,CAAS;QACnB,kBAAa,GAAb,aAAa,CAAQ;QACrB,QAAG,GAAH,GAAG,CAAS;QACZ,WAAM,GAAN,MAAM,CAAS;QAGtB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,eAAe;IAC/C,YAAY,GAAW,EAAE,OAAe;QACtC,KAAK,CAAC,iBAAiB,OAAO,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,eAAe;IACjD,YAAY,GAAW,EAAE,UAAmB;QAC1C,KAAK,CACH,eAAe,UAAU,CAAC,CAAC,CAAC,aAAa,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAC9D,YAAY,EACZ,GAAG,EACH,SAAS,EACT,GAAG,CACJ,CAAC;IACJ,CAAC;CACF"}
|
package/types/http.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type LogLevel = "debug" | "info" | "warn" | "error";
|
|
2
|
-
export type Method = "GET" | "POST" | "PUT" | "PATCH" | "OPTIONS" | "DELETE" | "HEAD";
|
|
3
|
-
export type ResponseType = "auto" | "json" | "text" | "xml" | "html" | "buffer" | "stream" | "blob";
|
|
4
|
-
export type SourceType = "json" | "xml" | "html" | "text" | "buffer";
|
|
5
|
-
//# sourceMappingURL=http.d.ts.map
|
package/types/http.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/types/http.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,MAAM,MAAM,GACd,KAAK,GACL,MAAM,GACN,KAAK,GACL,OAAO,GACP,SAAS,GACT,QAAQ,GACR,MAAM,CAAC;AAEX,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC"}
|
package/types/http.js
DELETED
package/types/http.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/types/http.ts"],"names":[],"mappings":""}
|
package/types/hyper.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { Method, ResponseType } from "./http.js";
|
|
2
|
-
import type { RequestBodyData } from "./request.js";
|
|
3
|
-
export interface InternalRequest {
|
|
4
|
-
method: Method;
|
|
5
|
-
url: string;
|
|
6
|
-
headers: Record<string, string | string[]>;
|
|
7
|
-
body?: RequestBodyData;
|
|
8
|
-
signal?: AbortSignal;
|
|
9
|
-
meta?: {
|
|
10
|
-
timings?: {
|
|
11
|
-
networkMs?: number;
|
|
12
|
-
};
|
|
13
|
-
responseType?: ResponseType;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export interface Cloneable<T> {
|
|
17
|
-
clone(): T;
|
|
18
|
-
}
|
|
19
|
-
export interface HttpResponse<T = any> extends Cloneable<HttpResponse<T>> {
|
|
20
|
-
status: number;
|
|
21
|
-
headers: Record<string, any>;
|
|
22
|
-
url?: string;
|
|
23
|
-
body: T;
|
|
24
|
-
clone(): HttpResponse<T>;
|
|
25
|
-
}
|
|
26
|
-
export interface HyperStats {
|
|
27
|
-
inflightRequests?: number;
|
|
28
|
-
cacheSize?: number;
|
|
29
|
-
queuedRequests?: number;
|
|
30
|
-
activeQueue?: number;
|
|
31
|
-
rateLimitHits?: number;
|
|
32
|
-
[key: string]: any;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=hyper.d.ts.map
|
package/types/hyper.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hyper.d.ts","sourceRoot":"","sources":["../../src/types/hyper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IAEf,GAAG,EAAE,MAAM,CAAC;IAEZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAE3C,IAAI,CAAC,EAAE,eAAe,CAAC;IAEvB,MAAM,CAAC,EAAE,WAAW,CAAC;IAErB,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE;YACR,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;QACF,YAAY,CAAC,EAAE,YAAY,CAAC;KAC7B,CAAC;CACH;AAED,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,KAAK,IAAI,CAAC,CAAC;CACZ;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACvE,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
|
package/types/hyper.js
DELETED
package/types/hyper.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hyper.js","sourceRoot":"","sources":["../../src/types/hyper.ts"],"names":[],"mappings":""}
|
package/types/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./errors.js";
|
|
2
|
-
export * from "./http.js";
|
|
3
|
-
export * from "./hyper.js";
|
|
4
|
-
export * from "./metrics.js";
|
|
5
|
-
export * from "./network.js";
|
|
6
|
-
export * from "./options.js";
|
|
7
|
-
export * from "./plugins.js";
|
|
8
|
-
export * from "./request.js";
|
|
9
|
-
export * from "./retry.js";
|
|
10
|
-
export * from "./stream.js";
|
|
11
|
-
export * from "./transport.js";
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
package/types/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./errors.js";
|
|
2
|
-
export * from "./http.js";
|
|
3
|
-
export * from "./hyper.js";
|
|
4
|
-
export * from "./metrics.js";
|
|
5
|
-
export * from "./network.js";
|
|
6
|
-
export * from "./options.js";
|
|
7
|
-
export * from "./plugins.js";
|
|
8
|
-
export * from "./request.js";
|
|
9
|
-
export * from "./retry.js";
|
|
10
|
-
export * from "./stream.js";
|
|
11
|
-
export * from "./transport.js";
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
package/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|