hyperttp 0.3.22 → 0.4.0
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/Hyperttp/Client/HyperClient.d.ts +28 -13
- package/Hyperttp/Client/HyperClient.d.ts.map +1 -1
- package/Hyperttp/Client/HyperClient.js +118 -141
- package/Hyperttp/Client/HyperClient.js.map +1 -1
- package/Hyperttp/Request.d.ts +19 -34
- package/Hyperttp/Request.d.ts.map +1 -1
- package/Hyperttp/Request.js +90 -70
- package/Hyperttp/Request.js.map +1 -1
- package/Hyperttp/UrlExtractor.d.ts +1 -1
- package/Hyperttp/UrlExtractor.d.ts.map +1 -1
- package/Hyperttp/UrlExtractor.js +1 -1
- package/Hyperttp/UrlExtractor.js.map +1 -1
- package/Hyperttp/Utils/RequestBuilder.d.ts +141 -1
- package/Hyperttp/Utils/RequestBuilder.d.ts.map +1 -1
- package/Hyperttp/Utils/RequestBuilder.js +150 -14
- package/Hyperttp/Utils/RequestBuilder.js.map +1 -1
- package/Hyperttp/defaultConfig.d.ts +1 -1
- package/Hyperttp/defaultConfig.d.ts.map +1 -1
- package/Hyperttp/defaultConfig.js +1 -1
- package/Hyperttp/defaultConfig.js.map +1 -1
- package/Hyperttp/index.d.ts +0 -1
- package/Hyperttp/index.d.ts.map +1 -1
- package/Hyperttp/index.js +1 -1
- package/Hyperttp/index.js.map +1 -1
- package/LICENSE +21 -0
- package/README.md +200 -0
- package/Types/index.d.ts +0 -1
- package/Types/index.d.ts.map +1 -1
- package/Types/index.js +0 -1
- package/Types/index.js.map +1 -1
- package/Types/url-extractor.d.ts +40 -0
- package/Types/url-extractor.d.ts.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +19 -10
- package/Hyperttp/Utils/merge.d.ts +0 -2
- package/Hyperttp/Utils/merge.d.ts.map +0 -1
- package/Hyperttp/Utils/merge.js +0 -25
- package/Hyperttp/Utils/merge.js.map +0 -1
- package/Types/http-client.d.ts +0 -35
- package/Types/http-client.d.ts.map +0 -1
- package/Types/http-client.js +0 -2
- package/Types/http-client.js.map +0 -1
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { HyperClient } from "../Client/HyperClient.js";
|
|
2
|
+
/**
|
|
3
|
+
* @ru Строитель запросов для удобного создания и настройки HTTP запросов.
|
|
4
|
+
* @en Request builder for convenient creation and configuration of HTTP requests.
|
|
5
|
+
*/
|
|
1
6
|
export class RequestBuilder {
|
|
2
7
|
_url;
|
|
3
8
|
_method = "GET";
|
|
@@ -6,23 +11,59 @@ export class RequestBuilder {
|
|
|
6
11
|
_responseType = "json";
|
|
7
12
|
_client;
|
|
8
13
|
_signal;
|
|
14
|
+
/**
|
|
15
|
+
* @ru Создаёт экземпляр строителя запросов.
|
|
16
|
+
* @en Creates a request builder instance.
|
|
17
|
+
*
|
|
18
|
+
* @param url - Base URL.
|
|
19
|
+
* @param client - HyperClient instance.
|
|
20
|
+
*/
|
|
9
21
|
constructor(url, client) {
|
|
10
22
|
this._url = url;
|
|
11
23
|
this._client = client;
|
|
12
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* @ru Добавляет заголовки к запросу.
|
|
27
|
+
* @en Adds headers to the request.
|
|
28
|
+
*
|
|
29
|
+
* @param headers - Headers object.
|
|
30
|
+
* @returns Current builder instance for chaining.
|
|
31
|
+
*/
|
|
13
32
|
headers(headers) {
|
|
14
33
|
Object.assign(this._headers, headers);
|
|
15
34
|
return this;
|
|
16
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* @ru Устанавливает тело запроса.
|
|
38
|
+
* @en Sets request body.
|
|
39
|
+
*
|
|
40
|
+
* @param bodyData - Request body data.
|
|
41
|
+
* @returns Current builder instance for chaining.
|
|
42
|
+
*/
|
|
17
43
|
body(bodyData) {
|
|
18
44
|
this._body = bodyData;
|
|
19
45
|
return this;
|
|
20
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* @ru Устанавливает JSON тело и автоматически добавляет Content-Type заголовок.
|
|
49
|
+
* @en Sets JSON body and automatically adds Content-Type header.
|
|
50
|
+
*
|
|
51
|
+
* @typeParam B - Body type.
|
|
52
|
+
* @param body - JSON body data.
|
|
53
|
+
* @returns Current builder instance for chaining.
|
|
54
|
+
*/
|
|
21
55
|
jsonBody(body) {
|
|
22
56
|
this._body = body;
|
|
23
57
|
this._headers["Content-Type"] = "application/json; charset=utf-8";
|
|
24
58
|
return this;
|
|
25
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* @ru Добавляет query параметры к URL.
|
|
62
|
+
* @en Adds query parameters to the URL.
|
|
63
|
+
*
|
|
64
|
+
* @param params - Query parameters object.
|
|
65
|
+
* @returns Current builder instance for chaining.
|
|
66
|
+
*/
|
|
26
67
|
query(params) {
|
|
27
68
|
const urlObj = new URL(this._url);
|
|
28
69
|
for (const [k, v] of Object.entries(params)) {
|
|
@@ -31,76 +72,171 @@ export class RequestBuilder {
|
|
|
31
72
|
this._url = urlObj.toString();
|
|
32
73
|
return this;
|
|
33
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* @ru Устанавливает метод запроса на GET.
|
|
77
|
+
* @en Sets request method to GET.
|
|
78
|
+
*
|
|
79
|
+
* @returns Current builder instance for chaining.
|
|
80
|
+
*/
|
|
34
81
|
get() {
|
|
35
82
|
this._method = "GET";
|
|
36
83
|
return this;
|
|
37
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* @ru Устанавливает метод запроса на POST.
|
|
87
|
+
* @en Sets request method to POST.
|
|
88
|
+
*
|
|
89
|
+
* @returns Current builder instance for chaining.
|
|
90
|
+
*/
|
|
38
91
|
post() {
|
|
39
92
|
this._method = "POST";
|
|
40
93
|
return this;
|
|
41
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* @ru Устанавливает метод запроса на PUT.
|
|
97
|
+
* @en Sets request method to PUT.
|
|
98
|
+
*
|
|
99
|
+
* @returns Current builder instance for chaining.
|
|
100
|
+
*/
|
|
42
101
|
put() {
|
|
43
102
|
this._method = "PUT";
|
|
44
103
|
return this;
|
|
45
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* @ru Устанавливает метод запроса на PATCH.
|
|
107
|
+
* @en Sets request method to PATCH.
|
|
108
|
+
*
|
|
109
|
+
* @returns Current builder instance for chaining.
|
|
110
|
+
*/
|
|
46
111
|
patch() {
|
|
47
112
|
this._method = "PATCH";
|
|
48
113
|
return this;
|
|
49
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* @ru Устанавливает метод запроса на DELETE.
|
|
117
|
+
* @en Sets request method to DELETE.
|
|
118
|
+
*
|
|
119
|
+
* @returns Current builder instance for chaining.
|
|
120
|
+
*/
|
|
50
121
|
delete() {
|
|
51
122
|
this._method = "DELETE";
|
|
52
123
|
return this;
|
|
53
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* @ru Устанавливает метод запроса на HEAD.
|
|
127
|
+
* @en Sets request method to HEAD.
|
|
128
|
+
*
|
|
129
|
+
* @returns Current builder instance for chaining.
|
|
130
|
+
*/
|
|
54
131
|
head() {
|
|
55
132
|
this._method = "HEAD";
|
|
56
133
|
return this;
|
|
57
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* @ru Устанавливает метод запроса на OPTIONS.
|
|
137
|
+
* @en Sets request method to OPTIONS.
|
|
138
|
+
*
|
|
139
|
+
* @returns Current builder instance for chaining.
|
|
140
|
+
*/
|
|
58
141
|
options() {
|
|
59
142
|
this._method = "OPTIONS";
|
|
60
143
|
return this;
|
|
61
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* @ru Устанавливает тип ответа на JSON.
|
|
147
|
+
* @en Sets response type to JSON.
|
|
148
|
+
*
|
|
149
|
+
* @returns Current builder instance for chaining.
|
|
150
|
+
*/
|
|
62
151
|
json() {
|
|
63
152
|
this._responseType = "json";
|
|
64
153
|
return this;
|
|
65
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* @ru Устанавливает тип ответа на текст.
|
|
157
|
+
* @en Sets response type to text.
|
|
158
|
+
*
|
|
159
|
+
* @returns Current builder instance for chaining.
|
|
160
|
+
*/
|
|
66
161
|
text() {
|
|
67
162
|
this._responseType = "text";
|
|
68
163
|
return this;
|
|
69
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* @ru Устанавливает тип ответа на XML.
|
|
167
|
+
* @en Sets response type to XML.
|
|
168
|
+
*
|
|
169
|
+
* @returns Current builder instance for chaining.
|
|
170
|
+
*/
|
|
70
171
|
xml() {
|
|
71
172
|
this._responseType = "xml";
|
|
72
173
|
return this;
|
|
73
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* @ru Устанавливает тип ответа на буфер.
|
|
177
|
+
* @en Sets response type to buffer.
|
|
178
|
+
*
|
|
179
|
+
* @returns Current builder instance for chaining.
|
|
180
|
+
*/
|
|
74
181
|
buffer() {
|
|
75
182
|
this._responseType = "buffer";
|
|
76
183
|
return this;
|
|
77
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* @ru Устанавливает тип ответа на поток.
|
|
187
|
+
* @en Sets response type to stream.
|
|
188
|
+
*
|
|
189
|
+
* @returns Current builder instance for chaining.
|
|
190
|
+
*/
|
|
78
191
|
stream() {
|
|
79
192
|
this._responseType = "stream";
|
|
80
193
|
return this;
|
|
81
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* @ru Устанавливает AbortSignal для отмены запроса.
|
|
197
|
+
* @en Sets AbortSignal for request cancellation.
|
|
198
|
+
*
|
|
199
|
+
* @param signal - AbortSignal instance.
|
|
200
|
+
* @returns Current builder instance for chaining.
|
|
201
|
+
*/
|
|
82
202
|
signal(signal) {
|
|
83
203
|
this._signal = signal;
|
|
84
204
|
return this;
|
|
85
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* @ru Устанавливает таймаут для запроса.
|
|
208
|
+
* @en Sets timeout for the request.
|
|
209
|
+
*
|
|
210
|
+
* @param ms - Timeout in milliseconds.
|
|
211
|
+
* @returns Current builder instance for chaining.
|
|
212
|
+
*/
|
|
86
213
|
timeout(ms) {
|
|
87
214
|
this._signal = AbortSignal.timeout(ms);
|
|
88
215
|
return this;
|
|
89
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* @ru Преобразует текущее состояние строителя в объект запроса.
|
|
219
|
+
* @en Converts current builder state to request object.
|
|
220
|
+
*
|
|
221
|
+
* @private
|
|
222
|
+
* @returns Request interface object.
|
|
223
|
+
*/
|
|
90
224
|
toRequest() {
|
|
91
|
-
const url = this._url;
|
|
92
|
-
const headers = this._headers;
|
|
93
|
-
const body = this._body;
|
|
94
|
-
const signal = this._signal;
|
|
95
|
-
const responseType = this._responseType;
|
|
96
225
|
return {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
226
|
+
url: this._url,
|
|
227
|
+
headers: this._headers,
|
|
228
|
+
body: this._body,
|
|
229
|
+
signal: this._signal,
|
|
230
|
+
meta: { responseType: this._responseType },
|
|
102
231
|
};
|
|
103
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* @ru Отправляет сконфигурированный запрос.
|
|
235
|
+
* @en Sends the configured request.
|
|
236
|
+
*
|
|
237
|
+
* @typeParam T - Return data type.
|
|
238
|
+
* @returns Promise with response data or stream response.
|
|
239
|
+
*/
|
|
104
240
|
async send() {
|
|
105
241
|
const req = this.toRequest();
|
|
106
242
|
if (this._responseType === "stream") {
|
|
@@ -110,15 +246,15 @@ export class RequestBuilder {
|
|
|
110
246
|
case "GET":
|
|
111
247
|
return this._client.get(req, this._responseType, this._signal);
|
|
112
248
|
case "POST":
|
|
113
|
-
return this._client.post(req, this.
|
|
249
|
+
return this._client.post(req, this._responseType, this._body, this._signal);
|
|
114
250
|
case "PUT":
|
|
115
|
-
return this._client.put(req, this.
|
|
251
|
+
return this._client.put(req, this._responseType, this._body, this._signal);
|
|
116
252
|
case "PATCH":
|
|
117
|
-
return this._client.patch(req, this.
|
|
253
|
+
return this._client.patch(req, this._responseType, this._body, this._signal);
|
|
118
254
|
case "DELETE":
|
|
119
255
|
return this._client.delete(req, this._responseType, this._signal);
|
|
120
256
|
case "OPTIONS":
|
|
121
|
-
return this._client.options(req, this.
|
|
257
|
+
return this._client.options(req, this._responseType, this._body, this._signal);
|
|
122
258
|
case "HEAD":
|
|
123
259
|
return this._client.head(req, this._responseType, this._signal);
|
|
124
260
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBuilder.js","sourceRoot":"","sources":["../../../src/Hyperttp/Utils/RequestBuilder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBuilder.js","sourceRoot":"","sources":["../../../src/Hyperttp/Utils/RequestBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD;;;GAGG;AACH,MAAM,OAAO,cAAc;IACjB,IAAI,CAAS;IACb,OAAO,GAAW,KAAK,CAAC;IACxB,QAAQ,GAA2B,EAAE,CAAC;IACtC,KAAK,CAAW;IAChB,aAAa,GAAiB,MAAM,CAAC;IACrC,OAAO,CAAc;IACrB,OAAO,CAAe;IAE9B;;;;;;OAMG;IACH,YAAY,GAAW,EAAE,MAAmB;QAC1C,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,OAA+B;QACrC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,QAAiB;QACpB,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAI,IAAO;QACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,QAAQ,CAAC,cAAc,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|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultConfig.d.ts","sourceRoot":"","sources":["../../src/Hyperttp/defaultConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"defaultConfig.d.ts","sourceRoot":"","sources":["../../src/Hyperttp/defaultConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,eAAO,MAAM,aAAa,EAAE,iBA4C3B,CAAC"}
|
|
@@ -2,7 +2,6 @@ export const defaultConfig = {
|
|
|
2
2
|
network: {
|
|
3
3
|
timeout: 30000,
|
|
4
4
|
maxConcurrent: 500,
|
|
5
|
-
allowHttp2: true,
|
|
6
5
|
pipelining: 10,
|
|
7
6
|
keepAliveTimeout: 30000,
|
|
8
7
|
followRedirects: true,
|
|
@@ -21,6 +20,7 @@ export const defaultConfig = {
|
|
|
21
20
|
},
|
|
22
21
|
cache: {
|
|
23
22
|
enabled: true,
|
|
23
|
+
maxSize: 1000,
|
|
24
24
|
ttl: 60000,
|
|
25
25
|
},
|
|
26
26
|
interceptors: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultConfig.js","sourceRoot":"","sources":["../../src/Hyperttp/defaultConfig.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,OAAO,EAAE;QACP,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,GAAG;QAClB,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"defaultConfig.js","sourceRoot":"","sources":["../../src/Hyperttp/defaultConfig.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,OAAO,EAAE;QACP,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,GAAG;QAClB,UAAU,EAAE,EAAE;QACd,gBAAgB,EAAE,KAAK;QACvB,eAAe,EAAE,IAAI;QACrB,YAAY,EAAE,CAAC;QACf,kBAAkB,EAAE,IAAI;QACxB,SAAS,EAAE,cAAc;KAC1B;IAED,KAAK,EAAE;QACL,UAAU,EAAE,CAAC;QACb,SAAS,EAAE,GAAG;QACd,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,IAAI;KACb;IAED,OAAO,EAAE;QACP,OAAO,EAAE,IAAI;KACd;IAED,KAAK,EAAE;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;QACb,GAAG,EAAE,KAAK;KACX;IAED,YAAY,EAAE;QACZ,OAAO,EAAE,IAAI;KACd;IAED,SAAS,EAAE;QACT,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE,IAAI;KACf;IAED,KAAK,EAAE;QACL,OAAO,EAAE,IAAI;KACd;IAED,OAAO,EAAE,KAAK;CACf,CAAC"}
|
package/Hyperttp/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { HyperClient } from "./Client/HyperClient.js";
|
|
2
2
|
export { default as Request } from "./Request.js";
|
|
3
|
-
export { PreparedRequest } from "./Request.js";
|
|
4
3
|
export { default as UrlExtractor } from "./UrlExtractor.js";
|
|
5
4
|
export * from "./Utils/index.js";
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
package/Hyperttp/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Hyperttp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Hyperttp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,cAAc,kBAAkB,CAAC"}
|
package/Hyperttp/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { HyperClient } from "./Client/HyperClient.js";
|
|
2
2
|
export { default as Request } from "./Request.js";
|
|
3
|
-
export { PreparedRequest } from "./Request.js";
|
|
3
|
+
// export { PreparedRequest } from "./Request.js";
|
|
4
4
|
export { default as UrlExtractor } from "./UrlExtractor.js";
|
|
5
5
|
export * from "./Utils/index.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/Hyperttp/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Hyperttp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Hyperttp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,kDAAkD;AAClD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,cAAc,kBAAkB,CAAC"}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dirold2
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Hyperttp
|
|
2
|
+
|
|
3
|
+
Advanced HTTP client for Node.js with caching, rate limiting, request queuing,
|
|
4
|
+
automatic retries, cookie management, and automatic JSON/XML parsing.
|
|
5
|
+
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
- Automatic request deduplication
|
|
9
|
+
- LRU caching with TTL
|
|
10
|
+
- Configurable rate limiting
|
|
11
|
+
- Concurrent request management
|
|
12
|
+
- Exponential backoff with jitter for retries
|
|
13
|
+
- Cookie jar support
|
|
14
|
+
- Automatic response parsing (JSON/XML/text/buffer)
|
|
15
|
+
- Automatic handling of redirects
|
|
16
|
+
- Fluent request builder API
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install hyperttp
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 🚀 Simple Usage
|
|
27
|
+
|
|
28
|
+
Get started in seconds — just import and make requests:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import HttpClientImproved from "hyperttp";
|
|
32
|
+
|
|
33
|
+
const client = new HttpClientImproved();
|
|
34
|
+
|
|
35
|
+
// Simple GET request
|
|
36
|
+
const data = await client.get("https://api.example.com/data");
|
|
37
|
+
|
|
38
|
+
// POST request with JSON body
|
|
39
|
+
const postData = await client.post("https://api.example.com/items", {
|
|
40
|
+
name: "Item 1",
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**That's it!** Caching, request queuing, and retries are enabled by default.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## ⚙️ Advanced Configuration
|
|
49
|
+
|
|
50
|
+
Configure all components for your specific needs:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
import HttpClientImproved from "hyperttp";
|
|
54
|
+
|
|
55
|
+
const client = new HttpClientImproved({
|
|
56
|
+
// 🌐 Network settings
|
|
57
|
+
network: {
|
|
58
|
+
timeout: 10000, // Request timeout (ms)
|
|
59
|
+
maxConcurrent: 50, // Max concurrent requests
|
|
60
|
+
maxRedirects: 5, // Max redirects to follow
|
|
61
|
+
followRedirects: true, // Follow redirects automatically
|
|
62
|
+
userAgent: "MyApp/1.0", // User-Agent header
|
|
63
|
+
allowHttp2: true, // Enable HTTP/2
|
|
64
|
+
pipelining: 10, // Request pipelining
|
|
65
|
+
keepAliveTimeout: 30000, // Keep-alive timeout
|
|
66
|
+
rejectUnauthorized: false, // Skip SSL certificate validation
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
// 💾 Caching (LRU cache)
|
|
70
|
+
cache: {
|
|
71
|
+
enabled: true, // Enable caching
|
|
72
|
+
ttl: 1000 * 60 * 5, // Cache TTL (5 minutes)
|
|
73
|
+
maxSize: 500, // Max cache size (entries)
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
// 🚦 Rate Limiting (Token Bucket)
|
|
77
|
+
rateLimit: {
|
|
78
|
+
enabled: true, // Enable rate limiting
|
|
79
|
+
maxRequests: 100, // Max requests per window
|
|
80
|
+
windowMs: 60000, // Time window (ms)
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
// 📊 Request Queue
|
|
84
|
+
queue: {
|
|
85
|
+
enabled: true, // Enable request queue
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
// 🔄 Retry Logic
|
|
89
|
+
retry: {
|
|
90
|
+
maxRetries: 3, // Max retry attempts
|
|
91
|
+
baseDelay: 1000, // Base delay between retries (ms)
|
|
92
|
+
maxDelay: 10000, // Max delay (ms)
|
|
93
|
+
jitter: true, // Add randomization to delays
|
|
94
|
+
retryStatusCodes: [408, 429, 500, 502, 503, 504],
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
// 📈 Metrics
|
|
98
|
+
metrics: {
|
|
99
|
+
enabled: true, // Enable metrics collection
|
|
100
|
+
maxHistory: 1000, // Metrics history size
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
// 🔍 Logging
|
|
104
|
+
verbose: true, // Enable verbose logging
|
|
105
|
+
logger: (level, msg) => console.log(`[${level}] ${msg}`),
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Using Advanced Features
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
// Using Fluent RequestBuilder
|
|
113
|
+
const result = await client
|
|
114
|
+
.request("https://api.example.com/search")
|
|
115
|
+
.query({ q: "hyperttp", limit: 10 })
|
|
116
|
+
.headers({ Authorization: "Bearer TOKEN" })
|
|
117
|
+
.json()
|
|
118
|
+
.send();
|
|
119
|
+
|
|
120
|
+
// Get client statistics
|
|
121
|
+
const stats = client.getStats();
|
|
122
|
+
console.log({
|
|
123
|
+
cacheSize: stats.cacheSize, // Current cache size
|
|
124
|
+
inflightRequests: stats.inflightRequests, // Active requests
|
|
125
|
+
queuedRequests: stats.queuedRequests, // Requests waiting in queue
|
|
126
|
+
activeRequests: stats.activeRequests, // Currently executing
|
|
127
|
+
currentRateLimit: stats.currentRateLimit, // Used rate limit slots
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// Work with metrics
|
|
131
|
+
const metrics = client.getMetrics("https://api.example.com/data");
|
|
132
|
+
console.log(metrics);
|
|
133
|
+
|
|
134
|
+
// Clear cache
|
|
135
|
+
client.clearCache();
|
|
136
|
+
|
|
137
|
+
// Clear metrics
|
|
138
|
+
client.clearMetrics();
|
|
139
|
+
|
|
140
|
+
// Graceful shutdown
|
|
141
|
+
await client.destroy();
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Fluent Builder API
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
client
|
|
150
|
+
.request("https://api.example.com/data")
|
|
151
|
+
.get() // default
|
|
152
|
+
.headers({ "X-Test": "123" })
|
|
153
|
+
.query({ page: 1 })
|
|
154
|
+
.json() // or .text(), .xml()
|
|
155
|
+
.send()
|
|
156
|
+
.then(console.log);
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Architecture Components
|
|
162
|
+
|
|
163
|
+
### 💾 CacheManager
|
|
164
|
+
|
|
165
|
+
LRU cache with TTL and metadata support (etag, lastModified):
|
|
166
|
+
|
|
167
|
+
- Automatically caches GET/HEAD responses
|
|
168
|
+
- Configurable size and TTL
|
|
169
|
+
- Methods: `get()`, `set()`, `getWithMetadata()`, `setWithMetadata()`
|
|
170
|
+
|
|
171
|
+
### 📊 QueueManager
|
|
172
|
+
|
|
173
|
+
Request queue management:
|
|
174
|
+
|
|
175
|
+
- Concurrency control (maxConcurrent)
|
|
176
|
+
- FIFO processing of pending requests
|
|
177
|
+
- Methods: `enqueue()`, `activeCount`, `queuedCount`
|
|
178
|
+
|
|
179
|
+
### 🚦 RateLimiter
|
|
180
|
+
|
|
181
|
+
Token bucket algorithm with wait queue:
|
|
182
|
+
|
|
183
|
+
- Smooth rate limiting
|
|
184
|
+
- FIFO waiting when limit exceeded
|
|
185
|
+
- Methods: `wait()`, `tryConsume()`, `remainingRequests`
|
|
186
|
+
|
|
187
|
+
### 📈 MetricsManager
|
|
188
|
+
|
|
189
|
+
Performance metrics collection and analysis:
|
|
190
|
+
|
|
191
|
+
- Request timing
|
|
192
|
+
- Bytes sent/received
|
|
193
|
+
- Cache hits/misses
|
|
194
|
+
- Retry counts
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Documentation
|
|
199
|
+
|
|
200
|
+
- [Русский](https://github.com/Dirold2/hyperttp/blob/main/lang/ru/README.md)
|
package/Types/index.d.ts
CHANGED
package/Types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Types/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
package/Types/index.js
CHANGED
package/Types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Types/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
package/Types/url-extractor.d.ts
CHANGED
|
@@ -1,10 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ru Шаблон URL для извлечения параметров.
|
|
3
|
+
* @en URL pattern for extracting parameters.
|
|
4
|
+
*
|
|
5
|
+
* @typeParam T - Типы имен групп (строковые литералы).
|
|
6
|
+
* @typeParam T - Group names types (string literals).
|
|
7
|
+
*/
|
|
1
8
|
export interface UrlPattern<T extends string = string> {
|
|
9
|
+
/**
|
|
10
|
+
* @ru Название сущности (например, "video", "user").
|
|
11
|
+
* @en Entity name (e.g., "video", "user").
|
|
12
|
+
*/
|
|
2
13
|
entity: string;
|
|
14
|
+
/**
|
|
15
|
+
* @ru Регулярное выражение для сопоставления URL.
|
|
16
|
+
* @en Regular expression for matching URLs.
|
|
17
|
+
*/
|
|
3
18
|
regex: RegExp;
|
|
19
|
+
/**
|
|
20
|
+
* @ru Имена захваченных групп.
|
|
21
|
+
* @en Captured group names.
|
|
22
|
+
*/
|
|
4
23
|
groupNames: T[];
|
|
5
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* @ru Интерфейс экстрактора URL для извлечения идентификаторов из URL различных платформ.
|
|
27
|
+
* @en URL extractor interface for extracting IDs from URLs of different platforms.
|
|
28
|
+
*/
|
|
6
29
|
export interface UrlExtractorInterface {
|
|
30
|
+
/**
|
|
31
|
+
* @ru Регистрирует платформу с набором шаблонов URL.
|
|
32
|
+
* @en Registers a platform with a set of URL patterns.
|
|
33
|
+
*
|
|
34
|
+
* @param platform - Platform name (e.g., "youtube", "twitter").
|
|
35
|
+
* @param patterns - Array of URL patterns for this platform.
|
|
36
|
+
*/
|
|
7
37
|
registerPlatform(platform: string, patterns: UrlPattern[]): void;
|
|
38
|
+
/**
|
|
39
|
+
* @ru Извлекает идентификаторы из URL для указанной сущности и платформы.
|
|
40
|
+
* @en Extracts IDs from URL for the specified entity and platform.
|
|
41
|
+
*
|
|
42
|
+
* @typeParam T - ID type (string or number).
|
|
43
|
+
* @param url - URL to extract from.
|
|
44
|
+
* @param entity - Entity name to look for.
|
|
45
|
+
* @param platform - Platform name.
|
|
46
|
+
* @returns Object with extracted IDs mapped by group names.
|
|
47
|
+
*/
|
|
8
48
|
extractId<T extends string | number>(url: string, entity: string, platform: string): Record<string, T>;
|
|
9
49
|
}
|
|
10
50
|
//# sourceMappingURL=url-extractor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-extractor.d.ts","sourceRoot":"","sources":["../../src/Types/url-extractor.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACnD,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"url-extractor.d.ts","sourceRoot":"","sources":["../../src/Types/url-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACnD;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,UAAU,EAAE,CAAC,EAAE,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAEjE;;;;;;;;;OASG;IACH,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACjC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;CACtB"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { HyperClient } from "./Hyperttp/index.js";
|
|
2
|
-
export { Request,
|
|
2
|
+
export { Request, UrlExtractor } from "./Hyperttp/index.js";
|
|
3
3
|
export type * from "./Types/index.js";
|
|
4
4
|
export * from "@hyperttp/cache";
|
|
5
5
|
export * from "@hyperttp/queue";
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE5D,mBAAmB,kBAAkB,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"}
|