rezo 1.0.136 → 1.0.138
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 +3 -3
- package/dist/adapters/entries/curl.d.ts +119 -82
- package/dist/adapters/entries/fetch.d.ts +119 -82
- package/dist/adapters/entries/http.d.ts +119 -82
- package/dist/adapters/entries/http2.d.ts +119 -82
- package/dist/adapters/entries/react-native.cjs +6 -6
- package/dist/adapters/entries/react-native.d.ts +119 -82
- package/dist/adapters/entries/xhr.d.ts +119 -82
- package/dist/adapters/http.cjs +26 -0
- package/dist/adapters/http.js +26 -0
- package/dist/adapters/index.cjs +10 -10
- package/dist/adapters/index.d.ts +52 -15
- package/dist/cache/index.cjs +9 -9
- package/dist/cookies/cookie-jar.cjs +154 -9
- package/dist/cookies/cookie-jar.js +150 -5
- package/dist/cookies/index.cjs +10 -10
- package/dist/crawler/index.cjs +42 -42
- package/dist/crawler/plugin/index.cjs +1 -1
- package/dist/crawler.d.ts +118 -81
- package/dist/entries/crawler.cjs +24 -24
- package/dist/errors/rezo-error.cjs +3 -2
- package/dist/errors/rezo-error.js +3 -2
- package/dist/index.cjs +58 -58
- package/dist/index.d.ts +119 -82
- package/dist/internal/agents/index.cjs +14 -14
- package/dist/platform/browser.d.ts +119 -82
- package/dist/platform/bun.d.ts +119 -82
- package/dist/platform/deno.d.ts +119 -82
- package/dist/platform/node.d.ts +119 -82
- package/dist/platform/react-native.cjs +6 -6
- package/dist/platform/react-native.d.ts +119 -82
- package/dist/platform/worker.d.ts +119 -82
- package/dist/proxy/index.cjs +4 -4
- package/dist/queue/index.cjs +8 -8
- package/dist/responses/universal/index.cjs +11 -11
- package/dist/stealth/index.cjs +17 -17
- package/dist/stealth/profiles/index.cjs +10 -10
- package/dist/utils/agent-pool.cjs +1 -1
- package/dist/utils/agent-pool.js +1 -1
- package/dist/utils/headers.cjs +3 -0
- package/dist/utils/headers.js +3 -0
- package/dist/utils/http-config.cjs +15 -2
- package/dist/utils/http-config.js +15 -2
- package/dist/utils/staged-timeout.cjs +1 -2
- package/dist/utils/staged-timeout.js +1 -2
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/wget/index.cjs +51 -51
- package/dist/wget/index.d.ts +118 -81
- package/package.json +1 -1
|
@@ -112,10 +112,9 @@ export class StagedTimeoutManager {
|
|
|
112
112
|
total: `Total timeout: Request exceeded maximum duration of ${elapsed}ms`
|
|
113
113
|
};
|
|
114
114
|
const message = phaseMessages[phaseName] || `Timeout in ${phaseName} phase after ${elapsed}ms`;
|
|
115
|
-
const error = new RezoError(message, this.config || {}, phaseName === "connect" ? "ETIMEDOUT" : phaseName === "
|
|
115
|
+
const error = new RezoError(message, this.config || {}, phaseName === "connect" ? "ETIMEDOUT" : phaseName === "total" ? "ECONNABORTED" : "ESOCKETTIMEDOUT", this.requestConfig || undefined);
|
|
116
116
|
error.phase = phaseName;
|
|
117
117
|
error.elapsed = elapsed;
|
|
118
|
-
error.isRetryable = phaseName === "connect" || phaseName === "headers";
|
|
119
118
|
return error;
|
|
120
119
|
}
|
|
121
120
|
getPhaseTimeout(phaseName) {
|
package/dist/version.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const VERSION = exports.VERSION = "1.0.
|
|
1
|
+
const VERSION = exports.VERSION = "1.0.138";
|
|
2
2
|
const PACKAGE_NAME = exports.PACKAGE_NAME = "rezo";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "1.0.
|
|
1
|
+
export const VERSION = "1.0.138";
|
|
2
2
|
export const PACKAGE_NAME = "rezo";
|
package/dist/wget/index.cjs
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.WgetError =
|
|
3
|
-
const
|
|
4
|
-
exports.AssetExtractor =
|
|
5
|
-
const
|
|
6
|
-
exports.UrlFilter =
|
|
7
|
-
const
|
|
8
|
-
exports.FileWriter =
|
|
9
|
-
const
|
|
10
|
-
exports.RobotsHandler =
|
|
11
|
-
const
|
|
12
|
-
exports.ResumeHandler =
|
|
13
|
-
const
|
|
14
|
-
exports.ProgressReporter =
|
|
15
|
-
exports.ProgressTracker =
|
|
16
|
-
exports.parseSize =
|
|
17
|
-
const
|
|
18
|
-
exports.LinkConverter =
|
|
19
|
-
const
|
|
20
|
-
exports.StyleExtractor =
|
|
21
|
-
const
|
|
22
|
-
exports.Downloader =
|
|
23
|
-
const
|
|
24
|
-
exports.AssetOrganizer =
|
|
25
|
-
exports.DEFAULT_ASSET_FOLDERS =
|
|
26
|
-
const
|
|
27
|
-
exports.DownloadCache =
|
|
28
|
-
const
|
|
29
|
-
exports.EXECUTABLE_EXTENSIONS =
|
|
30
|
-
exports.ARCHIVE_EXTENSIONS =
|
|
31
|
-
exports.DOCUMENT_EXTENSIONS =
|
|
32
|
-
exports.IMAGE_EXTENSIONS =
|
|
33
|
-
exports.VIDEO_EXTENSIONS =
|
|
34
|
-
exports.AUDIO_EXTENSIONS =
|
|
35
|
-
exports.FONT_EXTENSIONS =
|
|
36
|
-
exports.WEB_ASSET_EXTENSIONS =
|
|
37
|
-
exports.DATA_EXTENSIONS =
|
|
38
|
-
exports.EXECUTABLE_MIME_TYPES =
|
|
39
|
-
exports.ARCHIVE_MIME_TYPES =
|
|
40
|
-
exports.DOCUMENT_MIME_TYPES =
|
|
41
|
-
exports.IMAGE_MIME_TYPES =
|
|
42
|
-
exports.VIDEO_MIME_TYPES =
|
|
43
|
-
exports.AUDIO_MIME_TYPES =
|
|
44
|
-
exports.FONT_MIME_TYPES =
|
|
45
|
-
exports.WEB_ASSET_MIME_TYPES =
|
|
46
|
-
exports.DATA_MIME_TYPES =
|
|
47
|
-
exports.SAFE_WEB_PRESET =
|
|
48
|
-
exports.DOCUMENTS_ONLY_PRESET =
|
|
49
|
-
exports.NO_MEDIA_PRESET =
|
|
50
|
-
exports.MINIMAL_MIRROR_PRESET =
|
|
51
|
-
exports.TEXT_ONLY_PRESET =
|
|
1
|
+
const _mod_lklfgo = require('./types.cjs');
|
|
2
|
+
exports.WgetError = _mod_lklfgo.WgetError;;
|
|
3
|
+
const _mod_2omdal = require('./asset-extractor.cjs');
|
|
4
|
+
exports.AssetExtractor = _mod_2omdal.AssetExtractor;;
|
|
5
|
+
const _mod_1r2aey = require('./url-filter.cjs');
|
|
6
|
+
exports.UrlFilter = _mod_1r2aey.UrlFilter;;
|
|
7
|
+
const _mod_i7x6hs = require('./file-writer.cjs');
|
|
8
|
+
exports.FileWriter = _mod_i7x6hs.FileWriter;;
|
|
9
|
+
const _mod_9iic0p = require('./robots.cjs');
|
|
10
|
+
exports.RobotsHandler = _mod_9iic0p.RobotsHandler;;
|
|
11
|
+
const _mod_pdeqyx = require('./resume.cjs');
|
|
12
|
+
exports.ResumeHandler = _mod_pdeqyx.ResumeHandler;;
|
|
13
|
+
const _mod_8wrwj6 = require('./progress.cjs');
|
|
14
|
+
exports.ProgressReporter = _mod_8wrwj6.ProgressReporter;
|
|
15
|
+
exports.ProgressTracker = _mod_8wrwj6.ProgressTracker;
|
|
16
|
+
exports.parseSize = _mod_8wrwj6.parseSize;;
|
|
17
|
+
const _mod_zbg6yh = require('./link-converter.cjs');
|
|
18
|
+
exports.LinkConverter = _mod_zbg6yh.LinkConverter;;
|
|
19
|
+
const _mod_grn37r = require('./style-extractor.cjs');
|
|
20
|
+
exports.StyleExtractor = _mod_grn37r.StyleExtractor;;
|
|
21
|
+
const _mod_7mbqf8 = require('./downloader.cjs');
|
|
22
|
+
exports.Downloader = _mod_7mbqf8.Downloader;;
|
|
23
|
+
const _mod_e7are2 = require('./asset-organizer.cjs');
|
|
24
|
+
exports.AssetOrganizer = _mod_e7are2.AssetOrganizer;
|
|
25
|
+
exports.DEFAULT_ASSET_FOLDERS = _mod_e7are2.DEFAULT_ASSET_FOLDERS;;
|
|
26
|
+
const _mod_d0q4ne = require('./download-cache.cjs');
|
|
27
|
+
exports.DownloadCache = _mod_d0q4ne.DownloadCache;;
|
|
28
|
+
const _mod_5qatz2 = require('./filter-lists.cjs');
|
|
29
|
+
exports.EXECUTABLE_EXTENSIONS = _mod_5qatz2.EXECUTABLE_EXTENSIONS;
|
|
30
|
+
exports.ARCHIVE_EXTENSIONS = _mod_5qatz2.ARCHIVE_EXTENSIONS;
|
|
31
|
+
exports.DOCUMENT_EXTENSIONS = _mod_5qatz2.DOCUMENT_EXTENSIONS;
|
|
32
|
+
exports.IMAGE_EXTENSIONS = _mod_5qatz2.IMAGE_EXTENSIONS;
|
|
33
|
+
exports.VIDEO_EXTENSIONS = _mod_5qatz2.VIDEO_EXTENSIONS;
|
|
34
|
+
exports.AUDIO_EXTENSIONS = _mod_5qatz2.AUDIO_EXTENSIONS;
|
|
35
|
+
exports.FONT_EXTENSIONS = _mod_5qatz2.FONT_EXTENSIONS;
|
|
36
|
+
exports.WEB_ASSET_EXTENSIONS = _mod_5qatz2.WEB_ASSET_EXTENSIONS;
|
|
37
|
+
exports.DATA_EXTENSIONS = _mod_5qatz2.DATA_EXTENSIONS;
|
|
38
|
+
exports.EXECUTABLE_MIME_TYPES = _mod_5qatz2.EXECUTABLE_MIME_TYPES;
|
|
39
|
+
exports.ARCHIVE_MIME_TYPES = _mod_5qatz2.ARCHIVE_MIME_TYPES;
|
|
40
|
+
exports.DOCUMENT_MIME_TYPES = _mod_5qatz2.DOCUMENT_MIME_TYPES;
|
|
41
|
+
exports.IMAGE_MIME_TYPES = _mod_5qatz2.IMAGE_MIME_TYPES;
|
|
42
|
+
exports.VIDEO_MIME_TYPES = _mod_5qatz2.VIDEO_MIME_TYPES;
|
|
43
|
+
exports.AUDIO_MIME_TYPES = _mod_5qatz2.AUDIO_MIME_TYPES;
|
|
44
|
+
exports.FONT_MIME_TYPES = _mod_5qatz2.FONT_MIME_TYPES;
|
|
45
|
+
exports.WEB_ASSET_MIME_TYPES = _mod_5qatz2.WEB_ASSET_MIME_TYPES;
|
|
46
|
+
exports.DATA_MIME_TYPES = _mod_5qatz2.DATA_MIME_TYPES;
|
|
47
|
+
exports.SAFE_WEB_PRESET = _mod_5qatz2.SAFE_WEB_PRESET;
|
|
48
|
+
exports.DOCUMENTS_ONLY_PRESET = _mod_5qatz2.DOCUMENTS_ONLY_PRESET;
|
|
49
|
+
exports.NO_MEDIA_PRESET = _mod_5qatz2.NO_MEDIA_PRESET;
|
|
50
|
+
exports.MINIMAL_MIRROR_PRESET = _mod_5qatz2.MINIMAL_MIRROR_PRESET;
|
|
51
|
+
exports.TEXT_ONLY_PRESET = _mod_5qatz2.TEXT_ONLY_PRESET;;
|
|
52
52
|
const { Downloader } = require('./downloader.cjs');
|
|
53
53
|
const rezo = require('../index.cjs');
|
|
54
54
|
const { promises: fs } = require("node:fs");
|
package/dist/wget/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Agent as HttpAgent, OutgoingHttpHeaders } from 'node:http';
|
|
|
3
3
|
import { Agent as HttpsAgent } from 'node:https';
|
|
4
4
|
import { Socket } from 'node:net';
|
|
5
5
|
import { SecureContext, TLSSocket } from 'node:tls';
|
|
6
|
-
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, Nullable, Store } from 'tough-cookie';
|
|
6
|
+
import { Callback, Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, GetCookiesOptions, Nullable, SerializedCookieJar, SetCookieOptions, Store } from 'tough-cookie';
|
|
7
7
|
|
|
8
8
|
declare class Cookie extends TouchCookie {
|
|
9
9
|
constructor(options?: CreateCookieOptions);
|
|
@@ -66,6 +66,38 @@ declare class RezoCookieJar extends TouchCookieJar {
|
|
|
66
66
|
constructor(cookies: Cookie[], url: string);
|
|
67
67
|
constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
|
|
68
68
|
private generateCookies;
|
|
69
|
+
setCookieSync(cookie: string | Cookie, url: string, options?: SetCookieOptions): Cookie | undefined;
|
|
70
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, callback: Callback<TouchCookie | undefined>): void;
|
|
71
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, options: SetCookieOptions, callback: Callback<TouchCookie | undefined>): void;
|
|
72
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, options?: SetCookieOptions): Promise<TouchCookie | undefined>;
|
|
73
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, options: SetCookieOptions | Callback<TouchCookie | undefined>, callback?: Callback<TouchCookie | undefined>): unknown;
|
|
74
|
+
getCookies(url: string, callback: Callback<TouchCookie[]>): void;
|
|
75
|
+
getCookies(url: string | URL, options: GetCookiesOptions | undefined, callback: Callback<TouchCookie[]>): void;
|
|
76
|
+
getCookies(url: string | URL, options?: GetCookiesOptions): Promise<TouchCookie[]>;
|
|
77
|
+
getCookies(url: string | URL, options: GetCookiesOptions | undefined | Callback<TouchCookie[]>, callback?: Callback<TouchCookie[]>): unknown;
|
|
78
|
+
getCookiesSync(url: string, options?: GetCookiesOptions): Cookie[];
|
|
79
|
+
getCookieString(url: string, callback: Callback<string | undefined>): void;
|
|
80
|
+
getCookieString(url: string, options: GetCookiesOptions, callback: Callback<string | undefined>): void;
|
|
81
|
+
getCookieString(url: string, options?: GetCookiesOptions): Promise<string>;
|
|
82
|
+
getCookieString(url: string, options: GetCookiesOptions | Callback<string | undefined>, callback?: Callback<string | undefined>): unknown;
|
|
83
|
+
getCookieStringSync(url: string, options?: GetCookiesOptions): string;
|
|
84
|
+
getSetCookieStrings(url: string, callback: Callback<string[] | undefined>): void;
|
|
85
|
+
getSetCookieStrings(url: string, options: GetCookiesOptions, callback: Callback<string[] | undefined>): void;
|
|
86
|
+
getSetCookieStrings(url: string, options?: GetCookiesOptions): Promise<string[] | undefined>;
|
|
87
|
+
getSetCookieStrings(url: string, options: GetCookiesOptions, callback?: Callback<string[] | undefined>): unknown;
|
|
88
|
+
getSetCookieStringsSync(url: string, options?: GetCookiesOptions): string[];
|
|
89
|
+
serialize(callback: Callback<SerializedCookieJar>): void;
|
|
90
|
+
serialize(): Promise<SerializedCookieJar>;
|
|
91
|
+
serializeSync(): SerializedCookieJar | undefined;
|
|
92
|
+
toJSON(): ReturnType<TouchCookieJar["toJSON"]>;
|
|
93
|
+
private toPublicSerializedJar;
|
|
94
|
+
private toStoredCookie;
|
|
95
|
+
private toPublicCookies;
|
|
96
|
+
private toPublicCookie;
|
|
97
|
+
private toStoredCookieKey;
|
|
98
|
+
private toPublicCookieKey;
|
|
99
|
+
private cookiesToCookieString;
|
|
100
|
+
private cookiesToSetCookieStrings;
|
|
69
101
|
/**
|
|
70
102
|
* Get all cookies from the cookie jar.
|
|
71
103
|
*
|
|
@@ -3336,6 +3368,9 @@ declare class RezoHeaders extends Headers {
|
|
|
3336
3368
|
* Used by stealth adapters to match browser header ordering.
|
|
3337
3369
|
*/
|
|
3338
3370
|
toOrderedObject(order: string[]): Record<string, string | string[]>;
|
|
3371
|
+
toJSON(): Record<string, string> & {
|
|
3372
|
+
"set-cookie"?: string[];
|
|
3373
|
+
};
|
|
3339
3374
|
toObject(omit?: Array<keyof RezoHttpHeaders> | keyof RezoHttpHeaders): Record<string, string | string[]>;
|
|
3340
3375
|
toString(): string;
|
|
3341
3376
|
set(name: keyof RezoHttpHeaders, value: string): void;
|
|
@@ -7074,34 +7109,36 @@ export interface RezoRequestConfig<D = any> {
|
|
|
7074
7109
|
* TLS negotiation for HTTPS).
|
|
7075
7110
|
*
|
|
7076
7111
|
* **Behavior:**
|
|
7077
|
-
* - `
|
|
7078
|
-
*
|
|
7112
|
+
* - `true` (default) - Connections are pooled and reused across requests to the
|
|
7113
|
+
* same host. Idle pooled sockets are closed after ~5 seconds.
|
|
7114
|
+
* - `false` - A fresh connection is opened for every request and closed after
|
|
7115
|
+
* the response. No pooling, no reuse.
|
|
7079
7116
|
*
|
|
7080
|
-
* **When to
|
|
7117
|
+
* **When to keep the default (`keepAlive: true`):**
|
|
7081
7118
|
* - Making multiple requests to the same host in sequence
|
|
7082
7119
|
* - Long-running applications (servers, bots, scrapers)
|
|
7083
7120
|
* - Performance-critical applications where connection overhead matters
|
|
7084
7121
|
*
|
|
7085
|
-
* **When to use `keepAlive: false
|
|
7086
|
-
* -
|
|
7087
|
-
* -
|
|
7088
|
-
* -
|
|
7122
|
+
* **When to use `keepAlive: false`:**
|
|
7123
|
+
* - Hosts that reset reused connections aggressively
|
|
7124
|
+
* - Debugging connection-level issues (isolates every request)
|
|
7125
|
+
* - One-off requests where connection reuse buys nothing
|
|
7089
7126
|
*
|
|
7090
7127
|
* @example
|
|
7091
7128
|
* ```typescript
|
|
7092
|
-
* // Default:
|
|
7129
|
+
* // Default: pooled keep-alive connections
|
|
7093
7130
|
* const { data } = await rezo.get('https://api.example.com/data');
|
|
7094
7131
|
*
|
|
7095
|
-
* //
|
|
7096
|
-
* const client =
|
|
7132
|
+
* // Fresh connection per request for this instance
|
|
7133
|
+
* const client = rezo.create({ keepAlive: false });
|
|
7097
7134
|
* await client.get('https://api.example.com/users');
|
|
7098
|
-
* await client.get('https://api.example.com/posts'); //
|
|
7135
|
+
* await client.get('https://api.example.com/posts'); // New connection again
|
|
7099
7136
|
*
|
|
7100
|
-
* //
|
|
7101
|
-
*
|
|
7137
|
+
* // Or per request
|
|
7138
|
+
* await rezo.get('https://api.example.com/data', { keepAlive: false });
|
|
7102
7139
|
* ```
|
|
7103
7140
|
*
|
|
7104
|
-
* @default
|
|
7141
|
+
* @default true
|
|
7105
7142
|
*/
|
|
7106
7143
|
keepAlive?: boolean;
|
|
7107
7144
|
/**
|
|
@@ -7523,9 +7560,9 @@ export interface httpAdapterOverloads {
|
|
|
7523
7560
|
request(options: RezoRequestOptions & {
|
|
7524
7561
|
responseType: "blob";
|
|
7525
7562
|
}): Promise<RezoResponse<Blob>>;
|
|
7526
|
-
request(options: RezoRequestOptions & {
|
|
7563
|
+
request<T extends string = string>(options: RezoRequestOptions & {
|
|
7527
7564
|
responseType: "text";
|
|
7528
|
-
}): Promise<RezoResponse<
|
|
7565
|
+
}): Promise<RezoResponse<T>>;
|
|
7529
7566
|
request(options: RezoRequestOptions & {
|
|
7530
7567
|
responseType: "download";
|
|
7531
7568
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -7555,9 +7592,9 @@ export interface httpAdapterOverloads {
|
|
|
7555
7592
|
get(url: string | URL, options: RezoHttpGetRequest & {
|
|
7556
7593
|
responseType: "blob";
|
|
7557
7594
|
}): Promise<RezoResponse<Blob>>;
|
|
7558
|
-
get(url: string | URL, options: RezoHttpGetRequest & {
|
|
7595
|
+
get<T extends string = string>(url: string | URL, options: RezoHttpGetRequest & {
|
|
7559
7596
|
responseType: "text";
|
|
7560
|
-
}): Promise<RezoResponse<
|
|
7597
|
+
}): Promise<RezoResponse<T>>;
|
|
7561
7598
|
get(url: string | URL, options: RezoHttpGetRequest & {
|
|
7562
7599
|
responseType: "download";
|
|
7563
7600
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -7589,9 +7626,9 @@ export interface httpAdapterOverloads {
|
|
|
7589
7626
|
delete(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
7590
7627
|
responseType: "blob";
|
|
7591
7628
|
}): Promise<RezoResponse<Blob>>;
|
|
7592
|
-
delete(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
7629
|
+
delete<T extends string = string>(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
7593
7630
|
responseType: "text";
|
|
7594
|
-
}): Promise<RezoResponse<
|
|
7631
|
+
}): Promise<RezoResponse<T>>;
|
|
7595
7632
|
delete(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
7596
7633
|
responseType: "download";
|
|
7597
7634
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -7678,9 +7715,9 @@ export interface httpAdapterPostOverloads {
|
|
|
7678
7715
|
post(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
7679
7716
|
responseType: "blob";
|
|
7680
7717
|
}): Promise<RezoResponse<Blob>>;
|
|
7681
|
-
post(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
7718
|
+
post<T extends string = string>(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
7682
7719
|
responseType: "text";
|
|
7683
|
-
}): Promise<RezoResponse<
|
|
7720
|
+
}): Promise<RezoResponse<T>>;
|
|
7684
7721
|
post(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
7685
7722
|
responseType: "download";
|
|
7686
7723
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -7708,15 +7745,15 @@ export interface httpAdapterPostOverloads {
|
|
|
7708
7745
|
postJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7709
7746
|
responseType: "auto" | "json";
|
|
7710
7747
|
}): Promise<RezoResponse<T>>;
|
|
7711
|
-
postJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
|
|
7748
|
+
postJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
|
|
7712
7749
|
responseType: "text";
|
|
7713
|
-
}): Promise<RezoResponse<
|
|
7714
|
-
postJson(url: string | URL, jsonString: string, options: RezoHttpPostRequest & {
|
|
7750
|
+
}): Promise<RezoResponse<T>>;
|
|
7751
|
+
postJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPostRequest & {
|
|
7715
7752
|
responseType: "text";
|
|
7716
|
-
}): Promise<RezoResponse<
|
|
7717
|
-
postJson(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7753
|
+
}): Promise<RezoResponse<T>>;
|
|
7754
|
+
postJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7718
7755
|
responseType: "text";
|
|
7719
|
-
}): Promise<RezoResponse<
|
|
7756
|
+
}): Promise<RezoResponse<T>>;
|
|
7720
7757
|
postJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
|
|
7721
7758
|
responseType: "arrayBuffer";
|
|
7722
7759
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -7768,15 +7805,15 @@ export interface httpAdapterPostOverloads {
|
|
|
7768
7805
|
postForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7769
7806
|
responseType: "auto" | "json";
|
|
7770
7807
|
}): Promise<RezoResponse<T>>;
|
|
7771
|
-
postForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
|
|
7808
|
+
postForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
|
|
7772
7809
|
responseType: "text";
|
|
7773
|
-
}): Promise<RezoResponse<
|
|
7774
|
-
postForm(url: string | URL, string: string, options: RezoHttpPostRequest & {
|
|
7810
|
+
}): Promise<RezoResponse<T>>;
|
|
7811
|
+
postForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPostRequest & {
|
|
7775
7812
|
responseType: "text";
|
|
7776
|
-
}): Promise<RezoResponse<
|
|
7777
|
-
postForm(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7813
|
+
}): Promise<RezoResponse<T>>;
|
|
7814
|
+
postForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7778
7815
|
responseType: "text";
|
|
7779
|
-
}): Promise<RezoResponse<
|
|
7816
|
+
}): Promise<RezoResponse<T>>;
|
|
7780
7817
|
postForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
|
|
7781
7818
|
responseType: "arrayBuffer";
|
|
7782
7819
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -7837,15 +7874,15 @@ export interface httpAdapterPostOverloads {
|
|
|
7837
7874
|
postMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
|
|
7838
7875
|
responseType: "json";
|
|
7839
7876
|
}): Promise<RezoResponse<T>>;
|
|
7840
|
-
postMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
|
|
7877
|
+
postMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
|
|
7841
7878
|
responseType: "text";
|
|
7842
|
-
}): Promise<RezoResponse<
|
|
7843
|
-
postMultipart(url: string | URL, formData: FormData, options: RezoHttpPostRequest & {
|
|
7879
|
+
}): Promise<RezoResponse<T>>;
|
|
7880
|
+
postMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPostRequest & {
|
|
7844
7881
|
responseType: "text";
|
|
7845
|
-
}): Promise<RezoResponse<
|
|
7846
|
-
postMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
|
|
7882
|
+
}): Promise<RezoResponse<T>>;
|
|
7883
|
+
postMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
|
|
7847
7884
|
responseType: "text";
|
|
7848
|
-
}): Promise<RezoResponse<
|
|
7885
|
+
}): Promise<RezoResponse<T>>;
|
|
7849
7886
|
postMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
|
|
7850
7887
|
responseType: "stream";
|
|
7851
7888
|
}): Promise<RezoStreamResponse>;
|
|
@@ -7901,9 +7938,9 @@ export interface httpAdapterPatchOverloads {
|
|
|
7901
7938
|
patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
7902
7939
|
responseType: "blob";
|
|
7903
7940
|
}): Promise<RezoResponse<Blob>>;
|
|
7904
|
-
patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
7941
|
+
patch<T extends string = string>(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
7905
7942
|
responseType: "text";
|
|
7906
|
-
}): Promise<RezoResponse<
|
|
7943
|
+
}): Promise<RezoResponse<T>>;
|
|
7907
7944
|
patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
7908
7945
|
responseType: "download";
|
|
7909
7946
|
}): RezoDownloadResponse;
|
|
@@ -7931,15 +7968,15 @@ export interface httpAdapterPatchOverloads {
|
|
|
7931
7968
|
patchJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
7932
7969
|
responseType: "auto" | "json";
|
|
7933
7970
|
}): Promise<RezoResponse<T>>;
|
|
7934
|
-
patchJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
|
|
7971
|
+
patchJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
|
|
7935
7972
|
responseType: "text";
|
|
7936
|
-
}): Promise<RezoResponse<
|
|
7937
|
-
patchJson(url: string | URL, jsonString: string, options: RezoHttpPatchRequest & {
|
|
7973
|
+
}): Promise<RezoResponse<T>>;
|
|
7974
|
+
patchJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPatchRequest & {
|
|
7938
7975
|
responseType: "text";
|
|
7939
|
-
}): Promise<RezoResponse<
|
|
7940
|
-
patchJson(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
7976
|
+
}): Promise<RezoResponse<T>>;
|
|
7977
|
+
patchJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
7941
7978
|
responseType: "text";
|
|
7942
|
-
}): Promise<RezoResponse<
|
|
7979
|
+
}): Promise<RezoResponse<T>>;
|
|
7943
7980
|
patchJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
|
|
7944
7981
|
responseType: "arrayBuffer";
|
|
7945
7982
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -8000,15 +8037,15 @@ export interface httpAdapterPatchOverloads {
|
|
|
8000
8037
|
patchForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
8001
8038
|
responseType: "auto" | "json";
|
|
8002
8039
|
}): Promise<RezoResponse<T>>;
|
|
8003
|
-
patchForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
|
|
8040
|
+
patchForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
|
|
8004
8041
|
responseType: "text";
|
|
8005
|
-
}): Promise<RezoResponse<
|
|
8006
|
-
patchForm(url: string | URL, string: string, options: RezoHttpPatchRequest & {
|
|
8042
|
+
}): Promise<RezoResponse<T>>;
|
|
8043
|
+
patchForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPatchRequest & {
|
|
8007
8044
|
responseType: "text";
|
|
8008
|
-
}): Promise<RezoResponse<
|
|
8009
|
-
patchForm(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
8045
|
+
}): Promise<RezoResponse<T>>;
|
|
8046
|
+
patchForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
8010
8047
|
responseType: "text";
|
|
8011
|
-
}): Promise<RezoResponse<
|
|
8048
|
+
}): Promise<RezoResponse<T>>;
|
|
8012
8049
|
patchForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
|
|
8013
8050
|
responseType: "arrayBuffer";
|
|
8014
8051
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -8069,15 +8106,15 @@ export interface httpAdapterPatchOverloads {
|
|
|
8069
8106
|
patchMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
|
|
8070
8107
|
responseType: "auto" | "json";
|
|
8071
8108
|
}): Promise<RezoResponse<T>>;
|
|
8072
|
-
patchMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
|
|
8109
|
+
patchMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
|
|
8073
8110
|
responseType: "text";
|
|
8074
|
-
}): Promise<RezoResponse<
|
|
8075
|
-
patchMultipart(url: string | URL, formData: FormData, options: RezoHttpPatchRequest & {
|
|
8111
|
+
}): Promise<RezoResponse<T>>;
|
|
8112
|
+
patchMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPatchRequest & {
|
|
8076
8113
|
responseType: "text";
|
|
8077
|
-
}): Promise<RezoResponse<
|
|
8078
|
-
patchMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
|
|
8114
|
+
}): Promise<RezoResponse<T>>;
|
|
8115
|
+
patchMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
|
|
8079
8116
|
responseType: "text";
|
|
8080
|
-
}): Promise<RezoResponse<
|
|
8117
|
+
}): Promise<RezoResponse<T>>;
|
|
8081
8118
|
patchMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
|
|
8082
8119
|
responseType: "stream";
|
|
8083
8120
|
}): RezoStreamResponse;
|
|
@@ -8142,9 +8179,9 @@ export interface httpAdapterPutOverloads {
|
|
|
8142
8179
|
put(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
8143
8180
|
responseType: "blob";
|
|
8144
8181
|
}): Promise<RezoResponse<Blob>>;
|
|
8145
|
-
put(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
8182
|
+
put<T extends string = string>(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
8146
8183
|
responseType: "text";
|
|
8147
|
-
}): Promise<RezoResponse<
|
|
8184
|
+
}): Promise<RezoResponse<T>>;
|
|
8148
8185
|
put(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
8149
8186
|
responseType: "download";
|
|
8150
8187
|
}): RezoDownloadResponse;
|
|
@@ -8172,15 +8209,15 @@ export interface httpAdapterPutOverloads {
|
|
|
8172
8209
|
putJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
8173
8210
|
responseType: "auto" | "json";
|
|
8174
8211
|
}): Promise<RezoResponse<T>>;
|
|
8175
|
-
putJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
|
|
8212
|
+
putJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
|
|
8176
8213
|
responseType: "text";
|
|
8177
|
-
}): Promise<RezoResponse<
|
|
8178
|
-
putJson(url: string | URL, jsonString: string, options: RezoHttpPutRequest & {
|
|
8214
|
+
}): Promise<RezoResponse<T>>;
|
|
8215
|
+
putJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPutRequest & {
|
|
8179
8216
|
responseType: "text";
|
|
8180
|
-
}): Promise<RezoResponse<
|
|
8181
|
-
putJson(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
8217
|
+
}): Promise<RezoResponse<T>>;
|
|
8218
|
+
putJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
8182
8219
|
responseType: "text";
|
|
8183
|
-
}): Promise<RezoResponse<
|
|
8220
|
+
}): Promise<RezoResponse<T>>;
|
|
8184
8221
|
putJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
|
|
8185
8222
|
responseType: "arrayBuffer";
|
|
8186
8223
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -8241,15 +8278,15 @@ export interface httpAdapterPutOverloads {
|
|
|
8241
8278
|
putForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
8242
8279
|
responseType: "auto" | "json";
|
|
8243
8280
|
}): Promise<RezoResponse<T>>;
|
|
8244
|
-
putForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
|
|
8281
|
+
putForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
|
|
8245
8282
|
responseType: "text";
|
|
8246
|
-
}): Promise<RezoResponse<
|
|
8247
|
-
putForm(url: string | URL, string: string, options: RezoHttpPutRequest & {
|
|
8283
|
+
}): Promise<RezoResponse<T>>;
|
|
8284
|
+
putForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPutRequest & {
|
|
8248
8285
|
responseType: "text";
|
|
8249
|
-
}): Promise<RezoResponse<
|
|
8250
|
-
putForm(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
8286
|
+
}): Promise<RezoResponse<T>>;
|
|
8287
|
+
putForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
8251
8288
|
responseType: "text";
|
|
8252
|
-
}): Promise<RezoResponse<
|
|
8289
|
+
}): Promise<RezoResponse<T>>;
|
|
8253
8290
|
putForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
|
|
8254
8291
|
responseType: "arrayBuffer";
|
|
8255
8292
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -8310,15 +8347,15 @@ export interface httpAdapterPutOverloads {
|
|
|
8310
8347
|
putMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
|
|
8311
8348
|
responseType: "auto" | "json";
|
|
8312
8349
|
}): Promise<RezoResponse<T>>;
|
|
8313
|
-
putMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
|
|
8350
|
+
putMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
|
|
8314
8351
|
responseType: "text";
|
|
8315
|
-
}): Promise<RezoResponse<
|
|
8316
|
-
putMultipart(url: string | URL, formData: FormData, options: RezoHttpPutRequest & {
|
|
8352
|
+
}): Promise<RezoResponse<T>>;
|
|
8353
|
+
putMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPutRequest & {
|
|
8317
8354
|
responseType: "text";
|
|
8318
|
-
}): Promise<RezoResponse<
|
|
8319
|
-
putMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
|
|
8355
|
+
}): Promise<RezoResponse<T>>;
|
|
8356
|
+
putMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
|
|
8320
8357
|
responseType: "text";
|
|
8321
|
-
}): Promise<RezoResponse<
|
|
8358
|
+
}): Promise<RezoResponse<T>>;
|
|
8322
8359
|
putMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
|
|
8323
8360
|
responseType: "stream";
|
|
8324
8361
|
}): RezoStreamResponse;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rezo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.138",
|
|
4
4
|
"description": "Lightning-fast, enterprise-grade HTTP client for modern JavaScript. Full HTTP/2 support, intelligent cookie management, multiple adapters (HTTP, Fetch, cURL, XHR), streaming, proxy support (HTTP/HTTPS/SOCKS), and cross-environment compatibility.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|